Brokex Docs
Docs/OVERVIEW/Protocol Overview

Protocol Overview

High-level summary of Brokex's five core contracts and capital flows.

Five-Contract Architecture

Brokex V1 consists of five core smart contracts deployed on Base Mainnet:

  1. BrokexRegistry: Central configuration, role management (Ownable2Step + operator + treasury), market parameters, and Unified Mode A oracle view. Holds zero user or LP funds.
  2. BrokexRouter: Single user entry point for all trading actions and the only contract traders approve for USDC. Also escrows limit-open margins and reserves close-order shares.
  3. BrokexVault: ERC-4626 LP vault (brkUSDC, 9 decimals) that lends USDC to LongManager and manages the strict FIFO withdrawal queue.
  4. LongManager: Manages cumulative per-(trader, asset) long positions, physical NVDAc custody, Aerodrome CL swaps, and the global RAY (1e27) debt index.
  5. ShortManager: Deployed to preserve 5-contract wiring, but disabled on Base Mainnet V1 (shortEnabled = false).
LONG Position LifecycleBase Mainnet · 1.0x–2.0x
1. Trader MarginUSDC → BrokexRouter2. Vault Borrow(L−1)×M + 0.10% Fee3. Aerodrome SwapUSDC → NVDAc Spot4. Share CustodyHeld in LongManagerInterest accrues (2%–40% APR)5. Sell NVDAcSwap back to USDC6. Repay Vault DebtPrincipal + Interest7. Close Fee0.10% (50% LP / 50% BROKEX)8. Trader PayoutRemaining USDC → Wallet