Crypto market making agent
Updated by the Circuit team
What a market maker does
A market maker posts a buy order below the current price and a sell order above it. Then it waits for other traders to fill them. When both fill it bought low and sold high by the width of the gap. That gap is the spread. Capturing it over and over is the business.
The maker never chooses direction. It earns when the price chops back and forth through its quotes. It loses when the price runs one way. Then only one side fills and it ends up holding inventory that keeps losing value. Every market making strategy is a way of managing that trade-off.
Spread, size and skew
Three settings define a quoting agent.
| Setting | What it controls | Too small | Too large |
|---|---|---|---|
| Spread | Distance between bid and ask | Fees and adverse moves eat the profit | Quotes rarely fill |
| Size | Amount per quote | Profit per fill doesn't cover the effort | One run against you builds a large position |
| Skew | How far quotes shift when the agent holds inventory | Inventory piles up | The agent dumps inventory at bad prices |
Skew is how a maker manages risk without stopping. If the agent is long 0.05 BTC from bids that filled on the way down it moves both quotes lower. The lower ask is more likely to fill and sell the inventory. The lower bid is less likely to fill and add more. A common rule shifts the midpoint of the quotes by a fixed fraction of the spread for each unit of inventory held.
Most makers also set a hard inventory limit. Past it the agent stops quoting the side that adds to the position until it works back down.
Maker fees on Hyperliquid and Lighter
Fees decide whether a tight spread is profitable. As of October 2026 each venue's fee page says:
| Venue and account | Maker fee | Taker fee | Source |
|---|---|---|---|
| Hyperliquid perps, base tier | 0.015% | 0.045% | Hyperliquid fees |
| Hyperliquid perps, over $500M 14-day volume | 0.000% | 0.028% | Hyperliquid fees |
| Hyperliquid maker rebate tiers | −0.001% to −0.003% | n/a | Above 0.5%, 1.5% or 3% of 14-day weighted maker volume |
| Hyperliquid spot, base tier | 0.040% | 0.070% | Hyperliquid fees |
| Lighter Standard account (default) | 0% | 0% | Lighter fees |
| Lighter Premium account, no LIT staked | 0.0040% | 0.0280% | Lighter fees |
Hyperliquid tiers use 14-day weighted volume. Spot volume counts double. Staking HYPE cuts fees by 5% to 40%. The rebate tiers pay makers. They require a share of the whole exchange's maker volume that a single retail agent won't reach.
Lighter's Standard account pays no fees and adds latency. Taker orders and cancels or modifies wait 300 ms. Maker orders wait 0 ms. A resting maker quote goes in immediately. Pulling it takes 300 ms.
Post-only orders
A maker quote must never cross the book by accident. If the market moves between when the agent computes its bid and when the bid arrives a plain limit order could fill instantly as a taker and pay the taker fee. A post-only order prevents that. The venue rejects or cancels it instead of letting it take liquidity.
Hyperliquid calls this ALO for add liquidity only. Its docs label it "Post Only". Lighter calls it post-only and cancels the order if it would cross (Lighter order types). On Circuit agents pass timeInForce: "alo" on a limit order for either venue. The same call takes "gtc" to rest until filled or canceled and "ioc" to fill what crosses now and cancel the rest. Lighter's resting orders last at most 28 days. That is its maximum expiry.
The engine rounds buy prices down and sell prices up to the venue's precision. It rounds sizes down to the market's size decimals. Circuit rejects an opening limit order below 10 USDC of value on either venue before it is sent.
A worked P&L example
An agent quotes BTC on Hyperliquid at the base fee tier with BTC at $80,000. It posts a bid at $79,960 and an ask at $80,040 with 0.01 BTC on each side. The spread is $80 or 0.1%. Both orders are post-only.
| Item | Math | Result |
|---|---|---|
| Buy fill | 0.01 × $79,960 | $799.60 |
| Sell fill | 0.01 × $80,040 | $800.40 |
| Gross spread captured | $800.40 − $799.60 | $0.80 |
| Maker fee on buy | $799.60 × 0.015% | $0.11994 |
| Maker fee on sell | $800.40 × 0.015% | $0.12006 |
| Net per round trip | $0.80 − $0.24 | $0.56 |
| Ten round trips a day | 10 × $0.56 | $5.60 |
The same quotes on a Lighter Standard account keep the full $0.80 per round trip. Maker fees are zero there.
Now the bad day. The bid fills at $79,960 and BTC falls 1% to $79,160 before the ask fills. The agent holds 0.01 BTC that lost 0.01 × $800 = $8.00. That one move erases $8.00 ÷ $0.56 = 14.3 round trips of profit. A maker's real P&L is spread income minus inventory losses. Inventory losses come in exactly the moments when price runs.
What Circuit can and cannot do
Circuit can run a slow and honest market maker. It cannot run a high-frequency one.
What works. An agent can rest post-only limit orders on both sides of Hyperliquid or Lighter perps and spot, read its own open orders, cancel them and place new ones. A continuous agent runs as one long-lived process and decides its own loop timing. Scheduled agents run as often as once a minute. Circuit keeps watching resting orders and attributes later fills to the agent. Partial fills show up in its holdings.
What limits it.
- No order modify. Moving a quote means canceling it and placing a new one. Each is a separate operation with its own lifecycle.
- Order state lags. Hyperliquid's open-order list for an agent refreshes about once a minute from Circuit's order record.
- No resubmits. A failed or timed-out order is never retried automatically. The agent decides what to do next.
- Latency. Every order goes through Circuit's signing boundary under your permit. That adds time a co-located HFT maker doesn't pay. Professional makers update quotes many times a second. A Circuit agent updates in seconds at best.
- No Polymarket making. Circuit sends Polymarket orders as fill-or-kill. An agent cannot rest quotes there.
The strategies that fit are the ones where speed matters less. That means wide spreads on volatile pairs, ladders of resting orders across a range, and quotes that refresh every minute or so around a slow-moving mid. The BTC grid strategy is the closest ready-made spec. It sets five buy rungs 1% apart below the starting price and sells each filled rung 1% above its entry.
Testing a quoting agent
Backtests are optimistic for makers. Circuit's backtest fills a resting order once a later minute trades through its limit and the account has margin. It doesn't model queue position. In the real book other orders at the same price may fill first. Treat a maker backtest as an upper bound.
Paper trading uses the backtest's fill rule against live prices. It does not model queue position either. Crossing orders fill at the current best bid or ask. Resting orders fill once a later minute trades through them. Run a maker in paper for at least a week of mixed conditions. Then compare its fill count, inventory swings and fees with the backtest. Treat both as an upper bound. Start a real-money maker small to learn how often its quotes fill.
Build one on Circuit
Start with a spec the Builder can turn into code and you can test:
"Quote ETH on Lighter. Every minute, cancel my resting orders and post a post-only bid 0.15% below the mid and a post-only ask 0.15% above it, each $200. If I hold more than $600 of ETH long or short, stop quoting the side that adds to it and move the other quote 0.05% closer to the mid. If ETH moves more than 2% in five minutes, cancel everything and wait 15 minutes. Log every quote, fill and inventory change."
Every number becomes a setting. Run it in paper trading and read the logs. Then widen or tighten the spread. Building an agent without code covers writing specs in general. For the venues see the Hyperliquid and Lighter guides.
Keys and permits
Agents run on a wallet you create in Circuit or import by private key. Circuit keeps the signing key in a hardware enclave. Agents never see it. An agent requests typed actions through Circuit's SDK. Nothing is signed without the permit you sign with your passkey when you start the agent.
You can export the private key from Settings at any time. You can pause, resume or stop an agent at any time. Stopping leaves your positions and resting orders in your account. You ask Circuit to close them.
What it costs
Circuit charges no fees today and adds no builder fee to Hyperliquid or Polymarket orders. You pay the venue's trading fees, network gas and any bridge or routing fees. Each prepared action's review shows the costs it reports before you confirm. Today's terms make no commitment about future fees.
FAQ
Is crypto market making profitable?
It can be when spread income beats fees and inventory losses. In the worked example a 0.1% spread on 0.01 BTC nets $0.56 per round trip on Hyperliquid's base tier. A single 1% move against held inventory loses $8.00. Results depend on volatility, fees and how fast the agent reacts.
What is a post-only order?
A limit order that only rests on the book as a maker order. If it would fill immediately as a taker the venue rejects or cancels it. Hyperliquid calls it ALO (add liquidity only). Lighter calls it post-only.
Does Hyperliquid pay maker rebates?
Yes. As of October 2026 rebates run from −0.001% to −0.003% for accounts above 0.5%, 1.5% or 3% of 14-day weighted maker volume. Below those thresholds makers pay 0.015% at the base tier. That falls to 0% above $500M of 14-day volume.
Does Lighter charge maker fees?
Not on its default Standard account. It pays 0% maker and 0% taker as of October 2026. Standard accounts add 300 ms of latency to taker orders and cancels. Premium accounts pay fees and get lower latency.
Can I run a high-frequency market maker on Circuit?
No. Circuit agents update quotes in seconds. Each order is its own signed operation. Orders can't be modified in place. Circuit suits slower makers with wider spreads, grids and minute-level requotes.
Can an agent make markets on Polymarket through Circuit?
No. Circuit sends Polymarket orders as fill-or-kill. They never rest on the book.
Build it on Circuit
Circuit writes the agent and backtests it. Paper trade it before you fund it.
Build your agent