Jagadish Writes Logo - Light Theme
Published on

How AI Is Used in Automated Crypto Market Making

Listen to the full article:

Authors
  • avatar
    Name
    Jagadish V Gaikwad
    Twitter
Source

Automated crypto market making uses software to quote prices or supply liquidity so traders can buy and sell digital assets. AI adds a decision layer: models can analyze market conditions, estimate short-term risk, adjust liquidity positions, and choose when to reduce exposure.

The technology does not remove the core risks of market making. A strategy can still suffer from adverse price movement, impermanent loss, smart-contract exploits, oracle failures, thin liquidity, and execution costs. AI is best understood as an optimization and monitoring tool that operates within rules, not as a guarantee of profitable trades.

What automated crypto market making means

A market maker continuously provides tradable liquidity. On a centralized exchange, that commonly means placing buy and sell orders around a reference price. On a decentralized exchange, an automated market maker, or AMM, usually uses a smart-contract-controlled liquidity pool instead of a traditional order book.

Uniswap describes AMMs as pool contracts that hold liquidity and execute swaps, while its documentation explains that trades occur against pooled assets rather than directly against posted orders. Uniswap’s protocol overview and How Uniswap Works provide the underlying model.

A liquidity provider deposits assets into a pool and receives a share of trading fees. The pool’s pricing rules determine how a swap changes the relative balances of those assets. When the external market moves, arbitrage traders generally trade against pools whose prices have not yet caught up.

In a basic automated strategy, software might:

  • Monitor pool balances and market prices.
  • Compare prices across exchanges.
  • Rebalance assets when inventory becomes too one-sided.
  • Add or remove liquidity.
  • Adjust a concentrated-liquidity range.
  • Collect fees and record performance.
  • Pause activity when risk limits are reached.

AI can assist with each of these decisions, but the smart contract still enforces the pool’s rules. A machine-learning model cannot override a protocol’s settlement logic unless the system was explicitly designed to give it that authority.

Where AI fits into the market-making stack

AI is not one feature. It is a group of statistical, machine-learning, and optimization methods connected to a trading or liquidity-management system.

1. Short-term price and volatility estimation

A market-making system needs an estimate of where prices and volatility may move over its decision window. Volatility means the size and frequency of price changes. A model may use:

  • Recent trades and returns.
  • Order-book depth on centralized exchanges.
  • Pool volume and reserve changes.
  • Bid-ask spreads.
  • Funding rates and derivatives data.
  • Cross-exchange price differences.
  • Blockchain activity and wallet flows.
  • Gas costs and transaction-confirmation conditions.

The output is not necessarily a single price prediction. More useful outputs can include a range of possible prices, an estimated probability of a sharp move, or a confidence score indicating that current data is unreliable.

This distinction matters because market makers earn fees or spreads while accepting inventory risk. If a model identifies rising volatility, the system may widen its quotes, reduce liquidity, move a concentrated range, or decrease position size.

A prediction model can be wrong because crypto markets are affected by liquidations, exchange outages, protocol announcements, regulatory events, and coordinated trading. A prudent design therefore treats predictions as inputs to a risk policy rather than commands to trade.

2. Dynamic pricing and spread selection

On an order-book exchange, an AI-assisted market maker may adjust the distance between buy and sell quotes. A narrow spread can attract more trading but provides less protection against sudden price movement. A wider spread can compensate for risk but may lose flow to competitors.

The system can combine:

  • Estimated volatility.
  • Current inventory.
  • Recent execution quality.
  • Market depth.
  • Latency.
  • Fees and rebates.
  • Probability of informed trading.
  • Available hedging venues.

If the strategy holds too much of a token, it may make selling that token more attractive and buying it less attractive. This encourages inventory to move back toward a target. If the market becomes unstable, the system may quote less aggressively or stop quoting.

AI can help estimate these conditions, but ordinary rules often remain essential. For example, a hard maximum position size can prevent a model from accumulating unlimited exposure during an unusual market event.

3. Concentrated-liquidity range management

Concentrated liquidity lets providers choose a price interval in which their capital is active. Uniswap’s developer documentation explains that v3 and v4 liquidity providers select custom price ranges, which can improve capital efficiency but require active management. Uniswap’s concentrated-liquidity documentation describes this mechanism.

AI can help decide:

  • How wide a range should be.
  • Where to center the range.
  • When to move a position.
  • How much capital to allocate to each range.
  • Whether expected fees justify the cost of repositioning.
  • When to leave liquidity inactive rather than chase the market.

