Markets

Somnia Markets

Somnia Markets is the market infrastructure layer of Somnia. The order book, the matching engine and settlement run as smart contracts, so spot, perpetual and event markets on crypto assets and real-world assets (RWAs) share one engine, one liquidity root and one SDK, with no company in the middle of the trade.

Onchain order books for anything.

Why Somnia Markets

Launch a venue, not an exchange

Plug a branded front end into live order books and existing users. Matching, custody, settlement and indexing are already running, and you set your own fees.

Execute on fully transparent rules

Price-time priority and deterministic ordering are published in open contract code. Every order, match and fill is an onchain event anyone can audit.

Settle in the same block

Matching and settlement are a single atomic state transition. There is no off-chain matcher, no batch reconciliation and no settlement lag between trade and transfer.

Pay gas, not a protocol toll

Somnia Markets charges no protocol fee. Traders pay network gas, which stays a fraction of a cent, and venues decide what, if anything, to charge on top.

Four products, one engine

Spot, perpetual futures, binary event contracts and liquidity vaults are separate products with their own rules, but they share one onchain matching engine, one settlement path and one indexer.

Product What it is
Spot Trade tokens and RWAs on fully onchain central limit order books
Perpetual Futures Leveraged perpetuals on crypto and RWAs, with onchain funding
Binary Event Contracts Yes/no contracts on anything with a public data source
Liquidity Vaults Pooled capital that makes markets and funds zero-fee trading

From order to settlement, entirely onchain

Each step is a contract call or an onchain event. Nothing in the path depends on a privileged operator.

  1. Deposit once. A trader or desk funds a session-key account. Gas can be sponsored on core pairs, so trading starts without wallet prompts.
  2. Place an order. The order is submitted to the market contract through a venue front end, an API gateway or directly from code.
  3. Match by price and time. The matching engine contract pairs orders by price-time priority with deterministic ordering inside the block.
  4. Settle atomically. Balances move in the same state transition as the match. A fill is either complete and final or it never happened.
  5. Index and stream. The shared markets indexer records fills, order changes and candles, and serves them to every venue and API client.

Capabilities

  • Onchain matching engine. Matching is a smart contract with price-time priority and deterministic ordering, published as open code.
  • One engine, three market types. Spot, perpetual and binary event markets run on the same engine and the same settlement path.
  • Shared markets indexer. A high-throughput indexer exposes markets, orders, fills, candles and positions to every venue over GraphQL.
  • Market-maker gateways. Low-latency REST and WebSocket APIs, CCXT and MCP interfaces sit in front of the contracts for professional flow.
  • Builder fees. Front ends that route flow attach their own fee to orders, so distribution partners earn without a separate deal.
  • No MEV by design. No centralised sequencer and no proposer reordering. Fair ordering is a property of the protocol, not a policy.

Further reading

Placeholder generated from the platform site's product copy, until this section is sourced from the product's repo.Edit this page