The buyer of the Escrow contract can obtain/get all tokens contract balance in the Escrow#resolveDispute()
function. When the new Escrow is created in the EscrowFactory
contract the msg.sneder
is actually the buyer of the Escrow contract. This allows the msg.sender (buyer) to set the arbiter
address to their own.
Let's consider the following example:
The buyer creates a new Escrow contract and sets the arbiter
address to their own.
Buyer call Escrow#initiateDispute()
function to set the state to Disputed.
The arbiter (who is actually the buyer) calls the Escrow#resolveDispute()
function and passes the buyerAward
parameter with the value of i_tokenContract.balanceOf(address(this))
.
The buyer obtains all of the tokens in the contract balance.
See Summary
Manual Review
One possible solution is to ensure that msg.sender != arbiter
during the creation of a new Escrow contract.
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.