AMM Best Practices for Teams That Run a Pool
AMM best practices keep a liquidity pool safe, fairly priced and worth providing for. This guide covers pool design, fees, oracles, security and monitoring.
On this page
Short answer
An automated market maker, or AMM, is a smart contract that prices trades from a formula and the tokens in its pool instead of matching buyers with sellers. The best practices for running one cover pool design, fee setting, price feeds, security checks and live monitoring, so the pool stays solvent and attractive to liquidity providers.
What are AMM best practices?
AMM best practices are the operating rules that keep a liquidity pool safe, fairly priced and worth providing liquidity for. An AMM is a smart contract that prices trades from a formula and the tokens held in its pool, so every design choice affects the price traders get and the returns providers earn.
The practices fall into five areas, and a team that runs a pool needs all five:
| Area | What good practice looks like | What goes wrong without it |
|---|---|---|
| Pool design | Right model and pair for the tokens | Thin liquidity and wide spreads |
| Fees | Fee tier matched to volatility | Providers leave or traders overpay |
| Price feeds | Time-weighted or median oracle | Flash-loan price manipulation |
| Security | Audit, limits and a pause path | A bug drains the pool |
| Monitoring | Alerts on volume, price and depth | Problems found by users first |
These are operations practices, not build steps. For the build itself, see how to implement an AMM.
For the model choice, see AMM types compared.
How should you design the pool?
You design the pool around the token pair and the traders you expect, because the AMM model that fits a stable pair does not fit a volatile one. A constant product pool works for most pairs, while concentrated liquidity suits pairs where providers want to focus depth around the current price.
Start with the pair itself. Pairs of tokens that track each other, such as two dollar-pegged stablecoins, need a model built for low slippage between near-equal values. Volatile pairs need wider ranges and higher fees to pay providers for the risk they carry.
Seed the pool with enough depth on day one. A pool that starts thin gives bad prices, which drives traders away, which keeps the pool thin. If your own team seeds the first liquidity, set the starting price from a trusted market price, not from a guess, and document the ratio you used.
Keep the pool focused. One well-funded pool per pair beats five thin ones, because liquidity that is split across pools gives every trader a worse price. Add a new pool only when a pair has enough volume to support it on its own.
How do you set fees and manage liquidity?
You set fees to balance two groups: traders want low fees, and liquidity providers want enough income to stay. A fee tier that is too low leaves providers underpaid, so they withdraw; a fee that is too high pushes traders to another pool.
Match the tier to volatility. Stable pairs can run on low fees because prices barely move and providers face little loss from price drift. Volatile pairs need higher fees, because providers accept the risk that the token ratio shifts against them while their funds sit in the pool.
Review fee income against that drift regularly. If providers are earning less in fees than they lose to price movement, the pool will shrink. That check is the single most useful weekly number for a pool operator, and it is easy to compute from pool data.
Use incentives with care. Extra rewards can attract liquidity fast, but they attract short-term deposits that leave when the rewards stop. Pay incentives for depth that stays, such as rewards tied to time in the pool, rather than for deposits that arrive and leave in a day.
How do you protect a pool from attacks?
You protect a pool by assuming someone will try to move its price and by making that attempt expensive and unprofitable. The most common attack is a flash loan that pushes the pool price for one transaction, then uses the distorted price somewhere else.
Never price anything important from a single spot reading of your own pool. Use a time-weighted average price or a median of several sources, so a one-block price spike cannot change what the rest of your system believes. This is the control that matters most for lending and derivatives built on top of a pool.
Get the contracts audited before launch and again after any material change. An audit does not prove a contract is safe, but it catches the common classes of error: rounding mistakes, re-entrancy paths, access control gaps and arithmetic that overflows at large values.
Set slippage limits that traders can see and change, and keep an emergency pause that a small set of trusted signers can trigger. A pause that takes a week to activate is useless in an incident, so test the pause path on a test network before you need it in production.
How do you monitor a live AMM?
You monitor a live AMM by watching four numbers: pool depth, daily volume, fee income and the gap between your price and the wider market. When any of them moves sharply, something has changed, and you want to know before your users do.
Set alerts, not just dashboards. A dashboard that nobody opens is decoration. Alerts should fire on large withdrawals, sudden volume spikes, price gaps against other venues, and failed transactions above a threshold, because each of those is an early sign of an attack or a broken integration.
Track provider returns, not just pool totals. A pool can show rising volume while providers quietly lose money to price drift, and by the time depth falls it is hard to win them back. Publish the provider return figure internally every week so the team sees the trend.
Keep an incident runbook. It should name who decides to pause, how the team communicates with providers, and what checks run before the pool reopens. Write it when things are calm, because during an incident nobody has time to invent it.
Example (hypothetical): a two-token pool in numbers
Example (hypothetical): a team runs a pool holding $200,000 of two tokens in equal value. On a typical day the pool trades $40,000 of volume and charges a 0.3% fee, which brings in $120 a day in fees.
One provider supplied 10% of the pool, or $20,000. That provider earns 10% of the daily fees, which is $12 a day, or about $360 over 30 days if volume stays flat.
Over the same month the token price drifts, and the provider's position loses 2% to that drift, which is $400 on a $20,000 position. Fees of $360 against a $400 drift loss leave the provider roughly at break-even for the month.
The lesson is the point of the example: fee income and price drift must be compared together. A pool that looks busy can still lose providers if the drift loss is larger than the fees, so the team raises the fee tier slightly and watches the next month before deciding whether the change worked.
What are the common mistakes?
The most common AMM mistakes are launching with thin liquidity, pricing from a single spot reading, and ignoring provider returns until depth has already left.
- Seeding too little. A thin pool gives bad prices from day one and never attracts the volume that would deepen it.
- Trusting the spot price. Any system that reads the pool price in one block can be manipulated with a flash loan.
- Setting fees once and forgetting them. Volatility changes, so a fee tier that was right at launch can be wrong three months later.
- Rewarding short-term deposits. Incentives that pay for arrival, not for staying, leave the pool empty when they end.
- No pause path. A pool with no tested emergency pause leaves the team watching an incident it cannot stop.
- Watching volume only. Rising volume with falling provider returns is a pool in decline, not a pool that is growing.
Key takeaways
- AMM best practices cover pool design, fees, price feeds, security and monitoring together
- Match the fee tier to volatility: stable pairs run on low fees, volatile pairs need more
- Never price anything important from a single spot reading of your own pool
- Compare fee income against price drift every week to see whether providers are actually earning
- Test the emergency pause on a test network before you need it in production
Frequently asked questions
What is an AMM in simple terms?
An automated market maker is a smart contract that holds two or more tokens and prices trades with a formula based on the ratio in the pool. Traders swap against the pool instead of waiting for another trader, and liquidity providers earn a share of the trading fees.
How much liquidity does a new AMM pool need?
There is no fixed number, but the pool needs enough depth that a typical trade moves the price by only a small amount. Start with the largest realistic trade size, check the price impact it would cause, and seed until that impact is acceptable for your traders.
What is impermanent loss?
Impermanent loss is the loss a liquidity provider faces when the price ratio of the pooled tokens changes after depositing. The provider would have been better off simply holding the tokens. Fee income is meant to offset it, which is why the two must be compared together.
Why do AMMs use time-weighted average prices?
A time-weighted average price smooths out short spikes, so a single transaction cannot distort the price that other contracts rely on. Spot prices can be moved with a flash loan inside one block, while an average over many blocks is far more expensive to manipulate.
Can an AMM pool be paused?
Most production AMMs include a pause or emergency stop controlled by a small set of signers or a governance vote. Pausing stops trades and deposits while the team investigates, and it should be tested on a test network before it is ever needed.
How often should AMM fees be reviewed?
Review fees at least monthly, and sooner after a sharp change in volatility or volume. A fee tier is a setting, not a permanent choice, and teams that adjust it as conditions change keep both traders and providers.