State Channels and Mike Ryan’s Chess Project
While part one in this series explained the theory behind MakerDAO, POA Network, and their native assets, this section will take a more hands-on approach, explaining state channels and their practical usage.
Firstly, it is important to understand the difference between a state channel and a sidechain. While both state channels and sidechains have the same end-goal of scalability, they each take very different approaches.
As the name implies, a sidechain is a blockchain that operates alongside another (called the main chain) and is connected via two (or more) smart contracts (with at least one on each chain). These smart contracts lock up assets on one blockchain and issue them on the other, allowing them to pass back and forth between chains so as to make use of each’s features as desired.
Note that sidechains frequently use different consensus algorithms than their main chains in order to increase transaction throughput and that their security and immutability are separate and distinct to the that of the main chains.
Much like sidechains, state channels require that a quantity of on-chain assets be locked up; unlike in a state channel, the assets are not then issued on a separate blockchain. Once on-chain assets are locked, the involved parties may then transact among themselves by signing transactions that can be submitted to the blockchain at a later date. As each new transaction has a nonce — the same way transactions on a blockchain have a nonce — state channel transactions have a provable topology which can be reconciled with the blockchain at a later time agreed upon by both parties.
By moving transactions off a blockchain and processing them in bulk at a later stage, significant improvements are made in both speed (as transactions are not limited by block time) and cost (as only two on-chain transactions need to occur for a state channel to be opened and closed).
It is important to note that the same cryptographic proofs that secure a blockchain also apply to state channels so—while open state channel transactions lack proof of work or any other consensus algorithm—the security of their transactions are comparable to that of an on-chain transaction.