Skip to main content
BlendController supports Supply and Withdraw against the configured Blend pool and registered reserve tokens. It authenticates AccountManager, resolves token tracking metadata, and calls Blend through SmartAccount-authorized callbacks. Supply uses Blend request type 0; withdraw uses type 1. Input amounts use WAD and are converted to reserve-native units. Receipt changes are derived from Blend positions and synchronized through authorized tracking-token operations and underlying caches. withdraw_all_to batches reserve exits and sends underlying to the supplied recipient. Liquidation uses this path to pay Blend collateral directly to the liquidator. It verifies that requested supply positions have fully exited and burns remaining tracking receipts. The contract exposes capability, execution, Registry, and admin-upgrade methods. The constructor argument order differs from ControllerFacade: verify the signatures below.

Function signatures

These signatures are copied from the reviewed Rust implementation. env is supplied by Soroban and is not a transaction argument. Result errors and panics must be handled by the caller; simulation does not guarantee later execution. Public methods include privileged and internal-contract callbacks, not just user entrypoints.

__constructor

upgrade

can_call

execute

withdraw_all_to

get_registry

Source reference

  • Protocol_V1_Soroban_testnet/contracts/BlendControllerContract/src/controller.rs