Trading Mechanics
Last updated
Last updated
Bin-Based Liquidity:
Liquidity is divided into bins, each corresponding to a specific price point .
The bin step (e.g., 0.01% or 1 basis point) determines the price increment between bins.
Each bin holds reserves of two tokens (X and Y), but only the active bin (where the current market price lies) contains both tokens. Bins to the left (lower prices) hold only token Y, and bins to the right (higher prices) hold only token X.
Active Bin:
The active bin is where trading happens. It contains both tokens and supports swaps at its fixed price.
Trades within the active bin follow a constant sum formula (X + Y = k), meaning the price remains constant until one token is depleted. This contrasts with the constant product formula (x * y = k) in traditional AMMs.
Trades consume liquidity within the active bin at its set price. If demand exceeds the bin’s reserves (e.g., swapping 10 SUI when only 8 are available), the system shifts to the next bin (e.g., $3.10), executing the remainder at that price.
This stepwise progression mimics a limit order book but retains AMM decentralization and composability.