The Fees.sol
contract handles any deposits to the contract of any token to be converted to WETH which will be used for rewards on the Staking.sol
contract. During the sellProfits()
function call the contract attempts to swap any balance of the passed token as parameter to WETH through Uniswap Router and forwards the proceeds to the Staking.sol
contract.
The problem lies in the lack of approve()
function before the actual attempt to swap tokens using the Uniswap Router which would cause any call to the sellProfits()
function to fail.
Below you can find a simple PoC which uses a fork of Ethereum Mainnet to test the functionality.
The test can be ran with the following command:
The test run will fail with error SBF which indicates the lack of approval which can be expected also in the logs on the terminal.
Any funds send to the Fees.sol
contract will be locked there forever.
Manual Review / Foundry
Add the following line of code before the actual swap happens within the sellProfits()
function:
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.