20,000 USDC
View results
Submission Details
Severity: high
Valid

Hardcoded Uniswap router

Summary

The Fees.sol contract uses the Uniswap router to swap any token that is stored as balance on the contract for WETH which is then transferred to the Staking.sol contract as rewards for stakers.

Vulnerability Details

The issues is that the Uniswap Router address is hardcoded which could lead to mistakes if the protocol is deployed on another chain as the Uniswap Router address would be different. Another option is for an attacker to create a contract on that specific address and drain funds whenever sellProfits() is called.

Impact

Possible block of protocol / drainage of funds

Tools Used

Manual Review

Recommendations

Pass the UniswapRouter contract address within the constructor and assign it to the swapRouter variable.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.