LiquidityProvider

Interface specification for the Spline liquidity provider contract.

Version: 0.1.7

ILiquidityProvider

Fully qualified path: spline_v0::lp::ILiquidityProvider

pub trait ILiquidityProvider<TStorage>

Trait functions

create_and_initialize_pool

creates and initializes a pool with ekubo key pool_key with initial tick initial_tick. only owner of liquidity provider can initialize

Fully qualified path: spline_v0::lp::ILiquidityProvider::create_and_initialize_pool

fn create_and_initialize_pool(
    ref self: TStorage,
    pool_key: ekubo::types::keys::PoolKey,
    initial_tick: ekubo::types::i129::i129,
    profile_params: Span<ekubo::types::i129::i129>,
)

compound_fees

compounds any existing fees on pool with ekubo key pool_key into the liquidity factor

Fully qualified path: spline_v0::lp::ILiquidityProvider::compound_fees

fn compound_fees(ref self: TStorage, pool_key: ekubo::types::keys::PoolKey) -> u128

add_liquidity

adds an amount of liquidity factor to pool with ekubo key pool_key, minting shares to caller

Fully qualified path: spline_v0::lp::ILiquidityProvider::add_liquidity

fn add_liquidity(
    ref self: TStorage,
    pool_key: ekubo::types::keys::PoolKey,
    factor: u128,
    amount0_max: u128,
    amount1_max: u128,
) -> u256

remove_liquidity

removes an amount of liquidity factor from pool with ekubo key pool_key

Fully qualified path: spline_v0::lp::ILiquidityProvider::remove_liquidity

fn remove_liquidity(
    ref self: TStorage,
    pool_key: ekubo::types::keys::PoolKey,
    shares: u256,
    amount0_min: u128,
    amount1_min: u128,
) -> u128

sweep

sweeps any tokens in this contract to recipient. only callable by owner

Fully qualified path: spline_v0::lp::ILiquidityProvider::sweep

fn sweep(
    ref self: TStorage,
    token: starknet::ContractAddress,
    recipient: starknet::ContractAddress,
    amount: u256,
)

core

returns the ekubo core for pools deployed by this liquidity provider

Fully qualified path: spline_v0::lp::ILiquidityProvider::core

fn core(self: @TStorage) -> ekubo::interfaces::core::ICoreDispatcher

profile

returns the profile for pools deployed by this liquidity provider

Fully qualified path: spline_v0::lp::ILiquidityProvider::profile

fn profile(self: @TStorage) -> spline_v0::profile::ILiquidityProfileDispatcher

pool_token

returns the liquidity provider token for pool with ekubo key pool_key

Fully qualified path: spline_v0::lp::ILiquidityProvider::pool_token

fn pool_token(self: @TStorage, pool_key: ekubo::types::keys::PoolKey) -> starknet::ContractAddress

pool_liquidity_factor

Fully qualified path: spline_v0::lp::ILiquidityProvider::pool_liquidity_factor

fn pool_liquidity_factor(self: @TStorage, pool_key: ekubo::types::keys::PoolKey) -> u128

pool_reserves

Fully qualified path: spline_v0::lp::ILiquidityProvider::pool_reserves

fn pool_reserves(self: @TStorage, pool_key: ekubo::types::keys::PoolKey) -> (u128, u128)

pool_minimum_liquidity_factor

returns the minimum liquidity factor for pool with ekubo key pool_key for pool price at given tick

Fully qualified path: spline_v0::lp::ILiquidityProvider::pool_minimum_liquidity_factor

fn pool_minimum_liquidity_factor(
    self: @TStorage, pool_key: ekubo::types::keys::PoolKey, tick: ekubo::types::i129::i129,
) -> u128

Last updated