Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@1kresh
Copy link
Collaborator

@1kresh 1kresh commented Feb 18, 2025

No description provided.

address slasherFactory,
address vaultFactory,
address implementation
) VaultStorage(delegatorFactory, slasherFactory) MigratableEntity(vaultFactory) {

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.?

Copy link
Collaborator Author

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

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!


_processMigrateParams(params);

if ((params.epochDurationSetEpochsDelay - 2) * epochDurationInternal < MIN_EXIT_WINDOW) {

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?

Copy link
Collaborator Author

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.

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!

@StackOverflowExcept1on
Copy link

@1kresh can you also update OZ to 5.5?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants