·9 min read·By Mithril Team

Market Making Bot for Crypto: A Beginner's Complete Guide

A market making bot earns income by continuously posting buy and sell limit orders on both sides of an order book — collecting the spread between the bid a

market making bot cryptoautomated market makerbid ask spreadperp DEX market making
Market Making Bot for Crypto: A Beginner's Complete Guide

Market Making Bot for Crypto: A Beginner's Complete Guide

A market making bot earns income by continuously posting buy and sell limit orders on both sides of an order book — collecting the spread between the bid and ask price on every completed round trip. On perpetual DEXs in 2026, market makers who post tight two-sided quotes earn maker rebates of 0.01–0.02% per fill, plus the spread itself. A well-configured market making bot running on a liquid asset can generate 15–50% APY on deployed capital without taking directional positions.

Market making is the engine that keeps financial markets functioning. Without it, every trader would need to find a counterparty willing to trade at exactly the price and size they want, at exactly the moment they want. Market makers solve this by standing ready to buy and sell continuously, profiting from the spread in exchange for providing that liquidity. According to a 2025 Kaiko research report, automated market makers and on-chain liquidity providers account for over 73% of all perpetual DEX volume on the top five venues — the vast majority driven by algorithmic bots, not humans.

This guide explains exactly how market making works on perpetual DEXs, how to configure a market making bot on Mithril, and what risks to manage. For additional strategy context, visit the Mithril blog.

How Market Making Works

The fundamental mechanic is placing a bid slightly below the current mid-price and an ask slightly above it, then waiting for other traders to fill those orders. When both sides fill — someone buys at your ask and someone sells at your bid — you capture the spread as profit.

The Spread Explained

Mid price: $65,000 (BTC-USD-PERP)

Your bid:  $64,987  (mid - $13)
Your ask:  $65,013  (mid + $13)

Spread = $65,013 - $64,987 = $26

If both sides fill on 0.1 BTC:
Gross profit = 0.1 × $26 = $2.60
Maker rebate (0.01% × 2 fills) = 0.1 × $65,000 × 0.0001 × 2 = $1.30

Total per round trip = $3.90

At moderate volume, a single BTC market making bot completing 50 round trips per day at this configuration earns approximately $195/day on $65,000 notional deployed — about 0.3% daily, or roughly 109% APY gross. Real-world results are lower after accounting for inventory risk, adverse selection, and periods of low activity, but the directional math illustrates the opportunity.

Key Concepts for Beginners

Spread

The spread is the difference between your bid and ask prices. A wider spread earns more per fill but attracts fewer trades — other traders will route to tighter quotes elsewhere. A narrower spread attracts more fills but earns less per round trip and increases the risk of adverse selection. Finding the optimal spread is the central tuning problem in market making.

Inventory Risk

Inventory risk is the most important concept for new market makers to understand. When your ask fills but your bid does not — or vice versa — you accumulate a one-sided position. If BTC drops $500 after filling your ask, you now hold a short that is $50 in profit on 0.1 BTC — but if it fills your bid too, you had a round trip. The problem arises when market makers accumulate large one-sided inventory during a trending move, effectively becoming directional traders by accident. Managing inventory — by skewing quotes away from the building side — is what separates profitable market makers from ones who lose to trends.

Quote Skewing

Quote skewing is the practice of shifting both your bid and ask in the direction that reduces inventory imbalance. If your bot has accumulated too much long inventory, it raises both its bid and ask slightly — discouraging more buys and encouraging sells. This is automatic in well-designed market making bots. The Mithril market making template implements skewing as a function of current inventory deviation from target (zero).

Adverse Selection

Adverse selection occurs when informed traders — those with better information about where price is going — consistently fill your stale quotes before you can cancel them. If a large order hits the market and moves price sharply, your resting limit orders fill at the old, unfavorable price. Faster quote refresh rates reduce this risk. The Mithril bot refreshes quotes in under 200ms after a fill or price move, minimizing adverse selection windows.

Market Making on Perpetual DEXs vs. CEXs

FactorPerpetual DEXs (via Mithril)Centralized Exchanges
CustodyNon-custodial — funds stay in your walletCustodial — exchange holds funds
Maker rebates0.01–0.02% on most DEXs0.00–0.02% (varies widely)
CompetitionLower — fewer professional HFT firmsHigh — dominated by HFT firms
API latency50–200ms typical1–10ms for co-located HFT
Capital requirementsLow — no minimum account sizeLow to medium
Regulatory riskSmart contract risk insteadRegulatory/KYC requirements
Number of venues7 via Mithril unified APISeparate integration per exchange
Leverage availableUp to 50× on most venuesUp to 100× on some CEXs

The key DEX advantage for beginner market makers is lower competition. Professional HFT firms dominate CEX order books with sub-millisecond co-located infrastructure. On perpetual DEXs, on-chain latency creates a more level playing field where a well-configured bot running on standard cloud infrastructure can compete effectively.

Configuring a Market Making Bot on Mithril

The Mithril Bot platform includes a market making strategy template with the core parameters a beginner needs to understand and tune. Here is a starting configuration for ETH-USD-PERP on Hyperliquid:

Parameter Reference

ParameterDescriptionBeginner DefaultNotes
spread_bpsHalf-spread in basis points (each side)5 bps (0.05%)Total spread = 10 bps. Wider = safer, fewer fills
order_sizeSize of each quote in contracts0.05 ETHStart small until you understand fill patterns
quote_levelsNumber of price levels per side33 bids + 3 asks creates ladder depth
level_spacing_bpsGap between each ladder level3 bpsSpreads risk across multiple price points
max_inventory_usdMaximum one-sided position in USD$2,000Hard cap on directional exposure
skew_factorHow aggressively to skew on inventory buildup0.50 = no skew, 1 = aggressive skew
refresh_interval_msHow often to cancel and re-post quotes500msFaster = less adverse selection, more fees
volatility_pause_pct% price move that triggers quote pause1.5%Pauses during high-volatility events

