Add DIA price minimum update timestamp word#46
Closed
JuaniRios wants to merge 1 commit into
Closed
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (16)
WalkthroughChangesThe DIA integration adds DIA price-after operation
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant RainParser
participant DiaSubParser
participant DiaExtern
participant LibOpDiaPrice
participant LibDia
participant DIAOracle
RainParser->>DiaSubParser: parse dia-price-after
DiaSubParser->>DiaExtern: dispatch OPCODE_DIA_PRICE_AFTER
DiaExtern->>LibOpDiaPrice: runAfter(key, minimumUpdatedAt, staleAfter)
LibOpDiaPrice->>LibDia: getPriceNoOlderThanAndUpdatedAfter(...)
LibDia->>DIAOracle: fetch price and timestamp
DIAOracle-->>LibDia: raw price and update timestamp
LibDia-->>LibOpDiaPrice: price and updatedAt
LibOpDiaPrice-->>DiaExtern: return two stack outputs
Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
JuaniRios
marked this pull request as ready for review
July 17, 2026 14:46
JuaniRios
force-pushed
the
dia-price-after-freshness-boundary
branch
2 times, most recently
from
July 17, 2026 15:02
ed301ab to
9f2eada
Compare
JuaniRios
force-pushed
the
dia-price-after-freshness-boundary
branch
from
July 17, 2026 16:49
9f2eada to
f70720f
Compare
This was referenced Jul 18, 2026
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.

What
Adds
dia-price-after, which is the same DIA price read asdia-pricebut with an extraminimumUpdatedAtinput.This lets callers reject prices whose DIA update happened before a caller-defined boundary, e.g. market open / session start.
Why
staleAfteronly says "not older than N seconds from now". It does not say "this price was marked after the event I care about".For the liquidity bot case, that means we can wait for a fresh DIA mark after session start instead of encoding this as downstream strategy-specific oracle glue.
How
LibDia.getPriceNoOlderThanAndUpdatedAfter.dia-price-afterextern word with 3 inputs and 2 outputs.Testing
forge testSummary by CodeRabbit
dia-price-afteroracle query.dia-price-after.dia-price-after.