What Decibel Is
Decibel is a perpetuals 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. How it works.
- A perp clearinghouse: the
clearinghouse_perpmodule tracks positions, margin, PnL, and liquidations. How it works. - 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:| Tier | What it is | What it does |
|---|---|---|
| Login Wallet | Your normal Aptos account (e.g. Petra) | Logs into the web app, creates an API Wallet |
| API Wallet | A dedicated keypair for programmatic trading | Holds APT for gas, signs all on-chain transactions. Create one at app.decibel.trade/api. |
| Trading Account | On-chain object managed by dex_accounts | Holds USDC collateral. All orders, PnL, and margin checks route through here. |
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. - Continuous funding: Accrues every second and is realized when positions change or close. 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 if insurance funds are exhausted.
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:| Key | Purpose | How it’s used |
|---|---|---|
| Client API key (Geomi) | GET endpoints on api.decibel.trade | Sent as Authorization: Bearer <CLIENT_API_KEY> |
| Node API key (Geomi / Aptos Build) | SDK connection to Aptos fullnodes | Passed as nodeApiKey to DecibelReadDex / DecibelWriteDex |
| API Wallet private key | Signs on-chain transactions | Never commit to Git; store in .env or a secrets manager |
Integrating with Decibel
There are three layers for interacting with Decibel, each with different read/write access:| Layer | Access | What it does |
|---|---|---|
TypeScript SDK (@decibeltrade/sdk) | Read + Write | Handles ABI, replay protection, gas, and JSON decoding. High-level helpers like placeOrder, placeTwapOrder, depositToVault. |
| REST & WebSocket APIs | Read | REST for queries (GET /api/v1/markets, /orders, /positions). WebSocket for streaming prices, depth, trades. |
| Raw Aptos transactions | Write | Call Move entry functions directly (e.g. dex_accounts_entry::place_order_to_subaccount). Full control over payloads, ABI parsing, and signing. |
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

