Closed
Conversation
Collaborator
LukasDeco
commented
Mar 25, 2026
- rm: pyth pull and other pyth stuff
- refactor: pyth lazer defaults for tests
- temp: working on cargo tests
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
…rp default) When slots_before_stale_for_amm_immdiate_override is 0, oracle_validity() unconditionally returns is_stale_for_amm_immediate=true (math/oracle.rs:344-348). This was never a problem when spot markets used OracleSource::Pyth (push oracle path), but with PythLazer the oracle delay computation (clock_slot - posted_slot) can produce non-positive values that still get flagged as stale, causing InvalidOracle failures during liquidation and margin calculations. Perp markets already default to oracle_slot_delay_override=-1 (perp_market.rs:1407), which makes the check evaluate oracle_delay > 0 instead of unconditionally true. This commit applies the same -1 override to all spot oracle validity calls in spot_balance.rs (exchange oracle) and margin.rs (margin calc) so that PythLazer spot oracles are not incorrectly classified as stale. Made-with: Cursor
This was referenced Apr 7, 2026
Collaborator
Author
|
Closing to reopen from protocol-v2-shadow. |
Collaborator
Author
|
Closing to reopen from |
Collaborator
Author
|
move to shadow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.