The Fees
contract can be sandwiched to steal its funds.
The Fees
contract sells accumulated protocol fees on Uniswap V3. The swap does neither set amountOutMinimum
nor sqrtPriceLimitX96
, meaning it can be sandwiched to steal its funds.
An attacker can steal the funds from the contract by sandwiching a call to sellProfits
. For example, assuming the token to be sold is USDC
:
Sell a large amount of USDC
on the USDC/WETH
Uniswap V3 pool. A flashloan can be used.
Call sellProfits
, which causes the USDC
from the contract to be sold into the manipulated pool, outputting a very minor amount of WETH
.
Buy USDC
from the USDC/WETH
Uniswap V3 pool with the funds received from step 1. This results in a profit for the attacker.
None
Use an oracle, for example Chainlink or on-chain Uniswap V3 TWAP, to calculate the expected swap output and set amountOutMinimum
accordingly.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.