Contract 86801782458d4ab4887c8f9dfa048133fdf4137a9b55381a75aa356d9f571017

← Back to Index 📥 Download WASM

Meta

cliver 26.0.0#60f7458e7ecffddf2f2d91dc6d0d2db4fab03ecc
rssdkver 20.5.0#9e2c3022b4355b224a7a814e13ba51761eeb14bb
rsver 1.95.0

Instances

  • CDO3GSX27G6TAHLBROCC6WV4TNM6BWLFZDT2OW6RSUVBSGZJKTIISJFG

Interface

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,
)

Imports

WebAssembly Text (WAT) ▶