When introducing Qlear - The Trust Machine for Online Gaming, we often encounter the same two concerns. For one, blockchains are notoriously slow and inefficient computation devices. How could we possibly render entire games on them, let alone cater for the needs of a multi-billion industry and its legion of users? Secondly, blockchains have been specifically designed to reveal secrets, not to hide them. Running games, such as poker for example, on the blockchain, would expose everyone’s move to everyone else, and kill the game before it’s started. Or would it?
In short, our answers to these indeed justified concerns are respectively: Plasma and Multi-Party Computation.
How Secure Multi-Party Computation allows players to process games without revealing their secrets and without trusting a third party has been discussed extensively here. To understand how the Plasma framework allows Qlear to reach industrial throughput and scale, while being rooted on Ethereum we’ll first have to understand side-chains.
At their core, side-chains are mini-blockchains that branch off the main-chain. These mini-chains allow participants to settle transactions quickly and privately amongst themselves, without involving the rest of the network. Once all private transactions are cleared, the side-chain re-merges with the parent chain to report back the results, which then become part of the main blockchain.
If you’ve ever acquired a prepaid punch card at Starbucks, you were party to a real-world analogy to side chains. While buying the card you performed a root transaction which established a private ledger between you and Starbucks. Visa, Mastercard, and the banking system, only know about this specific root transaction: you transferred $20 from your account to Starbucks LTD. Everything that happens afterward is settled privately between you and your favorite caffeine dispensary.
For our beverage sidechain to close, one of two things can happen: You either exhaust your prepaid coffee benefits or you return the half-used card and get a refund. In both cases, the punch card is discarded, and the payment for the amount of coffee you purchased is settled and cleared on the mainchain (which is the banking system, in this example). Even if the punch card counts 100 individual cups of coffee, your bank only knows about two transactions: the one needed to buy the card, and the one settling the refund.
When it comes to blockchains, this is an extremely useful trick. On the main-chain, all participants process all transactions of all other participants. Everything that has ever happened in the network is massively replicated and multiplied by the number of network nodes. This 100% redundancy is what makes blockchains so secure, but it’s also what makes them incredibly slow. Side-chains allow users to escape Ethereum’s perpetual traffic jam, settle their private issues without the whole world and its mother-in-law to be involved, only to rejoin when matters become relevant to everyone else.
However, there’s a catch. Although side chains are much faster than their parent main-chain, they’re also less secure - and for the exact same reason. Fewer participants in the side network, mean faster transaction throughput, but also less computation power securing it. Going back to our Starbucks example: Forging a punch card is much easier than forging a $20 bill, and attempting to do so also entails lesser penalties.
“Plasma” is a coding framework that aims to solve this zero-sum game between speed and security. More than it is a “network” or an application in its own right, Plasma is a mode of coding and a set of guidelines that allow side-chains to be secured by the master network, making the former as secure as the latter.
While using the Plasma framework, side-chains are created as a sort of federated sub-jurisdiction of their parent chain. The side-chain is free to operate under its own rules, but if a dispute between nodes arises, the parent chain acts as a higher level of court, resolving the dispute.
If a side-chain is attacked by one of its participants or an external agent, trying to unlawfully runoff with the funds invested in the side-chain (the $20 deposited to obtain the punch card for that matter), the attacked nodes have enough time to report the crime to the parent chain. The parent chain then re-runs the transaction history of the side chain and decides if the withdrawal attempt is indeed an unauthorized attack.
One notable aspect of Plasma side chains, and which makes the concept especially useful for Qlear’s purpuses, is their ability to infinitely bifurcate and branch off into sub-chains and sub-sub-chains.
This vein-like structure allows the Qlear Protocol to treat each individual game as an independent network which has its specific game rules hardcoded into its code-base. The game, let’s say a poker table, would be subjected to its parent chain, which in this case is the poker room. The poker room would be a side-chain branching from the gaming platform, which brakes from the Qlear parent network, which itself is rooted on Ethereum.
This way, games can run lightning fast, as if supported by a centralized server. Control, however, is never centralized and remains subjected to the distributed trust system, which is eventually supported by the global Ethereum network.
On grounds of this framework, truly remarkable things can be done. Simple games on the blockchain are not a novelty, but fully-fledged, low latency real-time gaming is unheard off. In upcoming blog posts, we’ll explain how Qlear can aid even the most advanced massively multiplayer online role-playing games. So stay tuned here, follow us on Twitter, and join the conversation on Discord.
Warm regards,
The Qlear Team.