20,000 USDC
View results
Submission Details
Severity: high

Reentrancy Vulnerability

Summary

Reentrancy Vulnerability

Vulnerability Details

The sellProfits function performs external contract calls (IERC20(_profits).balanceOf and swapRouter.exactInputSingle) before sending the WETH tokens to the staking address.

Impact

If any of these external calls result in a contract that is not trusted or could be malicious, there might be a reentrancy vulnerability.

Recommendations

To mitigate the reentrancy vulnerability, follow the "checks-effects-interactions" pattern, ensuring external interactions occur after internal state changes. Consider using the "ReentrancyGuard" pattern to further guard against reentrancy in critical functions. This will enhance the contract's security and protect against potential financial loss and unauthorized actions.

Support

FAQs

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