This vulnerability arises from the SystemConfig:updateReferrerInfo() function, which allows arbitrary users to update critical parameters that control the distribution of platform fees. Specifically, the referrerRate and authorityRate settings can be manipulated by attackers to unjustly allocate rewards and funds.
The SystemConfig:updateReferrerInfo()
function is responsible for updating the referrer
setting, specifically the referralInfo.referrerRate
and referralInfo.authorityRate
. These parameters are crucial as they directly influence the distribution of rewards and funds. Unauthorized or malicious manipulation of these values can result in significant financial losses for users.
In the PreMarkets:createTaker
function, the platformFee
is calculated as follows:
This platformFee
is then distributed between the referrer
(the entity that referred msg.sender
) and the current user (msg.sender
) as referrerReferralBonus
and authorityReferralBonus
. Both bonuses are calculated using the following formulas:
Referrer Referral Bonus:
Authority Referral Bonus:
The calculated bonuses are then added to the respective balances of the referrer
and msg.sender
. However, since anyone can invoke the SystemConfig:updateReferrerInfo()
function and supply arbitrary values for _referrer
, _referrerRate
, and _authorityRate
, this data can be manipulated to favor the attacker, leading to the diversion of funds.
Divert funds by manipulating the referral rates
Potentially cause a loss of trust in the platform due to unfair distribution of rewards.
Unjustly increase their own or another party's rewards at the expense of others.
Manual
Use restriction is calling of this function SystemConfig:updateReferrerInfo()
.
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.