In TradingAccountBranch contract user can create an account by calling createTradingAccount() function, when isCustomReferralCode is passed as false, there is no check of the referralCode is genuine.
If the project decides to use referral codes to reward users who bring in the most value, this feature might be abused. Malicious users could create a large number of fake accounts to farm points and ultimately claim the rewards.Here is an POC.
add the code snippet to test/integration/perpetuals/trading-account-branch/createTradingAccount/createTradingAccount.t.sol and then run the following command.
Manually Review
Make sure the referral is signed by in a trusty way and user cannot forge them.
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.