No doubt, blockchain is the protagonistic buzzword in the tech space since its inception over a decade now, needless to say, that places it on the radar of almost every developer. But every new technology is not without its own challenges and blockchain is certainly not an exception.

One of the blockchain challenges that developers face in an endeavor to bring their newly minted, fabulous, game-changing idea into reality is building a custom blockchain from scratch that best delivers that specific use case.

First, they have to define the state engine of the blockchain with all the use case functionalities, and then set up the consensus mechanism to provide security for the network. They also have to spend some time to gain enough community recognition, trust, and network effect. Obviously, this is very time-consuming and requires a lot of work and a very strong coordinated team.

What if there is a shortcut to this? What if you don’t need to worry about security fragility but leverage the robust security of an already established platform that saves you the energy and time to focus on building and perfecting your state engine deliverables?

Curious to explore? Stay with me as I unravel the power Polkadot places in your hands to easily deploy a custom blockchain while harnessing its tamper-proof security.

Being a layer 0 blockchain, it allows for their blockchains to be built on top of it while providing shared security for the blockchains, thanks to its tamper-proof relay chain structure. Using substrate’s already packaged frame pallets, developers can easily design custom blockchains for almost every use case. These are called parachains and in this article, we will cover the most basic concepts regarding parachains, their mechanics, and use cases.

What are Parachains?

Simply put, parachains are custom blockchains that connect to the relay chain for shared security and interoperability.

Parachains come by their name as they are parallelized chains based on a horizontal sharding model, processing transactions in parallel with one another as opposed to a sequential processing model.

The latter is associated with problems of transaction collisions typically seen with Ethereum smart contracts. Since every shard has its own lane of communication to the relay chain using UMP(Upward Message Passing). Although the validator set election logic frequently switches between sets per era, a lot of transactions can be processed at once improving speed while limiting computational wastage associated with a sequential model, without fear of transaction collision

Parachains can be built with any language that compiles to WebAssembly, but the most common implementations are in substrate, the framework with which Polkadot and Kusama are also built.

Parachain Consensus

Parachains share the relay chain’s consensus mechanism of nominated-proof-of-stake (NPoS).

It is a mechanism by which DOT holders can nominate up to 16 and 24 validators of their choice on Polkadot and Kusama respectively for staking rewards. At the end of each nomination period, the election logic outputs validator sets that will produce new block candidates in BABE as well as vote in GRANDPA for finality.

They also validate the transactions of parachains (which are collected by the collators) and have some role in ensuring data availability and cross-chain messaging. . For details on the Polkadot consensus, click here. 

Parachain Maintenance

Parachains are maintained by a group of full node operators called collators who are tasked with the duty of processing the parachains’ transactions and creating new blocks. They then submit a bundled proof-of-verification(PoV) state transition to the relay chain gate-keepers; the validators.

Since collators are full node operators, they can act as fishermen, monitoring the network and reporting any bad behavior. This reporting process requires burning some amount of tokens to avoid ill-informed or false reports.

Each parachain needs at least 5 sets of validators in order to prove the validity of its state transitions. Should in case anywhere between 30-50% of validators went offline due to, say, server outages or downtimes, all the other parachains will stop producing blocks until enough validators come online because at least two-thirds of the validator sets are required to validate PoVs submitted by collators.

Fortunately, collators can sense this shortage and slow down transaction throughput until all enough validators are online.

PARACHAINS SOVEREIGNTY

One of the autonomies of parachains is the ability to choose what they do, how they want to do it, and the degree of transparency to the public.

They can choose to have their own economy and their own tokens, else they can opt to use the relay chain’s native token; DOT or KSM depending, on whether they are deployed on Kusama or Polkadot.

Note that public utility chains must fully align their logic with that of their relay chain, and hence must use the relay chain’s native token.

INTEROPERABILITY IN PARACHAINS

Aside from the future-proof security that the relay chain offers to parachains, it also provides a secure channel of communication between the parachains using a cross-consensus message format (XCM). This includes message passing between parachains and their relay chain(UMP and DMP) and parachain-parachain intercommunication using XCMP. For more details check this post.

The revolutionary aspect of this is that it further cements the whole system together, providing the true web3 vision of Polkadot becoming the internet of blockchains.

