Skip to content

Conversation

@clement-ux
Copy link
Collaborator

@clement-ux clement-ux commented Dec 9, 2025

Description

This pull request makes substantial changes to the IVault interface and related contracts, primarily to simplify asset and strategy management, remove unused or deprecated functionality, and update how price oracles are referenced. The changes affect core vault logic, mock contracts, strategies, and event emissions. The most important changes are grouped by theme below.

Vault Interface Simplification and Refactoring

  • Removed numerous functions and events from IVault, including asset-specific strategy management, swapper/oracle slippage controls, and price provider references, to streamline the interface. This includes the removal of priceProvider, setPriceProvider, swap-related functions, and asset-specific strategy functions. [1] [2] [3] [4] [5] [6] [7]
  • Added or renamed functions and events to centralize strategy management, such as setDefaultStrategy, defaultStrategy, and DefaultStrategyUpdated. [1] [2]
  • Changed the vault initialization function to take only a single address (the backing asset), and added backingAsset() as a public view function.
  • Moved weth() to the end of the interface and ensured it is still accessible.

Oracle and Price Provider Handling

  • Removed direct references to the price provider/oracle from the vault and strategies, instead passing the oracle address explicitly where needed (e.g., in BridgedWOETHStrategy and mocks). [1] [2] [3] [4] [5] [6] [7] [8]
  • Updated mocks and strategies to use the new oracle reference pattern, removing reliance on IVault.priceProvider(). [1] [2] [3] [4] [5] [6]

Asset and Strategy Management

  • Replaced per-asset strategy management with a single default strategy, and removed functions/events related to asset-level strategies and configuration. [1] [2] [3]
  • Updated mock vaults and admin contracts to use backingAsset instead of asset arrays or indices, and simplified asset support logic. [1] [2] [3] [4] [5]

Miscellaneous Updates

  • Updated test and mock contracts to align with the new mint/redeem logic and asset handling.
  • Removed the now-empty OETHVault contract.

These changes significantly modernize and simplify the vault and strategy interfaces, improve clarity, and reduce unused code, paving the way for easier maintenance and future upgrades.

These changes help reduce contract complexity, remove unused features, and prepare the codebase for future upgrades.

Code Change Checklist

To be completed before internal review begins:

  • The contract code is complete
  • Executable deployment file
  • Fork tests that test after the deployment file runs
  • Unit tests *if needed
  • The owner has done a full checklist review of the code + tests

Internal review:

  • Two approvals by internal reviewers

Deploy checklist

Two reviewers complete the following checklist:

- [ ] All deployed contracts are listed in the deploy PR's description
- [ ] Deployed contract's verified code (and all dependencies) match the code in master
- [ ] Contract constructors have correct arguments
- [ ] The transactions that interacted with the newly deployed contract match the deploy script.
- [ ] Governance proposal matches the deploy script
- [ ] Smoke tests pass after fork test execution of the governance proposal

… improve clarity by removing deprecated functions and updating asset handling methods.
…itialization by using address(0) for backing asset.
…address, simplifying price retrieval and enhancing clarity
…nstructors for improved clarity and functionality
…y by removing unused variables and consolidating test cases
…et address, update test fixtures to use USDC instead of USDS, and simplify Dripper and VaultValueChecker tests by removing unused variables and consolidating logic.
@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

❌ Patch coverage is 97.53086% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.44%. Comparing base (7fdf6e1) to head (38a00fa).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
contracts/contracts/vault/VaultCore.sol 97.41% 3 Missing ⚠️
contracts/contracts/harvest/AbstractHarvester.sol 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2714      +/-   ##
==========================================
- Coverage   41.10%   35.44%   -5.66%     
==========================================
  Files         126      128       +2     
  Lines        5778     5504     -274     
  Branches     1537     1463      -74     
==========================================
- Hits         2375     1951     -424     
- Misses       3401     3552     +151     
+ Partials        2        1       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@clement-ux clement-ux marked this pull request as ready for review December 19, 2025 10:56
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