The TradingAccountBranch::createTradingAccount function lacks validation for the length of referral codes when non-customized referral codes are used. If the referral code exceeds 20 bytes (the length of an address), the decoded referrer address will be invalid.
Within the TradingAccountBranch::createTradingAccount function, the following line of code is used to decode the non-customized referral code into an address(referrer):
If the trader's non-customized referral code is longer than 20 bytes, the decoded referrer address will be invalid.
If the length of non-customized referral code is longer than 20 bytes, the decoded referrer address is invalid. It could lead to wrong points distributed which is based on referral address.
manual
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.