In the SystemConfig::updateReferralExtraRateMap function, the owner can update the referralExtraRateMap for a specific referrer. However, this change does not impact the referralInfoMap entries that were set before the update unless the updateReferrerInfo function is called again. This can lead to inconsistencies and potential fund loss for the referrer due to outdated referral rates.
The function updateReferrerInfo enforces the restriction that _referrerRate + _authorityRate must equal baseReferralRate + referralExtraRate:
However, the referralExtraRateMap can only be updated by the owner through updateReferralExtraRateMap:
The issue arises because any updates to referralExtraRateMap do not automatically affect previously set referralInfoMap. For these changes to take effect, the updateReferrerInfo function must be called for each referral again, which could lead to:
Inconsistency: The referralInfoMap may contain outdated information that does not reflect the latest referralExtraRateMap values.
Potential Fund Loss: If the outdated referralInfoMap is used in subsequent transactions, it could result in incorrect referral bonuses, leading to financial loss for the referrer.
The update to referralExtraRateMap does not affect previously set referralInfoMap unless the updateReferrerInfo function is called again. This can cause inconsistencies and potential financial losses for the referrer due to outdated referral rates being used.
Manual
The _authorityRate could be deduced from baseReferralRate + referralExtraRate[_referral] - referrerRate instead of storing it directly(of course, some additional cases should be taken into account). This approach ensures that the referralInfoMap is always in sync with the latest referralExtraRateMap values, eliminating the need to update referralInfoMap manually after each change.
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.