For the complete documentation index, see llms.txt. This page is also available as Markdown.

ZeUSD Router V2

Product Overview

The ZeUSD Router V2 serves as the primary entry point for user interactions with the ZeUSD protocol. It coordinates deposits, withdrawals, and protocol operations through a secure and compliant system.

Core Components

1. Access Control System

1.1 Role-Based Access

  • Integrated with AccessManager for role management

  • Key roles:

    • WHITELISTER_ROLE: Manages whitelisting and merkle roots

    • GUARDIAN_ROLE: Emergency controls

    • TREASURY_ROLE: Financial operations

    • ROUTER_ROLE: For deposit/withdrawal operations

    • GATEKEEPER_ROLE: For compliance operations

    • ORCHESTRATOR_ROLE: For vault management

1.2 User Access Management

  • Whitelist verification with merkle proofs

  • Blacklist integration with ZeUSD token

2. Protocol Integration Components

2.1 Vault Registry Integration

  • Manages vault configurations

  • Validates deposits against LTV ratios

  • Coordinates with price oracles

  • Tracks vault statuses

2.2 ZeUSD Token Management

3. Deposit Flow

4. Withdrawal Flow

Error Handling

Events

Security Features

  • Whitelist verification with merkle proofs

  • Integration with ZeUSD blacklist

  • Role-based access control

  • Input validation and bounds checking

  • Emergency pause functionality

Upgradeability

  • Implements UUPS proxy pattern

  • Managed through AccessManager

  • Preserves state during upgrades

  • Registry-based contract resolution

This updated documentation reflects the current implementation with:

  • Removal of LayerZero and Chainlink CCIP references

  • Updated role-based access control through AccessManager

  • New withdrawal system integration

  • CDP (ZeDP) NFT minting for position tracking

  • Merkle proof-based whitelist verification

  • Simplified deposit/withdrawal flows

  • Current error handling system

The diagrams provide visual representation of the key flows and component interactions in the current implementation.

Last updated