Overview
FXOS is an onchain perpetuals market for global currency pairs: 30 markets across the majors, crosses and emerging-market currencies. You post USDG as collateral, choose a direction and leverage, and hold a position with no expiry for as long as it stays above the maintenance margin. A liquidity pool is the counterparty to every position; trader profits are paid from it and losses flow into it.
Opening a position
Deposit USDG into your FXOS margin account, then open a position with a margin amount and a leverage. The contract sizes the position, charges the open fee on top of the margin, and fixes the entry at the verified oracle price — provided it is within your slippage bound.
size = margin × leverage openFee = size × 5 bps (charged on top of margin) long : price ≤ acceptablePrice short : price ≥ acceptablePrice max leverage = 50× (per-market, read live from the contract)
PnL
PnL is linear in the relative price change, on the full position size. Profit on a single position is capped at its size, so the pool can always cover it.
long pnl = size × (price − entry) / entry short pnl = size × (entry − price) / entry pnl ≤ size equity = margin + pnl − fundingFee − closeFee
Fees
Opening costs 5 bps of size, closing 5 bps. Liquidations pay the liquidator up to 50 bps of size from what remains of the margin. All fees go to the liquidity pool. Oracle verification may cost a small native-token fee, forwarded with the transaction and refunded when unused.
Funding
Funding accrues every second from the imbalance between long and short open interest: the crowded side pays the pool, the other side is paid. The rate scales with the skew up to a per-market maximum.
skew = (longOI − shortOI) / (longOI + shortOI) rate = maxFundingRatePerSecond × skew (positive: longs pay) fundingFee = size × (cumulativeIndex − entryIndex)
Liquidation
A position is liquidatable when its equity falls below 1% of size. Anyone can liquidate it with a fresh oracle report. The liquidation price shown in the app is computed by the contract's own view function.
liquidatable ⇔ equity < size × 100 bps k = (size × mm + fundingFee + closeFee − margin) / size long liqPrice = entry × (1 + k) short liqPrice = entry × (1 − k)
Take profit & stop loss
Take profit and stop loss are stored onchain with the position. Once the oracle price reaches either level, anyone can execute the close by submitting a fresh report; the position settles to your margin account. A stop loss beyond the liquidation price will not trigger before liquidation.
Oracle
FXOS currently executes against the FXOS price service. For every open, close, trigger or liquidation the app requests a price signed by the service's key (EIP-712 typed data: market, price, timestamp); the SignedPriceOracle contract checks the signature against its allow-listed signer and rejects prices older than 60 seconds. The service refuses to sign while the FX market is closed or when its source quote is stale.
Trust assumption: traders rely on that signing key to publish honest market prices. The protocol is built to move to Chainlink Data Streams (reports verified onchain through Chainlink's verifier) with a single owner call once access is provisioned.
Displayed vs execution prices
Quotes on screen are indicative and only drive the interface (Pyth when configured, otherwise Yahoo Finance). The contract never trusts a price from the app: what you review is used only to set your slippage bound; the executed price is always the verified oracle report.
Market hours
Spot FX trades from Sunday 17:00 to Friday 17:00 New York time. Outside those hours oracle reports carry a closed market status and FXOS cannot open or close positions. Open positions remain onchain over the weekend and resume trading when the market reopens.
Contracts
Risk
Perpetual contracts are leveraged. A move against you of a fraction of a percent can liquidate a high-leverage position and the margin is lost. Funding can erode a position over time. Oracle or network outages can delay closes. Smart contracts can contain bugs. Only trade with funds you can afford to lose.