Wrong resolveDispute
logic, ambigous operation when resolving a dispute, lead to wrong transfer allocation of award
In a typical dispute resolution process, the main subject of consideration is usually the seller, as they are the party whose service or product is being evaluated and potentially disputed by the buyer. Therefore, it would be more logical and common for the resolveDispute
function to distribute the tokens in favor of the seller, rather than the buyer.
resolveDispute
function parameter the buyerAward
, this is very ambiguous. I think this parameter should be the sellerAward
. Following information based on Line 111, uint256 totalFee = buyerAward + i_arbiterFee;
it only make sense if the buyerAward
is actually sellerAward
.
I mean, how can buyer
get an Award, while they are the one who put their money to the Escrow contract. Award should goes to party doing the work, in this case seller
.
The totalFee
is buyerAward
plus arbiterFee
doesn't make sense. It will make sense if the totalFee
is sellerAward
+ arbiterFee
.
This issue is not only of swapped terminology of buyerAward
and sellerAward
, more on that, the effect is seller
will get the rest of balance after transfering to buyer & arbiter (Line 127) as, this can make ambiguous operation.
In such a case, the buyerAward
parameter in the resolveDispute
function should represent the amount of tokens that will be awarded to the seller as compensation for their service or product. The function would then focus to transfer the tokens to the seller first, and any remaining token balance after deducting the i_arbiterFee
would be returned to the buyer.
By doing so, the function aligns with the standard dispute resolution approach, where the seller is the main focus, and the outcome of the resolution process determines the appropriate compensation for their work.
Ambigous operation when resolving a dispute, lead to wrong transfer allocation of funds
Manual audit
Swap the buyerAward
to sellerAward
, and swap the order of transfer, the 'refund' to buyer should be on the last transfer after deducting from sellerAward and arbiterFee.
But if this resolveDispute
parameter input is for sending token to buyer, the terminology should be refundToBuyerAmount
to avoid the ambiguous
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.