Autonity Historical Series · E-02 · Margin Mechanics

Margin, Maintenance
& Liquidation

How the AFP DCC computed margin health, maintenance thresholds, and liquidation prices before every settlement epoch. The same computation runs on Hyperliquid and every other perp venue today.

Autonity stood down in February 2026. This explainer preserves its mechanics. Not financial advice.

Historical · Feb 2026 Educational Interactive demo
01 · The core idea

Why margin health matters

When you open a leveraged position, you post a fraction of the notional as margin. The clearing system does not wait for you to lose everything — it liquidates you once your margin drops below a maintenance threshold. This protects the other side of your trade from a situation where you cannot cover your loss.

The AFP DCC ran this computation on-chain before every settlement epoch. Every Forecastathon participant holding an open position had their margin health checked deterministically, using the formula below. GREEN meant safe, AMBER meant near the threshold, RED meant at-risk of immediate liquidation.

The DCC's job

The DCC (Decentralized Clearing Contract) was the on-chain layer that held margin, computed health, and triggered liquidations. It did not match trades. Venue-agnostic clearing meant a position opened on one venue could be liquidated by the DCC regardless of which venue the intent-signing key pointed to. See E-03 for the full clearing design.

02 · The math

The margin health formula

unrealized_pnl = side_sign × (mark − entry) × (notional / entry) margin_balance = margin_posted + unrealized_pnl maintenance_threshold = notional × mmr buffer = margin_balance − maintenance_threshold buffer_pct = buffer / maintenance_threshold × 100 Health classification: GREEN → buffer_pct > 100% (buffer > full maintenance threshold) AMBER → 0% < buffer_pct ≤ 100% (buffer exists but thin) RED → buffer_pct ≤ 0% (at or below liquidation threshold) Liquidation price (isolated margin): liq_price = entry − side_sign × (margin_posted − maintenance_threshold) / (notional / entry)

The mark price is what drives unrealized PnL. On Autonity, the AFP DCC used the oracle-aggregated price (computed by the same validator network that settled forecasts) rather than a last-trade price. This prevented wash-trading from manipulating margin health.

03 · Interactive demo

Try the margin health calculator

🔒 All inputs are processed locally in your browser. No data is transmitted. Do not enter real personal data — use synthetic or anonymised inputs only.
Preset
Position Inputs
Collateral deposited to hold this position
e.g. 0.05 = 5% of notional
Margin Health
GREEN
Margin buffer is healthy
BUFFER PCT
--
Buffer vs maintenance threshold
04 · Where this lives now

Margin health on live venues

AFP/DCC mechanicLive heir
On-chain margin health check per epochHyperliquid runs margin checks continuously; liquidation is automatic once health drops below 1
Maintenance margin rate (MMR 5%)Hyperliquid: ~2.5% at 20x leverage (1/(2×L)); dYdX v4: ~3% for BTC, higher for alt-perps
Oracle-settled mark priceHyperliquid uses a median of top CEX spot prices; Binance uses a composite index
Isolated margin modelHyperliquid and most perp venues support isolated mode; Binance Unified Margin mixes positions at the account level
DCC liquidation triggerAll modern perp venues auto-liquidate at MMR; some use partial liquidation (Binance) before full liquidation