How-to guide

Exit an insured position

Use this guide to convert a directional position back into ETH without giving up more INVALID insurance than you hold.

Find and submit the exit

  1. Call the SDK's maximumInsuredExit with your current wallet balances and the pair's reserves. It binary-searches for the largest q satisfying the wallet INVALID, wallet long-share, and opposite-reserve bounds. For a YES position, q complete sets require q INVALID, q YES for redemption, and enough additional YES to buy exactly q NO.
  2. Set maxLongSharesIn, minEthOut, recipient, and deadline explicitly.
  3. Build the exit as a ShareToken safeBatchTransferFrom to the router carrying q INVALID and maxLongSharesIn long shares with the encoded request (the router reference lists the payload fields). Simulate it, then simulate again immediately before submission and confirm the result still satisfies the approved maxLongSharesIn and minEthOut. The UI does this for you from ExitPreview tradeExit insured YES.

The UI reports whether a request exceeds the wallet's INVALID or the combined long-share and pair-liquidity capacity. In either case the remainder has not been lost; it stays in the wallet as directional shares. Acquiring more INVALID helps only when INVALID is the binding limit. Why early ETH exits are limited works through the bounds with numbers.