fix: use calendar day for Rubic API queries - #9066
Draft
alpacai[bot] wants to merge 1 commit into
Draft
Conversation
|
The rubic adapter exports: |
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.
Summary
Rubic's daily endpoint expects a UTC calendar-day timestamp, but the adapter passed
startTimestamp, which the v1 runner sets one second before the day boundary. This could select the preceding day's API data and expose a large historical outlier under the wrong daily record; the adapter now passesstartOfDay.Changes
bridge-aggregators/rubic/index.ts: use the UTC calendar-day timestamp when querying Rubic's daily cross-chain volume endpoint.Verification
DEBUG_BREAKDOWN_FEES=1 pnpm test bridge-aggregators rubic 2026-08-30 polygon-> exit 0; corrected Polygon volume1.06 k(previously58.50 M).pnpm run ts-check-> exit 0.pnpm run ts-check-cli-> exit 0.git diff --check-> exit 0.