The SystemConfig:updateReferrerInfo function is designed to update referral settings, including referrer rates and authority rates. However, the function is currently exposed as external without any access control restrictions. This lack of access control means that any address can call the function, posing significant risks to the integrity and security of the contract.
The updateReferrerInfo function is marked external and lacks any access control modifiers such as onlyOwner or role-based access control checks. This implies that any address, including unauthorized users and potentially malicious actors, can call this function.
Without restrictions, attackers could exploit the function to manipulate the referral system. They can set fraudulent or inappropriate referral rates and hijack referral information for their benefit.
The function allows setting referrer rates (_referrerRate) and authority rates (_authorityRate) without validations. Users could set rates that violate the expected sum conditions, leading to inconsistent or corrupted referral data.
See the following code:
Unauthorized users could change referral rates and authority settings, potentially attacking the referral system's design and purpose. They can update the rates too much high in order to benefit from the system. They can even set the rate to 0 to cause precision loss and incorrect calculations in the system. Manipulation of referral rates would lead to financial losses for the users' incentives or rewards.
Manual Review
Restrict this function's access by using onlyOwner modifier or use a specific role for it. And strictly validate the params too.
Valid high severity. There are two impacts here due to the wrong setting of the `refferalInfoMap` mapping. 1. Wrong refferal info is always set, so the refferal will always be delegated to the refferer address instead of the caller 2. Anybody can arbitrarily change the referrer and referrer rate of any user, resulting in gaming of the refferal system I prefer #1500 description the most, be cause it seems to be the only issue although without a poc to fully describe all of the possible impacts
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.