Explanation
Why early ETH exits are limited
Turning a directional position back into ETH means rebuilding complete sets. Three wallet and pool quantities cap how many you can rebuild.
The three bounds
To redeem q complete sets from a long-YES wallet, the router needs q INVALID, q YES for the sets, and extra YES to purchase exactly q NO:
q ≤ wallet INVALIDq + required YES input(q) ≤ wallet YESq < pair NO reserve
The SDK binary-searches these monotonic conditions; the chosen candidate is then simulated through the router.
- User → Router: q INVALID + (q + swap input) YES
- Router → Pair: exact-output swap for q NO
- Pair → Router: q NO
- Router → SecurityPool:
redeemCompleteSet(q) - SecurityPool → Router: current ETH value
- Router → User: measured ETH delta
Example
A wallet holds 150 INVALID and 260 YES. If buying 100 NO requires 112 YES, redeeming 100 sets needs 212 YES and succeeds. Trying 150 might require 181 extra YES, or 331 in total, and fails on YES even though INVALID would cover it. If the wallet instead had only 60 INVALID, at most 60 sets are insured. Whatever YES cannot be insured remains a valid directional asset; it has not disappeared.