fn asset(env: soroban_sdk::Env) -> soroban_sdk::Address
Returns the underlying asset value of from's shares.
fn balance(env: soroban_sdk::Env, from: soroban_sdk::Address) -> i128
Deposit amount of underlying into Blend. Returns shares minted to from.
Share math:
fn deposit(env: soroban_sdk::Env, amount: i128, from: soroban_sdk::Address) -> i128
Claim BLND emissions, swap via Soroswap → asset, then redeposit into Blend. Share price rises for all holders; no per-user distribution.
No-op if total_shares == 0 (prevents a 1-wei first-depositor from harvesting pre-accrued emissions for free).
fn harvest(env: soroban_sdk::Env, from: soroban_sdk::Address) -> i128
fn registry(env: soroban_sdk::Env) -> soroban_sdk::Address
Burn shares_to_burn shares held by from, pay out proportional
underlying to to.
amount parameter is REUSED as shares_to_burn under the v4 share
model. Do not pass underlying amount.
Reverts if shares_to_burn > Shares(from) — fixes the C2 drain.
fn withdraw(
env: soroban_sdk::Env,
amount: i128,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
) -> i128
One-time initializer.
registry — strategy-registry contract; gates authorized callers.asset — base asset handled by this strategy (e.g. USDC SAC).blend_pool — Blend V2 pool contract this strategy supplies to.reserve_index — index of asset within the pool's reserve list.reward_token — BLND emission token contract.soroswap_router — Soroswap router contract (reward compound).soroswap_first_pair — pair contract of (swap_path[0], swap_path[1]).swap_path — must start with reward_token, end with asset, length ≥ 2.fn initialize(
env: soroban_sdk::Env,
registry: soroban_sdk::Address,
asset: soroban_sdk::Address,
blend_pool: soroban_sdk::Address,
reserve_index: u32,
reward_token: soroban_sdk::Address,
soroswap_router: soroban_sdk::Address,
soroswap_first_pair: soroban_sdk::Address,
swap_path: soroban_sdk::Vec,
)
Convenience: share price scaled by 10^7 (1.0 = 10_000_000).
fn share_price(env: soroban_sdk::Env) -> i128
Total shares outstanding across all depositors.
fn total_shares(env: soroban_sdk::Env) -> i128
Share balance for a specific keeper.
fn share_balance(env: soroban_sdk::Env, from: soroban_sdk::Address) -> i128