← JournalProduct · 12 min · Jul 12, 2026

Introducing the Sanect Order Book: a fully on-chain CLOB with sub-400ms settlement

Limit orders, market orders, partial fills, price-time priority matching — all fully on-chain with no off-chain relayer. Here's how it works, why it's different, and how to start trading.

in brief12 min read

Explains how the Sanect Order Book, a fully on-chain central limit order book with sub-400ms settlement, matches orders, charges fees, stays secure, and compares to AMMs.

  • The taker pays for matching inside their own transaction, so no off-chain relayer, keeper, or sequencer is needed.
  • Fees are 1 bps for makers and 5 bps for takers, hardcapped at 50 bps per side in the contract.
  • Two pairs are live at launch, SNCT/USDC and SNCT/USDT, deployed at block 1,915,526 with price-time priority matching.

Why an Order Book?

AMMs changed DeFi by eliminating the need for counterparties. You can swap any time there's liquidity in a pool. But AMMs have tradeoffs: you can't set a specific price, you suffer impermanent loss as an LP, and price impact on larger orders can be brutal.

Order books solve all three. You set your price. Your order waits until someone meets it. There's no price impact on passive orders — you get exactly the price you asked for. The reason on-chain order books haven't taken off historically is simple: gas costs and block times made them impractical. Placing an order, modifying it, cancelling it — every action is a transaction. On Ethereum at 12-second blocks and $5+ gas, that's unusable.

Sanect changes the math. At sub-400ms finality and fractions-of-a-cent gas, placing a limit order is as instant and cheap as clicking a button on a centralized exchange — except everything is verifiable on-chain, your funds never leave your wallet until matched, and there's no counterparty risk.

Architecture: How It Works On-Chain

The Sanect Order Book is a Central Limit Order Book (CLOB) — the same matching model used by every major traditional exchange (NYSE, NASDAQ, Binance). The difference: our order book is a smart contract, not a proprietary server.

Three Core Contracts

The system is composed of three contracts working together:

  • OrderBookFactory — Deploys new trading pair contracts. Each pair (e.g., SNCT/USDC) gets its own dedicated OrderBook contract. The factory also registers the router on each book for security.
  • OrderBookRouter — The user-facing entry point. Handles token approvals, transfers, and native SNCT wrapping (so you can trade native SNCT without manually wrapping to WSNCT). Routes calls to the correct OrderBook contract.
  • OrderBookViewer — A read-only contract for gas-free queries. Returns order book depth, estimates fill amounts, and provides paginated order data without costing gas.

The OrderBook Contract

Each trading pair has its own OrderBook.sol contract that holds all escrowed tokens and performs matching. Internally it maintains:

  • A sorted doubly-linked list of price levels — bids sorted high-to-low, asks sorted low-to-high
  • A FIFO queue at each price level — orders at the same price fill in the order they were placed
  • Escrowed balances — when you place a buy order, your USDC is locked in the contract. When you place a sell order, your SNCT is locked. Funds only move when a match occurs.

This is price-time priority — the same matching algorithm used by traditional exchanges. Better prices always fill first. At the same price, earlier orders fill first. Completely deterministic, completely transparent.

Taker-Pays-for-Matching Model

Most on-chain order books require an off-chain keeper or relayer to match orders — someone has to pay the gas to execute the matching logic. We eliminated this dependency entirely.

On Sanect, the taker pays for matching as part of their transaction. When you submit a market order (or a limit order that crosses the spread), the matching happens in the same transaction. The contract iterates through resting orders at the best available prices and fills them. No external service needed.

This works because Sanect's gas costs are negligible. Matching against 10 resting orders costs a few cents of SNCT in gas. On Ethereum, the same operation would cost $50+. The economics of sub-cent gas make the taker-pays model viable.

Order Types

Limit Orders

Place a buy or sell order at a specific price. Your order goes onto the book and waits until:

  • Another trader fills it (partially or fully)
  • You cancel it
  • It expires (if you set an expiration)

If your limit order crosses the current spread (e.g., placing a buy at or above the best ask), it fills immediately as a taker against resting orders — the unfilled remainder stays on the book as a maker.

Market Orders

Execute immediately at the best available price. Market orders walk through the book, filling against resting limit orders from best to worst price until your full amount is filled or the slippage limit is hit.

