A Comprehensive Introduction to Polkadot

05-06-2024

Martin Azpiroz

With the advent of blockchain's capability to facilitate smart contract development, a diverse range of unprecedented challenges and limitations confronted blockchain developers as well as users. Among these, interoperability and scalability issues emerged as focal points within the blockchain landscape.

In this scenario, Polkadot emerged from the central core of Ethereum. Gavin Wood, the creator of the Solidity programming language and former CTO, departed Ethereum to develop his own blockchain to tackle the limitations perceived on his previous project. Endowed with his Ethereum experience, Wood aimed to build a multi-chain environment where scalability and streamlined communication were the primary targets.

Succinctly stated, Polkadot can be defined as a fully shared blockchain. Polkadot relies on a central blockchain known as the Relay Chain, which assumes the crucial responsibility of providing security to the diverse array of chains that comprise the entire network.

How Does Polkadot Work?

Equipped with a Proof-of-Stake consensus mechanism, Polkadot's primary emphasis lies on ensuring the integrity and security of the interconnected chains that form its network rather than directly supporting smart contract development. Polkadot functions as a Layer-0 blockchain, bypassing the need for a dedicated validator network and assuming responsibility for securing Polkadot chains. This approach aims to foster the development of scalable and interconnected blockchains while prioritising robust security methods.

Polkadot chains are built on top of the Layer-0 Relay chain and serve as traditional Layer-1 blockchains. Polkadot chains delegate transaction and block validation to the Relay chain, which can be classified into Parachains and Parathreads. [1]

A Parachain is a chain that possesses the capability to process and execute smart contracts written in the WebAssembly programming language and adheres to the Relay Chain API. Parachains gain the opportunity to connect to the Polkadot Network by obtaining a dedicated Parachain slot. Such chains are responsible for handling their own transaction processing, constructing blocks, and proposing them to Polkadot's validators. Blocks are added to the Relay chain following an availability and validity control. Empowered by this approach, each Parachain has a unique state while their transactions are processed in parallel by the Polkadot blockchain. The Relay Chain then links Parachains' unique states to one final state: the state of states. Moreover, Parachains support the development of Layer-2 blockchains to amplify the network's scalability or serve as bridges to enhance interoperability. [2]

The second category of blockchain that can leverage Polkadot's security services is referred to as Parathreads. In contrast to applying for a limited Parachain slot, these chains participate in Polkadot's shared security by paying an associated fee per block executed. The significant contrast between Parachains and Parathreads relates to economic factors. While Parachains must participate in a Crowdloan to win their slot, Parathreads have a fixed fee for registration, which is more affordable than leasing a Parachain slot. However, once a Parathreads is registered, a competitive per-block auction takes place among registered Parathreads, where block inclusion in the Relay chain is determined by fees. From this perspective, certain Parathreads will issue their own tokens as an additional incentive to Polkadot validators to enhance their prospects of having their blocks included in the Relay Chain. [3]

Substrate, the Polkadot SDK

Parity Technologies, the foundation behind Polkadot's development, built the Substrate SDK as a blockchain framework to facilitate the establishment of new blockchains. The primary objective of developing this SDK is to equip developers with the necessary tools to create blockchains that can seamlessly integrate with the Relay chain, ensuring their security through the integration within the Polkadot Network. Nevertheless, Polkadot and Substrate are not dependent on each other. Parachains or Parathreads can be built without Substrate, and Substrate-native chains can operate independently from the Polkadot shared security system. [4]

Crowdloan and Parachains Building

Parachain slots are subject to a limitation; currently, while the exact number of Parachain slots supported without performance degradation has yet to be discovered, it is estimated that around 100 slots simultaneously could be supported. [5] Hence, to be part of the Polkadot network as a Parachain, it is mandatory to participate in public auctions known as Crowdloan and build community support to earn the right to lease one of these slots.

