Submitted by unforgiven
https://github.com/code-423n4/2022-12-tigris/blob/588c84b7bb354d20cbca6034544c4faa46e6a80e/contracts/Referrals.sol#L20-L24 
https://github.com/code-423n4/2022-12-tigris/blob/588c84b7bb354d20cbca6034544c4faa46e6a80e/contracts/TradingExtension.sol#L148-L152
By default the value of _referred[user] is 0x0 for all users and if one set 0x0 as his referral hash then he would become referral for all the users who didnt set referral by default and he would earn a lot of referral funds that users didnt approve it.
This is createReferralCode() code:
As you can see, attacker can become set 0x0 as his hash referral by calling createReferralCode(0x0) and code would set _referral[0x0] = attackerAddress (attacker needs to be the first one calling this).
Then in the getRef() code the logic would return attackerAddress as referral for all the users who didnt set referral.
In the code, getReferred(trader) would return 0x0 because trader didnt set referred and getReferral(0x0) would return attackerAddress.
_handleOpenFees() and _handleCloseFees() function in the Trading contract would use getRef(trader) and they would transfer referral fee to attackerAddress and attacker would receive fee from a lot of users which didnt set any referral, those users didnt set any referral and didnt approve attacker receiving referral fees from them and because most of the users wouldnt know about this and referral codes so attacker would receive a lot of funds.
VIM
Prevent someone from setting 0x0 hash for their referral code.
TriHaz (Tigris Trade) confirmed and commented:
Alex the Entreprenerd (judge) decreased severity to Medium and commented:
GainsGoblin (Tigris Trade) resolved:
