taiko-mono icon indicating copy to clipboard operation
taiko-mono copied to clipboard

refactor(protocol): improve proving logics

Open dantaik opened this issue 9 months ago • 1 comments

Addressing the concern from OZ:

I think it's theoretically possible that the first time the guardian proves when the cooldown window has expired, so the if doesn't trigger but it resets the timestamp. Then the guardian could reprove directly (which would make it in the window and return the liveness bond while it shouldn't be returned). To be clear it's pathological and should never happen, but just for sake of clean code I prefer to note it :)

Screenshot 2024-05-06 at 17 27 26

TODO:

  • [ ] create a test

dantaik avatar May 06 '24 09:05 dantaik

refactor(protocol): improve liveness bond return logics

Generated at commit: 4488874731f1d37edf8aa6305d6b1535e5a42ed1

🚨 Report Summary

Severity Level Results
Contracts Critical High Medium Low Note Total 2 2 0 5 41 50
Dependencies Critical High Medium Low Note Total 0 0 0 0 0 0

For more details view the full report in OpenZeppelin Code Inspector

openzeppelin-code[bot] avatar May 06 '24 09:05 openzeppelin-code[bot]