Skip to content

Conversation

@matias-gonz
Copy link
Member

  • Changed the base asset price for ETH in WstETHAdapter from 0 to 1 to ensure accurate pricing.
  • Updated related tests to verify that the ETH price is now correctly set to 1 instead of 0.
  • Adjusted documentation to clarify the base asset pricing behavior.

- Changed the base asset price for ETH in WstETHAdapter from 0 to 1 to ensure accurate pricing.
- Updated related tests to verify that the ETH price is now correctly set to 1 instead of 0.
- Adjusted documentation to clarify the base asset pricing behavior.
Copilot AI review requested due to automatic review settings October 22, 2025 08:36
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 updates the WstETHAdapter to set the ETH base asset price to 1 instead of 0, aligning with accurate pricing conventions. The change affects both the adapter implementation and the oracle helper's encoding logic.

Key changes:

  • Modified WstETHAdapter to set ETH price to 1 instead of 0
  • Added logic in encode_asset_prices() to normalize base asset price to 0 before encoding
  • Updated all related test assertions to verify ETH price is now 1

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

File Description
src/tq_oracle/adapters/price_adapters/wsteth.py Changed ETH base asset price from 0 to 1 in fetch_prices method and updated documentation
src/tq_oracle/processors/oracle_helper.py Added logic to overwrite base asset price to 0 during encoding, with updated documentation
tests/adapters/price_adapters/test_wsteth.py Updated test assertions to expect ETH price of 1 instead of 0
tests/processors/test_oracle_helper.py Added new test to verify base asset price is overwritten to 0 during encoding

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@matias-gonz matias-gonz merged commit 5dffbdc into master Oct 22, 2025
6 checks passed
@matias-gonz matias-gonz deleted the fix/eth-price-not-zero branch October 22, 2025 12:48
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