The Blend pool address (read-only view, handy for the frontend / dashboard).
fn pool(env: soroban_sdk::Env) -> soroban_sdk::Address
fn admin(env: soroban_sdk::Env) -> soroban_sdk::Address
Withdraw shares worth of underlying from Blend and send it to to. Returns underlying out.
fn redeem(env: soroban_sdk::Env, to: soroban_sdk::Address, shares: i128) -> i128
Pull amount USDC from from (the wrapper) and supply it to Blend. Returns shares minted.
fn deposit(env: soroban_sdk::Env, from: soroban_sdk::Address, amount: i128) -> i128
Human-readable semver of the source build (informational; for verifiable identity use
[Self::code_hash]).
fn version(env: soroban_sdk::Env) -> soroban_sdk::String
fn timelock(env: soroban_sdk::Env) -> u64
The live deployed WASM hash (32-byte SHA-256) of the running code — reflects the current build even across upgrades.
fn code_hash(env: soroban_sdk::Env) -> soroban_sdk::BytesN<32>
One-shot, admin-gated initialization.
admin — operational admin (pause/upgrade path; cannot move user funds).wrapper — the Spield wrapper; the sole authorized caller of deposit/redeem.pool — the Blend pool contract.underlying — the asset SAC (USDC) to supply.max_apr_bps — max allowed annual b_rate growth, in basis points (the sanity bound,
pro-rated by elapsed time on each read). Set generously above Blend's real max borrow APR
(e.g. 30_000 = 300%) so honest reads always pass while a wild read is still caught.fn initialize(
env: soroban_sdk::Env,
wrapper: soroban_sdk::Address,
pool: soroban_sdk::Address,
underlying: soroban_sdk::Address,
max_apr_bps: u32,
)
The current b_rate sanity bound: (last_rate, last_ts, max_apr_bps). View for monitoring —
lets ops watch the last observed rate/time and the configured annual-growth ceiling.
fn rate_bound(env: soroban_sdk::Env) -> (i128, u64, u32)
The underlying asset SAC.
fn underlying(env: soroban_sdk::Env) -> soroban_sdk::Address
Accept a pending admin proposal (step 2 of 2). Must be called by the proposed admin.
fn accept_admin(env: soroban_sdk::Env)
Live Blend b_rate (SCALAR_12), with the sanity bound applied and last_rate advanced.
fn current_rate(env: soroban_sdk::Env) -> i128
fn set_timelock(env: soroban_sdk::Env, secs: u64)
Total shares this strategy holds in Blend (the wrapper's whole position).
fn total_shares(env: soroban_sdk::Env) -> i128
Atomic deploy-time constructor (no deploy→init front-run). Binds admin the moment the
strategy exists; the remaining [Self::initialize] is then gated to this admin.
fn __constructor(env: soroban_sdk::Env, admin: soroban_sdk::Address)
fn apply_upgrade(env: soroban_sdk::Env)
fn pending_admin(env: soroban_sdk::Env) -> Option
Propose a new admin (step 1 of 2). Current admin authorizes; the proposed admin must then
call accept_admin to take control.
fn propose_admin(env: soroban_sdk::Env, new_admin: soroban_sdk::Address)
fn cancel_upgrade(env: soroban_sdk::Env)
Underlying value of shares at the live rate.
fn position_value(env: soroban_sdk::Env, shares: i128) -> i128
fn pending_upgrade(env: soroban_sdk::Env) -> Option
Widen (or tighten) the max annual b_rate growth, in basis points (the bound is then
pro-rated by elapsed time on each read — see check_rate_bound_timed). Admin only.
This is the safety valve for the soft-brick risk: if Blend's real b_rate ever rises faster
than the configured annual ceiling, every current_rate read would otherwise panic and
freeze the whole protocol (no claims/redeems/mints/solvency reads). The admin can raise the
ceiling to unstick it without a redeploy. last_rate/last_ts are preserved.
Intentionally immediate (not timelocked): it is a liveness safety valve that can only widen
tolerance on an already-trusted, monotonic Blend rate — it can never mint value or move funds.
Raising it does not bypass any solvency check; the wrapper still asserts backing >= principal
against Blend's real position on every mutation.
fn set_max_apr_bps(env: soroban_sdk::Env, max_apr_bps: u32)
Schedule a contract upgrade to wasm_hash, applyable after the timelock. Returns the eta.
fn schedule_upgrade(env: soroban_sdk::Env, wasm_hash: soroban_sdk::BytesN<32>) -> u64
Withdraw exactly amount underlying from Blend and send it to to. Returns shares burned.
fn redeem_underlying(
env: soroban_sdk::Env,
to: soroban_sdk::Address,
amount: i128,
) -> i128
Cancel a pending admin proposal. Current admin only.
fn cancel_admin_transfer(env: soroban_sdk::Env)