Skip to content
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

V1.1 #91

Open
wants to merge 46 commits into
base: main
Choose a base branch
from
Open

V1.1 #91

wants to merge 46 commits into from

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!

@@ -170,5 +175,9 @@ contract Vault is VaultStorage, MigratableEntity, AccessControlUpgradeable, Prox
(IVault.MigrateParams memory params) = abi.decode(data, (IVault.MigrateParams));

_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!

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.

2 participants