Detailed Explanation of the Elastic Sidechain Network SKALE: Technical Solutions, Cross-Chain Bridges, and Token Economics
Original Title: "In-Depth Analysis of the Elastic Sidechain Network SKALE: Technical Solutions, Cross-Chain Bridges, and Token Economics"
Original Source: ZKSwap Chinese Community
What is a sidechain? Here we quote Barry Whitehat (the proposer of the Rollup concept) on the definition of sidechains.
Its basic meaning is: a system of a type where a group of validators submits the latest state of a chain to a smart contract (on the main chain), thus advancing the system. These checkpoints (of the latest state) can be used by a bridging contract to support user deposits and withdrawals. Generally, there will also be a leader election process among this group of validators to decide who will create sidechain blocks at a certain time, such as PoA (Proof of Authority) and PoS (Proof of Stake) algorithms [1].
Barry also mentioned that as some Layer 2 scaling solutions mature, it is worth considering how sidechains can better integrate with other solutions. In certain specific scenarios, the characteristics of sidechains can shine.
Currently, mainstream sidechain solutions include: Polygon (formerly Matic Network), xDai Stable Chain, and SKALE Network. This article will outline SKALE's technical solutions, expansion packages, IMA cross-chain bridges, SKALE tokens and governance, as well as the development and investment situation of the SKALE ecosystem.
Introduction to SKALE
The SKALE Network is positioned as an "elastic sidechain network" for Ethereum, capable of supporting thousands of independent blockchains, sidechains, storage chains, and other types of subchains. These blockchains are all connected to the Ethereum mainnet and are fully compatible with the Ethereum ecosystem.
The sidechains in the SKALE Network are operated by a group of virtualized subnodes selected from the network node set. Each sidechain is highly configurable, allowing users to freely choose the specifications, consensus protocols, virtual machines, parent chains, and customized security measures of the sidechain.
The SKALE Network uses Solidity as the programming language for smart contracts, and its operating model is fully compatible with EVM, supporting mainstream Ethereum token standards. It can also connect to the network via web3.js and web3.py, as well as using tools like Truffle and Remix, making it developer-friendly.
Composition of the SKALE Network
Image Source: SKALE Network Whitepaper
The SKALE Network consists of two parts: SKALE nodes and SKALE administrators, where the SKALE administrator is a smart contract deployed on the Ethereum mainnet. The SKALE administrator contract serves as an "entry point," responsible for tasks such as the creation and destruction of nodes, the creation and destruction of elastic sidechains, the rotation of virtual subnodes, and the distribution of SKALE rewards.
Image Source: SKALE Network Whitepaper
Among them, virtual subnodes are participants in the elastic sidechain, responsible for executing SKALE consensus, running SKALE EVM, and facilitating inter-chain communication.
Creation and Destruction of Nodes
Potential nodes must go through the following steps to become nodes in the SKALE Network: (1) First, run the SKALE background program, which evaluates whether the potential node meets the network's hardware requirements; (2) If the evaluation passes, the potential node can submit an application to the SKALE administrator to join the network. The application requires staking a network deposit and providing node metadata such as IP address, port, and public key; (3) After submission, the potential node joins the system and is referred to as a "full node" or "light node" (the difference between the two types of nodes is that a full node provides all resources for a specific elastic sidechain, while a light node participates in multiple elastic sidechains).
Once a node is created, the SKALE Network will assign it a group of peer nodes (currently 24). The peer nodes will regularly review the downtime and latency of that node to determine the rewards distributed to it in each network cycle.
If a node wishes to exit the network, it must first broadcast an exit message to the network and wait for a termination period. After that, the node can retrieve its staked network deposit.
Creation and Destruction of Elastic Sidechains
The customizable "elastic sidechain" is one of SKALE's innovations. "Elastic" means that the blockchain is not fixed; users can choose the configuration of the blockchain according to their needs, selecting node resources of 1/128 (small), 1/16 (medium), or 1/1 (large) and duration options of 3, 6, or 12 months, as well as the network's storage capacity, and pay the corresponding rent using SKALE tokens. (Currently, the cost of resource consumption in the SKALE Network depends on the specifications and lifecycle of the chain and will be dynamically calculated in the future based on current network conditions and system load.)
Once users submit their application to the SKALE administrator, a new elastic sidechain is created.
Image Source: SKALE Network Whitepaper
If the rent paid by the user is exhausted, or if the user deletes their elastic sidechain, the elastic sidechain will be destroyed. Additionally, users can rotate the virtual subnodes of the elastic sidechain to prevent collusion and ensure the decentralization of the elastic sidechain.
Overall, the creation and destruction of SKALE's elastic sidechains are similar to the model of renting cloud servers, where resources are selected on demand and paid for based on usage. Once the rent is exhausted, users can choose to renew or delete the server (i.e., the elastic sidechain). Just as Docker and Kubernetes allow for easily customizable and scalable cloud services, SKALE's vision is to provide decentralized "chain services."
Distribution of SKALE Rewards
At the end of each SKALE network cycle, the SKALE tokens released during that period are equally distributed to all nodes that participated in the network before the start of the cycle.
The number of tokens allocated to each node depends on the average metrics submitted by 16 of its 24 peer nodes (excluding the highest and lowest 4 metrics). Tokens that are not distributed to nodes due to insufficient uptime/latency will flow to the N.O.D.E Foundation.
Elastic Sidechains and the Consensus Process
Elastic sidechains are composed of virtual subnodes in the SKALE Network, which participate in block creation and confirmation through an asynchronous, leaderless, and provably secure protocol. As long as more than 2/3 of the virtual subnodes in the validation set are online, they will continuously create and confirm new blocks on the chain. The consensus process of SKALE is illustrated as follows:
Image Source: SKALE Network Whitepaper
Block Proposal
Virtual subnodes need to follow these principles to create a block proposal: (1) Check their pending transaction queue; (2) If the transaction specifications in the pending queue are less than or equal to MAXBLOCKSIZE, the virtual subnode takes all transactions from it to include in the block proposal; (3) If the transaction specifications in the pending queue are greater than MAXBLOCKSIZE, the virtual subnode takes pending transactions in the order they were received to include in the MAXBLOCKSIZE block proposal; (4) Then, based on the SHA-256 root node, the virtual subnode collects the block proposal by sorting transactions from minimum to maximum value; (5) If the pending queue is empty, the virtual subnode will wait for a BEACON_TIME. If the queue is still empty afterward, it will create a block proposal that does not contain any transactions.
Once a virtual subnode creates a block proposal, it will notify other virtual subnodes according to the data availability protocol. The data availability protocol ensures that information can be transmitted to the vast majority of virtual subnodes.
Consensus and Rounds
Consensus on block proposals uses an asynchronous binary Byzantine agreement protocol (ABBA). Currently, SKALE uses a variant of the ABBA protocol derived from Mostefaoui et al.
After the proposal phase ends, each virtual subnode A that receives proposal P and the vast majority of signatures S will immediately vote on ABBA in a consensus round R. The protocol is as follows:
(1) For each round R, virtual subnodes will execute N instances of ABBA; (2) Each ABBA[i] corresponds to a vote by virtual subnode I on the block proposal; (3) Each ABBA[i] ends the consensus vote with a "yes" or "no"; (4) After all ABBA[i] instances conclude, a voting vector v[i] will be generated, which includes "yes" or "no" for each proposal.
(5) If there is only one "yes" vote, the corresponding block proposal P is submitted to the elastic sidechain; (6) If there are multiple "yes" votes, a pseudo-random number R will be used to randomly select P from the "yes" voting proposals. The selected proposal will index the remainder of R divided by NWIN, where NWIN is the total number of "yes" voting proposals; (7) The random number R is the sum of all COMMON_COIN (a source of randomness) from ABBA; (8) If all votes are "no," an empty block will be submitted to the blockchain. The likelihood of all votes being "no" is very low and decreases as N increases.
Once consensus successfully selects block P on any virtual subnode A, the virtual subnode will execute the following algorithm to determine the proposal and submit it to the blockchain. (1) A will check if it has received the selected proposal P; (2) If A has not received the proposal, it will request its peer virtual subnodes to download it; (3) A will sign a signature fragment S for P and send it to all other virtual subnodes; (4) A will wait to receive signature fragments from the vast majority of virtual subnodes, including its own; (5) Once A receives the majority of signature fragments, it will combine them into a threshold signature; (6) Finally, A submits P along with the threshold signature S to the blockchain.
Additionally, SKALE's containerized structure provides enterprise-level performance and options for dApp developers, aiming to achieve a level of flexibility, configurability, and modularity comparable to centralized systems, offering SKALE management services, node monitoring services, virtual subnode allocation services, and integrating a series of emergency strategies and fault recovery plans to address emergencies such as network attacks and failures.
SKALE Network Expansion
SKALE has developed two expansion packages: file storage and inter-chain communication.
File Storage
Image Source: SKALE Network Blog
The file storage of the SKALE Network relies on its built-in data availability protocol, which ensures that data is stored on at least 2/3 of the virtualized subnodes of each elastic sidechain. fileStorage.js is an npm package that allows users to integrate SKALE FileStorage into their dApps with just a few lines of code. Users can upload, download, and delete files by calling the methods uploadFile, downloadFileIntoBrowser/downloadFileIntoBuffer, and deleteFile.
SKALE Network users can divide files into 1MB "chunks" and submit them to the fileStorage smart contract for continuous storage in each node's file system.
Inter-Chain Communication
Image Source: SKALE Network Whitepaper
The SKALE Network employs BLS (Boneh–Lynn–Shacham) threshold signatures. The BLS signature algorithm is capable of achieving signature aggregation and key aggregation (i.e., aggregating multiple keys into one key and multiple signatures into one signature), which avoids unnecessary communication between signers [2].
Each elastic sidechain in the SKALE Network supports this signature, enabling fast and secure inter-chain communication. This means that an independent elastic sidechain in the SKALE Network can verify the signature of another elastic sidechain and submit blocks, allowing for the execution of smart contracts and the conversion of encrypted assets between elastic sidechains.
IMA Cross-Chain Bridge
Image Source: SKALE Network Blog
In July of this year, SKALE launched the IMA (Interchain Messaging Agent) cross-chain bridge, allowing users to transfer digital assets that support mainstream ERC standards and general message data between Ethereum and any SKALE chain.
If a user needs to transfer assets from Ethereum to the SKALE Network, the IMA cross-chain bridge will deposit the assets on Ethereum into a Deposit Box contract, waiting for confirmation of 10 Ethereum blocks, and then send a transfer request to an agent called the SKALE IMA Agent, which will sequentially call the SKALE TokenManager running in the SKALE Network to handle the transfer on their respective SKALE chains.
If assets need to be transferred from a SKALE chain to Ethereum, the tokens will be burned on the SKALE chain and unlocked on the Ethereum mainnet. If the tokens to be transferred were minted on the SKALE chain, they will be minted on Ethereum as part of the transfer to retain ownership of the tokens.
SKALE Tokens and Governance
SKALE Tokens represent the power to participate in the network as a validating node or as a developer to deploy and rent resources for elastic sidechains over a certain period.
(1) Users rent (computing, storage, bandwidth) resources in the form of elastic sidechains for a predetermined period through a subscription model. (2) Validating nodes stake SKALE tokens in the network and gain the power to operate nodes, earn transaction fees, and receive inflationary tokens.
Generally, SKALE governance adopts a delegated staking model, where stakeholders can directly participate in governance through staking votes or delegate their voting power to other stakeholders.
The default voting model used by SKALE is a simple majority rule. Proposals typically include a voting phase lasting 14 days. SKALE tokens that have been "loyal and formally staked" for over 90 days are eligible to vote on key issues proposed by the SKALE committee.
Ecosystem Development and Investment Situation
SKALE launched the first phase of its mainnet in June last year. In May of this year, after completing the Denali upgrade, the SKALE chain announced the official launch of its upgraded mainnet. This network upgrade introduced multi-chain capabilities to Ethereum and brought a modular architecture to the SKALE Network, allowing it to include native and third-party chain services, including file storage, inter-chain messaging, Oracles, Rollups, and more.
It also introduced high-performance app-specific chains, meaning that each dApp and protocol can run on its own EVM-compatible chain, isolated from other network traffic while inheriting the security of the Ethereum mainnet.
Image Source: SKALE Network Blog
At the end of July this year, SKALE announced the first batch of dApps running on the SKALE mainnet, including: Boot.Finance (decentralized liquidity protocol), Covey (portfolio sharing application), CurioDAO (real asset tokenization platform), Human Protocol (decentralized labor market framework), Ivy (NFT and token trading protocol), and Minds (decentralized social network platform). Additionally, according to SKALE's official news, in addition to the dApps that have already joined the SKALE Innovator program and are building on the platform, SKALE has also established partnerships with over 40 partners and validators.
The SKALE Network is supported by top Validators platforms globally, including 01NODE, Ankr, Anonstake, Audit One, Blockdaemon, Blockware, Chainflow, Chainode, Chorus One, Cypher Core, Dokia Capital, Figment Networks, FreshSkale, Hashed x DELIGHT, Hashquark, Staked, Stakin, StakedWithUs, WolfEdge Capital, and Staking Facilities. Currently, the SKALE Network has 48 validators operating 160 nodes.
In terms of financing, SKALE Labs announced in October 2019 that it had raised a total of $17.1 million in funding, supported by over 40 angel investors and venture capital firms, including Arrington XRP Capital, Blockchange, ConsenSys Labs, Hashed, HashKey, Multicoin Capital, and Recruit Holdings.
Conclusion
Compared to the popular Rollup scaling solutions and sidechain projects like Polygon and xDai, SKALE seems to be somewhat overlooked. As an established project that has been operating since 2017, SKALE has made a series of ecological advancements since the launch of its mainnet after the Denali upgrade, such as launching the first batch of dApps and establishing partnerships with other projects and validator platforms.
With various scaling solutions being implemented, SKALE's years of accumulation provide it with a relatively stable technical advantage, but it still needs to catch up in terms of ecosystem development.