For the complete documentation index, see llms.txt. This page is also available as Markdown.

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 docs.

Last updated