-
Notifications
You must be signed in to change notification settings - Fork 2
Refactor/dev 199 implement dao daily metric buckets #1548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
pikonha
merged 28 commits into
dev
from
refactor/DEV-199_implement_DAO_daily_metric_buckets
Jan 22, 2026
Merged
Refactor/dev 199 implement dao daily metric buckets #1548
pikonha
merged 28 commits into
dev
from
refactor/DEV-199_implement_DAO_daily_metric_buckets
Jan 22, 2026
+7,879
−18,496
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
pikonha
reviewed
Jan 19, 2026
…plement_DAO_daily_metric_buckets' into refactor/DEV-199_implement_DAO_daily_metric_buckets
…plement_DAO_daily_metric_buckets' into refactor/DEV-199_implement_DAO_daily_metric_buckets
pikonha
approved these changes
Jan 22, 2026
Member
pikonha
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LFGTM, nice job 🔥
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
This PR implements a new REST endpoint for token metrics with forward-fill logic, replacing the previous centralized forward-fill implementation with a dedicated token metrics service that handles daily metric buckets.
Key Changes
New Token Metrics Endpoint
GET /token-metrics- Returns token-related metrics with forward-fill support?type=CEX_SUPPLY&type=DEX_SUPPLY)after,before, andlimitparametersstartDateandendDateCode Organization
time-series.tsinto focused modules:date-helpers.ts- Date manipulation utilities (truncate to midnight, normalize timestamps)query-helpers.ts- Pagination and filtering utilities (cursor pagination, fallback logic)time-series.ts- Core forward-fill and timeline generationDaoMetricsDayBuckettype removed in favor of new structureForward-Fill Strategy
The service implements forward-fill to handle sparse database data:
[Day1: 100] [Day5: 150]→[100, 100, 100, 100, 150]Frontend Updates
useTimeSeriesDatahook to work with new endpoint structure