Reentrancy Vulnerability
The sellProfits function performs external contract calls (IERC20(_profits).balanceOf and swapRouter.exactInputSingle) before sending the WETH tokens to the staking address.
If any of these external calls result in a contract that is not trusted or could be malicious, there might be a reentrancy vulnerability.
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.
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.