If you run a market maker, the quote itself looks like the easy part: pick a price, pick a size, post it. The hard part starts when it fills, because you now hold inventory you didn't have a second ago. Every quote is also a decision about the inventory you're willing to hold and what it will cost to carry or unwind it.
We ran two kinds of maker to deal with that. Our pure market maker quotes around the local midpoint and lives with the inventory its fills create. Our hedge-aware maker prices each quote from what it would cost to offset a fill on other venues. Here's how our trading strategies price and size both, and what happens to inventory and orders after a fill.
If you'd rather offset fills than carry them, the hedge-aware approach is the one to look at closely. Pricing from the hedge ties passive liquidity to an exit that's executable at current prices, rather than a theoretical one.
Think in quote cycles, not quotes
When we think about market making, the unit of analysis is the full cycle a quote sets off, from posting to the inventory left behind. A resting order earns nothing until someone trades against it, and that trade leaves you holding a position. The cycle has five parts:
- The quote: the price and size we offer on the maker venue.
- The fill: the counterparty trades against us, in full or in part.
- The hedge: an optional offsetting trade elsewhere that neutralizes the new exposure.
- The costs: exchange fees or rebates, conversion between quote assets, and slippage on any hedge.
- The remaining inventory: whatever exposure is left once the fill, and any hedge, settles.
Inventory and costs matter to both of our makers; the hedge is what separates them. The pure maker sets its price from the local midpoint and configured spreads, and lets account capacity bound its size. The hedge-aware maker reverses the order: it derives the quote's price and size from the hedge it could execute, so a quote without an available hedge has no price at all.
The pure maker: spread capture plus rebates
Pure market making quotes both sides of one instrument and relies on spread capture plus maker incentives. Binance liquidity rebates were a core part of our business economics, and they're why supplying both sides of the book was worth doing at scale. Fills still build up inventory, though, and the strategy bounds it through account capacity rather than through hedges.
Quoting around a reference price
Our pure market maker starts from the local bid/ask midpoint and places quotes on either side of it:
bid = midpoint × (1 − bidSpread)ask = midpoint × (1 + askSpread)
The two spreads are configured independently, so you can lean the quotes in one direction. Prices then go through a smart-price adjustment relative to the best displayed price and get rounded to the exchange's precision.
The spreads are configuration values; the strategy itself doesn't contain a profit model. Rebates and fees live in the business economics around it.
Replacement tolerances and unsafe data
Markets tick constantly, and cancelling and re-posting on every tick wastes rate limits and loses queue position. We give quote creation and quote cancellation separate price tolerances, so a quote is only replaced when the price has moved far enough to matter.
The strategy also refuses to quote on data it can't trust. If price streams look inconsistent, it sets both bid and ask sizes to zero. Our order management system reads that as "desired liquidity is nothing" and cancels resting orders. That keeps strategy logic separate from order handling, as described in our article on the Chronicle-based execution engine.
Why we price the quote from the hedge
If you're weighing a pure maker against a hedged one, this is the difference that matters. Hedge-aware market making replaces the local midpoint with an external reference: the price at which we could offset a fill on other venues. The quote is priced from the cost of taking the opposite position, plus a margin.
Building the hedge price from executable chunks
For the asset being quoted, the strategy collects the hedge alternatives available across accounts and instruments. Each alternative contributes a chunk of price and quantity. Along the way, it:
- Skips instruments whose market data streams are stale.
- Skips quantities below the venue's minimum order size.
- Caps each chunk by the remaining size the quote still needs.
- Computes an amount-weighted hedge price across the eligible chunks.
Our price evaluator ranks alternatives by side: buys by lowest evaluated cost, sells by highest evaluated proceeds. That evaluation includes configured exchange costs and, where needed, a conversion through one cross instrument when the hedge is quoted in a different asset.
The result describes the hedge the strategy can currently attempt. Eligible prices and capacity come from the latest market data, and the market can move before a hedge order fills.
Turning hedge cost into a maker price
The direction logic follows from what a fill would require:
- Maker ask sits above the weighted price at which we could buy the asset back elsewhere.
- Maker bid sits below the weighted price at which we could sell the asset elsewhere.
Size is limited twice: by the maker account's own inventory and by total hedge capacity. We never offer more liquidity than we believe we can hedge. That's what ties passive liquidity to an exit that's executable at current prices, rather than a theoretical one.
Capital decides how much you can quote
A price is only half a quote. Both makers size each side as the smaller of a configured maximum and the account's available capacity, and spot and futures accounts measure that capacity differently.
Spot balances
Spot capacity is simple and strict. You can only sell the base asset you hold, and you can only buy with the quote asset you hold. Our spot market maker calculates buy capacity as quote balance divided by the bid price, and sell capacity as the base balance. Every unit of inventory is fully funded.
Futures collateral
Futures capacity comes from collateral rather than coins. Our futures market maker multiplies collateral by the account's configured notional-to-collateral ratio, includes unrealized PnL, and subtracts the size of the existing position.
In dual-position mode, where an account can hold separate long and short positions, it tracks long and short capacity separately. Profit and loss on open positions therefore changes how much you can quote, even when the market price you quote around has barely moved.
Venue minimums and precision
Every exchange imposes minimum order notionals and size increments. A quote smaller than the minimum can't be placed, and a hedge chunk below the minimum can't be executed. We round prices and sizes to instrument precision before emitting any order, and we discard quantities that would fall below a venue's minimum.
What happens after a fill
A fill changes your state in several places at once: balances, positions and open orders. Our strategy and hedger react to those events directly instead of waiting for the next price refresh.
Quote withdrawal
Before posting liquidity, the hedge-aware strategy sums maker-side and hedge-side exposure for the asset, including configured static offsets. If the absolute sum exceeds the minimum hedgeable amount, it emits zero sizes on both sides until the imbalance is resolved. That stops new inventory from stacking on top of exposure that hasn't been offset yet.
Hedge submission
The hedger aims to bring that residual close to zero and treats small remainders as dust not worth trading. Above the dust threshold, it:
- Picks the opposite order side.
- Walks the ranked alternatives, subtracting each submitted amount from the remaining exposure.
- Respects notional minimums, account capacity and stream health.
- Sends market orders, because certainty of execution matters more than price improvement here.
When a hedge goes through a pair where the asset is the quote rather than the base, the side and amount are translated accordingly.
State refresh
The hedger waits for its tracked orders to complete and for account state to reflect them before sending another batch. Without that wait, a stale balance would look like unhedged exposure, and the hedger would hedge the same fill twice.
Our execution engine tracks those pending order states, while getting balances, positions and fills to agree is covered in our article on trading data and reconciliation.
Worked example: one maker sale, two hedge alternatives
Here's the whole cycle on numbers. The numbers are illustrative.
Starting position
Adjusted combined exposure starts at zero. The maker account holds at least one unit of the asset available to sell, while offsetting portfolio exposure or configured static offsets account for that inventory, so nothing is waiting to be hedged.
We also assume the configured minimum hedgeable amount is smaller than one unit, so a full one-unit fill is large enough to hedge.
Pricing the quote
We want to quote a one-unit maker sell. Two hedge alternatives are available, with prices already expressed in the same quote asset:
- Buy 0.4 units at 100.
- Buy 0.6 units at 101.
The weighted hedge price is (0.4 × 100 + 0.6 × 101) / 1 = 100.6. With askSpread = 0.001, the pre-rounding maker ask is 100.6 × 1.001 = 100.7006.
The one-unit size needs one unit of sellable inventory on the maker account and one unit of combined hedge capacity. If either were smaller, the quote would shrink to match. Those two hedge prices are what the strategy could attempt when it posts the quote; they can move before any hedge actually fills.
Exposure after the fill
When the maker sale fills, the sum of maker-side and hedge-side exposure becomes -1. That residual exceeds the assumed minimum hedgeable amount, so the strategy withdraws both quotes and the hedger buys the missing unit through the two alternatives, cheapest first. Buying 0.4 and 0.6 restores combined exposure to zero.
The gross difference is 100.7006 − 100.6 = 0.1006 quote units, before any costs not already included in the assumed hedge prices. Realized PnL depends on the actual hedge fills, fees and market movement, because the hedge executes after the maker fill and prices can move in between.
Spot/futures and futures/futures hedges
The same logic covers hedges built from different instrument types, but exposure and funding look different in each.
Spot/futures hedges
In a spot/futures hedge, inventory sits in spot balances and a futures position offsets it. Our earlier Python hedging service summed spot balances across several source accounts and offset the total with the position on one futures account.
It favoured orders that reduce the futures position, waited for pending updates, and allowed only one hedge decision at a time. After initialization, it shut down rather than send an oversized reconciliation order.
The funding is asymmetric. The spot leg ties up the full value of the coins, while the futures leg ties up collateral whose capacity moves with the configured notional-to-collateral ratio and unrealized PnL.
Futures/futures hedges
In a futures/futures hedge, both legs are positions and both consume collateral. Exposure is the net position across accounts, and quoting capacity already subtracts the existing position. Pending orders matter on both sides, which is why exposure tracking and order tracking stay in one hedging component that several maker accounts can share.
The edge cases we test against
Our tests replay saved event sequences through the strategy and compare the emitted orders with expected output, with dry-run hedgers standing in for real ones.
Tested scenarios
The hedge-aware maker's scenarios cover five situations:
- Missing exposure data.
- Exposure that requires hedging.
- Unavailable hedge instruments.
- Ordinary liquidity.
- Cross-pair liquidity.
Each scenario fixes an input sequence together with the orders it should produce, so a change in quoting or hedging behavior shows up as a different emitted order.
What the rules imply
Other failure modes follow from the same rules applied to different inputs:
- Stale data: market streams are checked against a ten-second heartbeat lifespan, and stale hedge instruments contribute no capacity.
- Partial fills: the residual gate treats a partial fill like any smaller fill. If the filled amount pushes the residual past the minimum hedgeable amount, quotes are pulled and the hedger offsets it; a smaller residual stays as dust and quoting continues.
- Unavailable hedges: no eligible chunks means no hedge price and no maker size.
In every case, the default is to quote less, not to guess. For the hedge-aware maker, that's the practical meaning of treating the quote, the capital and the hedge as one decision.
Where to go from here
If you're building or reviewing a maker that hedges its fills, a useful next step is to check it against the same questions our design answers:
- Is each quote priced and sized from a hedge you can execute right now?
- Does it pull quotes when residual exposure exceeds the minimum hedgeable amount?
- Does the hedger wait for account state to reflect its orders before sending another batch?
The last two depend on order tracking and state agreement as much as on strategy logic. Our execution engine article covers how pending orders are tracked, and the rest of our strategy work shows where this maker fits.