This issue impacts any pools that use fee-on-transfer quoteTokens.
In addLiquidity, the check for feeOnTransfer was only for baseToken and not for quoteToken, leading to a pool with feeOnTransfer quoteTokens can still be created & liquidity added to. This will lead to the actual reserve of those pools being smaller than the internalReserve, and eventually, lead to many undefined behaviors.
Handle
UncleGrandpa925
Vulnerability details
Impact
This issue impacts any pools that use fee-on-transfer quoteTokens.
In addLiquidity, the check for feeOnTransfer was only for baseToken and not for quoteToken, leading to a pool with feeOnTransfer quoteTokens can still be created & liquidity added to. This will lead to the actual reserve of those pools being smaller than the internalReserve, and eventually, lead to many undefined behaviors.
Recommended Mitigation Steps
A check for feeOnTransfer should be added