Description: When users remove liquidity, their returns are adjusted by a multiplier. Specifically, the mAB multiplier defines how much B tokens can a user remove for each A token initially deposited by the same user. In _getMultipliers, if mAA is set as in L596 (say mAA > 1 => there is more A tokens that what the pool owes), mBB is set to:
in L602, and say mBB > 1. All indicators are healthy, as there are more tokens than debt. Still, in 607, mAB will be zero (this can be verified if one expand the whole equation).
Recommendation: Verify whether the described behavior is indeed intended, and if so, document if properly in the code. If not, adjust the mathematical model and its implementation.
Severity: Undetermined
File(s) affected:
contracts/amm/AMM.sol
Description: When users remove liquidity, their returns are adjusted by a multiplier. Specifically, the
mAB
multiplier defines how much B tokens can a user remove for each A token initially deposited by the same user. In_getMultipliers
, ifmAA
is set as in L596 (saymAA > 1
=> there is more A tokens that what the pool owes),mBB
is set to:in L602, and say
mBB > 1
. All indicators are healthy, as there are more tokens than debt. Still, in 607,mAB
will be zero (this can be verified if one expand the whole equation).Recommendation: Verify whether the described behavior is indeed intended, and if so, document if properly in the code. If not, adjust the mathematical model and its implementation.