Deposit stablecoin (e.g. USDC) into the corridor pool
fn deposit(env: soroban_sdk::Env, lp: soroban_sdk::Address, amount: i128) -> i128
Withdraw deposited stablecoin and earned yield from the pool
fn withdraw(env: soroban_sdk::Env, lp: soroban_sdk::Address, shares: i128) -> i128
Initialize the corridor pool with asset and interest rate parameters
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
token: soroban_sdk::Address,
gov_token: soroban_sdk::Address,
optimal_utilization: u32,
base_fee_bps: u32,
slope_1_bps: u32,
slope_2_bps: u32,
)
fn get_lp_state(env: soroban_sdk::Env, lp: soroban_sdk::Address) -> LPState
Anchors draw liquidity from the pool to fulfill instant settlement
fn draw_liquidity(env: soroban_sdk::Env, anchor: soroban_sdk::Address, amount: i128)
fn get_pool_state(env: soroban_sdk::Env) -> PoolState
Register/whitelist an anchor with standard credit limit (Governance task)
fn register_anchor(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
anchor: soroban_sdk::Address,
credit_limit: i128,
)
Repay liquidity drawn + pay the utilization-based settlement fee
fn repay_liquidity(
env: soroban_sdk::Env,
anchor: soroban_sdk::Address,
principal: i128,
)
fn get_anchor_state(env: soroban_sdk::Env, anchor: soroban_sdk::Address) -> AnchorState
fn get_pending_yield(env: soroban_sdk::Env, lp: soroban_sdk::Address) -> i128
Update anchor credit limit based on score (Governance/Risk Management)
fn adjust_credit_limit(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
anchor: soroban_sdk::Address,
new_limit: i128,
)