The AMU algorithm is the backbone of the Aqualis ecosystem and is responsible for integrating lending into the SP. The majority of the AMU behavior is dictated by these three parameters:
- Min SP liquidity: minimum amount in SP before lending gets any liquidity
- Target liquidity ratio: target ratio of liquidity between SP and lending
- Transfer threshold: the minimum amount of discrepancy required to trigger a transfer
Using the above parameters, the AMU algorithm checks how much liquidity is meant to be in the SP compared to lending, and compares this number to the transfer threshold. If the difference exceeds the transfer threshold, a transfer is initiated, if not then no transfer will be initiated.
Decentralized Rebalancing
A rebalance is checked each time a user deposits or withdraws stablecoins from the SP. If a large difference is detected between the current ratio and target ratio, a rebalance will occur.
Rebalancing Formulas
- Check the ratio of liquidity between SP and lending
- If liquidity in the SP is greater than the target liquidity by more than threshold
- Transfer stablecoins from SP into lending to meet the target liquidity, ratio of stablecoins transferred will be equal to the current ratio split in the SP
- If liquidity in SP is less than the target liquidity by more than the threshold
- Transfer stablecoins from lending into SP to meet the target liquidity, ratio of stablecoins transferred will adhere to our "product formula"