Brokex Docs
Base Mainnet (8453) · V1 LONG-ONLY LiveInternal Security Review Only · Unaudited

Spot-Backed Margin Trading for Tokenized Equities

Brokex is a decentralized margin protocol on Base. Every leveraged position is backed by real tokenized equity shares (NVDAc) purchased on Aerodrome Slipstream and held in on-chain custody by LongManager.

Base Mainnet
5 Contracts
Verified on BaseScan
Foundry Suite
202 Checks
Unit, fuzz & 10 invariants
NVDAc 5m Median Spread
0.0764%
vs Yahoo Finance Live
Live Leverage
1.0x – 2.0x
60% open / 80% liq LTV

Start Trading

Open 1.0x–2.0x spot-backed LONG positions on NVDAc, add margin, and configure SL/TP orders.

Provide Liquidity

Deposit USDC into BrokexVault (brkUSDC) to earn 50% of swap fees and 100% of borrow interest.

Protocol Architecture

Inspect the 5 core contracts, O(1) provision-free Vault NAV, Unified Mode A Oracles, and FIFO queue.

Financial Research

83-day hourly & 9-day 5m empirical study comparing Aerodrome CL, Chainlink, and Nasdaq/Yahoo.

Security & Reviews

Internal security reviews, BRX-01 vulnerability & fix, 202 Foundry tests/invariants, and audit status.

Protocol Architecture & Liquidity Flows

In V1 LONG-ONLY, BrokexRouter, BrokexVault, LongManager, and BrokexRegistry are live for NVDAc. ShortManager and Aave V4 are deployed/wired but disabled.

Brokex V1 — Core Smart Contract & Liquidity Topology
USDCNVDAc EquitybrkUSDCDebt / InterestRisk / Oracle
ACTORSBROKEX CORE CONTRACTS (BASE 8453)EXTERNAL VENUESTrader1x–2x LONG MarginApproves Router onlyLiquidity ProviderSupplies USDC LiquidityHolds brkUSDC (9 dec)Keeper BotOrders, Liq & FIFODIRECT / PAYMASTERBrokexRouterLIVESingle Entry & Order Escrow0xCC3841...Fb1d26Limit / SL / TP Margin HoldBrokexVaultLIVEERC-4626 Pool & FIFO Queue0x7a463b...F89148O(1) NAV · Offset = 3LongManagerLIVEPhysical NVDAc Custody0x9fa2C7...f7D24eGlobal RAY Debt Index (1e27)ShortManagerDISABLEDIsolated Short Collateral0x9Dbc42...8148b2shortEnabled = false in V1BrokexRegistryConfig, Roles & Mode A Oracle0x9fF053...231F298 · Zero FundsAerodrome CL PoolNVDAc / USDC (tickSpacing 10)0x853F5f...C7ab9Spot Swaps + 300s TWAPChainlink 24/7 FeedNVDA Reference Price0x48D973...af944≤ 2.00% Deviation GuardAave V4 SpokeIdle USDC Yield CompartmentDisabled (aaveSpoke = 0x0)USDCDepositbrkUSDCMarginBorrow / Repay + 50% FeeUSDCNVDAc2% Deviation CheckexecuteOrderAave V4 Rebalancing (Disabled in V1)
BrokexVault Capital Flows — O(1) NAV Accounting vs. Immediately Withdrawable LiquidityERC-4626 · brkUSDC (9 decimals)
Liquidity ProvidersDeposit USDC → Mint brkUSDCShare Price = NAV / SupplyVirtual Offset = 10³ (1,000)Earn 50% Fees + 100% InterestBrokexVault Balance Sheet1. Idle USDC BufferbalanceOf(Vault) − unclaimedUsdc2. Long Debt ReceivablestotalLongDebtShares × index / RAY3. Aave V4 Supplied (0 in V1)globalAaveEnabled = falsetotalAssets() = Idle + Debt + AaveLongManager BorrowersBorrows from Available LiquidityAccrues 2%–40% APR → NAV ↑Liquidation bad debt → NAV ↓Ring-Fenced FIFO ReservequeuedWithdrawalAssets() (Ceil)Protected from new Long borrowsSettled strictly at queueHeadWithdrawable / Borrowableavail = max(0, instant − queuedFifo)

Aerodrome CL vs. Nasdaq / Chainlink Price Integrity

Interactive empirical data from aerodrome-chainlink-stocks-study/ comparing on-chain Aerodrome swap prices against TradFi reference prints and Chainlink feeds.

Aerodrome CL vs. Nasdaq (Yahoo Ref) vs. Chainlink — Price & Spread Overlay
t = 11-29 19:25 UTCAero: $152.31TradFi: $149.80Chainlink: $149.61Spread: 1.673%
$127$148$170RELATIVE PRICE DEVIATION (%) — AERO VS CHAINLINK (SOLID) & VS TRADFI REF (DASHED)0.0%8.0%16.0%Aerodrome CLYahoo/Nasdaq RefChainlink Std