The current implementation of the createCustomReferralCode
function allows the referrer of an existing custom referral code
(CRC) to be overwritten. This can lead to a situation where the owner accidently sets a new referrer for a CRC that is already in use, thereby redirecting all referral benefits from the old referrer to the new referrer. This could result in significant financial losses for the original referrer and undermine the trust in the referral system.
The createCustomReferralCode
function in the GlobalConfigurationBranch
contract allows the creation of custom referral codes. However, it does not check if the referrer for the CRC is already set before assigning a new referrer:
This means that if a referral code is created a second time, the new referrer will overwrite the old one and receive all subsequent referral benefits from referrals already made by the old referrer.
To ensure that a CRC is only used once consider adding a check that ensures the CRC is not used already:
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.