-
Notifications
You must be signed in to change notification settings - Fork 98
[Vault] Simplify VaultCore. #2714
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: master
Are you sure you want to change the base?
Conversation
…emove WETH dependencies
…implify total value calculations
… and clean up comments in VaultCore
…ctions, simplifying the codebase.
…implify the codebase.
… improve clarity by removing deprecated functions and updating asset handling methods.
…itialization by using address(0) for backing asset.
…move deprecated asset handling
…rategy handling for backing asset
…address, simplifying price retrieval and enhancing clarity
…nstructors for improved clarity and functionality
…ved clarity and consistency
…y by removing unused variables and consolidating test cases
…nd consolidating test cases
…d consolidating test cases
…ables and consolidating test cases
…ate mint and redeem amounts for consistency
…fy asset handling
…et address, update test fixtures to use USDC instead of USDS, and simplify Dripper and VaultValueChecker tests by removing unused variables and consolidating logic.
| // Start with drip duration disabled | ||
| dripDuration = 1; | ||
| // Start with drip duration: 7 days | ||
| dripDuration = 604800; |
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.
Probably never going to be used since no new vault is scheduled
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.
What do you mean by the vault is scheduled?
We are now using the dripDuration in all the Vaults
* Refactor vault contracts to remove deprecated implementations and simplify admin structure * Refactor vault contracts to unify admin structure and simplify deployment scripts * move zapper to dedicated folder * Refactor vault upgrade scripts to unify implementation names and simplify deployment actions * Updated hot deploy with new Vault contracts * Update Vault contract diagrams * Add OSVault contract and update deployment script references --------- Co-authored-by: Nicholas Addison <nick@addisonbrown.com.au>
naddison36
left a comment
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.
Looks good
| // Start with drip duration disabled | ||
| dripDuration = 1; | ||
| // Start with drip duration: 7 days | ||
| dripDuration = 604800; |
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.
What do you mean by the vault is scheduled?
We are now using the dripDuration in all the Vaults
This pull request introduces significant refactoring and simplification across the vault contracts and related mocks, with a focus on consolidating interfaces, removing legacy features, and updating contract inheritance. The changes affect core vault logic, mock contracts, and strategy integration, aiming to streamline code and reduce complexity for future development.
Vault Interface and Contract Refactoring
IVaultinterface was extensively cleaned up: many legacy events and functions (such as asset-specific strategy management, price provider access, swapper logic, and OETH-specific features) were removed or deprecated. New unified methods and events (likesetDefaultStrategy,defaultStrategy, and withdrawal delay handling) were introduced to standardize vault behavior. [1] [2] [3] [4]MockVault,MockOETHVault,MockOETHVaultAdmin) now inherit from the updatedVaultAdminorOETHVaultcontracts instead of legacy core/admin contracts. This reflects the new inheritance structure and removes redundant or obsolete logic. [1] [2] [3]Mocks and Test Contract Updates
MockNonRebasingnow usesrequestWithdrawalinstead ofredeem, and constructor arguments and asset logic were adjusted for compatibility. [1] [2] [3]MockEvilReentrantContractandMockRebornMinterwere modified to use direct constructor injection for dependencies (likepriceProvider) and to update asset approvals and minting logic according to new standards. [1] [2] [3] [4]Strategy Contract Changes
BridgedWOETHStrategycontract now receives the oracle address directly via its constructor, rather than fetching it from the vault. This change improves modularity and testability for strategies. [1] [2] [3]Deprecation and Removal of Legacy Files
OETHBaseVaultAdmin.solwere removed, and their responsibilities consolidated into new base contracts likeOETHBaseVault.sol, further simplifying the contract hierarchy. [1] [2]Documentation Update
vaultCoreandvaultAdminto the unifiedvaultflag for contract source updates.