Contract 0c2d0b93055a2678c844e8737c951c655661e64c94715ce590d04c4dc744695f

← Back to Index 📥 Download WASM

Meta

cliver 27.1.0#8e402ea28202950b272fbabc34caad4d2f64fe87
rssdkver 27.0.4#3715435b643496244c9c22f0e7443b9c1f953ddb
rsver 1.97.1

Instances

  • CBRVU4WTQLOI7QJSEXBOBIXQGCSBCTNL3D5PWJXA6B4UDB2BHXNMVJOF

Interface

Mirrors Blend's submit(from, spender, to, requests) -> Positions ABI. Translates each request by DIRECTION:

  • OUTBOUND (Supply, SupplyCollateral, Repay) on the venue-wrapper asset: pre-wrap so the member holds the wrapped balance the pool will debit.
  • INBOUND (Withdraw, WithdrawCollateral, Borrow) on the venue-wrapper asset: forward first, then unwrap what comes back so the member holds the underlying.
  • Types 6-9: refused with Err::UnimplementedRequestType. Those are liquidator and auction paths, a different actor, deliberately out of scope.

The returned Positions is the pool's response, passed through unmodified.

Unwrap amount

The facade measures the member's wrapped balance before doing anything and again after the pool call, and unwraps the increase. It does NOT unwrap request.amount, because Blend independently caps all three inbound types and can refund an outbound one:

  • Withdraw / WithdrawCollateral are capped to the member's actual position (actions.rs:323, 374).
fn submit(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    spender: soroban_sdk::Address,
    to: soroban_sdk::Address,
    requests: soroban_sdk::Vec,
) -> Positions
fn get_pool(env: soroban_sdk::Env) -> soroban_sdk::Address

View the wrapper's allowlist. Returns false for never-allowed addresses.

THIS IS UX, NOT ENFORCEMENT. The wrapper's transfer gate is the actual allowlist enforcement; a false return here means submit will reject the call with Err::NotAllowlisted, not that the address is barred from the underlying system.

fn is_allowed(env: soroban_sdk::Env, id: soroban_sdk::Address) -> bool
fn get_wrapped(env: soroban_sdk::Env) -> soroban_sdk::Address

Constructor. Runs ATOMICALLY with deploy, which is the only window in which pool and wrapped can be set. There is no separate init step and so no init front-run window for an attacker to claim these: the only way they are set is the deploy transaction itself.

Requires --pool <P> --wrapped <W> at deploy time. There is no admin argument: see the file-level Immutability section.

fn __constructor(
    env: soroban_sdk::Env,
    pool: soroban_sdk::Address,
    wrapped: soroban_sdk::Address,
)

Imports

WebAssembly Text (WAT) ▶