40,000 USDC
View results
Submission Details
Severity: gas

safeTransfer function

Summary

The resolveDispute function includes so many condition checks that are not needed.The if-else checks with buyerAward and i_arbiterFee variables are not needed. This is because the safeTransfer function already contains some conditions to handle zero values.

Vulnerability Details

Remove the if-else checks and write below 3 simple lines of code =>
i_tokenContract.safeTransfer(i_buyer, buyerAward);
i_tokenContract.safeTransfer(i_arbiter, i_arbiterFee);
i_tokenContract.safeTransfer(i_seller, tokenBalance);

Impact

Gas cost will be reduced and the code will be clean.

Tools Used

Manual Review

Recommendations

Support

FAQs

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