40,000 USDC
View results
Submission Details
Severity: low
Valid

Arbitrator Address Validation Missing

Summary

The Escrow smart contract presented in this analysis is designed to facilitate transactions between a buyer, seller, and an optional arbiter. The contract allows for the secure transfer of funds and goods/services based on predefined conditions. However, a critical security vulnerability has been identified in the contract related to the selection of the arbiter.

Vulnerability Details

The vulnerability arises from the lack of validation in the contract to ensure that the arbiter is not the same individual as either the buyer or the seller. As a result, if the arbiter is also one of the parties involved in the transaction, they can potentially initiate a dispute and then manipulate the dispute resolution process in their favor to transfer funds unfairly.

Impact

If an unscrupulous individual serves as both the arbiter and a buyer/seller, they can exploit the contract's flaw to manipulate the outcome of the dispute resolution in their favor. This can lead to an unfair distribution of funds, compromising the intended security and integrity of the Escrow contract.
If the arbiter is also the buyer or the seller he can steal all the founds in the contract.

Tools Used

Manual review + forge test.

Recommendations

During contract initialization, implement a check to ensure that the arbiter's address is different from both the buyer and the seller. This validation step will prevent any conflicts of interest and ensure a neutral party acts as the arbiter.

if (arbiter == buyer || arbiter == seller) { revert Escrow__ArbitrerSameAsBuyerOrSeller(); }

Support

FAQs

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