Substrate

Learn how substrate is one of the core pillars of Polkadot.

Substrate is a core pillar of Polkadot. The word substrate is defined by the Oxford English Dictionary as a substance or layer which is under something or on which something happens. This definition fits the use case for Substrate as the technology layer underpinning Polkadot and all of its connected blockchains. Parity created Substrate as a way to build custom blockchains quickly and easily. Substrate’s FRAME (Framework for Runtime Aggregation of Modularized Entities) runtime system is what lets developers build out their own blockchain logic. Runtime, in the context of blockchain, refers to the business logic which defines a blockchain’s behavior.

FRAME makes it easy to construct a runtime by giving developers access to modulus known as ‘pallets’. Such modules are the building blocks for constructing a unique blockchain, with each pallet containing its own domain-specific logic. This can refer to governance, treasury, assets, and more. The advantage that this brings to developers is eliminating the need to build a custom chain from scratch, although FRAME grants the option to create a custom module. The substrate provides a solid foundation for developers to build on.

TSubstrate also facilitates smart contracts on the Polkadot blockchain. Smart contracts are possible because FRAME contains a module (‘pallet’) that implements an API for typical functions that smart contracts need. This module is the contracts pallet, and enables functions such as storage, querying information about accounts, etc. ink! is a Rust-based eDSL (Domain Specific Language) that is specifically for the contracts pallet. It is in this language that Polkadot smart contracts are written.

Substrate runtime is compiled into a native executable and a WebAssembly (Wasm) binary. ink! contracts are compiled into Wasm, meaning anyone can build a smart contract in a Wasm-compatible language. This is the same technology used by many blue-chip organizations as a faster alternative to JavaScript for the web. By utilizing Wasm for on-chain logic and smart contracts, Polkadot is taking advantage of the thousands of hours worth of development time that went into building the technology by the W3C, the organization behind WebAssembly.

👋 Need Help?

Contact us through email or our support page for any issues, bugs, or assistance you may need.