According to Tadle's documentation, the referral program works as follows:
Users can share their referral link and refer their friends and peers to trade on Tadle.
Once the peers have signed up and completed a trade on Tadle, the referrer will earn a 30% commission rate on their referred peers’ transaction fees.
In the current implementation of Tadle, this does not work as described, and the commission always goes to the same user - the taker. Consequently, any user can register as a referral from another address and receive a minimum 30% referral commission. This leads to a loss of funds for the protocol because the referral commissions are paid as a percentage of the fees that would otherwise go to the protocol.
I will support the above statements with excerpts from the source code. Here, it can be seen that the referral information is obtained by passing msg.sender to getReferralInfo.
The function getReferralInfo get that address to pull referrer address which is same as the msg.sender that is sent:
Finally in PreMarkets._updateReferralBonus() can be seen that the referral bonus comes from the protocol profits:
Loss of funds for the protocol
Manual review
Fix the referral logic so that it uses the real referrer identification from the link as mentioned in the docs.
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.