# Force Closing Positions

Symmio is a peer-to-peer perpetuals protocol: every position you hold is against a specific solver (PartyB), and it's that solver's job to fill your close requests. Most of the time this works without issue —  you submit a close, the solver fills it, and the position settles. But solvers are off-chain actors, and sometimes one goes offline, falls behind, or simply ignores a close request that no longer suits them. **Force close will allow you to close your position.** If the market has clearly reached your close price and your solver still hasn't filled, you can close the position yourself directly against the contract, without needing the solver's cooperation.

This page explains when force close is available, what price you'll get, what it costs, and the handful of things that can cause it to fail.

### When You Can Force Close

* **The position must have an open close request.** The quote needs to be in `CLOSE_PENDING`; meaning you've already submitted a `requestToClosePosition` that the solver hasn't filled.
* **The close request must be a LIMIT order.** Market close requests can't be force-closed, because there's no specific price the solver has failed to honor.
* **The cooldowns must have elapsed.** Two timers protect the solver from being force-closed on a price spike: an initial cooldown after the close request was submitted, and a second cooldown measured from the market hitting your price. Both must pass.
* **The market price must have reached your close price.** The contract verifies this against a signed Muon oracle price.

If any of those fail, the transaction reverts and the close stays pending as normal.

### The Price You Actually Get

Your force-close price is your requested close price, nudged slightly against you by a small gap. This gap exists so solvers aren't punished for a single wick that touches your limit and retraces.

The size of that gap is set per symbol by a parameter called `forceCloseGapRatio`. Your frontend should display the estimated force-close price before you submit so you know exactly what you're agreeing to.

The gap is the reason force close is best thought of as a safety net rather than an execution strategy: you'll get a price near your limit, but not quite at it. If the solver is filling you normally, `fillCloseRequest` will almost always give you a better price than force close.

### The Close Fee

Force close runs a full solvency check before it touches your position, and that check now includes a **close fee** in addition to any open-side trading fee already baked into the quote. The fee is computed as:

```
closeFee = filledAmount × closedPrice × quote.closeFee / 1e36
```

and subtracted from your available balance in the solvency math. The close fee rate itself depends on the affiliate your frontend is registered under, so different frontends can charge different close fees on the same symbol.

{% hint style="info" %}
If you're force-closing a losing position near your maintenance margin, the close fee is another subtraction that can push the solvency check negative. Ensure you have enough margin to force close a position.
{% endhint %}

### What Happens Under the Hood

You submit one transaction. Internally, the contract walks through up to three stages:

1. **Initialize.** Validates the cooldowns and order type, reads the market price from a signed oracle snapshot, computes your force-close price including the gap, and runs the solvency check against your account.
2. **Settle (conditional).** If either you or the solver doesn't currently have enough free balance to cover the close — usually because the funds are sitting as unrealized profit in *other* open positions — this stage pulls that unrealized profits into available balance so the close can finalize. Most force closes don't need this stage; it only activates when funds are tied up elsewhere.
3. **Finalize.** Refreshes the price snapshot and actually closes the position, transferring the uPnL and emitting a `ForceClosePosition` event.

Frontends can call a single bundled function that does all three in one transaction ([`forceCloseAndSettlePositionsUnified`](/contract-documentation/symmio-perps-v0.8.5/diamond-core-facets/forceclosesteps.md)).

{% hint style="info" %}
A **solver cannot permanently block your force close.** If the solver's free balance is insufficient even after the settle stage, the contract has a fallback path that still closes your position at your force-close price and handles the solver's shortfall separately, off your critical path. You get filled; the protocol sorts out the solver on its own.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.symm.io/trader-documentation/how-trading-works-in-symmio/force-closing-positions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