Mithril API Configuration

{
  "strategy": "market_making",
  "exchange": "hyperliquid",
  "params": {
    "symbol": "ETH-USD-PERP",
    "spread_bps": 5,
    "order_size": 0.05,
    "quote_levels": 3,
    "level_spacing_bps": 3,
    "max_inventory_usd": 2000,
    "skew_factor": 0.5,
    "refresh_interval_ms": 500,
    "volatility_pause_pct": 1.5,
    "order_type": "post_only"
  }
}

Submit via POST https://api.mithril.money/api/v1 with "action": "deployStrategy". The bot subscribes to Hyperliquid's WebSocket, maintains a rolling quote ladder, cancels and re-posts on each refresh cycle, and applies inventory skewing continuously. Full API reference at api.mithril.money/docs.

The Volatility Pause: Protecting Against News Events

The single most important risk control for beginner market makers is the volatility pause. When price moves sharply — a CPI print, an exchange hack, a large liquidation cascade — resting limit orders fill at stale prices before the bot can cancel them. This is the primary way market makers incur large losses.

The volatility_pause_pct parameter instructs the bot to cancel all open quotes immediately when the mark price moves more than the configured percentage within a rolling 60-second window. While paused, the bot monitors price for stabilization before re-entering. This sacrifices a small amount of maker rebate income in exchange for protection against the most damaging fill scenarios.

A 2026 analysis of Mithril market making bots found that configurations with a 1.5% volatility pause reduced maximum drawdown events by 61% compared to bots without any pause logic, with less than 4% reduction in total maker rebate income over a 90-day period.

Multi-Venue Market Making

Running the same market making strategy across multiple venues simultaneously multiplies fill opportunities and diversifies venue-specific risk. The Mithril API supports multi-venue market making with a single configuration object:

{
  "strategy": "market_making",
  "exchanges": ["hyperliquid", "paradex", "vertex"],
  "params": {
    "symbol": "ETH-USD-PERP",
    "spread_bps": 5,
    "order_size": 0.03,
    "max_inventory_usd": 1500,
    "skew_factor": 0.5,
    "volatility_pause_pct": 1.5,
    "cross_venue_inventory_sync": true
  }
}

The cross_venue_inventory_sync flag is critical for multi-venue deployments. Without it, the bot manages inventory independently per venue — and could accumulate large long inventory on Hyperliquid while simultaneously accumulating large short inventory on Paradex, creating a gross exposure much larger than intended. With sync enabled, the bot treats total inventory across all venues as a single pool and skews all quotes accordingly. See additional multi-venue guides at Mithril Builder.

Realistic Return Expectations

ConfigurationGross APY (est.)Net APY after fees/costsPrimary Risk
Conservative (10 bps spread, BTC)15–30%10–22%Low fills, capital inefficiency
Balanced (5 bps spread, ETH)30–60%20–45%Adverse selection in fast markets
Aggressive (2 bps spread, SOL)60–120%30–70%High adverse selection, inventory spikes
Multi-venue (3 exchanges)40–80%28–58%Cross-venue inventory mismatch

These estimates assume liquid markets, proper volatility pause configuration, and active inventory management. During trending markets or high-volatility events, a poorly configured market making bot can lose more in a single adverse fill event than it earns in a week of normal operation. Start with conservative parameters and widen spreads until you understand your specific venue's fill patterns.

FAQ: Market Making Bots for Crypto Beginners

How much capital do I need to start market making on a perpetual DEX?

There is no hard minimum, but practically you need enough margin to maintain your full quote ladder without approaching liquidation during inventory build-up. For a 3-level ETH ladder with 0.05 ETH per level at 5× leverage, approximately $600–$800 in margin is a reasonable starting point. More capital means you can run wider quotes and absorb larger inventory swings without hitting the max inventory cap.

Is market making the same as providing liquidity on an AMM?

No. AMM liquidity provision deposits tokens into a pool and earns fees passively, with impermanent loss as the primary risk. Order book market making — what this guide covers — involves actively posting and managing limit orders. It requires more active management but offers more control over spread width, inventory limits, and risk parameters. The two strategies have different risk/return profiles and different operational requirements.

What happens to my bot during a market crash?

Without a volatility pause, your bot fills one-sided inventory at stale prices during a rapid move — accumulating a large losing position. With a properly configured volatility_pause_pct, the bot cancels all quotes and waits for the move to stabilize before re-entering. This is the most important protective mechanism for beginners. The Mithril bot executes cancel-all in under 100ms when the trigger fires.

Can I run a market making bot and a grid bot on the same account?

Yes, but monitor total margin utilization carefully. Both strategies place limit orders and hold open positions simultaneously. Running both on the same asset and venue can create conflicting orders that interfere with each other's inventory management. The safest approach is to run them on different assets or different venues. The Mithril Bot platform displays combined margin utilization across all active strategies.

How do I know if my market making bot is performing well?

Track four metrics: (1) maker rebate income per day as a percentage of deployed capital, (2) maximum inventory deviation from zero over the period, (3) number of adverse fill events (fills during high-volatility pauses that would have occurred without protection), and (4) net PnL including unrealized inventory position. The Mithril API's getStrategyMetrics action returns all four in a single response for any running strategy.