In the Escrow.sol contract, the resolveDispute
function is restricted to be called only by the onlyArbiter
modifier, implying that the arbiter is trusted and will not execute reentrancy
attacks. As such, the use of the nonReentrant
modifier in this context is unnecessary and can be removed to save gas.
The resolveDispute
function in the Escrow.sol contract is designed to handle dispute resolution and distribute awards accordingly. It is guarded by the onlyArbiter
modifier, which ensures that only an authorized arbiter can execute this function. Given that the arbiter is assumed to be trusted, the need for the nonReentrant
modifier can be questioned, as it guards against reentrancy
attacks, which are not expected from a trusted arbiter.
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/Escrow.sol#L109-L130
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.