The SystemConfig contract in the Tadle system is responsible for managing referral rates and platform fees. However, the updateReferrerInfo() function in this contract lacks proper access control, which allows any user to modify referral rates arbitrarily.
The function is intended to prevent a user from setting themselves as a referrer by including a check that reverts the transaction if the sender and the referrer are the same. However, this check can be easily bypassed by using a secondary address to set or modify referral rates for the primary address. Consequently, unauthorized users can exploit this loophole to alter referral rates.
This vulnerability exposes two significant risks:
Loss of Legitimate Referral Earnings: A malicious actor can front-run a legitimate transaction to createTaker() by lowering the referral rate associated with a legitimate referrer. This would reduce or eliminate the referral earnings that the legitimate referrer is supposed to receive.
Excessive Fees for the Protocol: An attacker could also increase the referral rate excessively before a transaction is executed, causing the protocol to pay out inflated and illegitimate referral fees.
The lack of proper access control on the updateReferrerInfo() function allows anyone to manipulate referral rates, making the system vulnerable to both loss of legitimate earnings and potential financial exploitation.
Legitimate referrers losing out on their legitimate referral earnings.
The protocol paying excessive fees.
Add this PoC to test/PreMarkets.t.sol and run forge test --mt test_PoC_referral -vvvv:
Implement proper access control for the updateReferrerInfo() function. Only allow authorized addresses (e.g., platform administrators) to update referral rates. This can be achieved by adding an onlyOwner modifier:
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.