Bulk Orders: Next-Generation Market Making on Decibel
By Sital Kedia, Blockchain and Smart Contracts
Decibel6 min read·Just now--
The Problem with Onchain Market Making
Market makers update their quotes constantly. As prices move, they cancel old orders and place new ones. On centralized exchanges, this is cheap and instant. But onchain, every order placement and cancellation costs gas.
This creates two suboptimal options for market makers:
- Quote at wide spreads (2–5%) and rarely update, leading to poor trader experience
- Maintain tight spreads but pay massive gas fees, which is unsustainable
Bulk Orders on Decibel solve this by providing propAMM-level gas efficiency while maintaining full CLOB transparency.
Evolution of Onchain Market Making
Onchain market making has evolved through three approaches, each with different trade-offs.
CLOBs: Great UX, Terrible Economics
Central Limit Order Books work like traditional exchanges. Orders sit in a price-time priority index where best prices come first, and at each price level, earlier orders get filled first. The market maker generally wants to place resting orders on the book at different price levels and different sizes. The problem is that every order placement or cancellation requires updating this index, a sorted data structure onchain, which consumes gas. During DeFi summer on Ethereum, updating a 5-level ladder cost over $200 in gas. Even on cheaper and more efficient chains like Aptos, the economics don’t work without widening spreads significantly.
AMMs: Cheap but Lossy
To address the cost of market making on CLOBs onchain, Uniswap eliminated the orderbook entirely and used a bonding curve (x * y = k) instead. Passive LPs deposit into pools and trades happen against the curve. Since there is no active market making, it eliminates the gas cost for market making.
However, AMMs have their own problems. LPs face impermanent loss, there’s no real price discovery beyond arbitrage, and large trades move prices more than they should. AMMs work for retail swaps but aren’t ideal for serious trading.
PropAMMs: Fast but Limited
Proprietary AMMs combine the bonding curve’s efficiency with professional market making. A market maker runs pricing algorithms offchain and streams quotes to an onchain contract.
This approach delivers tight spreads and low gas costs. But the orderbook isn’t visible, there’s no price-time priority, and one market maker controls pricing. This centralization undermines the transparency that makes blockchains valuable — a malicious market maker, for example, can exploit traders by only quoting at the upper end of the slippage when the configured slippage is high (https://x.com/davidrhodus/status/2037231954496716848).
In addition, propAMMs are limited to spot assets and don’t work well for perpetual futures because the lack of an order book prevents critical risk management functionalities like liquidations and ADL.
What We Actually Need
The ideal solution combines:
- Transparent orderbook where you can see liquidity depth
- Price-time priority for fair execution
- Minimal gas cost to make market making with tight spreads sustainable
- Decentralized access where anyone can market make
Bulk Order
We introduce Bulk Orders — a new primitive to make market making cost-efficient on CLOBs. Traditional MMs onchain bleed gas. Every quote update, every cancel, every reprice is a separate transaction. On a CLOB that moves in real time, that adds up fast. Everything that makes a CLOB liquid at scale depends on MMs being able to operate without friction. Bulk Orders are where that starts on Decibel.
The core insight is that over 99% of market maker orders get cancelled before they’re matched. On Decibel, for example, the market maker can update more than 100 individual orders per second per market but there are just 1–2 orders matched per second per market on average.
Markets move constantly. Market makers place orders, the price changes, and they cancel several levels to place new levels. Most orders never actually trade, yet we’re paying to index all of them.
Traditional orders require paying gas for each price level:
- Inserting into the sorted index (O(log n) operation)
- Allocating storage
If the order gets cancelled moments later, you’ve burned gas for nothing.
How It Works
Bulk orders let you place multiple price levels (on both sides) in a single transaction. The key optimization is that only the best bid and best ask go into the active price-time index; all other levels are stored in a compact vector. When the top level gets matched, the next one automatically activates without requiring an extra transaction. If the market moves before any order is matched, the MM can place another bulk order — which replaces only the best bid and best ask in the active price-time index and overrides the compact vector for other levels. Essentially, instead of paying for indexing all orders, we are paying the cost for indexing only the best bid and best ask and overwriting a compact vector, which is significantly more efficient.
Here’s the structure of a bulk order in our Move smart contract:
Bulk Order structure in Move
Each bulk order placement operates as an atomic transaction — it simultaneously cancels all existing levels of the previous bulk order on the book and replaces them with the new one. By treating the cancellation and placement as a single indivisible operation, market makers are protected from two common risks: duplicate orders appearing on the book or the book being momentarily empty between updates.
Supporting High Frequency MM Quoting
In addition to making market making cost-efficient, bulk orders also provide semantics for MMs to update their quotes quickly and atomically in a blockchain environment without waiting for transaction finality.
Consider the following scenario: a market maker sends a transaction (T1) with Order A with quotes at $1500. It might take a few hundred milliseconds on Aptos (a few seconds to minutes on other blockchains) for that transaction to be finalized. While T1 is in the process of being confirmed, the price might move and the MM might want to send transaction (T2), which cancels Order A and places another Order B with quotes of $1510. However, it is possible T1 and T2 finalize out of order — essentially T2 is trying to cancel Order A, which doesn’t exist in the book yet, and T1 landing after T2 means the MM’s stale quote is still placed on the book. Another alternative for the MM is to wait for T1 confirmation before sending T2, which means that the MM would not be able to update its quote frequently enough and is forced to widen its quote to protect against being picked off.
Bulk orders solve this problem by introducing sequence numbers. Every bulk order includes a monotonically increasing counter. The blockchain only accepts orders with a higher sequence number than the currently active order.
Here’s how this plays out in the above scenario: the MM sends T1 with a quote of $1500 and sequence number 1. The price moves and the MM wants to update its quote before T1 is finalized — the MM sends T2 with a quote of $1510 and sequence number 2, and can optionally increase the gas priority for T2 so that T2 has a higher chance of landing before T1. If T2 lands before T1, then the onchain sequence number is updated to 2, which essentially invalidates the in-flight T1 with the older sequence number. Market makers can also combine sequence numbers with gas price prioritization. If the old order lands first, the new one will still replace it due to the higher sequence number.
Summary
Bulk orders make tight spreads economically viable onchain by combining propAMM efficiency with CLOB transparency — it is a cornerstone of efficient market making on Decibel.
For market makers, this means 90% lower gas costs, simpler systems with minimal state tracking, no risk from stale quotes, and the ability to quote spreads as tight as they want.
For traders, this means better liquidity as market makers can quote more aggressively, full transparency into orderbook depth, fair execution through price-time priority, and tighter spreads that reduce slippage.
Questions? Join our Discord