Risk
Measured exit liquidity, market limits and the impact of a sudden price drop.
Reading onchain markets…
Executed protection
What protection costs
Same trader and price path, with and without spot hedging. A hedge can reduce an upward-price loss and still perform worse in a sharp downward gap.
| Scenario | Without hedge | Hedge PnL | With hedge, all costs | Conservative NAV | Residual spot |
|---|---|---|---|---|---|
| Flat | +$0.0010 | -$0.1295 | -$0.2264 | $99.87 | 0.00000000 NEAR |
| Up 20% | -$1.9990 | +$1.8444 | -$0.2702 | $99.84 | 0.00000000 NEAR |
| Down 15% | +$1.5010 | -$1.6101 | -$0.1974 | $99.89 | 0.00000000 NEAR |
| Gap down 80% | +$2.0000 | -$8.0259 | -$6.0799 | $93.97 | 0.00000000 NEAR |
| Up 20% · missed orders | -$1.9990 | +$0.9222 | -$1.1873 | $98.92 | 0.00000000 NEAR |
| Up 20% · half-size liquidity | -$1.9990 | +$0.9222 | -$1.1925 | $98.92 | 0.00000000 NEAR |
| Up 20% · last receipt delayed | -$1.9990 | +$1.9219 | -$0.1259 | $88.00 · pending excluded | 2.88084160 NEAR |
Reproduce and inspect every assumption
Run pnpm exec tsx scripts/hedge-replay.ts. Output includes every timestamp, execution attempt, cash balance, inventory and both NAV paths.
Anchor: 2026-11-12T11:36:55.000Z, NEAR 3.44864500 USD, retained signed observation in out/deployments/ref-spike/seed-price.json. All subsequent prices and execution outcomes are synthetic.
Initial vault $100.00, one $10.00 long with $2.00 collateral, $10.00 hedge budget. Ten one-minute build-up cycles; trader settlement at minute 12, then bounded $1.00 unwinds through minute 30. Gains cap at notional; losses at collateral. No intervening liquidator or cross-margin positions are simulated.
Each fill assumes 25 bps fee + 25 bps slippage + 15 bps adverse basis. Spot funding is zero; trader funding is 5 bps/hour for 12 minutes, collectibility capped by collateral. Common trading/borrow fees are omitted from both paths.
Each attempted cycle assumes 0.001000 NEAR gas, converted at that scenario’s price, and $0.001000 incremental data cost. These are explicit assumptions, not observed custody costs. They are deducted in “all costs”, even when paid by the operator; conservative vault NAV excludes those external operating costs.
Missed orders spend operating costs but change no inventory. “Half-size” is reduced executable spot quantity, not a partial Ref swap: Ref swaps are atomic. Delayed receipt executes at the venue but remains unknown to custody, freezes replacement orders and excludes all external capital from recognized NAV. Its economic mark is counterfactual, not spendable funds.
Recognized inventory uses a 2% haircut; trade PnL uses the actual scenario mark. This is a bounded sensitivity model, not historical performance, APR, an AMM liquidity forecast or proof of guaranteed neutrality.
Re-run the measurement
Read-only 1Click quotes from your machine. No key required.
pnpm depth:sampleMethodology & details
- Exit capacity
- Largest sell size whose net price impact and every smaller sampled size stay within 100 bps on NEAR Intents. Dry 1Click quotes into USDC on NEAR; platform fee removed (25 bps without a partner key, route-specific partner fee otherwise). A missing route is not liquidity.
- Limits
- The effective open-interest cap per side is the lowest of measured exit capacity, the protocol limit and vault backing. Capacity below $10,000 or older than 30 min pauses new entries; insufficient vault backing also blocks them. A stale displayed price requires a fresh execution price. Leverage tiers: 2× below $50,000, 5× from $50,000, 10× from $250,000, 20× from $1,000,000, subject to the market ceiling.
- Stress model
- One instantaneous price drop. Trader gains round down and are capped at position size; losses round up. Maintenance uses leverage locked at entry. Cross legs share account cash and equity; whole positions close by increasing equity / maintenance until health recovers. Penalties and vault payout caps are included. Debt is attributed to the vault owed, not netted across vaults. This is an estimate from separate reads, not a liquidation guarantee.
- Estimate boundaries
Snapshot estimate: position, account and vault views are independent reads, not an atomic chain snapshot. Borrow and funding stay frozen at their view values; liquidation has no close fee.
Only the selected oracle price is shocked. Exit capacity stays at its last measured value: future quotes, price impact, new accrual, orders and keeper execution are not forecast.
Settlement order is isolated position id, then cross account id; cross legs follow the contract's signed health-ratio/id order and stop on recovery. Actual transaction order can change vault payout caps.
Bad debt is an estimate: isolated negative equity includes unpaid fees, not a booked receivable writeoff. Cross debt is counted only when the final leg exits, by creditor vault; a row's final account writeoff may belong to other vaults. Unpaid positive payouts under vault caps are not included.
This is trader liquidation stress, not total hedged-vault PnL: external inventory repricing, hedge execution and custody recovery are excluded. Payout caps use vault cash, not external marked assets.
- History
- Up to 48 real onchain samples per market inside the last 24h. Faster sampling shortens retained coverage. Missed observations are not backfilled. Tightening compares the two latest samples when the latest is within 30 min.
- Selected market
- —
- Data sources
- Onchain market registry, depth history, open positions, cross-margin accounts and vault balances, read separately.