-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Slippage Protection When Mint Liquidity #204
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-537
🤖_204_group
AI based duplicate group recommendation
satisfactory
satisfies C4 submission criteria; eligible for awards
Comments
c4-bot-5
added
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
labels
Apr 18, 2024
Picodes marked the issue as unsatisfactory: |
c4-judge
added
the
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
label
Apr 24, 2024
Picodes marked the issue as unsatisfactory: |
It's a new pool so by definition there is no price to manipulate yet |
Picodes marked the issue as duplicate of #537 |
Indeed, thanks for flagging |
Picodes marked the issue as satisfactory |
c4-judge
added
satisfactory
satisfies C4 submission criteria; eligible for awards
and removed
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
labels
May 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-537
🤖_204_group
AI based duplicate group recommendation
satisfactory
satisfies C4 submission criteria; eligible for awards
Lines of code
https://github.com/code-423n4/2024-04-panoptic/blob/833312ebd600665b577fbd9c03ffa0daf250ed24/contracts/PanopticFactory.sol#L335
Vulnerability details
Impact
There is no slippage protection during the minting of full-range-liquidity. In the process, the
slot0
is queried and there is no check from the user that the liquidity should be within an acceptable range. Thus user may suffer from loss when providing liquidity in Uniswap V3.Proof of Concept
In
PanopticFactory::deployNewPool
, the full-range liquidity should be provided bymsg.sender
.In the
_mintFullRange
, theIUniswapV3Pool(v3Pool).mint
is being called. But there is no slippage protection during the minting of full-range-liquidity. In the process, theslot0
is queried and there is no check from the user that the liquidity should be within an acceptable range.Thus, if the pool has gone through prices changes before the
mint
, the user may suffer from slippage loss.Tools Used
Manual
Recommended Mitigation Steps
It is recommended to add slippage protection in the function
PanopticFactory::deployNewPool
.Assessed type
MEV
The text was updated successfully, but these errors were encountered: