Understanding How Execution Works on Midgard L2

Execution on Midgard L2 is designed to be efficient, secure, and scalable, leveraging the innovative architecture of optimistic rollups. This page delves into the mechanisms and processes that ensure seamless execution of transactions and smart contracts on the Midgard protocol.

Trusted by more than 100 companies across the globe:

Execution Framework

Optimistic Rollup Architecture

At the core of Midgard’s execution framework is the optimistic rollup architecture. This approach processes transactions off-chain while maintaining the security and finality of the Cardano Layer 1 (L1) blockchain. By assuming transactions are valid unless proven otherwise, optimistic rollups significantly reduce the computational load on L1 and increase transaction throughput.

Validator Network

Midgard employs a network of validators responsible for processing off-chain transactions. Validators post bonds as collateral to ensure honest behavior and are tasked with submitting state updates to the Cardano blockchain.

  1. Transaction Processing: Transactions are initially processed off-chain by validators. They verify the transactions, update the state, and create state commitments that summarize these changes.

State Commitments: Validators periodically submit state commitments to the L1 blockchain. These commitments include the current state, the incoming transactions, and the resulting new state, all represented as Merkle roots for compact and efficient proof submissions.

State Management

Midgard uses Merkle roots to manage state transitions efficiently. The state management system includes:

  • Current State: Represents the current set of valid transactions and balances.
  • Incoming Transactions: New transactions that need to be processed.
  • Next State: The resulting state after processing the incoming transactions.

This structure allows for quick verification and compact storage of state data, ensuring high efficiency and scalability.

Fraud Proof System

A critical component of Midgard’s execution framework is its fraud proof system. This mechanism ensures the integrity and correctness of off-chain transactions by allowing participants to challenge invalid state updates.

Challenge Period

After a state update is submitted, there is a designated challenge period during which participants can submit fraud proofs to contest the validity of the update.

Submitting Fraud Proofs

To submit a fraud proof, a challenger provides evidence that a specific transaction or state transition is invalid. This involves providing the original transaction data and Merkle proofs.

Challenge-Response Mechanism

For complex fraud proofs, a challenge-response interaction occurs between the challenger and the validator. Both parties must provide evidence to support their claims, ensuring a thorough verification process.

Types of Fraud Proofs

Double-Spending Proofs

Detects when the same UTXO is used in multiple transactions illegitimately.

Invalid Signature Proofs

Proves that a UTXO is included in a transaction without the necessary cryptographic signature

Value Not Preserved Proofs

Ensures that the total value of inputs and outputs, minus fees, is consistent.

Timestamp Misuse Proofs

Validates that transaction and block timestamps are within the allowed ranges.

Improper Incentives/Fees Proofs

Ensures that transaction fees are calculated correctly.

Economic Incentives

Midgard’s execution framework is reinforced by strong economic incentives designed to promote honest behavior and discourage fraudulent activities.

Validator Bonds

Validators are required to post bonds, which are at risk of being slashed if they submit fraudulent transactions or invalid state updates.

Challenger Rewards

Participants who successfully submit fraud proofs are rewarded, incentivizing the community to actively monitor and maintain the integrity of the system.

Penalties for Dishonesty

Both validators and challengers face penalties for dishonest behavior, ensuring that the system remains secure and reliable.

Benefits of Midgard’s Execution Model

Hear from our satisfied clients about their experience with our AI software.

Scalability

Midgard significantly enhances the scalability of the Cardano blockchain by offloading transaction processing to Layer 2, allowing for higher transaction throughput and lower costs.

Security

The combination of optimistic rollups, robust fraud proof mechanisms, and economic incentives ensures that Midgard maintains the high-security standards of the Cardano ecosystem.

Efficiency

The use of Merkle roots and compact state representations allows for efficient state management, enabling Midgard to handle large volumes of transactions without overburdening the Cardano blockchain.

Midgard
© 2024 midgardprotocol.