What is Sidechains?
Sidechains are Ethereum-compatible, independent blockchains which employ their own consensus models and block parameters to efficiently process transactions. Public EVM Sidechains are designed for interoperability with Ethereum. Contracts are typically portable and assets and data may be transferred cross-chain. Public sidechains are useful in many different contexts including micro-transactions, stable transactions, and application-specific transactions (NFT-based art, DAO voting, community currencies, etc).
How Do Sidechains work?
Layer 2 sidechains are distributed ledgers which operate independently and in a parallel capacity to the Ethereum mainnet. Nodes within a sidechain network are responsible for confirming & processing transactions, writing transactions to blocks, and maintaining consensus across the network. Security is the responsibility of each sidechain; it is not directly inherited from Ethereum. Sidechains often incorporate alternate validator selection and consensus mechanisms to provide faster transaction times.
Security & Consensus
Sidechains are responsible for their own security and consensus processes. This allows for innovation and optimization, with the opportunity for increased transaction throughput and higher speed/lower cost transactions for users. Sidechains use a variety of validator selection methods to achieve these goals while maintaining security. Smaller validator sets are more susceptible to collusion-based attacks, so strong incentives must be in place to encourage honest validation and discourage malicious behavior. Examples include:
Proof-of-Authority: Validators (network nodes responsible for signing transactions and maintaing a consistent ledger) are pre-selected for the protocol. An example is the POA Network. POA uses an Authority Round consensus where selected validators, in this case US Notary Publics with public reputations at stake, take turns signing transactions and sealing blocks. The POA model improves scalability (5 second block times, low transaction fees) while sacrificing a degree of decentralization (validators are pre-selected and the protocol has a limited validator set).
Proof-of-Stake: A set of validators are selected based on the staking amount they commit to the protocol. Nodes which have placed more stake are more likely to be selected as validators. With delegated proof-of-stake, users can add additional staking amounts to a node, serving to increase that node’s likelihood of becoming a validator. An example is the xDai chain, where nodes who commit a higher amount of STAKE (the xDai governance token, staked by both validator candidates and delegators) into the protocol have a higher probability of selection to a dynamic validator set. Once selected, staking incentives promote honest validation.
Ultimately, application-specific transactions may be better suited for sidechain adoption. Examples include DAO voting, small cash transfers, crypto art and NFTs, community currencies, small-cap exchanges, and many other use-cases which may not require the same security guarantees as high-value financial transactions. On a sidechain, transactions can be optimized for speed and cost. After they are processed, they can then be moved and stored on Ethereum through interoperability mechanisms.
The ability to move assets and data between chains is an important aspect of the sidechain environment. Applications use sidechains for fast & inexpensive transactions, but the results of these transactions should be easily transferrable cross-chain. This is sometimes referred to as a two-way peg. Since chains are independent of one another, resources are typically locked on one chain and minted(created) on another. When they are transferred back, they are burned(destroyed) and unlocked.