A portion of the tx fees usually is split between the protocol and referrers . However, everyone can set themselves as a referrer from another owned EOA which even does not participate in the protocol.
When a user calls PreMarkets.createTaker()
, it needs to pay a platform fee. However if the user is a refferer to someone else, the fee is less(usually 30%).
https://github.com/Cyfrin/2024-08-tadle/blob/main/src/core/PreMarkets.sol#L203
https://github.com/Cyfrin/2024-08-tadle/blob/main/src/core/PreMarkets.sol#L254-L260
However the setting of referrer config logic is flawed and anyone can set themselves as a referrer. The user needs to call SystemConfig.updateReferrerInfo() from another EOA(to bypass the validation). The other EOA does not even need to participate in the protocol.
https://github.com/Cyfrin/2024-08-tadle/blob/main/src/core/SystemConfig.sol#L69
Protocol loses fees because all users can set themselfs as refferers from another EOA.
Manual review
Change here: https://github.com/Cyfrin/2024-08-tadle/blob/main/src/core/SystemConfig.sol#L69
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.