Contract e7dbdc95619fc5eafcec54e419a873c60eb951afaedbe1e96e7e8e42366b1d4f

← Back to Index 📥 Download WASM

Meta

cliver 27.0.0#5a7c5fe76530bf4248477ac812fc757146b98cc4
rssdkver 26.1.0#175aa41306f383057a8cdfc84b68d931664fc34e
rsver 1.96.0

Instances

  • CDAEPRFO5IXZWVRCA6CZJC6BOIXJYY5XWXVZ645GJP3I7N4RMAXK2I2N

Interface

The reserve's current bToken supply index (b_rate, SCALAR_12 scale), read live from Blend via get_reserve.

This is a live read, not a settled one: get_reserve runs Reserve::load, which accrues from data.last_time to the current ledger timestamp before returning (early-returning only when the reserve was already accrued this ledger). So the index advances continuously on a quiet reserve, and a pin_index at a term boundary captures that boundary's true index — no interaction has to land nearby. The Alula adapter reaches the same property by projecting forward itself, because its source settles on read; here the pool already does it.

b_rate does legitimately hold flat while utilization == 0 — nothing is borrowed, so suppliers earn nothing. That is a real zero rate, not staleness.

fn index(env: soroban_sdk::Env) -> i128

The bound configuration (pool / asset).

fn config(env: soroban_sdk::Env) -> Config

Replace the contract's wasm (admin-gated). Address and storage are kept.

fn upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)
fn get_admin(env: soroban_sdk::Env) -> soroban_sdk::Address

Hand the admin role to new_admin (current admin only).

upgrade is admin-gated and this contract has no other way to move that role, so without this the deploying key kept un-timelocked code-replacement authority over it forever — the governance handover could rotate the engine, vAMM and broker but not this.

fn set_admin(env: soroban_sdk::Env, new_admin: soroban_sdk::Address)

Storage/schema version, bumped by a post-upgrade migration when the layout changes.

fn get_version(env: soroban_sdk::Env) -> u32

Bind this adapter to one reserve (asset) of one Blend pool, admin-gated for upgrades.

fn __constructor(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    pool: soroban_sdk::Address,
    asset: soroban_sdk::Address,
)

Imports

WebAssembly Text (WAT) ▶