Opening a short
The market must beLive and not frozen. Your collateral must cover the
drawn debt at the initial collateral ratio (initial_cr_bps, for example
150%):
A worked example
Index: 100 SOL per unit. You hold a card worth about 100 SOL and want to hedge all of it.- Mint 1,000,000 tokens (one unit, 1e12 base units). Debt value = 100 SOL.
- At 150% initial CR you must post at least 150 SOL. Say you post 150 SOL.
- You sell the synth for roughly 100 SOL (minus fees and slippage).
- Maintenance CR is 120%, so you are liquidatable when
150 / index < 1.2, that is when the index rises above 125 SOL.
Managing the position
Watch your CR as the index moves. The index used everywhere is the smoothed
index_twap, not raw pushes, so you have some time to react to spikes, but
not unlimited time.
Funding while short
Your debt is stored funding-scaled, so funding applies continuously without touching your account:- Token above index (positive premium): funding pays shorts. Your debt shrinks slowly. You are being paid to hold the tether side.
- Token below index (negative premium): funding charges shorts. Your debt grows slowly, nudging you to buy cheap tokens back and repay, which is exactly the arbitrage that lifts the price.
max_funding_bps_per_day), so funding is a drift,
never a shock.
Closing out
1
Buy back the synth
Acquire tokens equal to your current debt. Current debt =
debt_scaled * funding_index / 1e12, read from your position and the
market.2
Repay
repayBurn(currentDebt) returns the tokens to the reserve and zeroes the
debt.3
Withdraw and close
withdrawCollateral(all) returns your SOL, then closePosition() reclaims
the account rent.
