The lack of access control on the sellProfits function
The lack of access control on the sellProfits function can pose significant security risks, as it allows anyone to call the function and execute the token swap. Without proper access control, unauthorized users can manipulate the token swap mechanism, potentially leading to financial losses and other undesirable outcomes
Since there is no access control, any external address can call the sellProfits function, even if they are not intended to use this functionality. This can result in unauthorized token swaps, leading to the transfer of tokens that were not meant to be swapped.
Manual Review
Implement access control mechanisms to restrict the execution of the sellProfits function to authorized addresses only. You can use modifiers or require statements to check if the caller is an authorized address, such as the contract owner or a specific role.
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.