You set a worst-price parameter (slippage tolerance). If the order can't fully fill within your tolerance, the remaining unfilled portion reverts — you don't get a surprise fill at a terrible price.

Partial Fills

Large orders fill incrementally. If you place a buy for 10,000 SNCT but only 3,000 are available at your price, you get 3,000 filled immediately and 7,000 remain as a resting order. The filled portion settles instantly; the remainder waits on the book.

Fee Structure

The fee model incentivizes liquidity provision:

SideFeeExplanation
Maker0.01% (1 bps)You add liquidity to the book — minimal fee to encourage resting orders
Taker0.05% (5 bps)You remove liquidity from the book — pays for the matching gas overhead

Both fees are hardcapped at 50 bps (0.5%) maximum per side — this is enforced in the contract and cannot be raised by governance without a new deployment. For comparison, Uniswap charges 30 bps on every swap regardless of side, and centralized exchanges typically charge 10-25 bps for takers.

Self-Trade Prevention

The contract includes built-in self-trade prevention. If you have a resting sell at $1.00 and you submit a buy at $1.00 from the same wallet, the contract will NOT match them against each other. This prevents accidental wash trading and protects market makers who use the same address for both sides.

If you genuinely want to trade against yourself (e.g., to seed initial liquidity for demonstration), use a second wallet.

Security Design

Several layers protect traders:

  • Reentrancy guards — All state changes complete before external calls. Standard CEI (Checks-Effects-Interactions) pattern throughout.
  • Escrow model — Your tokens are locked in the contract only while your order is open. Cancel returns them immediately. There's no custodian — the contract IS the escrow.
  • Router registration — Only the registered Router contract can call matching functions. Direct calls to the OrderBook contract bypass the token-transfer logic and revert.
  • Overflow protection — All arithmetic uses Solidity 0.8+ built-in overflow checks. Price × amount calculations are checked for uint256 overflow before execution.
  • Expired order cleanup — Expired orders are automatically skipped during matching and can be cancelled by anyone (the escrowed tokens return to the original placer).

Live Trading Pairs

Two pairs are live at launch:

PairContract
SNCT/USDC0xe9Ae4819BEed607a675807bD46cE93860783b080
SNCT/USDT0x1964EF1E9c8700899F87B508167766B48A3C04cD

More pairs can be deployed by the Factory owner as demand materializes. Any ERC-20/ERC-20 pair is supported — the Factory is generic.

The Trading Interface

The trading UI at trade.sanect.com provides a professional-grade trading experience:

  • Real-time order book with depth bars showing cumulative liquidity at each price level. Click any price to auto-fill the order form.
  • Candlestick chart powered by lightweight-charts with multiple timeframes (1m, 5m, 15m, 1h, 4h, 1d).
  • Depth chart showing cumulative bid/ask liquidity as an area chart — immediately see where the big walls are.
  • Order entry with limit/market toggle, native SNCT support (no wrapping needed), and ERC-20 approval flow.
  • Open orders panel showing fill progress with visual bars, one-click cancel, and "Cancel All" for bulk management.
  • Trade history showing recent fills with price, amount, and timestamp.
  • Market stats ticker with 24h price, volume, high, low, and change percentage.

On mobile, the interface adapts to a tabbed layout (Chart / Book / Trade / Orders) so everything is accessible on smaller screens.

How to Place Your First Order

Limit Order

  1. Go to trade.sanect.com
  2. Connect MetaMask (the app prompts you to add the Sanect network if needed)
  3. Select the trading pair from the pair selector (top left)
  4. Choose Limit and Buy or Sell
  5. Enter the Price (in USDC/USDT) and Amount (in SNCT)
  6. Click the submit button — if trading native SNCT, no approval needed. For ERC-20 tokens, approve first.
  7. Your order appears in Open Orders below. Cancel any time.

Market Order

  1. Select Market order type
  2. Enter the amount you want to buy or sell
  3. Set your slippage tolerance (worst acceptable price)
  4. Submit — fills immediately against resting orders on the book

Backend: The Indexer

The trading UI is backed by a dedicated indexer service that scans OrderBook contract events and builds:

  • Trade history — every fill with price, size, and timestamp
  • OHLCV candles — aggregated at 1m, 5m, 15m, 1h, 4h, and 1d intervals for the chart
  • Ticker data — 24h volume, high, low, last price, change
  • Order state — open orders, fill percentages, cancellations

