Jul 20,2023 ·
1 min read
Page last updated 8 hours ago
Share this post:
Imagine having the power to tailor-make a blockchain specifically for your application’s unique requirements – that’s exactly what appchains offer. Appchains are application-specific blockchains that offer developers the flexibility to fine-tune aspects of the chains to suit their applications’ needs, like choosing a different hash function or customizing the consensus algorithm. The best part? Appchains inherit the security of the robust L1 or L2 blockchains on which they are built, providing developers with the best of both worlds.
Introducing Madara, a game-changing sequencer that combines flexibility and lightning-fast performance. Sequencers are entities responsible for executing transactions and grouping them into batches. Acting as a gateway to launching your very own Starknet appchain, Madara opens up a realm of possibilities for experimentation in the Starknet ecosystem like never before.
Before we delve into the fascinating capabilities of Madara in enabling Starknet appchains, it’s important to address the question of why developers would opt to build appchains on top of Starknet rather than utilizing the Starknet Validity Rollup directly. One might wonder if Starknet is already sufficient for most scenarios.
Let’s first learn why appchains are a compelling extension to the Starknet ecosystem.
Madara, developed by the StarkWare Exploration Team, also known as Keep Starknet Strange, is specifically designed to realize StarkWare 's fractal scaling vision. There are numerous compelling reasons why developers might choose to establish a Starknet appchain or L3 instead of directly relying on Starknet.
App developers face significant challenges in terms of scalability within the existing blockchain infrastructure. Scalability encompasses two crucial aspects: high speed and low fees. By implementing a 1,000x cost reduction at each layer, developers can achieve a remarkable overall cost reduction from L1 to L3, potentially reaching up to 1,000,000x. The throughput remains unaffected by the activity of third-party applications as the app has a dedicated blockchain and is not competing for resources. This ensures a consistently smooth experience.
General-purpose chains like Starknet and Ethereum have multiple measures in place to ensure the network is usable by everyone, leading to a constrained environment. With appchains, developers can fine-tune various aspects of their applications and infrastructure, creating tailored solutions. Don’t like a feature of the Cairo VM? Eliminate it in your appchain.
The customizability of appchains also allows developers to work with features that are currently unavailable or risky in environments like Starknet. Appchains will offer each team the autonomy to write and authorize any desired code hints. This allows appchains to unlock many use cases, like being able to enforce on-chain KYC without leaking private information.
Let’s take a look at the interplay of different layers powering appchains, and where Madara comes in.
In Madara, the Cairo VM is being enhanced by utilizing the Substrate framework and integrating the Cairo VM for executing Cairo programs and Starknet smart contracts. Substrate is an open-source Rust framework to build customizable blockchains, that is known for its flexibility. Meanwhile, the Cairo VM is specifically designed to efficiently generate Validity Proofs for program execution. By employing state tracking and a smart contract to verify these proofs on L2, appchain ensures secure integration with Starknet. This way, Madara leverages Cairo’s power to enable the provability of program execution.
The Substrate framework’s inherent modular nature lets developers customize the appchain with ease. No assumptions are imposed, allowing you to incorporate your own consensus protocol, hash function, signature scheme, storage layout – whatever your app requires, all while utilizing Cairo to generate proofs. No limits on what developers can do while still being provable, inheriting the security of the underlying chain – be it Starknet or Ethereum.
Initially, Madara will bear a strong resemblance to Starknet, enabling the composability of smart contracts within the Starknet ecosystem. There are bigger plans in store for the future as Starknet integrates with Herodotus to leverage storage proofs to achieve interoperability. The integration of storage proofs will also let Madara appchains consider state and liquidity from other chains.
Prepare to witness a new era of possibilities in the realm of Starknet, enabled by Madara.