Casper vs Polkadot
Within this article, we shall do a mini deep dive into the Polkadot 1 blockchain, specifically the sharded architecture and parachains, and conclude with comparisons to the Casper layer 1 blockchain.
We shall argue that with the increased capabilities of bridging between blockchains, the focus should be on developing secure layer 1 chains (potentially with varying characteristics) and then applying bridges between these independent chains. This would then create the building blocks for a future decentralized web without the need for a single controlling blockchain, such as DOT. CSPR provides security through an implementation of CBC and Highway protocols, with the promise of innovative sharding, both a public and private (enterprise) blockchain offering and finally a promise of a gas futures market to ensure that enterprises have a guarantee of future costs. We feel, these are the reason why CSPR will be a dominant layer 1 chain within a future internet of chains, connected via bridging (as opposed to a Parachain implementation).
As we have extensively covered CSPR in our previous articles, we shall focus on first providing insights into DOT before moving to the comparison and concluding with a summary. We recommend first reading our deep-dive of the CSPR token here.
Polkadot was created by Gavin Wood and launched via ICO in Oct 2017. Gavin was one of the original founders and CTO of Ethereum. After building the Ethereum testnet in C++, Gavin then wrote the Ethereum yellow paper in April 2014 (a technical specification of Vitalik’s whitepaper) and later proposed Ethereum’s native programming language, Solidity. Following this, Gavin went on to set up the Web3 foundation and it was in developing and awaiting the release of a new Ethereum specification that would include sharding, that Gavin put together his workings for a heterogeneous multi-chain framework which later formed the basis of the blockchain project ‘Polkdot’.
The aim of Polkdot is to be able to create interoperability between multiple blockchains and therefore create the foundations of a fully decentralized web. This is a separate concept to where previously developers have successfully tried to ‘bridge’ different blockchains, thus allowing two chains to work together.
Polkdot is made up of several blockchains:
- Relay chain – The main blockchain where transactions are finalized
- Parachain – This is the name of each of the secondary blockchains that use the computing resources of the Relay chain to confirm that the transactions are correct
- Bridges – Systems to connect to external blockchains
Parachains can be considered as independent blockchains which are connected together via the Relay chain.
This is the heart of Polkadot and is responsible for the networks shared security, consensus and cross-chain interoperability. All validators of Polkadot are staked on the Relay chain and validate for the relay chain. There is deliberately minimal functionality on the relay chain (smart contracts are not supported), as its used to coordinate the system as a whole. Below are the transaction types:
- Interact with the governance mechanism
- Parachain auctions
- Participating in NPoS (Nominated-Proof-Of-Stake): a variation of the Proof-Of-Stake consensus protocol. This is the process of selecting validators to be allowed to participate in the consensus protocol. There are two main roles which will allow for this (covered below), (1) Validators and (2) Nominators.
There are various roles in the Relay chain:
- Validator – they validate the data in the Parachain blocks. As is the case with any PoS system, validators provide the infrastructure and maintenance for the network. They are responsible for the production of new blocks, the validation of Parachain blocks, guaranteeing finality and ultimately the security of the network. For validators to be able to perform their services for the network, they need to be in the ‘active set’. Validators in the active set take turns in proposing, validating and appending new blocks.
- Nominator – ensure the Relay Chain by selecting trusted validators. Nominators delegate their staked DOT tokens to validators and thus allocate their votes to them. Up to 16 validators can be backed by a nominator.
- Collectors – nodes that store a complete history for each Parachain and aggregate the transaction data of the Parachains in blocks to add them to the Relay Chain.
- Fishermen – monitor the Polkadot network and report bad behaviour to validators.
Any DOT holder can participate as a nominator. A nominator publishes a list of validator candidates that they trust, and allocates an amount of DOT tokens against each. Not all validators on the Poilkadot blockchain are able to carry out validating duties. Only a subset of the total validator set gets elected into the ‘active set’ to carry out the duties of a validator. If some of the candidates elected by a nominator are elected as validators in the ‘active set’, these validators then earn and shares reward payments, or the sanctions, on a per-staked-DOT basis with the nominator. Unlike other PoS protocols, where validators are weighted by stake, in Polkadot each validators given equal voting power the in consensus protocol.
The election process uses a method of proportional representation, and tries to ensures that any pool of nodes is neither over-represented nor under-represented by the elected validators, proportional to their stake.
The fair representation property roughly translates to the rule that any nominator holding at least one n-th of the total stake is guaranteed to have at least one of their trusted validators elected. For example if there is a total staked amount of 40 and a requirement to choose 4 validators, then any nominator holding 10 tokens (40/4) is guaranteed to have at lease one of their nominations selected. If then a nominator gets two or more of its trusted validators elected, their stake is distributed among the elected validators in such a way that the validators’ backings are as balanced as possible. This is iterated until the total number of desired validators are selected. Please see the example below where 4 validators are desired.
Every validator gets the same amount of rewards from the network, and rewards are distributed to nominators proportional to their staked tokens. This means that a delegator can earn higher rewards if they nominate a smaller, less popular validator that has less stake backing them.
Within Polkadot there is support for a number of execution slots. Each can be considered the same as a core on a computer processor. Each execution slot is a slot in the relay chain where a parachain can connect. Any developer, company or individual can create their custom parachain through Substrate, a framework for creating cryptocurrencies and decentralized systems. Once the custom chain connects to the Polkadot network, it becomes interoperable with all other Parachains on the network. We can therefore consider a Parachain as an independent blockchain.
Parachains may have their own economies with their own native tokens they however cannot use other consensus algorithms that provide their own finality. A Parachain must achieve its finality from the Relay chain only. Executing a block finality outside the context of the relay chain is outside the scope of trust that Polkadot provides.
Unlike most layer 1 blockchains, where decentralized applications are created within the bounds set by its blockchain, Polkadot allows developers to create their own independent blockchains. This means that each parachain can have its own parameters such as block times, transaction fees, governance mechanism and mining rewards. Parachains benefit from the Polkadot network’s security, maintained by the Relay Chain, rather than having to rely on their own set of validator nodes. Instead, parachains are maintained by collator nodes that store a full history for each parachain and aggregate parachain transaction data into blocks to be added to the Relay Chain.
Polkadot supports a limited number of parachains, currently estimated to be about 100. As the number of slots is limited, there are specific ways to allocate them (1) Governance granted Parachains (2) Auction granted Parachains (3) Parathreads.
The requirements for running a Polkadot validator node are 64Gb memory with an initial storage amount of up to 160Gb (for the first 6 months, with an expectation of this growing with the size of the chain). Polkadot recommends the use of a VPS but highlights the responsibility of running a node with the threat of severe slashing. There is a also a section detailing the amount of tokens required to likely get selected to becoming a validator within the ‘active set’. It states that the amount is dynamic and can change over time, depending not only on how much stake is being put behind each validator, but also the size of the active set and how many validators are waiting in the pool.
Comparison with CSPR
Before moving onto a direct comparison with CSRP, I wanted to first cover some issues I see in Polkadot:
- The network is limited to 100 Parachains, but for this to be the case they will need approximately 1000 validators. Each validator accepting the risk of slashing and needing to contribute enough DOT tokens to have a chance of getting selected into the active validator set. If each Parachain is considered a separate application (not necessarily even a blockchain), then 100 does not seem like many subsets to be able to create a ‘decentralized web’. Recall that the relay chain does not act as a typical functioning blockcahin and is on there to provide shared security across the Parachains.
- If the total number of validators does indeed hit 1000, then we can expect severe overhead in terms of bandwidth and processing power as the block size grows.
- Although the Parachains can be considered independent, they can only have blocks validated by the relay chain. This will lead to the issue where the security of a potentially independent chain is control by a collection of validators outside of the economic interest of the chain i.e. an independently created Parachain is controlled by the Relay chain. This will firstly lead to issues where it is not possible to create a private Parachain (as for a private chain, you may require amending or correcting previously finalised blocks), and secondly it may lead to censoring of Parachains by the Relay chain.
- Due to the auction process for Parachain slots, which currently can only be guaranteed for 24month, there is a risk of a blockchain losing their slot in the future.
- With regards to bridging to other networks such as ETH or BTC, at present this only seems possible via a Parachain. This will mean that with increased bridges, already limited Parachain slots will be consumed by bridges, thus reducing the number available for independent blockchains or applications
- Network nodes:
- Although DOT has the potential for up to 1000 validator nodes, within each era only a subset are active (those which have been nominated into the active set).
- CSPR at present has 100 validators which are able to run on standard servers as the node only required 32 GB of RAM.
- The key differences here is that there is a larger requirement for node uptime in DOT. This is likely the reason for the aggressive slashing on the network. Within each era, there will be notably fewer validators compared to the population, approving transactions and therefore the impact of downtime is greater.
- DOT is aiming for approximately 1000 validators to be able to support 100 Parachains.
- CSPR is currently running 100 validator nodes across its network, with an option to increase this if needed.
- Polkadot can achieve 1000 tps without Parachains and multithreading. With parallel processing this can reach many multiples higher.
- This compares with CSPR which is currently achieving 2.5k transactions per block (100 WASM deploys per block). With CSPR sharding this can be increased also by many multiples. Read more about general sharding and the CSPR specific research here.
- The security and finality of the CSPR network has been covered in these two articles: CBC and Highway. From the articles its clear that CSPR is a powerful non-statistical method to guarantee security and finality given a threshold of malicious nodes.
- For DOT, the defining difference is the nominated proof of stake (as described earlier)
- DOT implements severe slashing for node time or malicious behaviour
- CSPR implements jail time, without any slashing.
- Enterprise adoption:
- CSPR offers both a public and private (enterprise) chain. Read more about enterprise blockchains here.
- The design of the DOT infrastructure inhibits any possibility for a private chain – specifically due to the fact Parachains are approved via the Relay chain.
- Future Proof:
- Both DOT and CSPR can be upgraded without the need to fork.
Its clear from reviewing the above that DOT and CSPR are very different projects. The reason for this lays within the motivation for the creation of each project. Whereas CSPR is designed to be an ultra secure layer 1 blockchain that can facilitate both public and private side implementation, DOT was created to facilitate the interplay between future blockchains (Parachains). Its therefore not simple to draw comparisons between the two. DOT requires adoption by the building of Parachains, whereas with CSPR, adoption is achieved via the more tradition dapp development. Its is clear however that in terms of a more traditional layer 1 blockchain, CSPR ranks very highly due to its superior security and also private chain offering. With regard to DOT, its unclear if the need for a internet of blockchains is addressed by the project. Limiting the number of Parachains to 100 and with the addition scaling issues and sheer number of validators required to grow this further, seems to inhibit any future growth. Therefore with inhibited future growth, the projects lacks the endless growth opportunities as seen in the internet, which it aims to replicate. Additionally, in attempting to solve for this, it seems that the projects has introduced many issues, which would not be case if they opted for a more tradition approach but instead focused on building an ease of bridging.
With the increased capabilities of bridging between blockchains, surely the focus should be on developing secure layer 1 chains (potentially with varying characteristics) and then applying bridges between these independent chains. This would then create the building blocks for a future decentralized web without the need for a single controlling blockchain, such as DOT. CSPR provides security through an implementation of CBC and Highway protocols, with the promise of innovative sharding, both a public and private (enterprise) blockchain offering and finally a promise of a gas futures market to ensure that enterprises have a guarantee of future costs. We feel, these are the reason why CSPR will be a dominant layer 1 chain within a future internet of chains, connected via bridging (as opposed to a Parachain implementations).
I would like to conclude with stating that both CSPR and DOT can coexist in the future, with CSPR connected to the relay chain via a bridge.
Disclaimer: This article is for the purposes of research and does not constitute financial advice or a recommendation to buy.