Contract fa8a614e555c9f399d7ecebcb33ebdc2ea38a0b7028833d080c6f91d315b0301

← Back to Index 📥 Download WASM

Meta

cliver 26.1.0#1228cff8022b804659750b94b315932b0e0f3f6a
rssdk_spec_shaking 2
rssdkver 26.1.0#175aa41306f383057a8cdfc84b68d931664fc34e
rsver 1.96.0

Instances

  • CAS5PJYZQ74Z7W3YO24J6MX47WG6UFY52Z4JESCAE5I4COZFPAN664B3

Interface

Pays to through the splitter: the savings share of amount goes to to's chosen yield source, the rest is credited to the spendable balance.

fn pay(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    to: soroban_sdk::Address,
    amount: i128,
)
fn usdc(env: soroban_sdk::Env) -> soroban_sdk::Address
fn owner(env: soroban_sdk::Env) -> Option
fn pause(env: soroban_sdk::Env)
fn vault(env: soroban_sdk::Env) -> soroban_sdk::Address
fn paused(env: soroban_sdk::Env) -> bool
fn unpause(env: soroban_sdk::Env)

Locks savings withdrawals until until; a lock can only be extended.

fn set_lock(env: soroban_sdk::Env, user: soroban_sdk::Address, until: u64)
fn set_split(env: soroban_sdk::Env, user: soroban_sdk::Address, bps: u32)
fn account_of(env: soroban_sdk::Env, user: soroban_sdk::Address) -> Account
fn blend_pool(env: soroban_sdk::Env) -> soroban_sdk::Address
fn __constructor(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    usdc: soroban_sdk::Address,
    vault: soroban_sdk::Address,
    blend_pool: soroban_sdk::Address,
    blend_reserve_index: u32,
    soroswap_router: soroban_sdk::Address,
    soroswap_factory: soroban_sdk::Address,
    soroswap_pair: soroban_sdk::Address,
    xlm: soroban_sdk::Address,
    default_yield_target: YieldTarget,
)
fn soroswap_pair(env: soroban_sdk::Env) -> soroban_sdk::Address

Pays to with any token that has a Soroswap route to USDC: pulls amount_in of token_in from from, swaps it along path for USDC, then splits the received USDC exactly like pay. The swap is a plain call - any failure reverts the whole payment, since unlike a yield-source outage there is no USDC to degrade to.

fn pay_with_token(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    token_in: soroban_sdk::Address,
    amount_in: i128,
    min_usdc_out: i128,
    path: soroban_sdk::Vec,
    to: soroban_sdk::Address,
)
fn withdraw_spend(env: soroban_sdk::Env, user: soroban_sdk::Address, amount: i128)

Switches which protocol user's future savings earn yield in. Only allowed at a zero balance, since the sources' shares are not interchangeable and withdrawing first keeps the accounting simple.

fn set_yield_target(
    env: soroban_sdk::Env,
    user: soroban_sdk::Address,
    target: YieldTarget,
)

Redeems savings shares from user's yield source and sends the resulting USDC to them.

fn withdraw_savings(
    env: soroban_sdk::Env,
    user: soroban_sdk::Address,
    shares: i128,
) -> i128

Imports

WebAssembly Text (WAT) ▶