Schedule Pool
When a pool is created, a schedule can be set so that the swap fee (in bps) gradually decreases over the specified duration.
Volatile pool: Swap fee decreases from 20% → 0.1%.
Stable pool: Swap fee decreases from 20% → 0.04%.
Example
If you create a volatile pool with a 30-day schedule:
On Day 1: Swap fee ≈ 20%.
On Day 15: Swap fee ≈ 10%.
On Day 30: Swap fee ≈ 0.1%.
This mechanism incentivizes early liquidity and gradually aligns the pool with a competitive fee rate.
How to create schedule pool
Use the create_pool_with_fee_schedule
function from the router
module.
public entry fun create_pool_with_fee_schedule(
token_1: Object<Metadata>,
token_2: Object<Metadata>,
is_stable: bool,
duration: u64
) {
...
}
Function Parameters
token_1
: The first token object used to create or provide liquidity.token_2
: The second token object used to create or provide liquidity.is_stable
: A boolean flag indicating whether the pool is stable (true
) or volatile (false
)duration
: The time period (in seconds) over which the swap fee decreases from 20% to the standard fee.
Last updated