DeFiFoundry
60,000 USDC
View results
Submission Details
Severity: low
Valid

Referral is not updated when trading account is transferred

Summary

When account is being transferred notifyAccountTransfer doesn’t check whether this account have active referral attached to it and it will continue to use the old referral.

Vulnerability Details

Looking at the notifyAccountTransfer:

function notifyAccountTransfer(address to, uint128 tradingAccountId) external {
_onlyTradingAccountToken();
TradingAccount.Data storage tradingAccount = TradingAccount.loadExisting(tradingAccountId);
tradingAccount.owner = to;
}

We can see that it doesn’t check if the account have active referral and also won’t change or disable it.

Impact

Transferred trading account will continue to use the old referral and bring benefits (ZRS tokens or other incentives that Zaros team provides).

Tools Used

Manual Review

Recommendations

Add code to disable/change the referral when account is being transferred to other people.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Referrals should be set per trading account id instead of per trader

Appeal created

slavcheww Submitter
12 months ago
inallhonesty Lead Judge
12 months ago
inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Referrals should be set per trading account id instead of per trader

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.