A question that we get asked frequently — Which scaling approach does Matic Network follow & how is it different from other projects & approaches?
There are a lot of scaling solutions currently in the blockchain ecosystem. Multiple approaches, on Layer 1 (On-chain) and Layer 2 (Off-Chain) are being experimented with, to achieve the end goal of faster and cheaper transactions at scale.
This has led to a notion in the larger community that all of these solutions are competing with each other and scaling Ethereum will end up as a winner takes all. We feel this is gravely misleading and instead believe that some approaches being developed will be used in tandem to scale Ethereum and even other blockchains.
This article will shed light on the different approaches adopted by projects for scaling. We will compare Matic Network with other L2 projects and subsequently explain how we differ as compared to them.
We will cover this in the following sections:
1) Understanding project classification using their adopted approach
2) Compare Matic with other scaling projects to highlight the differences
We first classify the various approaches and then systematically break down each one to understand it better. The focus in this article is on Ethereum scaling, although we might draw parallels with other chains to ease explanations.
Understanding project classification using their adopted approach
Ethereum currently cannot support any DApps with meaningful transaction volume due to scaling constraints that lead to long waiting times and high fees. Scaling approaches can be classified under two major verticals:
Layer 1 approach or On-Chain scaling: Termed as an on-chain scaling due to the fact that it keeps all transactions on the base Ethereum chain and the approach aims to increase the throughput of the base chain itself.
Layer 2 approach or Off-Chain solutions: Defined as off-chain solutions as they take transactions and computations off the Ethereum base chain using various approaches which will be covered later in the document.
Layer 1: On Chain scaling
Sharding is the mainstay of layer 1 scaling efforts of Ethereum.
Ethereum 2.0 / Serenity has plans to incorporate sharding in the base chain to increase the throughput of the Ethereum. So what exactly does sharding do?
Raul Jordan from Prysmatic labs sums it up succinctly:
“ A smarter approach is the idea of blockchain sharding, where we split the entire state of the network into a bunch of partitions called shards that contain their own independent piece of state and transaction history. In this system, certain nodes would process transactions only for certain shards, allowing the throughput of transactions processed in total across all shards to be much higher than having a single shard do all the work as the mainchain does now.”
Simply put all nodes on the network will not be verifying all transactions on the blockchain. The chain will be divided into parts called shards with dedicated nodes of their own. These nodes can process transactions for their own shard. This makes parallel computation possible and thereby increases the throughput of the whole blockchain. Sharding is a popular database management technique now being applied to blockchains along with consensus mechanisms.
Although Sharding itself will not be able to provide the throughput to run a truly global DApp. Sharding, therefore, will work in conjunction with the other layer 2 scaling solutions to help scale Ethereum and realize its vision of not just being a payments network but a decentralized world computer.
As Vitalik has previously said in an interview:
“The reason I think layer 1 and layer 2 are complementary is because ultimately, if you look at the math, the scalability gains from the layer 1 improvements and layer 2 improvements do ultimately multiply with each other. If you have a Sharding solution, the Sharding solution itself might increase the scalability of Ethereum by a factor of 100, or eventually even more. But then, if you do Plasma on top of the scalability solution, then what that means is, you’re not just doing 100 times of the amount of activity but you are doing 100 times the amount of entrances, the amount of exits, and dispute resolutions”
Thus higher the throughput of the base chain the better it is for all L2 solutions.
Layer 2: Off-chain Scaling
Layer 2 or off chain scaling solutions are broadly divided into the following buckets:
1) State Channels
2) Sidechains/Plasma Architecture
3) Other approaches — Truebit.
State Channels on Ethereum can be imagined along the lines of Lightning Network payment channels on Bitcoin, but on Ethereum, they are intended not just to handle transactions but also aim to handle ‘State’ changes in order to process smart contract computations.
Counterfactual by L4 ventures, Raiden Network, Celer network are some of the projects which are developing and leading research on state channels on Ethereum.
We believe Raiden Network is mainly focused on payment channels on Ethereum but will be exploring state channel research in the future.
As Josh Stark of L4, which is developing Counterfactual states in this article:
“This means that we will likely build state channels on Plasma child-chains. For example, in an application where two users are exchanging a series of small transactions. Building a state channel at the child-chain level should be cheaper and faster than performing each of those transactions on the child-chain directly.”
We hope this helps to clarify the popularly held notion that sidechain based L2 solutions are competing with L2 state channels.
Instead, they can work and be used in conjunction and on top of these L2 Solutions.
We at Matic are already exploring these possibilities, as we believe scaling will not just be brought about by a single team/project but instead, it will be a multi-pronged approach brought to fruition by teams uniting their efforts.
Also, we have been in touch with the team at Celer and are exploring ways to help integrate Matic sidechains with Celer’s C channels to boost throughput.
Now that we have given a brief overview of the state channel approach we will compare Matic with the projects adopting this approach in detail.
Both Matic Network (L2) and Celer Network (L2) are different solutions to the same problem — low transaction throughput in current blockchains. Both utilize off-chain scaling techniques and rely on the main chain for final security; however the fundamental difference is in the approach— Matic Network is based on a set of sidechain(s) backed by Proof-of-Stake consensus, whereas Celer Network is a state-channel based solution. Both projects aim for generalized state transitions off-chain but in vastly different ways.
Matic Network is aiming to build a DApp developer ecosystem. Since it uses an account-based sidechain with plasma security guarantees and also employs an EVM-compatible runtime known as the Matic VM, it will relatively be easier for Ethereum based DApps to migrate to Matic Network once it is live. So in this respect as well, Celer Network is different in terms of developer experience.
As highlighted above these solutions can potentially be used together to achieve scaling.
For enabling payments, Raiden Network can be a competitor to Matic.
Raiden has implemented a system similar to Lightning Network on Ethereum. However, we believe that the issue of liquidity on the hubs is a big issue with this design. This issue gets further amplified for Raiden as Lightning network has only one asset (Bitcoin) for hubs to maintain liquidity, while on Ehtereum, Raiden Network would need to maintain liquidity for the countless number of assets (Ether and the many ERC20 Tokens)
We believe that Matic Network has an edge in terms of usability because, in Raiden, both sender and receiver have to create their payment channels, this may prove cumbersome for users. While with Matic’s architecture, there is no requirement to open channels and the users only need to have a valid Ethereum address to receive tokens. This is also in line with our long-term vision of improving the user experience for decentralized applications.
Plasma / Sidechain approach involves deploying sidechains/child-chains on top of the base Ethereum chain and thus taking a major part of the computations off-chain. These sidechains have security properties guaranteed by the Ethereum base chain.
The user can deposit funds on the child-chain/sidechain, perform as many transactions as needed and then exit to the main chain. The sidechain architecture ensures faster transactions which are powered by the sidechain’s choice of consensus and are eventually settled on the main chain.
Matic belongs to this category of scaling solutions. Briefly put, Matic Network is an L2 scaling solution based on an adapted plasma framework, it uses sidechains based on a PoS consensus to achieve scale. Read more on Matic Network here.
Loom Network, Skale labs, Liquidity Network are some of the other projects working on scaling using a similar approach.
Now that we have given a brief overview of the sidechain approach, as promised we will highlight some of the major differentiating factors for us as compared to the other projects
For simplicity, let us break this down in two parts: Business and Technical differences.
Loom is heavily concentrating on games, while Matic Network does support gaming applications, but we have a heavy focus on financial transactions (enabling Decentralized finance) and other DApp applications. We would like to point out that although the idea of owning in-game assets and tracked on the blockchain, is a possibility, but not a 100% eventuality. It's still early days and everyone is experimenting on building various infrastructure blocks.
We plan to support full-blown financial service stacks using protocols like 0x, Kyber, Dharma, RCN incorporating stablecoins like DAI, USDC, etc
Different flavors of Plasma
Loom has integrated Plasma Cash, which means there is no fungibility for the assets supported on the sidechains. Everything there is represented as an NFT/ERC721, so payments aren’t natively supported unless you want to barter things around.
Matic chains are based on an account based EVM (inspired by Plasma MoreVP) and support ERC721 in addition to ERC20, along with asset swaps out of the box. This makes Matic the go-to platform for deploying DeFi applications.
Different mechanisms for sidechain-mainchain consensus
Loom is a DPoS based L2 solution whereas Matic sidechains use PoS with periodic checkpointing to the Ethereum mainchain.
These checkpoints are used to batch multiple sidechain blocks which are then shared with the Ethereum mainchain using the PoS layer. By using this architecture in which block production and validation are done separately Matic secures the sidechains in a layered way; while providing confirmation times of ~1sec to the end user and ensuring finality on base Ethereum chain.
On Loom, protocols/DApps have to run their individual chains while that’s not the case for Matic. Matic sidechains are public chains with no need to deploy application-specific chains. Multiple protocols can be hosted on Matic just like on Ethereum making these sidechains an avenue for unstoppable DeFi solutions.
Matic will have multiple chains in the future but all of them will be public chains and developers will be free to deploy any contracts they wish to just as they currently do on Ethereum main chain.
Interchain communication and generalized state proofs will be needed to implement these features and thus are an area of research for us.
Matic has developed the Matic Wallet which will serve as the de-facto wallet for users who interact with Matic sidechains. It has been designed specifically to simplify the user and developer experience of moving funds to and fro from the sidechains, which is currently not possible intuitively while using any mainstream crypto wallet. To ensure mainstream adoption of L2 chains we believe applications such as Matic Wallet and other accompanying infrastructure tools are needed to remove UX friction and make user onboarding for developers a breeze.
Dagger - Matic’s notification engine a product that is a testament of the above thought process. It makes receiving notifications on DApps and on your favourite platform (using a Zapier integration) extremely simple to implement and use for both developers and users.
We are not aware of Loom’s plans to build any wallets catering to the sidechain ecosystem.
POA Network & Go-Chain:
POA uses block producers notarised by Government and Go-Chain relies on institutions across various countries. Such public block producers have a big chance of getting influenced by powerful external agencies and self-interests. Also, sidechain transactions are secured only by sidechain consensus in which the participants are very low in number 3–25 while on Matic Network, all side transactions are secured by multiple mechanisms on the side chain as well as mainchain.
On Matic sidechains, transactions done by Block producers are verified and checkpointed to the mainchain by a highly decentralized checkpointing layer. So if any fraudulent transaction happens on sidechain it can be detected and handled by the checkpointing layer. Even in an extreme and highly unlikely scenario wherein the block producer layer as well as the checkpointing layer both collude, even then Mainchain has fraud proofs on which anyone from the public can come and challenge any transaction that they deem fraudulent on the sidechain. If the challenge is successful, there is a huge economic disincentive/financial punishment to the colluding parties as their stakes are slashed. Also, the public challenger is rewarded with slashed stakes of the fraudulent sidechain actors.
This makes Matic Network sidechains a crypto-economically incentivized side chain network which is highly secure and decentralized.
Matic sidechains have much higher capacity and TPS than that of POA and Go-chain. Especially, when Matic Network can add multiple sidechains each of which can support thousands of transactions.
Truebit is a protocol which instead of increasing throughput of the Ethereum main chain directly, facilitates heavy computations off chain thus taking the computational load off the main chain. It is clear that it can be leveraged both on top of Layer 1 and the other Layer 2 solutions that are discussed above.
Below is a comparison of scaling solution based on the parameters we identified as important from the developer's point of view before they take a call on implementing/choosing any scaling solution. We also consider some Blockchains as our direct competitors, given the fact that they seek to launch new networks offering higher throughput than Ethereum.
We would again like to emphasize that to achieve scaling the ecosystem can have many approaches and some of them will complement each other. Hence, there is ample scope for multiple approaches to co-exist and function together. We at Matic would love to hear and collaborate with other projects working on bringing scale to Ethereum!
Note: Please note that this is an independent assessment and some discrepancy might have crept in despite our best efforts to ensure accuracy. In case you find any discrepancies or issues please do reach out and let us know so we can correct the same. You can mail us on info(at)matic.network or ping me on Twitter.