Force Closing Positions
In the cases where the counterparty you’re trading with might go unresponsive or refuse to act when it’s time to close or cancel, traders have the ability to force cancel quotes or positions. These force actions help keep the system fair and safe for everyone.
When force actions help
If you asked to cancel a quote and the solver never responded, you can trigger
forceCancelQuote, which refunds your locked funds so you aren’t stuck with a stale quote.If you requested to close a position but the solver didn’t act, you can call
forceCancelCloseRequestto restore the position to active, giving you the option to try again or choose a different solver.If the market has moved and your requested close conditions were met, but the solver didn’t finalize the close, you can use
forceClosePosition. This ends the trade and locks in a fair close price, even if the solver is ignoring you.
Force Closing a Position
Force actions are permissionless: once the conditions are met, anyone can trigger them on-chain. For a position to be force closed, the user needs to provide a signed price signature (HighLowPriceSig) from the Muon network. That signature includes the highest, lowest and average price over a time window, plus each party’s unrealized PnL at the end of that window.
The protocol checks that enough time has passed since the user asked to close (a grace period, so the solver had a fair chance to respond) and that your close request hasn’t expired. It also checks that the market actually moved through your requested close price by a safety margin: for a long, the price must have gone high enough; for a short, it must have gone low enough.
If everything checks out, the position is closed. The force close price is guaranteed to be at least the requestedClosePrice plus a penalty bonus. However, if the market average during that time window was even better than the penalty price, PartyA gets the market average instead.
Last updated
