Contract 2437c2efa8647fe0023d5b229db5a714369a4a3842ccf207add7c267702163b8

← Back to Index 📥 Download WASM

Meta

rssdkver 23.0.3#6aa930b08eabfd578b7824a0d5de473cbd958282
rsver 1.94.1

Instances

  • CA3E3W2ZCBH2PYZCRPFVH4C5FYC3CI7BM5CUWW7XDNE4LGCMSTOF4YCE

Interface

(Only Owner) Sweep token balances from the contract to to.

fn claim(
    env: soroban_sdk::Env,
    to: soroban_sdk::Address,
    assets: soroban_sdk::Vec,
) -> soroban_sdk::Map

(Only Owner) Deposit USDC from owner into the contract's supply position in source_pool. This is how the owner capitalizes or tops up the contract without needing programmatic access to C-account positions through a wallet UI.

fn deposit(env: soroban_sdk::Env, amount: i128)

(Only Owner) Withdraw USDC from the contract's source_pool position to any address (typically the owner's own wallet).

fn withdraw(env: soroban_sdk::Env, to: soroban_sdk::Address, amount: i128)
fn get_owner(env: soroban_sdk::Env) -> soroban_sdk::Address

(Only Owner) Rotate ownership.

fn set_owner(env: soroban_sdk::Env, new_owner: soroban_sdk::Address)

Initialize the contract.

Arguments

  • owner - Controls claim, set_owner, set_source_pool.
  • backstop - Blend backstop contract address.
  • usdc - USDC token contract address.
  • source_pool - The Blend pool where this contract holds a USDC supply position. Withdrawals happen from here to fund fills.
fn __constructor(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    backstop: soroban_sdk::Address,
    usdc: soroban_sdk::Address,
    source_pool: soroban_sdk::Address,
)

Fill an interest auction. Any invoker can call this — the transaction fee is expected to be paid via a fee-bump (e.g. via OpenZeppelin Channels). USDC is withdrawn from the contract's supply position in source_pool, converted to backstop LP tokens via Comet, and used to fill the auction in pool. Any unused USDC is re-supplied back to source_pool so it keeps earning interest.

Arguments

  • pool - Pool whose backstop has the interest auction.
  • fill_percent - Percentage to fill (1-100).
  • max_usdc_in - Upper bound of USDC to spend on this fill.
fn fill_interest(
    env: soroban_sdk::Env,
    pool: soroban_sdk::Address,
    fill_percent: u32,
    max_usdc_in: i128,
)
fn get_source_pool(env: soroban_sdk::Env) -> soroban_sdk::Address

(Only Owner) Change the pool this contract withdraws USDC from.

fn set_source_pool(env: soroban_sdk::Env, new_pool: soroban_sdk::Address)

Imports

WebAssembly Text (WAT) ▶