What is Substrate?
What exactly is a blockchain?
In a philosophical context, a blockchain is a trust engine, where the users of the blockchain do not need to trust others because the blockchain inherently offers them a completely trustless environment, due to the blockchain itself guaranteeing trust.
Since Bitcoin’s inception, there have been many blockchains developed for general purposes.
But starting these blockchains was not an easy task before: developers had to recreate the entire blockchain code from scratch, or copy (forking) the source code of another blockchain. They had to figure out how to integrate the elements necessary to run the blockchain, such as storage, cryptography, a consensus layer, a peer-to-peer networking layer, and the execution environment. Creating blockchains has been a challenge for years, but since the creation of Substrate, Polkadot’s blockchain builder SDK, starting your own blockchain is not a difficult task.
Substrate: The Building Blocks of Web3
In 2018, Dr. Gavin Wood, the co-founder and former CTO of Ethereum, founder of Parity Technologies, and founder of the coin Web3, demoed Substrate 1.0 and built a new blockchain in under 60 minutes. By 2020, Gavin’s vision to launch a supercomputer for Web3 became a reality with the launch of the Polkadot Network. Polkadot and Substrate share the same vision, but the two technologies differ. Substrate is a blockchain builder framework, while Polkadot is a relay blockchain that secures and relays transactions across both Substrate and non-Substrate based blockchains. While Polkadot forms the core infrastructure on which a decentralized and democratic internet can run, Substrate provides the technology to build more high-tech blockchains that can work simultaneously under the security of Polkadot.
How Does Substrate Work?
Substrate’s multilayered architecture lets developers choose between ease of development and technical freedom. It is designed to be both entirely general at its core, yet highly composable and suitable for rapid application development. General because developers can easily build blockchains in a logical and well-structured module-based environment, but at the same time, it is composable because they can implement various business logic into different modules and add them to the blockchain’s runtime. (In Substrate terminology, the runtime of a blockchain is the logic of how the blockchain constructs the blocks.) With this approach, developers can easily customize their blockchain for specific use cases.
For example, the developers of an IoT-oriented blockchain can tailor the blockchain for that use case, while developers of a DeFi project can optimize the logic for DeFi use cases, similar to how we do it with the case of Mosaic Chain.
Substrate Modules: The building blocks of Substrate
How Many Modules Does Substrate Have? A lot, and it is expanding. Developers can also modify these modules to fit the needs of the blockchain. To make it easier to understand, we will mention some modules from the hundreds and explain what they do:
- Aura Module: Aura is an already developed consensus mechanism that is used by several Parachains. Developers can add this module to a new blockchain, and Aura can then create consensus among the nodes in the blockchain. Developers can also modify Aura to make it fully customized to the needs of the blockchain.
- Balances Module: This module allows users to send and receive assets on the blockchain. It also manages account creation and removal, balance slashes, token supply issuance, and setting locks and unlocks for tokens.
- Treasury Module: A treasury is an address on the blockchain that can automatically collect balances in various ways, such as from slashing events, a portion of token issuance, and a portion of transaction fees. This module handles all Treasury-related events within the chain.
- Democracy Module: The democracy module contains all the necessary actions needed to propose, vote on, and enact referendums. With this module, the blockchain can be governed by token holders through democracy.
- XCM Module: All Substrate chains can integrate the XCM palette, enabling communication between Substrate chains through various formats like HRMP, VRMP, XCMP, and GMP channels. Non-Substrate chains can also integrate XCM and with this Substrate and Non-Substrate chains can understand each other and can communicate.
In addition to these modules, there are hundreds more modules in the Substrate documentation that developers are free to use. It is not necessary to use all of them; selecting and integrating only the modules that are truly needed for your blockchain is sufficient. This is illustrated in the figure below:
Additional benefits of Substrate
Furthermore, Substrate’s unique modular architecture offers several other benefits for all Substrate-based chains, such as light client support, via Smoldot and Substrate Connect. This can effectively decentralize the use of the blockchain since network participants do not have to rely on third-party RPC providers like Infura.
Substrate also offers a novel, industry-leading blockchain upgrading technology known as Forkless Runtime Upgrades. With this technology Substrate based chains can upgrade itself in a fast and seamless way without any danger. This is achieved by instead of putting software containing the blockchain’s operational logic into validators, Substrate allows developers to integrate this logic directly into the blockchain itself. As a result, the validators approve blocks based on the logic (runtime) of the blockchain, rather than the logic of the software downloaded to their hardware.
So these Forkless Runtime Upgrades are enacted by the blockchain itself. However the token holders of the Substrate based chains votes on these upgrades. Substrate-based chains therefore have the most advanced governance systems in the entire blockchain industry, and they best represent the wishes and desires of the community behind the blockchain.
Conclusion
According to Andreas M. Antonopoulos, a perfect blockchain must meet the following requirements:
– Revolutionary
– Immutable
– Public and auditable
– Collaborative with Governance
– Open and Permissionless
– Censorship-Resistant
– Decentralized
All the aforementioned qualities necessary for an ideal blockchain can be achieved using the Substrate blockchain builder framework, in a fast, agile, and groundbreaking approach. With Substrate, the possibilities for building a revolutionary blockchain are endless.