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

Add whenNotPaused modifier and max 4626 functions return 0 on contract paused #29

Merged
merged 9 commits into from
Sep 27, 2022

Conversation

tushargargght
Copy link
Contributor

@tushargargght tushargargght commented Sep 21, 2022

Linked to #27

Making flow functions deposit, mint, redeem, withdraw pausable for the vaults.

The EIP-4626 spec for maxWithdraw states:
MUST factor in both global and user-specific limits, like if withdrawals are entirely disabled (even temporarily) it MUST return 0.
same with maxMint, maxRedeem, maxDeposit

Actions:

  • Adding whenNotPaused modifier to the four flow functions deposit,mint,redeem,withdraw on AbstractVault and LightAbstractVault and all of them overrides.
  • returning 0 on max 4626 functions for AbstractVault and LightAbstractVault and all of them overrides.
  • Add unit-tests for above in BaseVault.behaviour.ts and overridden vaults
  • Add BaseVault behavior fork-tests to Convex3CrvLiquidatorVaults in savePlus.spec.ts
  • Added BaseVault behavior fork-test for musd based Convex3CrvBasicVault
  • Documentation update

@tushargargght tushargargght marked this pull request as ready for review September 27, 2022 06:06
Copy link
Contributor

@naddison36 naddison36 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@naddison36 naddison36 merged commit 19f0fd7 into main Sep 27, 2022
@tushargargght tushargargght deleted the issue/pausable-return-zero branch September 27, 2022 07:10
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.

issue/Add whenNotPaused modifier and max 4626 functions return 0 on contract paused
2 participants