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

The lack of access control on the sellProfits function

Summary

The lack of access control on the sellProfits function

Vulnerability Details

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

Impact

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.

Tools Used

Manual Review

Recommendations

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.

Support

FAQs

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

Give us feedback!