Skip to main content
When your position reaches its maturity date, it settles automatically. Your final PnL is calculated using the fixing price — the EUR/USD spot price recorded from Pyth Network at 4 PM UTC on the maturity business day. Profitable positions receive USDC from the pool; losing positions have losses deducted from locked margin.
Settlement is permissionless — anyone can trigger it. In practice, the automated keeper service handles settlement, but the smart contracts allow any address to settle matured positions.

What Happens at Maturity

1

Your maturity date arrives

When the current time reaches or passes your position’s fixing timestamp (4 PM UTC on the maturity business day), your position becomes eligible for settlement.
2

The fixing price is recorded

The Pyth EUR/USD spot price at the fixing time is captured onchain. This is the authoritative settlement price. All positions maturing at the same timestamp settle against the same fixing price.
3

Your PnL is calculated

Final PnL is computed from the difference between the fixing price and your entry strike:
  • LONG position: profit when fixing price > entry strike
  • SHORT position: profit when fixing price < entry strike
Your loss is capped at your locked margin — you can never owe more than what you deposited.
4

USDC flows are settled

Depending on whether you’re in profit or loss, USDC moves between your margin account and the pool.
5

Trading fee is collected

A settlement trading fee (0.05% of notional) is deducted from your remaining margin. If your margin was depleted by losses, the fee is reduced to whatever remains — settlement never fails due to insufficient fee funds.
6

Position is closed

Your position status changes to CLOSED with the reason “matured.” You can withdraw any remaining margin from your collateral account.

Settlement Outcomes

Your profit is transferred from the pool to your margin account.Example: 10,000 USDC LONG position, entry strike 1.0800, fixing price 1.0900.
  • PnL: +$92.59
  • Pool pays you $92.59
  • You receive: locked margin + $92.59 - trading fee

The Fixing Price

The fixing price is the anchor for maturity settlement — it determines your final PnL.
PropertyDetail
SourcePyth Network EUR/USD spot price
Timing4:00 PM UTC on the maturity business day
WindowMust be within ±2 minutes of the fixing time
PermanenceOnce recorded, a fixing price cannot be changed
SharedAll positions with the same maturity settle at the same fixing price
The fixing price uses the Pyth spot oracle, not the publisher’s forward price. This ensures the settlement price is independently verifiable and not dependent on the publisher’s computations.

Batch Settlement

The keeper service settles multiple matured positions in a single transaction for gas efficiency. Settlement processes each position individually — if one position cannot be settled (e.g., the fixing price hasn’t been recorded yet), it is skipped and the batch continues.
You don’t need to do anything for settlement — the keeper handles it automatically. If you want to settle your own position immediately, you can call the settlement function directly from the smart contract.

Settlement vs Early Termination

Maturity Settlement

  • Happens automatically at maturity
  • Uses the fixing price (Pyth spot at 4 PM UTC)
  • Deterministic and publicly verifiable
  • No action required from you
  • Standard trading fee only

Early Termination

  • You choose to close before maturity
  • Uses the live forward price (includes time-value premium)
  • Forward price may differ from what the fixing price would be
  • Requires an active decision
  • Standard trading fee only
If your position is both matured and liquidatable (equity below maintenance margin), it must go through the liquidation path — not standard settlement. Liquidatable positions incur the liquidation penalty on top of the trading fee.

Next Steps

PnL Calculation

Exact formulas for how PnL is computed.

Early Termination

Closing your position before maturity.

Liquidation

What happens when positions fall below maintenance margin.