Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Application Specific Blockchain Stack

Platform-D is built on Cosmos-sdk with consensus by CometBFT & smart contracts framework by CosmWasm.

Modules and Smart Contracts

Cosmos-sdk is the application layer of a blockchain node and communicates with the underlying networking and consensus layer - CometBFT. As the name suggests, it is a SDK and applications can add modules to it to interact with the states.

One notable module that any application specific blockchain can add is x/wasm. It is a Cosmos-sdk module that contains the Go binding (wasmvm) to the underlying CosmWasm-VM, which rus the CosmWasm smart contracts.

Given there are now 2 ways to customise functionalities on the blockchain, the design decision is where should such business logic lie for flexibility and efficiency.

Flexibility

One of the advantages of using CosmWasm over other smart contract frameworks is the ability to reuse other libraries written in rust (with some limitatiosn), in particular - many high quality cryptographic libraries.

Another way to reuse other libraries / keep up with newest development from the wider developer communities is to be able to load WASM code in the blockchain node. At the time of writing, WASM loader is not available in the runtime of Cosmos-sdk. However, in the 2024 roadmap the contributors include both cross language WASM loader & exploring alignment with CosmWasm.

With all these developements, the initial MVP of Platform-D will align with the Cosmos-sdk roadmap, it will be flexible by incorporating the x/wasm module.

It is important to note the EVM runs bytecodes that are customised, is very restrictive in its instruction and memory that makes it very difficult to write safe, efficient smart contracts. In addition, applications must be specifically built for the EVM, making it impossible to leverage external libraries outside of the ecosystem.

Efficienty


Last updated: Belsy Yuen, 28-11-2023