On a Crowdloan, different projects are submitted by locking a certain amount of DOT tokens. Moreover, interested projects are expected to present a well-defined plan articulating their purpose and providing a clear path to its attainment. Afterwards, users can express their support by locking their DOT tokens and obtaining the Parachain token in return. The Parachain proposer who accumulates the highest number of DOT deposits, either from users or self-contributed, is awarded the right to develop their own Parachain. [6]

However, certain Parachain slots remain unavailable for public auctions, as they are reserved for governance-granted Parachains, commonly denoted as System Parachains. These specialised Parachains are pivotal in assuming designated functionalities once inherent to the Relay Chain. Migrating these functions to a Parachain alleviates transaction workloads from the Relay Chain. Consequently, the Relay Chain can concentrate its resources on delivering robust security measures to the entire system. [7]

The Particular Kusama Case [8]

On Polkadot, the testing environment was developed around the "canary" blockchain named Kusama. The initial use case for Kusama was a pre-production environment. Thus, deployments in Kusama are like the birds that coal miners employed to place in coal mines to measure the amount of toxic gases in tunnels.

Additionally, in its early days, Kusama served as a Proof-of-concept for Polkadot's shared security model. Parachain candidates later started leveraging Kusama to deploy and test their Parachains, as it has the same approach regarding shared security. However, Kusama serves a more profound purpose beyond being a mere Testnet. Kusama operates as a fully-fledged blockchain with tangible economic value and proper governance models, thereby serving the concept of "testing in production". Conversely, Polkadot offers Rococo, a dedicated Testnet designed to facilitate comprehensive testing and development.

Overall, Kusama embraces a more assertive and adventurous approach, enabling swift upgrades and lower staking requirements than Polkadot. These attributes bolster its role as a pre-production environment.

Key Participants in the Polkadot Network [9]

The intricate architecture encompassing the Relay chain, Parachains, and Parathreads may give the impression of a complex set of actors required to ensure the network's efficiency and security. However, this is not the case for Polkadot, as it involves a similar group of participants typically found in a Proof of Stake blockchain, albeit labelled differently.

In the first instance, validators are the most relevant contributors to securing the whole network. Validators secure the Relay chain by staking their DOTs. Furthermore, they validate transactions and blocks from Parachains and Parathreads, which are received in what is commonly referred to as validating proofs. Afterwards, they add and perpetuate this information as Relay chain blocks. In exchange for their service, validators are compensated with DOT tokens sourced from block rewards and transaction fees. Additionally, they can be incentivised with Parachains or Parathreads tokens.

The next actor is known as "collator". Collators are entrusted with the task of maintaining Parachains and Parathreads by collecting users' transactions into block candidates and generating what is denominated as validation proofs to be sent to Relay chain validators. Furthermore, collators must maintain a full node for the Relay chain and another for their Parachain or Parathread. Given their non-involvement in security-related aspects, which fall under the validators' responsibility, collators are not obligated to stake tokens or receive compensation for their services. However, collators may be incentivised through the inflation of a native Parachain or Parathread token or transaction fees.

Lastly, there are those who stake their tokens with validators to contribute to enhancing network security, namely, nominators. In exchange for their contribution, nominators are compensated with DOT tokens, which they can choose to compound or accumulate separately to be easily withdrawn. Additionally, unstaking implies a 28-day waiting period.

Enabling Seamless Communication in the Polkadot Network [10]

As a core element of its ultimate goal, Polkadot aims to allow seamless and smooth communication between blockchains. To accomplish this ambitious undertaking, Polkadot interoperability cannot be constrained within the Polkadot network. Therefore, Polkadot supports bridge construction, regardless of the methodology employed in building blockchains. Parity Technologies has developed the Cross-Consensus Format (XCM) to enable blockchain communication and provide a messaging format and language they can understand. In this scenario, three types of landscapes mainly exist.

