Protocol modules
Omni-Vault (afUSD)
The ERC-4626 vault that takes the other side of every perp.
The Omni-Vault is an ERC-4626 vault on USDG. Deposit USDG and you receive afUSD shares; redeem them for USDG at the current share price. The vault is the counterparty to every index perp, so its depositors take the other side of trader PnL.
Where returns come from#
- Trading fees on every open and close (8–10 bps of notional by market), paid in full to the vault unless a protocol share is switched on.
- Spread — trades execute a few basis points away from the oracle mid, in the vault's favour.
- Funding — the side that makes a market's skew heavier pays funding to the vault, which carries the opposite side.
- Trader losses and liquidations — losing positions and the remaining margin of liquidated positions go to the vault.
- External yield — idle USDG can be allocated to one external ERC-4626 venue chosen by the owner. None is configured at deployment.
When traders close in profit, the vault pays them. The share price falls in that case, so a deposit can lose value. The 13-week T-bill rate shown on the site is a benchmark, not a promised return.
Share price#
is the traders' net unrealised PnL minus the funding they owe, at the last oracle prices — positive when the vault owes traders. Counting it means no one can deposit or withdraw at a price that ignores an open loss or gain. afUSD has 12 decimals (USDG's 6 plus a 6-decimal virtual-share offset that defeats first-depositor inflation attacks).
Withdrawals#
- A 10 bps exit fee is taken on redemptions and left in the vault for the remaining holders. The owner can change it, up to 1%.
- Withdrawable liquidity is the USDG the vault can release without touching trader backing:
- Stale prices pause the vault. If any market with open interest was last priced more than five minutes ago, deposits and withdrawals revert until someone pushes a fresh price batch. The keeper does this automatically, and the Terminal lets anyone do it.
Capacity#
The engine caps the sum of every market's net skew at 50% of the vault's assets, and each market has its own open-interest cap per side. Trades that would breach either revert.
Interface#
// ERC-4626: deposit, mint, withdraw, redeem, preview*, max*, convertTo*
function totalAssets() external view returns (uint256); // net of the trader claim
function availableLiquidity() external view returns (uint256); // USDG releasable now
function pricesFresh() external view returns (bool); // false pauses deposits/withdrawals
function withdrawFeeBps() external view returns (uint256);
function pay(address to, uint256 assets) external; // perp engine only