Return to site
Return to site

Bug Deep Dive #7

Attackers will steal rewards from legitimate pools by making duplicate pools for listed token - 232 OP

· Bug Deep Dive
Section image

Although this finding doesn't pay exceptionally well, there are 24 dups, but it contains a key information about Uniswap v4.

The Uniswap v4 pool configuration, as opposed to v3, allows the creation of any number of pools with the same token pair, but the protocol was not aware of this. The pool key, which identify each pool, is different for the following parameters:

Section image

More about Uniswap v4 hooks, here. Key functionality, modify liquidity hooks, called when adding or removing liquidity (even if 0).

Section image

Weaponizing it

1. Attacker identifies a listed token (e.g., USDC) with an existing legitimate pool (e.g., USDC/SuperDCA with dynamic fee).

2. Attacker creates a new malicious pool for the same pair (USDC/SuperDCA) using the same SuperDCAGauge hook, with minimal or zero liquidity (bypassing listing requirements).

3. Attacker adds minimal liquidity to the malicious pool, triggering _beforeAddLiquidity which calls _handleDistributionAndSettlement.

4. In _handleDistributionAndSettlement, rewards are accrued for the token (USDC) globally, and the community share is donated to the malicious pool (since it has liquidity).

5. Attacker removes liquidity from the malicious pool, triggering _beforeRemoveLiquidity again, potentially accruing more rewards.

6. Attacker repeats add/remove operations to maximize reward theft, then withdraws the donated rewards from the malicious pool.

Conclusion

This finding would earn you 232 OP, so as per the OP price at the time you can probably afford a fancy dinner.

Section image

Full Report

Subscribe
Previous
Bug Deep Dive #6
Next
Bug Deep Dive #8
 Return to site
Cookie Use
We use cookies to improve browsing experience, security, and data collection. By accepting, you agree to the use of cookies for advertising and analytics. You can change your cookie settings at any time. Learn More
Accept all
Settings
Decline All
Cookie Settings
Necessary Cookies
These cookies enable core functionality such as security, network management, and accessibility. These cookies can’t be switched off.
Analytics Cookies
These cookies help us better understand how visitors interact with our website and help us discover errors.
Preferences Cookies
These cookies allow the website to remember choices you've made to provide enhanced functionality and personalization.
Save