Skip to main content

Crosschain Treasury Introduction

The Crosschain Treasury enables secure asset transfers between EVVM and external blockchains. This multi-chain solution uses interoperability protocols to coordinate asset management across different blockchain networks.

Architecture

The system uses two coordinated stations that communicate through multiple cross-chain protocols:

Host Chain Station (TreasuryHostChainStation)

  • Operates on the same blockchain as EVVM
  • Handles withdrawals from EVVM balances to external chains
  • Receives Fisher bridge deposits from external chains
  • Manages EVVM balance integration and updates
  • Integrates with EVVM core contract for balance operations

External Chain Station (TreasuryExternalChainStation)

  • Deployed on external blockchains where user assets exist
  • Handles deposits from users to EVVM ecosystem
  • Receives Fisher bridge withdrawals from EVVM
  • Manages real asset custody (ERC20 tokens and native coins)
  • Provides deposit interfaces for multiple asset types

Supported Protocols

ProtocolIDDescription
Hyperlane0x01Modular interoperability framework
LayerZero0x02Omnichain protocol
Axelar0x03Decentralized cross-chain network

Fisher Bridge System

Advanced feature enabling gasless cross-chain transactions:

  • Gasless Operations: Users don't need native tokens for gas on destination chains
  • EIP-191 Signature Authorization: Users sign structured messages to authorize transfers
  • Priority Fees: Economic incentives for Fisher executors who process transactions
  • Fisher Executor Control: Permissioned addresses with onlyFisherExecutor modifier
  • Nonce-Based Security: Replay attack prevention with sequential nonce tracking
  • EVVM ID Integration: Cross-instance security through unique EVVM identifiers

When to Use Crosschain Treasury

Ideal for:

  • EVVM on different blockchain than user assets
  • Multi-chain support requirements
  • Advanced features like gasless transactions
  • Interoperability protocol integration

Available Functions

Host Chain Station

External Chain Station

Cross-Chain Flow

External Chain          Host Chain
│ │
User Assets ──────→ EVVM Balances
│ │
External Station ←──→ Host Station

The stations coordinate through cross-chain messaging to maintain synchronized asset management.

Available Functions

Host Chain Station Functions

External Chain Station Functions

Supporting Libraries

For Fisher Bridge signature requirements and verification, see the Fisher Bridge Signature Structure documentation.

The Treasury Crosschain system implements standardized error handling and data structures for cross-chain operations.

Security Features

Security Considerations
  • Principal Token Protection: Principal token (MATE) withdrawals blocked via PrincipalTokenIsNotWithdrawable error
  • Cross-Chain Authorization: All messages require sender and chain ID validation
  • Fisher Bridge Signatures: EIP-191 compliant signatures with structured message format
  • Nonce-Based Protection: Sequential nonce tracking prevents replay attacks
  • Time-Delayed Governance: 1-day delays for admin and Fisher executor changes
  • Access Control: onlyAdmin and onlyFisherExecutor modifiers restrict critical functions
  • Protocol Validation: Chain-specific authorization for Hyperlane, LayerZero, and Axelar
  • Balance Verification: Insufficient balance checks with InsufficientBalance error protection

Gas Management

Each protocol requires different gas payment mechanisms:

  • Hyperlane: Native tokens paid to mailbox contract
  • LayerZero: Estimated fees through LayerZero endpoint
  • Axelar: Gas service payments for cross-chain execution

Users must provide sufficient native tokens to cover cross-chain transaction costs when initiating transfers.