The first involves communication between two Substrate-native chains. These kinds of blockchains can be connected by bridge pallets, which are substrate modules. These bridge pallets empower chains built with this framework to interpret XCM messages and communicate with other Substrate-native chains.

The second scenario involves a Substrate-native chain and a blockchain built with a different framework but with the capability to support smart contract development. In this case, the solution is to deploy a smart contract on the non-substrate chain to allow it to interpret the XCM language. Nevertheless, this method can be extended to communicate two non-Substrate-native blockchains. One such example of this communication method is the Parity Bridge. Focused on connecting Ethereum mainnet with EVM blockchains, it provides a bridge smart contract that allows cross-chain transactions based on incoming XCM messages. Consequently, if a Substate-native chain enables the Substrate bridge pallet module, it can be connected to a non-substrate blockchain, as both will have the capability to understand and interpret the XCM language.

Finally, it is possible to encounter blockchains that may not support smart contract development. To overcome this specific challenge, it is essential to implement a higher-order protocol. A notable instance is the Interlay team implementation of the XCLAIM protocol to allow communications between Bitcoin and Parachains. XCLAIM, in particular, follows a proof-of-punishment approach, leveraging publicly verifiable smart contracts, chain relays, and collateralisation mechanisms to enforce participant adherence to system rules. Additionally, XCLAIM introduces novel applications, including cross-chain payment channels, temporary transaction offloading to mitigate network congestions and multi-party atomic swaps. Based on this framework, Interlay has enabled XCM interpretation, allowing Bitcoin to communicate with the Polkadot network. Leveraging its development, users can dispose of PolkaBTC on Parachains. In practice, the XCLAIM component maintains all accounts that own PolkaBTC, and the BTC Relay is responsible for verifying Bitcoin transactions and over-collateralisation.

Polkadot Challenges

While the Polkadot ecosystem boasts a well-designed architecture and a comprehensive toolkit aimed at addressing several issues and limitations in the blockchain landscape, it is not without its own set of challenges.

The inherent complexity of Polkadot's design, which intends to provide scalability and interoperability while remaining secure, presents a double-edged sword. Although it shows potential, its intricacy may appear daunting to both possible users and developers as a deterrent to further adoption. Furthermore, the process of securing a Parachain slot can seem costly and overly intricate, especially for emerging projects seeking to establish their own blockchain.

Lastly, Polkadot is still in a permanent quest for a dynamic community to harness, but most importantly, to test the potential of the emerging tools in its ecosystem. The extent to which these tools are put to the test in real-world scenarios will determine whether Polkadot's design aligns effectively with its foundational objectives.

Conclusion

Polkadot has been designed for specific purposes, further blockchain scalability and streamlined communication. Equipped with a Proof-of-Stake Relay chain that provides security to the whole network, it offers two avenues for participating in shared security: applying for a Parachain slot or becoming a Parathread. Moreover, Substrate presents a set of modules intended to enable the smooth development of blockchains that possess the flexibility to be incorporated into or operate separately from the Polkadot network.

The interoperability issue is addressed from three perspectives, mainly including the entire array of blockchains currently coexisting in the industry. Polkadot's comprehensive approach lays the foundation for a potentially scalable and interconnected blockchain ecosystem.

---

[1] https://wiki.polkadot.network/docs/learn-architecture#relay-chain

[2] https://wiki.polkadot.network/docs/learn-parachains

[3] https://wiki.polkadot.network/docs/learn-parathreads

[4] https://substrate.io/

[5] https://wiki.polkadot.network/docs/learn-parachains-faq

[6] https://wiki.polkadot.network/docs/learn-crowdloans

[7] https://wiki.polkadot.network/docs/learn-system-chains

[8] https://guide.kusama.network/docs/kusama-getting-started

[9] https://wiki.polkadot.network/docs/learn-participants-index

[10] https://wiki.polkadot.network/docs/learn-bridges#bitcoin-bridge-xclaim---substrate---polkadot

Topic

Crypto industry