Skip to main content
AquariusController supports Swap, AddLiquidity, and RemoveLiquidity through the configured Aquarius router. Tokens are sorted for pool discovery, and a pool index selects the underlying pool. Swap/add input amounts use WAD before native conversion. Remove-liquidity input is LP WAD, unlike Soroswap’s raw LP amount. Swap min_out and the add-liquidity minimum LP amount are native units passed to Aquarius. Removal splits min_out / 2 into each native leg minimum. Inspect the action branch and frontend builder before encoding minima. The controller authorizes router/pool/token subcalls through SmartAccount, synchronizes actual LP position membership, and returns signed WAD collateral deltas. Swap credits are capped by oracle input value. The configured XLM pair uses AqUSDC, a separate test token. The frontend configuration records a gauge/trustline limitation for smart-contract deposits into the referenced gauge-enabled pool. Controller support is present, but that comment is not evidence that the external pool now accepts deposits. Simulate the selected pool before relying on this flow; live availability was not checked in this documentation review.

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

register_pool

can_call

execute

get_registry

Source reference

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