sherlock-audit / 2023-12-avail-judging

4 stars 4 forks source link

kgothatso - `Merkle :: verify ` Gas limit is inaccurate #78

Closed sherlock-admin2 closed 8 months ago

sherlock-admin2 commented 8 months ago

kgothatso

high

Merkle :: verify Gas limit is inaccurate

Summary

Gas limit is inaccurate

Vulnerability Detail

transaction can fail due to gas limit

Impact

The owner of the bridged token would loose access to the token since the job failed.

Code Snippet

https://github.com/sherlock-audit/2023-12-avail/blob/main/contracts/src/lib/Merkle.sol#L17

Tool used

Manual Review

Recommendation

Modify the required amount of gas left to gasLimit + any amount of gas spent before reaching the call(), then multiply it by 32/30 to mitigate the 1/64 rule (+ some margin of safety maybe).

sherlock-admin commented 8 months ago

1 comment(s) were left on this issue during the judging contest.

takarez commented:

invalid because {invalid: no impact}