Wrong referral fee is being emitted in spot purchased function after calculation
Medium
Finding description and impact
Here in _handleTrasfer fucntion, referreal fee cost is being calculated, with respesct to total buyer fee amount. but main issue is referral fee cost is directly used in event emit, instead only referral fee reward should be emmitted not cost
Proof of Concept
lets consider a scenario
buyer fee amount is 50 and fee referall is 10%. now here 50-5 means 45 comes as referal cost and it is being emitted. and emmitted one is , which is to be gieven reward
* @param referralReward Amount of reward paid to referrer
Recommended mitigation steps
proper emit of variable and calculation of referral fee shoudl be done