> For the complete documentation index, see [llms.txt](https://docs.symm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.symm.io/trader-documentation/how-trading-works-in-symmio/settlement.md).

# Settlement

When you trade on Symmio, your positions gain or lose value over time. That running total is your unrealized PnL: it exists on paper but isn't yet locked in as realized PnL. Separately, you hold an allocated balance, real collateral you can use to cover losses, open new positions, or withdraw. The protocol requires that allocated balance to stay sufficient at all times, which means you can't close a losing trade unless you have enough realized collateral to cover the loss.

That creates an awkward situation: a trader can be profitable overall yet still be blocked from closing a losing position, because all the profit is locked up as unrealized gains in other open positions. Settlement is the mechanism that converts some of those unrealized gains into usable balance.

### How it works

Say **Bob** has three open positions:

1. **Position 1** with **Rasa Hedger**: unrealized profit of **$300**
2. **Position 2** with **PerpsHub Hedger**: unrealized profit of **$100**
3. **Position 3** with **PerpsHub Hedger**: unrealized loss of **$250**

Bob is $150 in profit overall and wants to close Position 3, but his allocated balance is too low to cover the $250 loss.

The solver steps in. PerpsHub submits a signed message from the Muon oracle attesting to current market prices and the unrealized profit and loss across Bob's positions. The contract verifies the signature, checks that everyone stays solvent, and settles: $150 from Position 1 and $100 from Position 2 are realized into Bob's allocated balance. Bob now has $250 of spendable collateral, so PerpsHub can fill the close on Position 3, which has stayed unchanged throughout. Nobody takes on uncollateralized risk, and Bob isn't stuck waiting for the losing trade to recover.

In earlier versions, settlement dealt only with position PnL. In 0.8.5 it also handles accumulated funding fees, so when a solver settles your positions, position PnL and any owed funding are factored in together.

A few protections are built into the process: the updated prices must always fall between the original entry price and the signed current price, neither side is allowed to end up insolvent as a result, and multiple positions can be settled at once, letting a solver free up collateral across many trades quickly. More detail is in the [Settlement](/contract-documentation/symmio-perps-v0.8.5/diamond-core-facets/settlement.md) docs.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.symm.io/trader-documentation/how-trading-works-in-symmio/settlement.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