The relay chain also dedicated some of its slots to bridges, enabling other sovereign blockchains to seamlessly interact with the ecosystem.

Types of Parachains

Based on the slot leasing mechanism, parachains can be broadly classified into two:

  • common good parachains which are further divided into system-level chains and public utility chains.
  • Specific parachains

Common good parachains benefit the system as a whole, hence the name. Due to limited capacity of the relay chain, common good parachains are needed to handle other functions of the relay chain such as accounts balance, governance, identity, and council election (and staking), thus improving the efficiency of the system by allowing the relay chain to focus solely on its primary security function.

System-level chains take an already existing functionality of the relay chain on-to itself while public utility chains bring in added functionality that the developing team believed will add value to the system.

Since public utility chains propose a non-existing functionality, they have to put out a compelling argument to the council before onboarding. The first common good parachains to be rolled out are Statemint on Polkadot and Statemine on Kusama, both for the creation and management of fungible and non-fungible assets in their respective ecosystems.

Parachain Slot leasing mechanism

Slot auctions

Parachains find their way to polkadot through parachains auction. They have to bid on these auctions with DOT tokens that they are willing to lock for the entire lease period. The Parachain team can opt to either use their own funds for the bidding or crowd-source it from interested stakeholders using the crowdloan function, in return for a stipulated reward after winning the slot.

It is worthy of note that funds used to participate in crowdloan are non-transferable and cannot be used for staking until the slot winner is decided.

If the parachain in question happens to emerge as the winner, then the funds are further locked until the entire leased period is over, otherwise, the contributors will claim back their tokens.

Currently, Polkadot’s relay chain capacity for parachain slots is 100. Each slot is divided into eight 3-months periods for a total of 2 years.

Any combination of slot periods can be leased within a slot duration in a fungible manner, meaning, any other slot periods can be acquired in the next auction and parachains can decide to choose how much of the slot periods they need.

Winners selection

The winner is determined using a modified candle auction spread over a 7 days period on Polkadot. while on Kusama it is 4 times faster than that. Out of this, the auction duration in which crowdloan contribution can be made is divided into 2 periods: an opening period lasting for one day eighteen hours and an ending period lasting for five days. Calculation of the winner takes place in the remaining six hours.

The selection is carried out in three sequential stages:

  • First, at each block during the ending period, a winner will emerge for that block bidding the highest tokens after multiplying the bidder DOTs with the total number of slot periods requested for each participating parachain. These are candidates with non-overlapping periods.
  • Second, a snapshot of each block is taken before the verifiable random function (VRF) terminates the period.
  • Lastly, one of the snapshots is randomly selected and the parachain candidate within that VRF chosen snapshot with the highest bid wins the auction. 

Slot expiration

When the leased period is over, a parachain may start the process of slot acquisition all over again or automatically become a parathread.

Parathreads function in a similar fashion as parachains but use a pay-as-you-go model per new blocks produced and validated. Some projects ab initio may choose to function as parathreads, this approach may economically be more suitable for projects that do not need the full functionality of a parachain.

But keep in mind that at times of high transaction traffic, the cost per block may be otherwise uneconomical.

In contrast to parachains,  Polkadot can host up to 10,000 parathreads.

Common good Parachains slots lease

If every parachain has to go through an auction to bid for a slot, then who will charitably bid for common good chains? I mean the benefit is for everyone. Assuming that is the case and some teams decided to contribute, then free riders will be everywhere, automatically benefitting from the increased efficiency even though they did not participate in any of the bids for it.

To tackle this issue, slot leasing of common good parachains is subject to on-chain governance votes.  

Parachain use-cases


Parachains can be anything and can be used for almost any blockchain use case out there, the only limit really is one’s imagination.

At the time of writing this article, there are a total of 172 parachain projects that are submitted to Polkadot and Kusama out of which 21 have already gained slots on Polkadot and 36 on Kusama.

These chains provide diverse use cases. Here’re some examples of Parachains in the ecosystem

  • Acala is a Defi solution as a multi-collateralized stablecoin;
  • Bit.Country is a web3 metaverse engine for building NFTs and play-to-earn games;
  • Astar is a scalability solution for substrate developers to add Astar functions by providing a substrate system module library;
  • Moonbeam is a smart contract-building framework that is fully compatible with EVM-based chains, bringing interoperability to life.

Share.

Comments are closed.