Volatile Pool
A volatile pool is a liquidity pool designed for trading assets with high price volatility (e.g., APT/USDC).
Higher risk of price fluctuation compared to stable pools.
Typically used for token pairs without a strong price peg.
Standard swap fee for volatile pools: 0.1%.
Volatile Pool Formula
Volatile pools use the constant product market maker formula:

Where:
x = reserve of token_1
y = reserve of token_2
k = constant (invariant), must remain unchanged after each swap
Explanation:
When a user swaps one token, the product of the two reserves (k) stays constant.
This design ensures continuous liquidity but introduces price slippage, especially for large trades.
How To Create Volatile Pool
Use the create_pool
function from the router
module.
public entry fun create_pool(
token_1: Object<Metadata>,
token_2: Object<Metadata>,
is_stable: bool,
) {
...
}
Function Parameters
Last updated