Deposit Liquidity
A Liquidity Module can deposit liquidity into the sovereignVault by calling the depositLiquidity
function on the Sovereign Pool. This is only true for the case where sovereignVault
is the pool itself. Otherwise the sovereignVault
must implement its own function for depositing liquidity.
This function can only be called by the Liquidity Module.
Liquidity Module is allowed to deposit any amount of
token0
ortoken1
to the pool.If the pool contains a
verifierModule
,_sender
and_verificationContext
would be checked for validity before accepting a deposit.This function supports rebase tokens.
This function is disabled if reserves are meant to be stored outside of the pool (
sovereignVault
is not the pool).No pool-level role can pause deposits.
Control Flow of a Withdrawal
user
→ Liquidity Module
→ Sovereign Pool’s depositLiquidity
.
The Liquidity Module is free to decide how to interface with users and represent their deposits internally.
WARNING: If
\_amount0
or\_amount1
is exactly 0, post-deposit callback checks will be skipped (to save gas in case of single token deposits). This means that if in one of these scenarios, the ALM transfers non-zero amounts, those would not be accounted in reserves and therefore permanently locked!
Last updated