The indexer watches the chain in real-time. New trades appear on the chart within one block (~400ms). The order book depth display reads directly from the Viewer contract — it's always live, not cached.

Order Book vs AMM: When to Use Which

Sanect has both. Use the right tool for the job:

Order Book (trade.sanect.com)AMM (swap.sanect.com)
Best forSpecific price targets, larger orders, active tradingQuick swaps, long-tail pairs, passive liquidity
Price controlExact — you set the priceMarket-determined with slippage
WaitingOrder may wait on the bookInstant fill (if liquidity exists)
FeeMaker 0.01% / Taker 0.05%0.30% per swap
EarningMakers earn the spreadLPs earn 0.3% of volume + farm rewards
PairsSNCT/USDC, SNCT/USDT15+ pairs including all bridged assets

For traders who want to buy SNCT at a specific price and wait, the order book is ideal. For quick in-and-out swaps or trading pairs not yet on the order book, use the AMM at swap.sanect.com.

What Makes This Different from dYdX, Hyperliquid, etc.?

Most "on-chain order books" aren't fully on-chain:

  • dYdX v3 uses a StarkEx rollup with off-chain matching by a centralized sequencer. Orders are matched off-chain; only settlements are posted on-chain.
  • Hyperliquid runs its own L1 with proprietary validators. The order book state is on their chain, but it's not EVM-compatible and you can't verify the matching logic against a standard EVM contract.
  • Sei has an on-chain order book but requires off-chain market makers to actively provide liquidity through API integrations.

Sanect's order book is different in a specific way: the matching logic is literally in the smart contract. You can read it, verify it, and any contract can integrate with it. There's no off-chain component in the critical path. The indexer only provides read-optimized views — if it goes down, the order book still works (you just can't see the chart). Everything state-changing is on-chain.

The tradeoff: we don't support sub-millisecond order updates or the kind of HFT strategies that require microsecond latency. Our target user is the DeFi trader who wants transparent, verifiable, non-custodial limit order trading — not the HFT firm optimizing for queue position.

Deployed Contracts

All contracts verified on scan.sanect.com:

ContractAddress
OrderBookFactory0xE850462927f45C1d782A6aBF1dD2306EB7daC35f
OrderBookRouter0xea675fB2126228457D03D602e7590b1E64256c94
OrderBookViewer0xf6Fd048ED7D9913d4E8b61C1e674fc86C02c605c
SNCT/USDC OrderBook0xe9Ae4819BEed607a675807bD46cE93860783b080
SNCT/USDT OrderBook0x1964EF1E9c8700899F87B508167766B48A3C04cD

Deploy block: 1,915,526. Factory owner: deployer EOA (migrating to protocol-governance Safe on Day 14).

Earning Airdrop Points

Trading on the order book earns airdrop points through the DEX swap product category (Product #1 in the 13-product matrix). Every trade contributes 0.5 points per USD of fees paid. Since taker fees are 5 bps, a $1,000 market order generates ~$0.50 in fees and earns ~0.25 points. Active traders accumulate points faster, but there's no cap — keep trading, keep earning.

Check your points at airdrop.sanect.com.

What's Next

  • More pairs — SNCT/WETH and SNCT/WBTC order books once liquidity justifies them
  • Advanced order types — stop-loss, take-profit, and trailing stop via a keeper layer (the base contract stays simple)
  • API documentation — REST endpoints for programmatic trading, chart data, and order management
  • Market maker incentives — fee rebates or point bonuses for consistent spread provision

The order book is live at trade.sanect.com. Connect MetaMask, place a limit order, and experience what on-chain trading should feel like — instant, transparent, and fully in your control.

Questions this answers3 · straight from the article
How does the Sanect order book match orders without an off-chain keeper?

The taker pays for matching as part of their transaction; the contract iterates through resting orders at the best prices and fills them. Sub-cent gas makes this economical.

What fees does the Sanect order book charge?

Makers pay 0.01% (1 bps) and takers pay 0.05% (5 bps). Both are hardcapped at 50 bps per side and cannot be raised without a new deployment.

When should I use the order book instead of the AMM?

Use the order book for specific price targets, larger orders, and active trading; use the AMM at swap.sanect.com for quick swaps and long-tail pairs.

— end · last updated
Share on X ↗ Discuss on Telegram ↗