Markets
Somnia Markets
Onchain order books on Somnia: spot, perpetual and binary event markets on one matching engine.
Somnia Markets runs order books as smart contracts on Somnia. Spot, perpetual and binary event markets share one matching engine, one settlement path and one indexer.
| Product | Status | What it is |
|---|---|---|
| Spot | Live | Central limit order books for tokens and RWAs |
| Perpetual Futures | Testnet | Perpetuals on crypto and RWAs, with onchain funding |
| Binary Event Contracts | Live | Yes/no contracts resolved by the Somnia Oracle |
| Liquidity Vaults | Coming soon |
To build on the markets, use the Markets SDK. As the Somnia Explorer's Markets section lists them:
| Product | Status | What it is |
|---|---|---|
| Somnia Venues | Live | Your markets under your brand, on the shared books |
| Somnia Markets | Live | The contracts, the SDK and the indexer behind every market |
| Somnia Analysis | Live | The liquidity behind every book, and the risk each venue carries |
From order to settlement
Each step is a contract call or an onchain event.
- Deposit. A trader funds an account, which can use session keys to trade without a wallet prompt per order.
- Place an order. The order is sent to the market contract, from a venue front end or directly from code.
- Match. The matching engine contract pairs orders by price-time priority, with deterministic ordering inside the block.
- Settle. Balances move in the same state transition as the match. A fill is either complete or it didn't happen.
- Index. The shared markets indexer records fills, order changes and candles, and serves them to venues and API clients over GraphQL.
Fees
Somnia Markets charges no protocol fee. Traders pay network gas, and venues can charge their own fees:
- Event markets. Each venue sets its own fee parameters and fee recipient, and a market keeps the fee it was created with.
- Spot markets. A venue earns a builder fee on an order it routes when the order carries its builder attribution, the trader has approved it as a builder, and the pool's fee cap allows it.
See Somnia Venues for how to set this up.