Skip to main content

AMM Overview

The XYZ AMM is a constant-product automated market maker that provides trading for tokens that have graduated from the Launchpad. It uses the standard x * y = k formula, where trading fees stay in the pool to benefit liquidity providers.

How It Works

The AMM maintains pools of two assets: XYZ and a CW20 token. The product of both reserves stays constant (minus fees):
When you swap XYZ for tokens, you add XYZ to the pool and remove tokens. The price adjusts automatically based on the ratio of reserves.

Price Formula

Larger trades relative to pool size have more price impact (slippage). Deeper pools provide better prices.

Pool Creation

Pools are created automatically when a launchpad token graduates. Only the launchpad contract (an authorized creator) can create new pools. When a token graduates at its dynamic XYZ threshold: This creates a pool with deep initial liquidity from day one.

Fee Structure

How Fees Work

Swap fees are deducted from your input before the trade calculation. The fee tokens stay in the pool, increasing reserves. This means LP positions grow in value over time as fees accumulate — the fee auto-compounds.

Augmented Fee

Newly graduated pools may have a temporary augmented fee (up to 5%) on top of the base 1%. This extra fee auto-disables once the pool’s total value reaches a target threshold. You can check the status:
Returns whether the augmented fee is active, the current pool value, and progress toward the target.

Querying Pool Info

Get the current state of any pool:
Returns:

Listing All Pools

Returns up to 30 pools per page. Pass the last token_address as start_after for pagination.

Next Steps

Swapping

Trade tokens on the AMM

Liquidity

Understand LP tokens and pool mechanics

Launchpad

How tokens reach the AMM via graduation