Notification called by the vault after it has already transferred tokens in. This function validates the caller is the vault but performs no token transfers or internal bookkeeping (the vault tracks balances via balance-differencing).
Zero-amount calls are no-ops (used for interface validation).
Negative amounts are rejected with InvalidAmount.
fn deposit(env: soroban_sdk::Env, from: soroban_sdk::Address, amount: i128)
Transfer up to amount of the asset back to the vault.
Returns the actual amount transferred (capped by available balance).
Returns 0 immediately for non-positive amounts (no auth required).
fn withdraw(env: soroban_sdk::Env, to: soroban_sdk::Address, amount: i128) -> i128
The token this strategy manages.
fn get_asset(env: soroban_sdk::Env) -> soroban_sdk::Address
The vault address that may call deposit / withdraw.
fn get_vault(env: soroban_sdk::Env) -> soroban_sdk::Address
Permissionless TTL extension.
fn extend_ttl(env: soroban_sdk::Env)
Idle token balance held by this contract (excludes deployed capital).
fn get_balance(env: soroban_sdk::Env) -> i128
Initialize the strategy.
asset – the token this strategy manages (e.g. XLM wrapper).vault – the August vault address; only address that may
call deposit / withdraw.controller – the EOA (e.g. Utila wallet) that may call
deploy_to_protocol / recall_from_protocol.fn __constructor(
env: soroban_sdk::Env,
asset: soroban_sdk::Address,
vault: soroban_sdk::Address,
controller: soroban_sdk::Address,
)
The controller address that may call deploy_to_protocol / recall_from_protocol.
fn get_controller(env: soroban_sdk::Env) -> soroban_sdk::Address
Rotate the controller address. Only the current controller may call.
fn set_controller(
env: soroban_sdk::Env,
current: soroban_sdk::Address,
new_controller: soroban_sdk::Address,
)
Move funds from this strategy into an external protocol address. Only the controller (e.g. Utila wallet) may call this.
fn deploy_to_protocol(
env: soroban_sdk::Env,
controller: soroban_sdk::Address,
protocol: soroban_sdk::Address,
amount: i128,
)
Bookkeeping estimate of funds currently deployed to external protocols. Saturates at zero; may not reflect yield accrued in protocols.
fn get_deployed_total(env: soroban_sdk::Env) -> i128
Pull funds back from an external protocol into this strategy. Only the controller (e.g. Utila wallet) may call this.
This performs a simple SEP-41 token transfer from protocol to this
contract. The protocol address must authorize this transfer via
Soroban auth. For protocols requiring a custom withdrawal call,
replace the transfer with the protocol's client interface.
Note: deployed_total is a bookkeeping estimate that saturates at
zero. If the recalled amount exceeds deployed_total (e.g. due to
protocol yield), the counter floors at zero rather than going negative.
fn recall_from_protocol(
env: soroban_sdk::Env,
controller: soroban_sdk::Address,
protocol: soroban_sdk::Address,
amount: i128,
)