HANNISOL
Sign in
DeFi Deep Dives7 min read·Jan 4, 2026

What Is an AMM? Understanding Automated Market Makers on Solana

Before automated market makers existed, every decentralized exchange attempted to replicate the traditional order book model on-chain — requiring a buyer and a seller to agree on a price at the same moment. This approach produced extremely thin markets, wide bid-ask spreads, and poor execution quali

H
Hannisol Team

The invention that made decentralized trading possible at scale

Before automated market makers existed, every decentralized exchange attempted to replicate the traditional order book model on-chain — requiring a buyer and a seller to agree on a price at the same moment. This approach produced extremely thin markets, wide bid-ask spreads, and poor execution quality because on-chain order matching is slow and expensive. The AMM model, first pioneered by Uniswap on Ethereum and rapidly adopted by every major Solana DEX, solved this problem through a fundamentally different mechanism: instead of matching orders, it replaced orders entirely with a mathematical pricing formula applied to a shared liquidity pool. The result was instant liquidity for any token pair without requiring a counterparty — and the foundation of the entire modern DeFi ecosystem.


The constant product formula — x × y = k

The most widely used AMM formula is the constant product model, formalized as:

x × y = k

Where x is the quantity of Token A in the pool, y is the quantity of Token B, and k is a constant that must remain unchanged after every trade. When you buy Token A with Token B, you add Token B to the pool (increasing y) and remove Token A (decreasing x). To maintain x × y = k, the price of Token A must increase — because x decreased while k remains fixed.

Concrete example: A pool holds 1,000 SOL (x) and 100,000 USDC (y). k = 100,000,000. You want to buy 10 SOL. After your purchase, x = 990 SOL. For k to remain 100,000,000, y must equal 101,010.10 USDC. You paid 1,010.10 USDC for 10 SOL — an effective price of $101 per SOL versus the pre-trade implied price of $100. The 1% difference is your price impact.


Why AMMs create slippage — and when it matters

Price impact (and resulting slippage) is inherent to the constant product model. Every trade moves the price, and larger trades cause larger price movements. The key variable is the ratio of your trade size to the total pool size: a $1,000 trade in a $10 million pool has negligible impact; the same $1,000 trade in a $5,000 pool creates enormous slippage.

For Solana token buyers, this means liquidity pool depth is not just a convenience metric — it directly determines whether a position can be entered and exited at reasonable prices. Hannisol's Exit Ability score is fundamentally a slippage assessment: can you exit your intended position without suffering more than a defined percentage loss purely from your own trade's price impact?


Concentrated liquidity — the CLMM improvement

The original constant product AMM distributes liquidity evenly across all possible prices, from zero to infinity. This is capital-inefficient: most liquidity sits at price ranges where trading rarely occurs. Concentrated Liquidity Market Makers (CLMMs), used by Raydium and Orca's Whirlpools, allow liquidity providers to specify a price range within which their capital is deployed. This concentrates capital where trading actually happens, dramatically improving capital efficiency — but introducing a new risk: if price moves outside the LP's range, their position becomes 100% in one asset and earns no fees until price returns.


Impermanent loss — the AMM tax on liquidity providers

When you provide liquidity to an AMM pool, you receive LP tokens representing your share of the pool. As prices change, the AMM automatically adjusts your position composition. If Token A appreciates significantly against Token B, the AMM sells your Token A and buys Token B to maintain the pool ratio. When you withdraw, you hold less of the appreciated asset than if you had simply held both tokens separately. This difference is impermanent loss — impermanent because if price returns to its original ratio, the loss reverses.

For token buyers (not LPs), the key insight is: impermanent loss means liquidity providers who support your favorite token are continuously bearing a cost that depends on price volatility. Highly volatile tokens in low-fee pools may not generate enough fees to compensate LPs, which creates LP withdrawal risk — the source of sudden liquidity drops that increase exit risk for holders.

Analyze any Solana token's liquidity risk and AMM depth at Hannisol.

Ready to apply this to a real token?

Run any Solana mint address through Hannisol's 8-dimension risk engine — free, no signup required.

Analyze a token on Hannisol →

Related articles

Profile
Notification
FavoritesFavorites
History