A simple range-management bot might reposition whenever price moves beyond a threshold. An AI-assisted system can consider additional variables, such as expected volatility, recent volume, the distance to important price levels, gas costs, and the probability that a move will reverse.

The trade-off is turnover. Frequent repositioning can generate more active liquidity, but each transaction may incur network fees, slippage, and execution risk. A model that reacts to every short-term movement can perform worse than a slower strategy.

4. Inventory forecasting and rebalancing

Inventory is the quantity of each asset controlled by a market-making system. Inventory becomes risky when the portfolio becomes heavily exposed to one asset or when the asset’s price moves rapidly.

AI can forecast likely inventory changes from:

  • Expected trading direction.
  • Pool flows.
  • Historical volume patterns.
  • Time of day.
  • Market-wide volatility.
  • Correlation between assets.
  • The strategy’s own recent fills.

The system can then rebalance through a centralized exchange, a decentralized exchange, a derivatives position, or a transfer between pools. Rebalancing is not free. It can create fees, slippage, taxes, bridge risk, and additional smart-contract exposure.

The objective is usually not to hold zero inventory. A market maker needs assets to provide liquidity or fill orders. The objective is to keep exposure within a range that matches the strategy’s risk budget.

5. Liquidity allocation across pools

A market-making operation may have access to multiple chains, pools, fee tiers, and trading venues. AI can rank opportunities using variables such as:

  • Trading volume.
  • Estimated fee revenue.
  • Depth near the current price.
  • Historical price volatility.
  • Expected impermanent loss.
  • Gas and bridging costs.
  • Smart-contract and counterparty risk.
  • Probability that liquidity will become inactive.
  • Capital lockup and withdrawal conditions.

The model might recommend moving capital from a low-volume pool to a deeper pool. That recommendation still requires a human-defined policy for protocol quality, custody, contract permissions, and maximum allocation.

No amount of historical volume proves that future fees will remain high. Incentive programs can end, competitors can enter, and a token’s price can change sharply.

Source

How AI interacts with AMM mechanics

The key difference between an AMM and an order-book market maker is where the strategy acts.

Market-making approachWhere AI makes decisionsMain advantageMain risk
Centralized exchange quotingQuote distance, order size, inventory, and cancellation timingFine-grained control over ordersExchange, latency, and counterparty risk
Passive AMM liquidityPool selection and capital allocationSimple on-chain execution and fee participationImpermanent loss and pool-specific smart-contract risk
Concentrated-liquidity managementPrice ranges, repositioning, and fee-tier selectionMore targeted use of capitalInactive positions and transaction costs
Cross-venue arbitragePrice differences, routing, and hedgingCan reduce stale-price exposureExecution failure, gas costs, and competition
Hybrid strategyAllocation between pools, order books, and hedgesBroader risk-management optionsGreater operational and model complexity

In a concentrated-liquidity pool, a position may earn fees while the market price remains inside its selected range. If the price leaves that range, the position may stop participating in trades until it is adjusted or the market returns. This creates a direct role for forecasting and control systems.

The strategy must also account for arbitrage. If an AMM price differs from the broader market, arbitrageurs may trade against it until the difference narrows. That process helps align prices, but it can leave liquidity providers with an asset mix that has changed unfavorably relative to simply holding the original assets.

What data AI systems use

A robust system typically combines on-chain, market, and operational data.

On-chain data can include pool reserves, swap events, liquidity changes, gas prices, block timing, and failed transactions. These data are useful for understanding actual pool behavior, but they may arrive with delay or be distorted by bots and one-off transactions.

Market data can include order books, trades, derivatives metrics, volatility, and prices from several venues. The system must normalize timestamps and account for unreliable or manipulated feeds.

Protocol data includes fee tiers, liquidity ranges, pool parameters, oracle behavior, upgrade permissions, and contract addresses. These details determine what actions are possible and what risks are present.

Operational data includes transaction latency, nonce management, wallet balances, RPC reliability, and pending transactions. A model can make a sound recommendation that becomes unprofitable if the transaction is delayed or fails.

Data quality is a central limitation. A sophisticated model trained on incomplete, stale, or manipulated data can create a false sense of precision.

Common AI techniques

