-
Notifications
You must be signed in to change notification settings - Fork 38
V1.1 #91
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
base: main
Are you sure you want to change the base?
Conversation
Make epoch's increase auto-commit
refactor: reduce one delegate call step
Flashloan flag
New version
…n.sol is unused in the code and wastes gas
src/contracts/vault/v1.1/Vault.sol
Outdated
| address slasherFactory, | ||
| address vaultFactory, | ||
| address implementation | ||
| ) VaultStorage(delegatorFactory, slasherFactory) MigratableEntity(vaultFactory) { |
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.
Hey,
If we remove VaultStorage here, how can we setup corresponding state vars in _processMigrateParams such as epochDurationSetEpochsDelay , flashFeeRate, etc.?
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.
Hey, I've only removed the constructor (immutable vars) from VaultStorage, but the layout stays the same
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.
Ahh sure.
Confirm the fix!
src/contracts/vault/v1.1/Vault.sol
Outdated
|
|
||
| _processMigrateParams(params); | ||
|
|
||
| if ((params.epochDurationSetEpochsDelay - 2) * epochDurationInternal < MIN_EXIT_WINDOW) { |
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.
Hey,
Why we do params.epochDurationSetEpochsDelay - 2?
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.
Withdrawals take 2 epochs (the one when requested and the next one) to be non-slashable and claimable. setEpochDuration() can be called at the very end of some epoch without a chance for users to create withdrawal requests in this epoch. So we subtract 1 because of this edge case, and 1 because the withdrawal needs the next epoch to end to be claimable. So this check means that the users will have at least MIN_EXIT_WINDOW real seconds to withdraw funds.
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.
Got it
Confirm the fix!
Minor changes
V1.1 scripts
Certora fixes
Chainsecurity fixes
|
@1kresh can you also update OZ to 5.5? |
No description provided.