Vulnerability: Using 0 as a Minimum Amount Allowed in AMMs can Cause Loss of Funds. / Contract: TokenisableRange / Function: claimFee #249
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-260
grade-c
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/GoodEntry-io/ge/blob/8a2686b14114edbd1ec523d79304ed678cc2e915/contracts/TokenisableRange.sol#L194-L201
Vulnerability details
Impact
No slippage protection on call to uniswap increase Liquidity function.
Proof of Concept
The amount0Min, amount1Min in the uniswap increaseLiquidity function are being set to 0, there is no slippage protection, so you are allowing to receive 0 tokens back without reverting the tx.
Uniswap recommends using these parameters as slippage protection in production:
https://docs.uniswap.org/contracts/v3/guides/providing-liquidity/increase-liquidity
Tools Used
Manual Code Review.
Recommended Mitigation Steps
Add slippage protection to the function.
Assessed type
Uniswap
The text was updated successfully, but these errors were encountered: