Non-ideal rETH/WETH pool used pays unnecessary fees
The protocol swaps WETH for rETH using a Uniswap pool that has higher fees and lower liquidity than alternatives, causing users to lose value through unnecessary fees and slippage. An attacker could not directly exploit this, but users suffer financial loss.
Submitted by yac, also found by peanuts, 0x52, and Ruhum
rETH is acquired using the Uniswap rETH/WETH pool. This solution has higher fees and lower liquidity than alternatives, which results in more lost user value than other solutions.
The Uniswap rETH/WETH pool that is used in Reth.sol to make swaps has a liquidity of $5 million. In comparison, the Balancer rETH/WETH pool has a liquidity of $80 million. Even the Curve rETH/WETH pool has a liquidity of $8 million. The greater liquidity should normally offer lower slippage to users. In addition, the fees to swap with the Balancer pool are only 0.04% compared to Uniswap’s 0.05%. Even the Curve pool offers a lower fee than Uniswap with just a 0.037% fee. This Dune Analytics dashboard shows that Balancer is where the majority of rETH swaps happen by volume.
One solution to finding the best swap path for rETH is to use RocketPool’s RocketSwapRouter.sol contract swapTo() function. When users visit the RocketPool frontend to swap ETH for rETH, this is the function that RocketPool calls for the user. RocketSwapRouter.sol automatically determines the best way to split the swap between Balancer and Uniswap pools.
Proof of Concept
Pools that can be used for rETH/WETH swapping:
- Uniswap rETH/WETH pool:
$5 millionin liquidity - Balancer rETH/WETH pool
- Curve Finance rETH/ETH pool:
$8 millionin liquidity
Line where Reth.sol swaps WETH for rETH with the Uniswap rETH/WETH pool.
Tools Used
Etherscan, Dune Analytics
Recommended Mitigation Steps
The best solution is to use the same flow as RocketPool’s frontend UI and to call swapTo() in RocketSwapRouter.sol. An alternative is to modify Reth.sol to use the Balancer rETH/ETH pool for swapping instead of Uniswap’s rETH/WETH pool to better conserve user value by reducing swap fees and reducing slippage costs.
What is the issue here? This is an improvement proposal (QA).
My reasoning was that it’s not an improvement proposal but a bug (sub-optimal of the AMM pool), hence it does qualify for Medium for “leak of value”.
I have to admit that I hesitated but I leaned towards Medium because of the label “sponsor confirmed” suggesting that this finding provided value for the sponsor.
Asymmetry mitigated
Status: Mitigation confirmed. Full details in reports from d3e4 and 0x52.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the code hard-codes the Uniswap rETH/WETH pool for swaps without considering more efficient alternatives.
Impact
Users lose value due to higher swap fees and greater slippage compared to using a more liquid pool with lower fees.
What the attacker needed
None
The fix
The code should use RocketPool's swapTo() function or switch to the Balancer rETH/ETH pool to reduce fees and slippage.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a program trades one token for another, it uses a pool of funds. Different pools charge different fees and have different amounts of money available. Using a pool with higher fees and less money means users lose more value than necessary.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.