Root Cause:
The sendProfit function is declared as external without any access control modifiers, allowing any address to invoke it.
Impact:
Profit Manipulation: Unauthorized users can manipulate totalProfit, affecting profit distribution logic.
Denial of Service (DoS): Spamming the sendProfit function can lead to increased gas consumption and potential DoS.
Financial Exploits: If sendProfit is used to distribute funds, unauthorized manipulation can lead to incorrect or fraudulent distributions.
Recommendation:
Implement Access Control: Restrict the sendProfit function to authorized roles (e.g., ADMIN_ROLE or a designated profit distributor role).
Validate Inputs: Ensure that the amount being sent adheres to expected constraints to prevent manipulation.
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.