40,000 USDC
View results
Submission Details
Severity: medium

there must be check for arbiterFee in the Escrow constructor

Summary

as an arbiter could resolveDispute and get arbiterFee, if the buyer sets arbiter address, it must add arbiterFee, because if the contract is in the Disputed state and if there is no arbiterFee, so there is no incentive to resolveDispute. and if there is no arbiter, there is no need for arbiterFee.

Vulnerability Details

In initiateDispute there is check for i_arbiter address but there is no check for arbiterFee value, and
In the Escrow constructor, there is no check for arbiterFee to be more than zero, so if the contract is in the Disputed state, there is no incentive for the arbiter to resolveDispute.

Impact

the buyer will lose the price.

Tools Used

Manual review

Recommendations

add check for arbiterFee in the Escrow constructor

- if (arbiterFee >= price) revert Escrow__FeeExceedsPrice(price, arbiterFee);
+ if (arbiter != address(0)){if (arbiterFee == 0 || arbiterFee >= price){revert();}}

And delete the check for arbiterFee in resolveDispute for gas optmizaiton.

- if (i_arbiterFee > 0)

Support

FAQs

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