Architecture

Architecture Overview

Technical deep dive into MANTRA Chain's architecture

Core Components

MANTRA Chain is built on a modular architecture combining:

  • Cosmos SDK: Flexible, scalable, and modular framework
  • EVM Module: Ethereum Virtual Machine compatibility
  • CometBFT: Consensus layer for validator set management
  • IBC: Inter-Blockchain Communication protocol

Virtual Machines

A Virtual Machine (VM) emulates a computer system, enabling code to run securely.

In the context of blockchain, VMs serve as the runtime environment where smart contract code is executed, ensuring:

  • Secure execution: Isolated from the host system
  • Deterministic behavior: Same input always produces same output
  • Isolated execution: Contracts cannot interfere with each other

How VMs Coexist

The EVM Module was developed to implement the EVM standard for Cosmos SDK-based chains.

Why Add EVM?

Adding an EVM module to Cosmos SDK allows us to:

  • Attract Solidity developers: The majority of developers in the space use Solidity/EVM
  • Further develop the ecosystem: Enable existing EVM tooling and libraries
  • Enable EVM-compatible smart contracts: Deploy contracts written for Ethereum without modification

Data Flow

The EVM module integrates seamlessly with Cosmos SDK modules through:

  1. Precompiles: Go code that directly interacts with Cosmos SDK module states
  2. Message routing: Cosmos SDK's message routing system
  3. State management: Shared state between EVM and Cosmos modules

Module Interactions

All modules interact through the Cosmos SDK's message routing system, allowing:

  • Cross-module transactions: Messages can interact with multiple modules
  • Atomic operations: All messages in a transaction succeed or fail together
  • State consistency: Guaranteed consistency across module states

Architecture Diagram

graph TB
    subgraph "Application Layer"
        RWA[RWA dApps]
        DeFi[DeFi dApps]
    end
    
    subgraph "MANTRA Chain"
        EVM[EVM Module]
        Cosmos[Cosmos SDK]
        Precompiles[Precompiles]
    end
    
    subgraph "Interoperability"
        Hyperlane[Hyperlane]
        IBC[IBC]
        Other[Other EVM Chains]
    end
    
    RWA --> EVM
    DeFi --> EVM
    EVM --> Precompiles
    Precompiles --> Cosmos
    EVM --> Hyperlane
    Cosmos --> IBC
    EVM --> Other

Next Steps