Earnium Docs Stardust
Documentation menu

Stable Pool

On this page

Stable Pool Formula

Stable pools use a hybrid invariant formula to optimize swaps between assets with similar values (e.g., USDC/USDT, ETH/stETH):

Where:

Explanation:

How to create stable 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