Skip to main content

5 min read

Share

Substrate: The Essentials & Use Cases

As official Substrate Delivery Partners, we have built multiple solutions using this framework, which can be used to create blockchains. In this article, we give an overview of what Substrate is, what has been built with this framework and how we have used it at Zondax for our clients.

What is Substrate?

Substrate is a framework to build blockchains, developed by Parity, which is part of the Web3 Foundation. It’s a set of open-source libraries that cover all the necessary functionalities required to build a blockchain. It allows makers to set up their own blockchain in an easy, flexible and efficient way, without having to reinvent the wheel. When a blockchain is Substrate based, it means that it started from the framework, and has built its custom functionalities on top.

Just as most web applications don’t need to develop their own version of HTTP, Substrate believes this also applies to blockchain: they consider having to build from scratch the whole network, including features that exist across blockchains, such as the database or transaction queue, would be a wasted effort for every team that’s creating a new blockchain. That’s why they’ve built a modular framework, implementing the knowledge they gained by building blockchains to give other developers the opportunity to reuse battle-tested libraries so they can develop their own blockchains efficiently.

A lot of people think of Polkadot when they hear Substrate. Substrate blockchains are natively compatible with Polkadot, and are easy to connect. However, blockchains connected to Polkadot don’t necessarily need to be built with Substrate, and Blockchains built with Substrate don’t need to be connected with the Polkadot network.

Why build blockchains with Substrate?

  • Substrate allows you to build your own blockchain with widely used and tested technologies, so you don’t have to reinvent the wheel nor spend a lot of time on testing.
  • It’s production ready: many blockchains have already been built with this technology, among them, Polkadot.
  • Forkless upgrades!
  • Smart contract ready: Substrate supports multiple smart contract platforms, including the EVM. Substrate uses Wasm, which means that you can develop smart contracts using any compatible language.
  • As the framework is modular, it gives enough technological freedom, which means that developers can build blockchains with custom functionalities on top, using the pre-built modules - pallets - or they can build their own!.
  • It has a multilayered architecture that allows you to choose between ease of development and technological freedom.
  • Natively compatible with Polkadot.

Ease of development vs technological freedom: 3 ways of usage

As mentioned before, Substrate is a modular framework with composable components (also referred to as “pallets”). The framework can be used in different ways, which allows developers to choose between the ease of development and the technical freedom:

  1. Substrate Node
    The Substrate Node allows you to build a blockchain with ease. With it, you can run the pre-assembled Substrate Node and configure its genesis block. You will only need to supply a JSON file to launch your own blockchain. The JSON file will allow you to configure the genesis state of the modules that compose the Substrate Node’s runtime, such as Balances and Staking.

  2. Substrate FRAME
    Substrate FRAME (Framework for Runtime Aggregation of Modularized Entities) is a modular framework for implementing runtimes, which also has been used to build the Substrate Node. It helps you compose your runtime by putting together composable modules, the so called pallets.

    This set of code gives you quite some freedom when building your own blockchain, as you can configure the majority of your blockchain’s logic and you can mix and match FRAME pallets (the composable modules) or even build your own custom pallets.

  3. Substrate Core
    Although Substrate CORE is the most difficult way to use Substrate, it gives you by far the most technological freedom. You can ignore the entire FRAME system, and the runtime can be designed and implemented from scratch. These implementations can be developed in any language that can target WebAssembly. You could even construct a new genesis block from your Wasm blob.

    Although it’s the most complex way of using Substrate, CORE gives you a foundation that still is far easier than building a blockchain from scratch, as it has, among others, a crypto primitives library and a composable transaction queue and block production mechanism included.

To sum up, Substrate can be used on different levels, varying development complexity and giving more or less space to innovate technologically:

What has been built with Substrate?

Over 130 teams have built products on Substrate, among them DeFi teams (Centrifuge, Polymesh, Acala Network), Identity (Ontology) and Smart contracts (Edgeware).

Polymesh: a Substrate Use Case
From having a look at the teams building on Substrate, it becomes clear that it has many use cases. For example, tokenization platform Polymath has built their Polymesh blockchain on Substrate. As they work with financial products, they wanted to operate on a blockchain that fit a regulated environment and that could be adapted to their use case. As Substrate has quite some flexibility and allows customization, regulatory features could be added to Polymesh’s base layer and its smart contract can hold compliance logic, such as KYC and AML.

Edgeware: a smart contract blockchain on Substrate
Edgeware is a smart contract blockchain with a focus on on-chain governance. It allows makers to build and deploy dApps on their blockchain. Solidity / EVM smart contracts can be deployed and developers can also work with Rust and WebAssembly. The Edgeware network has many collectives that are funded by the on-chain and community managed treasure, which aims to expand the network and explore new ideas.

The team behind Edgeware decided to use Substrate to build their blockchain as it allowed them to do most of the things right out of the box and it was easy for their team to adopt the technology.

What we have built with Substrate

Zondax is an official Substrate Delivery Partner from Parity, hence, so far we have built a big variety of solutions using this framework. We participated in this ecosystem even way before Kusama’s mainnet existed!

To give you an example of  solutions we have built using Substrate or for its ecosystem:

  • We have developed over 10 Ledger Apps for the Substrate / Polkadot Ecosystem.
  • We developed a complete SCALE decoder in minimalist and optimized C.
  • Currently, we are finalizing the last steps of a Substrate remote signer prototype.
  • We have been supporting the community by providing solutions such as cross-chain token recovery, polkadot.js integrations and collaboration in Ledger Live integration efforts.
  • At the moment we are exploring some parachain concept that hopefully will become public in the near future ;).

How we can help you

Are you interested in building a blockchain (solution) based on Susbstrate? We can help you with providing our expertise to deliver blockchain solutions using the Substrate framework as a base. If you are interested in learning more about how we can help, please reach out to our team.

About Zondax

Zondax is a team of engineers, software developers and cryptographers with diverse technical backgrounds, who have developed over 40 products together. We are specialized in software for HSMs and hardware wallets, blockchain protocol development and integration.

If you’d like to know more about us, please visit our Github or website.