Substrate: The Rust SDK for Blockchain Development

Substrate: The Rust SDK for Blockchain Development

My goal is to spark curiosity among developers looking to learn about new technologies they might need to adopt one day. Learning Substrate may allow you to land a job as a core blockchain engineer or as an application developer building UIs for gaming, voting or tooling platforms built with it. Substrate may also be complimentary to your existing web development stack. It is still very new — only in production since 2020 — yet it's the fastest growing open source Rust repository for blockchain developers.

☕️ Setting the scene

At a high level blockchain development implies building out logic to be executed by a distributed state machine on which you can further build higher-level applications. It stands on the shoulders of researchers and pioneers in P2P technologies, cryptography, distributed computing and game theory. These innovations are what made it possible to build out the core infrastructure that enables writing and executing value bearing applications built on decentralized consensus systems. The truth is that it takes a lot of effort to implement this stuff from scratch, yet many businesses require their own chains to build out the custom services they want to provide.

🧐 What kinds of services?

Typically ones:

  • That guarantee censorship resistance. Highly relevant for media platforms in various jurisdictions.
  • Where users can benefit from owning unique digital collectables. This could be their profile data, in-game assets or even badges they've earned on GitHub.
  • Where it's too costly for end users to trust a provider. Example providers that this service could help circumvent are national banks, file storage solutions, institutions counting ballots for electoral campaigns.
  • That are designed to generate proofs about that state of a system and verify them. This introduces ways to verify user identities without storing them anywhere for example.

🖼 Enter Substrate

Substrate is an SDK for (a) developing custom blockchains with minimal overhead and (b) writing their state transition function (STF) logic. It provides blockchain developers with core libraries to create extensible, upgradeable blockchains built with battle tested cryptography and consensus systems.

Substrate also includes an opinionated framework for composing state transition logic called FRAME. Using FRAME, developers are able to write custom STF modules or use the growing library of existing ones to compose or extend a chain's STF logic.

Additionally, it provides special crates that generate the metadata of a chain, making it useful for application builders aiming to interact with a chain. Read the official documentation to learn about other features of Substrate.

🎮 Building custom blockchains vs. building blockchain based applications

I think it's important to make a distinction between developers looking to build custom blockchain infrastructure — such as modifying the consensus layer, block structure, or using a purpose built networking layer — from developers building higher-level functionality and user-facing features for a blockchain. There's no clear divide between the two, but the two involve different areas of expertise and experience.

For example, application developers who are building apps that interact with one or several chains don't need to know to write custom STF modules. But they will need to understand how the modules work at a high level and how to interact with them using the metadata they expose.

Custom chains allow businesses to be independent from the limitations of a single blockchain. As developers, this opens the doors to innovate more freely. It encourages experimentation and collaboration.

Anecdotally, here's a fantastic seminar on the journey of an application developer for Substrate chains:

⚡️ Closing thoughts

If you're an application developer, there's a lot you can build on top of existing blockchains. Knowing Substrate can also open doors for working on anything from core protocol development to creating custom modules. That said, anyone serious about building a custom chain probably either:

  1. Has a team who has a business model that requires a custom chain and capital to help fund its development
  2. Already has a business that uses smart contracts on top of a blockchain that doesn't meet their scalability needs
  3. Is just interested in contributing to the growing amount of projects using Substrate out there
  4. Or just wants to have fun and learn about this super powerful SDK !

If you’re in the third category, you’re in the right place. In future blogs, I'll go through some more hands on material with building using Substrate, down the less conventional path.