Position Lifecycle
Understand position amounts, collateral, reductions, and settlement, from actual token borrowing and sale to repurchase and repayment.
A Short borrows Token from this market’s separate lending inventory and sells it into the external Pair; exiting requires actually buying Token back and returning it. Users pay and receive native BNB; the Pair settles in WBNB. Sale proceeds remain in the Engine’s position funds.
Opening and increasing positions
- Confirm migration and Engine readiness; check pauses, inventory, and capacity.
- Update the Funding index and risk checkpoint; position increases first settle Funding on old shares.
- Check added collateral against the additional notional, and enforce the Token borrowing limit.
- Actually borrow Token and sell it into Pair; verify transfers before recording the position and debt.
Opening/increase block lock
If the latest successful opening/increase occurred in block N, partial/full closing and liquidation are first allowed in N+1. Separate transactions in the same block cannot bypass this. Each increase updates the whole position’s openedBlockNumber.
Collateral additions and partial closes do not reset the lock. One still-locked position reverts an entire liquidation batch. This rule is separate from TWAP’s 300-second observation window.
Adding and adjusting collateral
Only collateral additions are supported; no separate withdrawal entry point exists for live positions. Partial closes also return no funds to the wallet.
Adding collateral first increases position funds, then settles Funding on all shares, allowing new funds to cover existing arrears. It does not increase Token debt.
Close partially
The user specifies part of the Token debt to repay. Engine settles Funding on closed shares, uses position funds to repurchase Token, and reduces debt, notional, and capacity usage.
- Closed shares round up while closed notional rounds down; they may differ by a smallest unit.
- Remaining shares keep their Funding snapshot and historical amounts owed. Reducing a position does not erase accrued costs.
- After repurchase, read Pair again and check the remaining debt’s full repurchase cost against the 120% safety ratio.
- The collateral field does not automatically decrease in proportion to a reduction. Partial closes neither pay cash to the wallet nor move Legacy into claimable status.
Full close and Legacy
A normal full close settles Funding, then repurchases all debt Token. After inventory is returned, remaining BNB is paid to the designated recipient and the position closes. Insufficient funds, rejected payment, or failed protections revert according to the relevant checks.
Earned Legacy goes into the position’s separate claimable ledger for its original owner. Choosing a closing payout recipient does not transfer Legacy ownership.
Pricing and execution boundaries
Position health uses the live Pair’s cost to repurchase the entire debt. Spot price times token quantity, TWAP price, or notional alone cannot replace it. Spot trades, tax processing, and other position operations after a quote can change the actual repurchase result.