In the updateReferrerInfo
function, the contract expects the total of _referrerRate
and _authorityRate
to be equal to baseReferralRate + referralExtraRate
. It checks this condition and reverts if it is not met.
However, no explicit check is done to ensure that _referrerRate
and _authorityRate
individually do not exceed the unit measure for rates, which is Constants.REFERRAL_RATE_DECIMAL_SCALER
. This can potentially lead to errors or vulnerabilities if values larger than expected are passed.
In the updateReferrerInfo
function :
the updateReferrerInfo
function could return an error value.
Manual Review
I recommend adding checks to validate that _referrerRate
and _authorityRate
do not exceed Constants.REFERRAL_RATE_DECIMAL_SCALER
. This will ensure the consistency of the smart contract and make it more robust against faulty or malicious inputs. Such a check can be introduced as follows:
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.