Usage of nonReentrant modifier adds a lot of gas costs. Consider removing the modifier since the only party that can call the function the arbiter
, which is a trusted party.
resolveDispute()
can only be called by the arbiter
. The arbiter
is a trusted party, therefor, you can remove the nonReentrant guard since the arbiter
won't be wearing his black hat on.
Function gas savings:
Function Name | min | avg | median | max | # calls |
---|---|---|---|---|---|
resolveDispute | 383 | 27017 | 22342 | 62460 | 8 |
resolveDisputeOptimized | 383 | 26794 | 22094 | 62184 | 8 |
Deployment gas savings:
Contract Name | Deployment Cost | Deployment Size |
---|---|---|
Escrow | 591900 | 3666 |
EscrowOptimized | 551375 | 3569 |
EscrowFactory.sol | 1720616 | 8622 |
EscrowFactoryOptimized.sol | 1681774 | 8482 |
Gas Optimization
Manual review.
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.