Skip to content

Conversation

@mpsc0x
Copy link
Collaborator

@mpsc0x mpsc0x commented Aug 4, 2025

The oracle module allows either the asset listing admin or the pool admin to set a custom price for certain assets. However, the set_asset_custom_price function does not verify whether a price cap is defined for the asset. As a result, if a custom price is set above the cap, the oracle will still return the capped price rather than the custom price. This discrepancy can lead to unintended consequences, as the effective price used by the system will differ from the custom price that was set. The PR corrects this behaviour.

@mpsc0x mpsc0x self-assigned this Aug 4, 2025
@mpsc0x mpsc0x force-pushed the fix/mpsc0x/oracle-custom-price branch from bface99 to 7bb17fe Compare August 4, 2025 16:53
@mpsc0x mpsc0x force-pushed the fix/mpsc0x/oracle-custom-price branch from 7bb17fe to 05365e3 Compare August 4, 2025 16:56
@codecov
Copy link

codecov bot commented Aug 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.09%. Comparing base (886d7d9) to head (05365e3).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #45      +/-   ##
==========================================
+ Coverage   96.89%   97.09%   +0.19%     
==========================================
  Files          16       16              
  Lines         515      516       +1     
==========================================
+ Hits          499      501       +2     
+ Misses         16       15       -1     
Flag Coverage Δ
move 97.09% <ø> (+0.19%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@mpsc0x mpsc0x merged commit c8db2a8 into main Aug 4, 2025
12 checks passed
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.

4 participants