40,000 USDC
View results
Submission Details
Severity: low

Check zero address check for arbiter in the constructor

Summary

Its better to perform zero address check in the constructor rather than in the functions. If arbiter address is zero, then we have to redeploy the same contract again with non-zero arbiter address which costs gas. So prevention is always better than cure.

Vulnerability Details

The constructor has checks to ensure that the token contract, buyer, and seller addresses are not zero addresses. However, it lacks a check for the arbiter address. it would be a good idea to add a check for the arbiter address to be non-zero.

if buyer or seller raises multiple disputes then every time it checks whether the arbiter address is zero or not.So its better to implement this check in the constructor itself rather than in the initiateDispute function to save gas.

Impact

Low

Tools Used

Manual Review

Recommendations

Add zero address check for the arbiter address in the constructor itself to avoid any future problems.

Support

FAQs

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