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
- Call the SDK's
maximumInsuredExitwith your current wallet balances and the pair's reserves. It binary-searches for the largestqsatisfying the wallet INVALID, wallet long-share, and opposite-reserve bounds. For a YES position,qcomplete sets requireqINVALID,qYES for redemption, and enough additional YES to buy exactlyqNO. - Set
maxLongSharesIn,minEthOut, recipient, and deadline explicitly. - Build the exit as a ShareToken
safeBatchTransferFromto the router carryingqINVALID andmaxLongSharesInlong 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 approvedmaxLongSharesInandminEthOut. The UI does this for you from Exit → Preview trade → Exit 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.