What Decibel Is
Decibel is a perpetuals and spot exchange where every order is placed, matched, and settled on the Aptos blockchain. There’s no off-chain server deciding who trades with whom. The matching logic is a smart contract that anyone can verify. Three technical pieces make this work:- An on-chain order book: a central-limit order book (CLOB) implemented in Move, shared by perp and spot markets. How it works.
- A perp clearinghouse: the
clearinghouse_perpmodule tracks positions, margin, PnL, and liquidations. How it works. Spot settles through its own clearinghouse instead, exchanging escrowed assets on each fill with no positions or margin. More on spot. - Composable DeFi primitives: orders, positions, vaults, and collateral are all on-chain resources that other apps can build on. More on vaults.
Accounts and Trading
Decibel separates who logs in, who signs trades, and where collateral lives:
The typical flow: Login Wallet -> create API Wallet -> create Trading Account -> deposit USDC -> trade.
The On-Chain Orderbook
Decibel uses a central-limit order book (CLOB) implemented in Move:- The order book, matching engine, and clearinghouse work together to:
- Check margin and risk.
- Route between maker/taker, TWAP, and bulk orders.
- Execute via Block-STM, so matching and settlement happen in one Aptos transaction.
- Price-time priority: Bids and asks are sorted by
(price, unique_idx), so the best-priced, earliest order matches first. - Deterministic fairness: No off-chain relay can jump the queue. Matching logic is part of the chain.
- Atomic settlement: Matching and PnL/collateral updates commit (or abort) in the same transaction.
Perpetuals and Risk Controls
Perp contracts live inclearinghouse_perp.move and related modules:
- Mark price: Median of the oracle price, orderbook mid price, and a basis-adjusted price:
median(P_oracle, P_mid, P_basis)whereP_basis = P_oracle * EMA_150s(P_mid / P_oracle). Used for PnL and margin checks. - Funding modes: The protocol supports continuous (
fundingPeriodS = 0) and periodic (fundingPeriodS > 0) funding. Current public markets are presented with an hourly cadence. See Funding Rates.
Margin
Cross margin uses one collateral pool to back all positions. Isolated margin locks collateral per-position. See Margin for full details.Global Risk Controls
- Price bands: Settlement must stay within a governance-set band around the mark price.
- Circuit breakers: Can pause matching/withdrawals on extreme oracle deviations.
- ADL (auto-deleveraging): Last-resort mechanism to protect solvency when the Backstop Liquidator accumulates losses beyond a market’s threshold.
Spot Markets
Spot contracts live inspot_clearinghouse.move and spot_engine.move. A spot market trades a base asset against a quote asset on the same CLOB the perps use, but it settles assets instead of tracking positions:
- Per-order escrow: Every order is fully collateralized before it enters the book. Buys escrow the quote asset, sells escrow the base asset.
- Immediate settlement: Each fill exchanges the escrowed assets in the same transaction. There is no position, no margin, and nothing to liquidate.
- Fees in the received asset: Protocol and builder fees are deducted from what each side receives — base on a buy, quote on a sell — rather than from USDC collateral. See Fees.
GET /api/v1/spot/asset_contexts, GET /api/v1/orderbook, or the all_spot_mids and depth:{marketAddr} WebSocket topics.
Spot and perp markets for the same asset are separate markets with separate addresses. Endpoints that return both products tag each row with asset_type (perp or spot); see the REST API overview for per-endpoint coverage.
To place spot orders on-chain, see Place Spot Order.
Vaults
Vaults let you run on-chain strategies that others can deposit into:- A vault is a Move resource that:
- Holds collateral (e.g. USDC).
- Mints fungible vault shares (a claim on assets).
- Charges interval-based performance fees (0–10%, crystallized every 30–365 days) in shares.
- Depositors contribute USDC and receive shares at the current share price.
- Managers trade via delegated permissions; fees are crystallized periodically as additional shares.
- Protocol vault: Managed by Decibel, has a 72-hour lockup and stricter risk settings.
- User vaults: Created and managed by any user; deposits are withdrawable without protocol lockups by default.
API Keys and Node Access
You’ll see three different “keys” in the docs:
Rule of thumb: Reading data needs a Client API key + Node API key. Sending transactions needs a Node API key + API Wallet private key.
Integrating with Decibel
There are three layers for interacting with Decibel, each with different read/write access:Next Steps
TypeScript Starter Kit
Set up credentials and place your first trade in under 5 minutes
On-Chain Reference
Move entry function signatures and examples for every transaction type
Vault Integration Guide
Create and manage onchain vaults with pooled capital and performance fees

