The existing resolveDispute
function only provides the option to return funds to the buyer, which could potentially be unfair to the seller. A more balanced approach would be to allow the arbiter to decide who should receive the funds and to automatically calculate the amount based on the contract balance and the predefined arbiter fee.
In the resolveDispute
function, the arbiter has the option to return funds to the buyer but not the seller. This could potentially lead to unfair outcomes.
This design could potentially exclude valid scenarios where the seller should receive the funds. It also places the responsibility of calculating the correct award on the arbiter, which could lead to potential errors or misuse.
The current implementation could lead to unfair dispute resolution outcomes and could potentially result in loss of funds for the seller.
This potential vulnerability was found using manual code review methods.
I recommend modifying the resolveDispute
function to allow the arbiter to decide who the recipient of the funds should be, either the buyer or the seller, and to automatically calculate the amount to be awarded.
Here is a potential implementation:
In this version, the function uses a onlyBuyerOrSeller
modifier to ensure that the recipient of the funds is either the buyer or the seller. This ensures a fairer dispute resolution process and reduces the chance of errors in the distribution of funds.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.