Mirrors Blend's submit(from, spender, to, requests) -> Positions
ABI. Translates each request by DIRECTION:
Supply, SupplyCollateral, Repay) on the
venue-wrapper asset: pre-wrap so the member holds the
wrapped balance the pool will debit.Withdraw, WithdrawCollateral, Borrow) on the
venue-wrapper asset: forward first, then unwrap what comes
back so the member holds the underlying.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.
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,
)