The second approach to building Valhello: add some plasma. Plasma chains are child chains living between "clients", but periodically being synced to the main chain which spawned them. We'll use a popular approach developed by one of the leaders in the field.
Header image by Elvira Akchurina.
A Plasma chain is a separate blockchain, often with its own consensus mechanism (i.e. DPoS or PoA vs. Proof of Work) which periodically synchronizes its information with the main chain whose side it is.
Special nodes that keep this blockchain alive execute transactions on it, but don't tell the main chain about these transactions until a given amount of time has elapsed, or an even has occured. In many ways, plasma chains are like state channels, except they don't require you to enter/exit the chain to submit the master state to the main blockchain - only once you really want to pull the data out or dispute a state on the plasma chain do you actually call the main chain.
A good explanation of a payments-only version of Plasma can be seen in the video below.
The Loom ecosystem comes with all this pre-configured and mature enough for general state transfer (not payments alone), so it should be a really nice use case for Valhello. We'll be using their SDK, about which you can read more here (comes with a proof of concept tutorial that lets you play with their plasma chain).
Loom is a company behind the hugely successful CryptoZombies tutorial, the amazing Zombie Battleground trading carg game, the DelegateCall Q&A platform, and the Plasma implementation driving those. Needless to say, these good folk are innovating on a lot of fronts.
They recently opened up their LoomX SDK so that anyone can try their hand at developing something on their technology.
In a nutshell, Loom lets you create a dappchain for a particular context - ours being Valhello. This lets you execute transactions on this sidechain, thereby ignoring state bloat (the fact that blockchain data can grow to unmaintainable proportions) and transaction fees (the dappchain is yours to command - you decide the rules of the chain), but still allows for asset transfer back to the main chain on Ethereum.
In other words, we can play Valhello on a dappchain, level up characters, fight, achieve victories and epic losses and collect extraordinary items there, and then bring them over to the main chain for some NFT trading. It sounds like a win-win for everyone, but things aren't as clear cut as they may seem.
Image by Elvira Akchurina.
Pros and Cons
The problem with dappchains of this nature is that the consensus mechanism being used is DPoS, which essentially means that you select some delegates to do on-chain voting for you, and you delegate your votes to them. These actors are then "in charge" of the blockchain, but it also means your game's chain:
- relies on them always being there, for if they disappear your game does too
- guarantees incentives for these delegates, because otherwise they have no reason to run the software syncing your blockchain
This is a problem for Valhello for two reasons:
- In the original introduction we stated that our aim is to have Valhello run forever, so that it can even be picked up in 10 or 20 years if the contracts still exist. All one would need is interact with the contract, with or without a UI, and the game would effectively still be there. Unless someone is still running the dappchain nodes, this is not possible with Loom's tech.
- Incentives for node-runners are unclear. At first this hints at the need for some kind of game-native token to build financial incentives into the dappchain, but this doesn't feel right. Maybe the delegates could share the profits from character creation fees, but as those probably won't be overflowing the treasury, it's a question of economics.
One of the biggest advantages here is that running the game on a dappchain makes it possible to create super light clients, meaning the game could be played on mobile devices easily, or in the web browser. If you're interacting with the game through the nodes maintaining the dappchain, you can live without fees or transaction confirmation times, similar to state channels. We would basically get the same real time feeling we get from Zombie Battleground. In fact, the players would never have to be exposed to ether or gas or even any kind of wallet, and that's something to be desired.
Follow the progress and join the discussion on Github.