-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No min timelock at initialisation #7
No min timelock at initialisation #7
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
… into feat/other-features
This seems to significantly increase the attack possibilities by the owner and curator because reducing the timelock to 0 does not look like an attack in itself and can be accepted under emergencies, and then the actual attack happens. If it's only required for vault setup, would it be enough to either 1) disable the timelock during the creation block, or 2) allow an initial timelock of 0 that can only move away from 0? |
I did not find a simple, cheap way to allow changes within the contract creation block only. Here is a version where the initial timelock can be 0 but no timelock change can set it to 0: #19 |
test: adapt verif to new timelock zero spec
Initial timelock can be zero
Remove the minimum timelock at construction, to allow vaults manager to setup their vaults faster (list new markets).
Then the timelock can only be set to a value between the min and the max timelock.
Note that for the formal verification, we are now required to assume that the block timestamp is not zero, because it could mean that you could set a pending value valid at timestamp 0 (as the timelock is zero), which the code does not expect. And also on the timelock bounds, now the min bound is zero.