-
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
Token owners can unfairly claim protocol fees through DOS attack #342
Comments
MarioPoneder marked the issue as duplicate of #34 |
MarioPoneder changed the severity to 2 (Med Risk) |
MarioPoneder marked the issue as satisfactory |
This issue is not a duplicate of #34; it's a separate issue. Please review it again. Thanks! |
Thank you for your comment! You are correct, I apologize for the oversight. Although this report also showed the not-clearing-slot problem it's not the emphasis of the report. |
MarioPoneder marked the issue as not a duplicate |
MarioPoneder marked the issue as unsatisfactory: |
Lines of code
https://github.com/code-423n4/2024-02-uniswap-foundation/blob/5298812a129f942555466ebaa6ea9a2af4be0ccc/src/V3FactoryOwner.sol#L189-L190
https://github.com/Uniswap/v3-core/blob/d8b1c635c275d2a9450bd6a78f3fa2484fef73eb/contracts/UniswapV3Pool.sol#L856-L865
Vulnerability details
Description
In UniStaker, protocol fees are collected via the
claimFees
function, enabling MEV bots or anyone to pay inWETH
and receive pool protocol fees for themselves.V3FactoryOwner
with access to retrieve protocol fees from pools will call thecollectProtocol
function within the pool contract to transfer the fees to the recipient provided by the caller.In decentralized exchanges like Uniswap, tokens within pools may not adhere to the same standards. Some of them incorporate functionalities such as blacklisting and pausing, which token owners can utilize, potentially leading to denial-of-service (DOS) attacks.
Examples
USDC/ETH
pool, the USDC token includes a blacklist functionality that can prevent theclaimFees
caller by adding the fees recipient to the blacklist and reverting the transaction.Impact
Proof of Concept
There are two ways to cause DOS:
In this proof of concept, the temporary pausing case is demonstrated.
claimFees
caller's transactions to be reverted.POC setup
foundry.toml:
forge test --mt test_tokenOwnersCanClaimProtocolFeesUnfairly -vv
Tools Used
Manual Review
Foundry
Assessed type
DoS
The text was updated successfully, but these errors were encountered: