40,000 USDC
View results
Submission Details
Severity: medium

[M-01] Late evaluation i_arbiterFee > 0 in resolveDispute

Summary

If the value for i_arbiterFee is equal to zero, the arbiter don't have incentive to resolve this Dispute.

Vulnerability Details

When resolveDispute() is executed there is a statement to check that i_arbiterFee is greater than zero, this check should be in the constructor to ensure that the arbitrator has an incentive to resolve any disputes. Otherwise, if there is a dispute, it may not be resolved.

Impact

Medium can impact to seller and buyer.

Tools Used

Manual code review

Recommendations

You can apply these change:

Escrow.sol:122:

- if (i_arbiterFee > 0) {
- i_tokenContract.safeTransfer(i_arbiter, i_arbiterFee);
- }
+ i_tokenContract.safeTransfer(i_arbiter, i_arbiterFee);

Escrow.sol:43:

if (arbiterFee >= price) revert Escrow__FeeExceedsPrice(price, arbiterFee);
+ if (arbiterFee == 0) revert Escrow__ArbiterFeeIsZero();

IEscrow.sol:19:

+ error Escrow__ArbiterFeeIsZero();

Support

FAQs

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