Skip to content

Smart Contracts

Architecture Overview

ZeroLedger's smart contract system consists of five several contracts designed for modularity, security, and gas efficiency:

  • ZeroLedger Vault: Core contract managing commitments and transactions
  • Morpho Lending Vault: A permissionless immutable ERC-4626 vault that lends USDC tokens on isolated USDC/ETH Morpho Market
  • Forwarder: Meta-transaction and batching support (permissionless)
  • ProtocolManager: Protocol-level parameter management (fees, TVL limits)
  • Administrator: Manages administrative functions and protocol governance
  • InvoiceFactory: Creates one-time proxy contracts for private invoicing
  • TokenDistributor: A contract that manages ZRL tokens, farming & airdrop.
contracts-scheme

All contracts can be found in the official contracts repo

Security Features

  • Reentrancy Protection: Guards against reentrancy attacks
  • Access Control: Proper authorization for all functions
  • Input Validation: Comprehensive validation of all inputs
  • Emergency Pause: Ability to pause the contract in emergencies

Meta-transaction Support

The Forwarder contract is permissionless and extends the OZ meta-transaction contract, enabling meta-transactions and advanced transaction patterns:

  • Gasless Transactions: Users can execute transactions without paying gas directly
  • Batch Operations: Multiple operations in a single transaction
  • Paymaster Integration: Third-party gas payment support
  • Signature Verification: EIP-712 and ERC1271 compliant signature verification via solady signature checker based on EIP-6492

Multisig Governance

All administrative functions are managed through multisig wallets, ensuring no single entity can make critical changes:

  • Admin Multisig: Controls protocol roles management
  • Maintainer Multisig: Controls protocol contract upgrades
  • Security Council Multisig: Manages emergency pauses and emergency withdraw from Morpho Lending Vault to ZeroLedger Vault
  • Treasury Manager Multisig: Controls fee parameters, Security Council fees and treasury operations

Deployment Information

Network Deployments

Base Mainnet

  • Zeroledger Vault: 0xE0Eefe4AA0cB32740aDFD8083AbeC255AaC3b379
  • ZK Verifier: 0xfaf0cc3f0A38021f9d873130ACc62F7824Fc339D
  • Morpho Lending Vault: 0x9b939BE68658998efD2aA2589E34f1b49D6b0C5f
  • ProtocolManager: 0xCC499487F6a1780dB9410a65408B98E63346aCfe
  • Forwarder: 0xf3430970980d60BEEcEcC5f72b3868B891127c83
  • Administrator: 0x86f5A233a477fd2Fd338F294Ae7277407b60655a
  • InvoiceFactory: 0xaAc5Dfc0Cb60b5F829e67749a72101A9d7C67FaD
  • InvoiceImplementation: 0xB174b2FC3d53951C8d1a5844f1ad642D06Cc5Cab
  • TokenDistributor: 0xa7c6a53463b005c22f41c8f408983f4019ccb509
  • ZeroLedger Governance Token: 0x9c9b79ed7f210d65402fb36cd18bf8dde7e85c1a