A flaw in the access control implementation allows referrers to manipulate their referral information and claim all the rewards intended for both the authority and the referrer.
In the SystemConfig::updateReferrerInfo
function, users are permitted to adjust the _referrerRate
and _authorityRate
values for themselves and their referrer.
The function includes a check to prevent the _referrer
from adjusting these properties:
The check is designed to prevent the referrer from directly adjusting their referrerRate
and authorityRate
values to capture all the fees meant for both themselves and the authority.
While the current check prevents referrers from directly making these changes, it is ineffective because the referrer can simply create a separate address to bypass this restriction. By using a new address, the referrer can set their desired _referrerRate
and _authorityRate
, effectively claiming all the fees that should have been shared.
A referrer creates a secondary address.
The referrer uses this address to update their referralInfo
, setting a high _referrerRate
and a low _authorityRate
.
As a result, the referrer can claim all the rewards meant for both the authority and the referrer, leaving the authority with nothing.
This vulnerability leads to a loss of funds for the authority, as the referrer can effectively grief the authority by claiming all the rewards meant for both parties.
Manual
Restrict Access: Only allow the owner and the authority to update the referralRate
related to their accounts.
Enhance Validation: Implement additional checks to ensure that referrers cannot indirectly manipulate their referral information through other accounts.
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.