Tadle

Tadle
DeFiFoundry
27,750 USDC
View results
Submission Details
Severity: low
Valid

referrerRate is set incorrectly in updateRefferInfo()

Summary

referralInfo.referrerRate is set incorrectly in SystemConfig::updateRefferInfo()

Vulnerability Details

As per documentation referrerRate can be up to a maximum of 30%, but here it is setting to minimum 30% i.e totally opposite & the baseReferralRate is set to 30% by default, which means referrerRate can be as high as possible.

if (_referrerRate < baseReferralRate) {
revert InvalidReferrerRate(_referrerRate);
}

Tool Used

Manual review

Recommendation

- if (_referrerRate < baseReferralRate) {
revert InvalidReferrerRate(_referrerRate);
}
+ if (_referrerRate > baseReferralRate || _referrerRate == 0 ) {
revert InvalidReferrerRate(_referrerRate);
}

I am assuming _referrerRate can't be 0 atleast.

Related Links

  1. https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/SystemConfig.sol#L54

Updates

Lead Judging Commences

0xnevi Lead Judge
about 1 year ago
0xnevi Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Design choice

Appeal created

itsabinashb Submitter
about 1 year ago
itsabinashb Submitter
about 1 year ago
0xnevi Lead Judge
about 1 year ago
itsabinashb Submitter
about 1 year ago
itsabinashb Submitter
about 1 year ago
0xnevi Lead Judge
about 1 year ago
0xnevi Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-SystemConfig-updateReferrerInfo-wrong-referral-rate-combined-check

Valid medium, specific valid inputs by admin will still cause revert in updates to referral info due to incorrect totalRate computation and checks implemented. Note: Downgrade to low severity: This is a valid issue that highlights a valid inconsistency in the docs. In the docs, it was mentioned in the steps that referral rates can be adjusted up to a maximum of 30% as seen in [Step 4. ](https://tadle.gitbook.io/tadle/tadle-incentives-program/referral-program/create-and-manage-referral)but as of now, the minimum refferal rate is 30%. However, since refferals are entirely optional, if a minimum 30% refferal rate is established and the user deems it as too high, he can simply choose not to perform the refferal. Hence, I believe low severity to be appropriate.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.