Different tasks call for different methods.

  • Supervised learning predicts a labeled outcome, such as short-horizon volatility or the likelihood that a position will leave its range.
  • Time-series models analyze sequential prices, volumes, and liquidity changes.
  • Reinforcement learning learns actions through simulated or historical rewards, such as fee revenue adjusted for inventory losses and costs.
  • Anomaly detection flags unusual flows, sudden volatility, oracle disagreement, or abnormal contract behavior.
  • Optimization models select allocations and ranges subject to limits on exposure, costs, and liquidity.
  • Large language models can help summarize governance proposals, explain transaction logs, or generate monitoring queries, but they should not be treated as autonomous sources of financial truth.

Reinforcement learning is especially sensitive to its reward design. If the reward counts fees but fails to include inventory losses, gas, slippage, and failed transactions, the resulting policy can optimize the wrong objective.

Backtesting has similar limitations. Historical simulations may omit latency, failed transactions, changing liquidity, gas spikes, sandwich attacks, and the effect of the strategy’s own trades. A paper profit in a backtest is not evidence of live profitability.

Risks that AI cannot eliminate

AI may improve monitoring without removing market-making risk.

Impermanent loss

Impermanent loss is the difference between providing assets to a pool and holding those assets outside the pool, measured before considering fees. It becomes more significant when relative prices diverge. Fees may offset it, but there is no general guarantee that they will.

Smart-contract and protocol risk

A pool can contain a coding vulnerability, rely on flawed assumptions, or expose users to upgrade and governance risks. An AI model cannot repair an exploited contract unless the surrounding system has an effective emergency process.

Oracle and data risk

A manipulated or stale price feed can lead to incorrect valuation, bad range placement, or dangerous rebalancing. Multiple feeds and deviation checks can reduce the risk, but they add complexity.

Adversarial behavior

Other traders may infer a strategy’s behavior, front-run transactions, exploit predictable rebalancing, or trade during periods when the model is slow to react. Private transaction infrastructure may address some execution concerns but introduces additional trust and availability considerations.

Regime change

A model trained during calm markets may fail during a liquidation cascade, exchange failure, chain congestion, or protocol migration. Market relationships that appeared stable can break abruptly.

A practical evaluation checklist

Before evaluating an AI market-making system, ask:

  • What exactly does the model predict or control?
  • What data does it require, and how quickly does that data arrive?
  • How are fees, gas, slippage, impermanent loss, and failed transactions measured?
  • What happens when the model is uncertain?
  • Are there hard limits on position size, pool exposure, and transaction value?
  • Can the system pause automatically?
  • Who controls the keys and contract permissions?
  • How are upgrades reviewed and logged?
  • Has the strategy been tested under extreme volatility and stale data?
  • Does live monitoring compare expected and realized outcomes?
  • Can a human override the system quickly?
  • Are returns being reported before or after all costs?

The most important question is not whether a system uses AI. It is whether its objective, controls, data, and failure procedures are understandable and testable.

Source

A safer architecture for AI-assisted market making

A layered design is generally easier to audit than a model with unrestricted control.

  1. Data layer: Collect prices, pool events, order books, gas data, and system health signals.
  2. Feature layer: Convert raw data into consistent measures such as volatility, inventory, spread, and liquidity depth.
  3. Model layer: Produce forecasts, rankings, or recommended actions.
  4. Policy layer: Apply exposure limits, allowlists, confidence thresholds, and cost checks.
  5. Execution layer: Submit transactions or orders with slippage and permission controls.
  6. Monitoring layer: Compare expected results with actual fills, fees, losses, and failures.
  7. Emergency layer: Pause activity, remove liquidity, cancel orders, or transfer control when predefined conditions are met.

The model should not be the only component deciding whether an action is allowed. A deterministic policy can reject a recommendation that exceeds a wallet limit, interacts with an unapproved contract, or has an unfavorable expected cost.

Conclusion

AI is used in automated crypto market making to estimate volatility, adjust spreads, manage inventory, select liquidity pools, reposition concentrated-liquidity ranges, detect anomalies, and coordinate execution. Its value comes from processing changing information faster and more consistently than a manual workflow.

The strongest systems combine models with transparent rules, reliable data, strict exposure limits, transaction controls, and emergency stops. The central evaluation question is therefore not “Does AI make market making profitable?” It is “Does the AI improve decisions after fees, losses, execution failures, and protocol risks are included?”

For readers assessing a strategy, a conservative process is to verify the underlying AMM mechanics, quantify all costs, test adverse scenarios, inspect permissions and contracts, and treat model forecasts as uncertain inputs. In crypto markets, automation can improve discipline, but it cannot make volatility, smart-contract risk, or liquidity risk disappear.

You may also like

Comments: