Skip to content

[OUSD-14] _totalValueInVault() Returns The Value Denoted In Asset Decimals.#2779

Merged
shahthepro merged 1 commit intoclement/simplify-ousdfrom
clement/simplify-ousd-fix14
Feb 10, 2026
Merged

[OUSD-14] _totalValueInVault() Returns The Value Denoted In Asset Decimals.#2779
shahthepro merged 1 commit intoclement/simplify-ousdfrom
clement/simplify-ousd-fix14

Conversation

@clement-ux
Copy link
Collaborator

Description

Remove _totalValueInVault() as not used anymore in the contract.

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

@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 33.16%. Comparing base (327a6eb) to head (5559a86).
⚠️ Report is 5 commits behind head on clement/simplify-ousd.

Additional details and impacted files
@@                    Coverage Diff                    @@
##           clement/simplify-ousd    #2779      +/-   ##
=========================================================
- Coverage                  34.34%   33.16%   -1.18%     
=========================================================
  Files                        124      124              
  Lines                       5488     5451      -37     
  Branches                    1450     1441       -9     
=========================================================
- Hits                        1885     1808      -77     
- Misses                      3602     3642      +40     
  Partials                       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 changed the title [Vault] OUSD-14 _totalValueInVault() Returns The Value Denoted In Asset Decimals. [OUSD-14] _totalValueInVault() Returns The Value Denoted In Asset Decimals. Feb 3, 2026
Copy link
Member

@sparrowDom sparrowDom left a comment

Choose a reason for hiding this comment

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

LGTM

@shahthepro shahthepro merged commit 0f516d5 into clement/simplify-ousd Feb 10, 2026
11 of 17 checks passed
@shahthepro shahthepro deleted the clement/simplify-ousd-fix14 branch February 10, 2026 04:27
shahthepro added a commit that referenced this pull request Feb 10, 2026
* Refactor OETHVaultCore and VaultCore to simplify asset handling and remove WETH dependencies

* Add constructors to MockVault and MockVaultCoreInstantRebase for initialization

* Refactor OETHVaultCore and VaultCore to implement async withdrawal functionality

* Refactor OETHVaultCore and VaultCore to remove unused functions and simplify total value calculations

* Remove unused addWithdrawalQueueLiquidity function from OETHVaultCore and clean up comments in VaultCore

* Refactor OETHVaultCore and VaultCore to remove unused imports and functions, simplifying the codebase.

* Remove unused pricing functions and related imports in VaultCore to simplify the codebase.

* Update constructor parameter in OETHVaultCore to use _weth for clarity

* Add OUSDVaultCore contract and implement redeem functionality with access control

* Refactor OETHVaultAdmin and VaultAdmin contracts to simplify code and improve clarity by removing deprecated functions and updating asset handling methods.

* Refactor vault admin contracts to remove constructors and simplify initialization by using address(0) for backing asset.

* Refactor vault contracts to enforce backing asset restrictions and remove deprecated asset handling

* Refactor VaultAdmin and VaultStorage contracts to simplify default strategy handling for backing asset

* Refactor AbstractHarvester and related contracts to integrate oracle address, simplifying price retrieval and enhancing clarity

* Revert changes on Harvester

* remove old code

* Refactor vault admin contracts to include backing asset address in constructors for improved clarity and functionality

* Refactor OETH Vault tests to simplify strategy handling and improve error messages

* adjust decimal logic in VaultStorage

* wip fix test

* Refactor scaling logic in VaultCore to use scaleBy function for improved clarity and consistency

* Refactor Compound strategy tests to simplify logic and improve clarity by removing unused variables and consolidating test cases

* Refactor Vault tests to simplify logic by removing unused variables and consolidating test cases

* Refactor Vault tests to simplify code by removing unused variables and consolidating test cases

* Refactor Vault redeem tests to simplify logic by removing unused variables and consolidating test cases

* fix buyback fixture

* Refactor Reborner contract and tests to use USDC instead of USDS, update mint and redeem amounts for consistency

* Refactor compoundingStakingSSVStrategyFixture to simplify default strategy setting

* Refactor Convex strategy tests to use USDC instead of USDS and simplify asset handling

* Refactor MockVaultCoreInstantRebase constructor to accept backing asset address, update test fixtures to use USDC instead of USDS, and simplify Dripper and VaultValueChecker tests by removing unused variables and consolidating logic.

* fix remaining unit test

* fix base setup

* fix sonic setup

* Add slither-disable comments for reentrancy checks in mint functions

* Remove collateral swaps test file to streamline testing suite

* Add OUSDVaultAdmin contract and deployment script for OUSD Vault upgrade

* fix vault fork test

* prettier

* fix more fork tests

* lint

* fix more tests

* fix sonic fork test

* lint + prettier

* skip plume test

* fix sonic fork test

* fix sonic fork test

* remove .only

* remove old fix

* fix decimal conversion

* refactor: change contracts to abstract for VaultAdmin, VaultCore, VaultInitializer, and VaultStorage

* fix test

* WIP add async withdraw test for OUSD

* Add lot of test for async withdraw

* adjust comment

* refactor: remove setDripper function from IVault interface

* fix: update redeem function to use correct amount parameter

* feat: add deprecated weth asset index to OETHVaultCore contract

* increase ousd vault upgrade number

* fix: add slither disable comment for constable-states in OETHVaultCore contract

* fix: correct drip duration initialization in VaultInitializer contract

* feat: deprecate calculateRedeemOutputs and introduce calculateRedeemOutput in VaultCore contract

* refactor: rename backingAsset to asset across contracts for consistency

* refactor: change visibility of deprecated asset-related mappings to private

* fix: improve error message for unsupported asset decimals in VaultStorage constructor

* fix: update error message for unsupported asset in minting process

* refactor: update comments to clarify AMO strategy references in mint and redeem functions

* refactor: standardize terminology by replacing 'backing asset' with 'asset' in contracts and tests

* refactor: simplify redeem output calculation by removing deprecated function

* refactor: streamline redeem output calculation by consolidating return values

* refactor: improve clarity in comments regarding AMO strategy in mint and redeem functions

* refactor: mark isSupportedAsset function as deprecated

* [Vault] Simplify `mint()` (#2735)

* refactor: remove deprecated asset structure and related mappings from VaultStorage

* refactor: remove deprecated mint function parameters and related tests

* refactor: remove unused parameters from _mint and mint functions

* refactor: remove unnecessary blank lines in test files

* refactor: change internal mappings to private for better encapsulation

* Clement/simplify ousd get rid of old stuff (#2736)

* refactor: remove deprecated asset structure and related mappings from VaultStorage

* refactor: remove deprecated mint function parameters and related tests

* refactor: remove unused parameters from _mint and mint functions

* refactor: remove unnecessary blank lines in test files

* refactor: change internal mappings to private for better encapsulation

* refactor: simplify asset mappings by changing from mapping to single uint256

* [Vault] Remove `redeem()` and simplify inheritance. (#2737)

* Remove redeem functionality and related events from vault contracts

* Refactor vault contracts to inherit from VaultCore, removing deprecated OETHVaultCore references and relocating legacy code for consistency.

* Fix tests after redeem has been removed (#2738)

* Remove calculateRedeemOutputs view function from Vault

* Removed redeem, fund and yield Hardhat task

* FIxed unit tests

* Fixed fork tests

* Fix Base fork tests

* Fixed Base Curve AMO fork tests

* Removed redeemFeeBps from Sonic fork tests

* Fix Base and Sonic unit tests

* Prettier

* Remove hardhat fund from node script

* Fix OUSD AMO fork tests

* Fix AMO fork tests

* Remove unused gap variable from OUSDVaultCore contract

---------

Co-authored-by: Nick Addison <nick@addisonbrown.com.au>

* Removed Beacon consolidation fork tests

* Add OETH vault upgrade deployment script with governance proposal

* Remove deprecated redeem tests from OETH vault and bridge helper test files

* lint

* Add vault upgrade deployment script and skip deprecated tests in bridge helper

* prettier

* Add deployment script for OSonic vault upgrade with governance actions

* Refactor OETH and OSonic VaultAdmin contracts to inherit from VaultAdmin

* New gov prop of deploy script 163

* Simplify withdrawal amount calculations in VaultCore contract

* fix bug

* [Vault] Merge VaultAdmin and VaultCore (#2743)

* 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>

* Removed commented out IOracle lines from Harvester

* Changed the OUSD default strategy to the Morpho OUSD v2 strategy

* Rename OSonicVault to OSVault in deployment script

* Refactor rebase and withdrawal queue liquidity calls in VaultAdmin contract

* Add slither disable comments for reentrancy checks in VaultAdmin contract

* Removed dependency on OracleRouter from the OUSD and SuperOETH Vaults

* Bumped the deploy script numbers

* prevent removal of strategies that still have balance after the withdrawal (#2767)

* [OUSD-16] Miscellaneous General Comments (#2788)

* replace interface to fetch decimals

* add comment

* add link to readme

* removed TODO

* rename oUSD to oToken

* add function for reverse compatibility and mark deprecated

* rename

* refactor: update setRebaseRateMax function to clarify APR parameters and improve documentation (#2785)

* Remove constant MAX_PRICE_STALENESS from BridgedWOETHStrategy contract (#2784)

* remove unused _totalValueInVault function to simplify VaultCore contract (#2779)

* [OUSD-13] `removeStrategy()` Does Not Reset Mint Whitelist Flag. (#2778)

* Reset mintWhiteList flag when removing strategy.

* Add test to reset mint whitelist flag when removing a strategy

* [OUSD-11]  Missing Zero Amount Validation In `requestWithdrawal()`.  (#2777)

* Add validation for withdrawal amount in requestWithdrawal function

* Fail to allow withdrawal of zero amount in requestWithdrawal function

* Add asset support check in approveStrategy function (#2776)

* Fix Vault tests  (#2790)

* Fix base unit tests

* Fix Ehereum unit tests

* Remove redundant fork tests

* fix approval

* Fix CI

---------

Co-authored-by: Nick Addison <nick@addisonbrown.com.au>
Co-authored-by: Domen Grabec <grabec@gmail.com>
Co-authored-by: Shah <10547529+shahthepro@users.noreply.github.com>
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.

3 participants

Comments