Skip to content

Conversation

@timbrinded
Copy link
Collaborator

This pull request adds native support for osETH (the StakeWise osToken) throughout the oracle, including asset and price adapters, configuration, and constants. It introduces osETH as a default supported asset on mainnet, enables fetching its price via the OsTokenVaultController contract, and improves the way additional assets are handled in the idle balances adapter.

Copilot AI review requested due to automatic review settings November 26, 2025 15:43
@timbrinded timbrinded added audit sherlock Sherlock auditor changes labels Nov 26, 2025
Copilot finished reviewing on behalf of timbrinded November 26, 2025 15:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the oracle to add native support for osETH (StakeWise's osToken) as a default asset on mainnet. The changes include adding osETH price fetching via the OsTokenVaultController contract, making osETH a default supported asset, simplifying the StakeWise adapter by removing escrow handling, and introducing a global additional_asset_support toggle to enable/disable additional asset features.

Key changes:

  • Added OsTokenVaultController ABI and osETH native pricing in the ETH price adapter
  • Made osETH a default additional asset for mainnet that's automatically included
  • Removed StakeWise escrow functionality and simplified exit queue processing
  • Added additional_asset_support configuration flag to enable/disable osETH and other additional assets globally

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/tq_oracle/constants.py Added OSETH to network assets, new os_token_vault_controller address, and DEFAULT_ADDITIONAL_ASSETS mapping
src/tq_oracle/settings.py Added additional_asset_support flag and new StakeWise adapter settings (exit_max_lookback_blocks, extra_addresses, skip_exit_queue_scan)
src/tq_oracle/abi.py Added OsTokenVaultController ABI loader and extracted fetch_subvault_addresses function
src/tq_oracle/abis/OsTokenVaultController.json New ABI file for OsTokenVaultController contract
src/tq_oracle/adapters/price_adapters/eth.py Added osETH pricing via OsTokenVaultController.convertToAssets()
src/tq_oracle/adapters/price_adapters/cow_swap.py Added osETH to skipped assets list to avoid pricing conflicts
src/tq_oracle/adapters/asset_adapters/stakewise.py Removed escrow handling, added fetch_all_assets(), updated exit queue calculation, added skip_exit_queue_scan option
src/tq_oracle/adapters/asset_adapters/idle_balances.py Distinguished between default and extra additional assets, with default assets (osETH) coming from constants
src/tq_oracle/pipeline/assets.py Refactored to use centralized fetch_subvault_addresses and added default StakeWise adapter initialization
tests/test_settings.py Added tests for new StakeWise adapter settings and additional_asset_support toggle
tests/adapters/test_stakewise_adapter.py Updated tests to reflect new exit queue return signature and removed escrow tests
tests/adapters/price_adapters/test_eth.py Added tests for osETH pricing and additional_asset_support flag
tests/adapters/price_adapters/test_cow_swap.py Added tests to verify osETH is skipped in CowSwap
tests/adapters/asset_adapters/test_idle_balances.py Added tests for default additional assets, additional_asset_support toggle, and error handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@timbrinded
Copy link
Collaborator Author

superseded by #130

@timbrinded timbrinded closed this Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit sherlock Sherlock auditor changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants