Supply amount of asset to the Blend pool.
The vault pre-funds the strategy with the tokens before calling this.
fn supply(
env: soroban_sdk::Env,
vault: soroban_sdk::Address,
pool: soroban_sdk::Address,
asset: soroban_sdk::Address,
amount: i128,
)
Deposit amount of asset into Blend pool on behalf of from (vault).
Pulls tokens from from via transfer_from (requires pre-approval).
fn deposit(
env: soroban_sdk::Env,
amount: i128,
pool: soroban_sdk::Address,
asset: soroban_sdk::Address,
from: soroban_sdk::Address,
) -> i128
fn get_name(env: soroban_sdk::Env) -> soroban_sdk::String
Withdraw amount of asset from Blend pool, sending tokens to to.
fn withdraw(
env: soroban_sdk::Env,
amount: i128,
pool: soroban_sdk::Address,
asset: soroban_sdk::Address,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
) -> i128
Return the value of all positions (alias — same as get_total_value).
fn get_value(env: soroban_sdk::Env, vault: soroban_sdk::Address) -> i128
Initialize the strategy for a vault.
No pool- or asset-specific arguments — positions are registered
dynamically on the first supply call for each pool.
fn initialize(
env: soroban_sdk::Env,
vault: soroban_sdk::Address,
name: soroban_sdk::String,
)
Return true if any active position involves asset.
fn asset_in_use(
env: soroban_sdk::Env,
vault: soroban_sdk::Address,
asset: soroban_sdk::Address,
) -> bool
Return the total base-asset value of all positions for vault.
Budget profile:
blend_get_supply call per active pool (unavoidable — Blend tracks state)get_prices batch call for all unique lending assetsfn get_total_value(env: soroban_sdk::Env, vault: soroban_sdk::Address) -> i128
Return the number of active pools (> 0 means strategy holds positions).
fn get_share_balance(env: soroban_sdk::Env) -> i128
Proportionally withdraw numerator/denominator of every active pool
position and send underlying tokens directly to to.
fn withdraw_fraction(
env: soroban_sdk::Env,
vault: soroban_sdk::Address,
numerator: i128,
denominator: i128,
to: soroban_sdk::Address,
)
Return all pool addresses with a (potentially) non-zero supply balance.
fn get_active_positions(
env: soroban_sdk::Env,
) -> soroban_sdk::Vec
fn refresh_asset_handler(env: soroban_sdk::Env)
Withdraw amount from Blend pool and return tokens to vault.
fn withdraw_from_lending(
env: soroban_sdk::Env,
vault: soroban_sdk::Address,
pool: soroban_sdk::Address,
asset: soroban_sdk::Address,
amount: i128,
)
Return underlying token balances across all active Blend lending positions.
For each active pool: returns the lent token balance (queried from the Blend pool). The vault uses this to batch-price all assets without nesting factory + oracle calls inside the strategy.
fn get_underlying_asset_balances(
env: soroban_sdk::Env,
vault: soroban_sdk::Address,
) -> soroban_sdk::Map