The Tadle
protocol allows users to use referral links, thus obtaining bonus tax fees on each referred user transaction. However, the current referrer update process in the SystemConfig
contract is invalid, leading to incorrect referrer/referral settings.
Users who want to update their referrer information will invoke the SystemConfig::updateReferrerInfo(...)
, passing in the address of the user, together with the information for the referrer rates (referrerRate
+ authorityRate
). Currently, whenever, a user calls the function, the _referrer
input is set, not only as the referralInfo.referrer = _referrer
, but also as the referralInfoMap
mapping key:
From the above code logic, it turns out that if Alice referred Bob and Bob updated Alice's referrer information, then when Bob uses PreMarkets::createTaker(...)
, the systemConfig.getReferralInfo(_msgSender())
call in PreMarkets/sol
, won't return anything, as getReferralInfo
will pass msg.sender
to the referralInfoMap
mapping, which contains Alice as the mapping owner. This in turn will lead to the referral/referrer bonuses being skipped later on in the code execution.
Referrer bonuses will not be properly assigned to the corresponding individuals
Manual review
Change the mapping key in SystemConfig::updateReferrerInfo(...)
to be msg.sender
instead of _referrer
.
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.