What is Polkadot and how does it work?

jun 25

How do you make a network that can process a lot of transactions quickly and cheaply, while remaining secure and decentralized? Most new blockchains try to solve this trilemma but only a few offer a fresh perspective. One such project is a blockchain of blockchains - Polkadot.

Polkadot was founded by Gavin Wood - former Ethereum CTO and creator of the Solidity programming language, who decided to solve problems faced by Ethereum in Polkadot - the world's first layer-zero blockchain that can connect layer-one blockchains to itself.

At the core of Polkadot beats its heart - Relay Chain. The Relay Chain is a Nominated Proof-of-Stake blockchain with validators who stake Polkadot's native DOT tokens, produce new blocks, and secure the network by staking their DOT tokens. Also there are nominators who, in exchange for some of the validators' rewards, stake their DOT to support one or more of them.

However, the Relay Chain is very limited in its functionality. Its tasks are bounded by making the Nominated Proof-of-Stake consensus work, supporting the Polkadot decentralized governance mechanism, and validating parachains, which will be explained next. The Relay Chain, for example, does not support smart contracts. Hence the name - layer 0 - it is just the basis for everything else Polkadot is willing to offer.

Smart contracts, dapps, possibility to create and transfer assets - Polkadot delivers all this through parallelized chains or parachains that are connected to the Relay Chain. These layer-1 blockchains produce blocks - a batch of state transitions that progress to a new state, but they do not have their own validators to verify those blocks for correctness.

Instead, nodes of parahcains, called collators, execute transactions and collect the states of the blocks to submit them to the Relay Chain validators. Validators check the validity of the parachain blocks and may reject them in case they see fraud.

Thus, the Relay Chain collects states from parachains and makes them into what is called a 'state of states' - the overall status of the system. If you're familiar with the concept of sharding, you can safely say that parachains are Polkadot's shards, as one set of validators is responsible for a specific parachain. This workload-sharing approach is called horizontal scaling and is designed to relieve validators from having to verify all transactions on the blockchain.

Like almost any network, parachains have their own tokens, their economy, their community and system of government. And even though each parachain is autonomous, it can communicate with other parachains, and all together they form one big network.

Parachains communicate by sending each other not only tokens but also data, which means that one parachain can easily use some of the functions of another, and vice versa. Parachains can also have layers 2 built on top of them.

Polkadot's parachains can also function as bridges, connecting the ecosystem to external blockchains like Ethereum or Bitcoin. The system takes external networks connected by bridges as parachains.

In total, Polkadot offers no more than 100 parachains, which can be added by participating in a dedicated parachain slot auction that gives them the right to lease a parachain slot for up to two years. To lease a parachain one is also required to lock a certain amount of DOT for the whole period of the parachain lease.

However, leasing parachain is not the only option to become a part of the Polkadot ecosystem, as there are also parathreads. Technically, they are the same as parachains, but differ from the latter by the economic model.

Parathreads use a pay-as-you-go model and pay for each block to be validated by the Relay Chain. That is, during times of high network congestion, parathreads can become quite expensive to use, and during times of low activity, the fees on them are low. The Polkadot network can hold up to 10,000 parathreads.

This is how Polkadot solved the scalability problem that Ethereum is still struggling with. To further ensure their security, Polkadot has resorted to an even more unusual solution - a stand-alone blockchain called Kusama.

Kusama and Polkadot share the same architecture, but Kusama has lower slashing penalties for validators, a lower entry barrier for parachains along with latest technology implemented there first, making it a perfect place to test out protocols and conduct bold experiments.

For example, many Polkadot parachains have their counterparts on Kusama, and applications that want to run on Polkadot must first run for a while on Kusama to test their viability and security.

It should be noted, however, that Kusama is an independent blockchain, and not a testnet. It uses real stakes with native KSM tokens to secure it and is expected to grow and follow its own development path over time.

The team that created Polkadot also came up with a blockchain-building framework called Substrate. In other words, Substrate is a development kit for building blockchains. It is considered one of the simplest and most advanced.

The Polkadot network itself was built using Substrate, but to build parachains using substrate is not at all a prerequisite. And vice versa - blockchains built with substrate can exist on their own, without connecting to Polkadot or Kusama.

More video explainers:

Latest News