Madara High-performance Starknet sorter, the cornerstone of personalized application chains.

Featured Overview


Imagine being able to customize a blockchain according to the unique needs of your application – that’s exactly what application chains offer. Application chains are blockchains customized for applications, providing developers with the flexibility to fine-tune various aspects of the chain to meet the requirements of their applications, such as choosing different hash functions or custom consensus algorithms. What’s great is that building an application chain on top of a powerful L1 or L2 and inheriting the security of the L1 or L2 provides developers with the best of both worlds.

Madara is a revolutionary sorter that combines flexibility with lightning-fast performance. The sorter is the entity responsible for executing transactions and grouping them into batches. As the entry point to launch your own Starknet application chain, Madara opens up vast possibilities for experimentation within the Starknet ecosystem.

Before we delve into how Madara empowers Starknet application chains with powerful features, it is necessary to answer a question: why would developers choose to build application chains on Starknet instead of using Starknet Validity Rollup directly? Some may wonder if Starknet is already sufficient for most scenarios.

Let’s first understand why application chains have become an attractive extension in the Starknet ecosystem.

Why Choose Application Chains

Madara, developed by the StarkWare exploration team (also known as Keep Starknet Strange), is designed to achieve the vision of StarkWare’s fractal scalability. There are many reasons why developers choose to build Starknet application chains (or L3 layer) instead of relying directly on Starknet.


Application developers face significant challenges in the scalability of existing blockchain infrastructure. Scalability encompasses two key points: speed and cost. By reducing the cost of each layer by a thousandfold, developers can significantly reduce the overall cost from L1 to L3, up to millions of times. Throughput is not affected by the activity of third-party applications, as applications are equipped with dedicated blockchains and do not compete for resources, ensuring a consistently smooth experience.


General-purpose chains like Starknet and Ethereum have taken various measures to ensure that everyone can use the network, which leads to limited environments. With application chains, developers can fine-tune every aspect of their applications and infrastructure to create customized solutions. If you don’t like a certain feature of the Cairo VM, you can remove it in your application chain.


The customization of application chains also allows developers to use features that are currently unavailable or risky in environments like Starknet. Application chains give teams autonomy, allowing them to freely write and authorize any code they need. This unlocks many use cases for application chains, such as implementing on-chain KYC without leaking private information.

Madara’s Impact on the Application Chain Stack

Next, let’s understand the interaction between the different layers that drive the application chain and the role played by Madara in them.

  • Execution: The execution layer defines the execution of blocks and the generation of state differences. Madara is flexible and can switch between two execution packages (StarkWare’s blockifier and LambdaClass’s starknet_in_rust). Regardless of the chosen package, the underlying framework uses the Cairo VM. The Cairo language helps create provable programs that demonstrate correct computation execution.

  • Settlement: As an Validity Rollup, the state of Madara’s application chain can be reconstructed solely by checking its settlement layer. By settling more frequently on Starknet L2, L3 application chains can achieve faster finality in terms of both hardness and softness. Therefore, settlement is enhanced in these two aspects.

  • Ordering: Madara is responsible for the ordering process, which can be changed according to the needs of the application. Whether it’s a simple FCFS, PGA, or a more complex Narwhall & Bullshark scheme, certain application chains can choose to deploy encrypted memory pools to ensure fair ordering and mitigate the impact of MEV.

  • Data Availability: Data availability ensures that the complete state tree is always accessible, giving users confidence that they can prove ownership of their funds even if Madara experiences interruptions. Madara will provide developers with a range of data availability (DA) schemes to choose from.

  • Governance: Each Madara application chain can choose its governance model. Snapshot X provides a fully on-chain governance system that relies on storage proofs. Other governance mechanisms are also being explored, such as native Substrate governance pallets. On-chain governance is a core value of Madara.

Entering the Application Chain: Madara

Madara utilizes the Substrate framework and integrates the Cairo VM to execute Cairo programs and Starknet smart contracts, enhancing the Cairo VM. Substrate is an open-source Rust framework known for its flexibility in building customizable blockchains. Meanwhile, Cairo VM is specifically designed for efficient generation of program execution validity proofs. By adopting state tracking and smart contracts to validate proofs on L2, the application chain ensures secure integration with Starknet. This enables Madara to leverage the powerful capabilities of Cairo for provability of program execution.

The inherent modularity of the Substrate framework allows developers to easily customize their own application chains. There are no imposed assumptions, allowing you to integrate your own consensus protocols, hash functions, signature schemes, storage layouts, etc. into your application, while also utilizing Cairo to generate proofs. Developers can freely do anything without limitations while maintaining verifiability, and inherit the security of the underlying chain, whether it is Starknet or Ethereum.

Initially, Madara will be highly similar to Starknet, enabling composability of smart contracts within the Starknet ecosystem. With the integration of Starknet and Herodotus to leverage storage proofs for interop, there are even bigger plans for the future. The integration of storage proofs will also allow the Madara application chain to consider the state and liquidity of other chains.

Get ready to witness a new era as Madara opens up the infinite possibilities of the Starknet kingdom!

Like what you're reading? Subscribe to our top stories.

We will continue to update Gambling Chain; if you have any questions or suggestions, please contact us!

Follow us on Twitter, Facebook, YouTube, and TikTok.


Was this article helpful?

93 out of 132 found this helpful

Gambling Chain Logo
Digital Asset Investment
Real world, Metaverse and Network.
Build Daos that bring Decentralized finance to more and more persons Who love Web3.
Website and other Media Daos

Products used

GC Wallet

Send targeted currencies to the right people at the right time.