arbiter_fees transfer when the fee amount is >0 but it is not correct the when the arbiter_fees is not >0 then it is not transferring fees at that time arbiter not receive fees.
suppose a case that arbiter_fees is Not >0 then at that time they con't receive fees but the arbiter solved the issue. in this case the arbiter was loss their funds.so i said that at first we need to check that fees> 0.when then fees is not >0 then what is the use of doing that work of Arbiter. so must and should transfer fees to Arbiter when the problem is resolves.
Arbiter loss their fees although they solve issue.
Manual Review
function resolveDispute(uint256 buyerAward) external onlyArbiter nonReentrant inState(State.Disputed) {
uint256 tokenBalance = i_tokenContract.balanceOf(address(this));
++ require(i_arbiterFee > 0 ,"fees must be greater than zero");
uint256 totalFee = buyerAward + i_arbiterFee; // Reverts on overflow
if (totalFee > tokenBalance) {
revert Escrow__TotalFeeExceedsBalance(tokenBalance, totalFee);
}
s_state = State.Resolved;
emit Resolved(i_buyer, i_seller);
++ i_tokenContract.safeTransfer(i_arbiter, i_arbiterFee);
if (buyerAward > 0) {
i_tokenContract.safeTransfer(i_buyer, buyerAward);
}
tokenBalance = i_tokenContract.balanceOf(address(this));
if (tokenBalance > 0) {
i_tokenContract.safeTransfer(i_seller, tokenBalance);
}
}
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.