Introduction
Architecture
The contracts, a price service and a keeper, and how value moves between them.
AevumFi is a set of contracts plus two off-chain services. The contracts hold every balance and enforce every rule; the services only submit data and transactions that anyone could submit — plus, for ladder vaults whose owners chose it, re-centring. The oracle-priced core looks like this:
Price service · /api/prices
- 34 index quotes + ETH
- one EIP-712 signed batch
AevumFiOracle.sol
- signer threshold
- freshness
- latest price per feed
PerpEngine.sol
- isolated USDG margin
- funding
- liquidations
- limit & stop orders
OmniVault.sol (afUSD)
- ERC-4626 on USDG
- counterparty to every perp
DarkPool.sol
- commit → reveal → cross
- WETH / USDG balances
Keeper · /api/keeper
- liquidates positions
- executes limit & stop orders
- settles dark-pool batches
- pushes prices
Contracts#
| Contract | Role |
|---|---|
AevumFiOracle.sol | Verifies signed price batches (EIP-712, signer threshold, freshness) and stores the latest price per feed. |
OmniVault.sol | ERC-4626 vault on USDG (afUSD). Counterparty to the perp engine; optional external ERC-4626 yield venue for idle USDG. |
PerpEngine.sol | Isolated-margin perps on 34 indices: positions, funding, orders, liquidations, open-interest caps. |
DarkPool.sol | Internal WETH/USDG balances and sealed-order batch auctions crossed at the oracle mid. |
LadderFactory.sol · LadderPool.sol | One ladder pool per pair: price rungs on a geometric grid, per-rung fees, an on-chain EMA and volatility gauge. |
LadderVaultFactory.sol · LadderVault.sol | A user-owned vault per ladder strategy (a minimal clone), re-centred by its restricted operator. |
AevumLaunchpad.sol · AevumToken.sol | The Aevum Engine: fixed-supply launches on a locked ladder, and the fee harvest. |
AgentStreamRoute.sol · FloorBackstopRoute.sol · BuybackBurnRoute.sol | The Autonomous Capital Routes a launch's creator fees flow through. |
FloorBook.sol · FractionVault.sol | The on-chain NFT listing book a floor backstop sweeps, and the fractions it mints for holders. |
None of them is upgradeable. Those with admin settings use two-step ownership, and every numeric setting has hard bounds in the contract (see security & trust).
Ladders and launches#
Ladder pools price themselves from their own rungs, so they need no oracle:
Launchpad (Aevum Engine)
- deploys a fixed-supply token
- owns its locked 120-rung ladder
- harvests the ladder's fees
AevumToken + LadderPool
- whole supply on the ladder
- 1% fee on every fill
Creator
- can point its share elsewhere
Autonomous Capital Route
AgentStreamRoute
- convert
- 7-day stream
- agent wallet
FloorBackstopRoute
- buy the floor on FloorBook
- FractionVault
- every holder
BuybackBurnRoute
- bid rungs under the price
- take the fills
- burn
LadderVault
- operator re-centres within your limits
- kill switch: setOperator(0x0)
LadderPool
- bids below the price
- asks above it
Traders
OmniVault.sol (afUSD)
- fees deposited as afUSD for you
- WETH fees sold for USDG first
How value moves#
- Opening a position moves the trader's USDG margin into the engine. The open fee goes straight to the vault.
- Closing pays the trader their margin plus PnL minus the close fee. A profit is paid by the vault; a loss is sent to it.
- Funding flows between each position's margin and the vault. The side that makes the market's skew heavier pays, so the vault is paid for carrying the opposite side.
- Liquidation pays the liquidator a fee out of the margin and sends the rest of the margin to the vault.
- Dark-pool fills move tokens between traders' internal balances. The pool fee and rounding dust go to the treasury.
The vault's share price#
The vault marks itself against open positions, so its share price includes what traders are owed (or owe) right now:
where is the net unrealised trader PnL minus funding owed, summed over every market with open interest. The engine keeps exact per-market sums so is a closed form, not a loop over positions. Because this value depends on prices, the vault refuses deposits and withdrawals whenever open interest is priced on data older than five minutes — the keeper keeps it fresh.
Off-chain services#
- Price service —
/api/pricesfetches quotes, rejects bad data, and signs a batch with the oracle signer key. Anyone can relay a signed batch; nobody can alter one. - Keeper —
/api/keeperruns on a schedule. Every action it takes is permissionless — except re-centring the ladder vaults whose owners made it their operator — and each transaction is simulated before it is sent.