Core Contracts

Overview of the DX Terminal Pro contracts

Protocol Control

  • Authority: Central ACL and registry contract. Manages roles, contract locations, vault registration, token registration, default vault configurations, and experiment finalization.
  • Purgatory: Holds reserved/pre-graduation token balances and supports controlled distribution, sweeping, and managed external calls.

Vault Layer

  • AgentVaultFactory: Deploys EIP-1167 AgentVault clones, registers vaults in Authority, and enforces creation rules (including sanctions checks when enabled).
  • AgentVault: Per-user vault bound to an Agent NFT. Handles owner deposits/withdrawals, strategy metadata, operator-mediated trading, presale participation, and vault closure flow.

Token Launch and Distribution

  • XDRC20Factory: Deploys new XDRC20 tokens and registers them with Authority.
  • XDRC20: Launch token with pre-graduation transfer gating via Authority, plus graduation and reap state transitions.
  • TokenLaunchpad: Launch orchestrator that deploys tokens, initializes Uniswap v4 pools, and mints initial LP positions.
  • TokenPresale: Vault-only WETH presale system with funding, migration to launchpad, batched distribution, and refund/failure handling.

Liquidity and Pool Management

  • PositionRegistry: Stores canonical per-token LP position metadata (pool id, position id/count, fee, hook, orientation).
  • LPManager: Manages protocol LP positions (exit, compound, consolidate, migrate-to-lower-fee, reserve accounting, and controlled sweeps).
  • XDHook: Uniswap v4 hook enforcing pre-graduation access rules and charging/claiming swap fees (WETH-preferred fee accounting).

Reap Lifecycle

  • Reaper: Coordinates reap initialization, holder snapshot/distribution batches, reserved-pot accounting, and post-distribution TWAP buy execution/finalization.

Upgradeability Model

  • Proxy-backed core contracts: Authority, Purgatory, PositionRegistry, LPManager, TokenLaunchpad, TokenPresale, Reaper.
  • Non-proxy runtime contracts: AgentVaultFactory, AgentVault (clone implementation), XDRC20Factory, XDRC20, hooks/XDHook.
Last modified March 24, 2026: add resource page (1609a9d)