Platform usage: add Whole sale buy-velocity window #233
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:open_issues
agents
agent:security_audit
agent:verify
area
timecurve
arena
arena-v2
audit
block:feature_review
block:security
bug
contracts
design
devops
docs
documentation
enhancement
epic
feature
frontend
indexer
low priority
megaeth
operations
ops
performance
QA
qa checklist
referrals
removal
security
smart-contracts
tech-debt
testing
time-arena
timecurve
visual-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/yieldomega#233
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
On
/timecurve/protocol, the Platform usage card (#231) exposes Buy velocity with a two-option toggle: Last hour (default) and Last day (velocity_window=1h|24h).Add a third option — Whole sale — beside those windows so operators can see buy velocity across the entire active sale, not only the trailing 1h/24h slices.
Current behavior
TimeCurveProtocolPlatformUsageSectionrenders["1h", "24h"]only (Last hour/Last day).GET /v1/timecurve/platform-usageacceptsvelocity_window=1h|24h; counts buys withblock_timestamp >= anchor - window_sec(parse_velocity_window).Desired behavior
sale_startthrough the velocity anchor (same anchor as today: chain-timer head, elseMAX(block_timestamp)on buys).window_hoursderived from elapsed seconds sincesale_start(minimum 1h divisor or document zero/pre-open edge case).sale_startunset or anchor <sale_start), show empty-state copy consistent with No buys in this window (#200).Implementation notes
velocity_window(e.g.saleorall) and SQL filter:block_timestamp >= sale_start_sec(exposesale_start_secon chain-timer or read from sale metadata already indexed).PlatformUsageVelocityWindowinfrontend/src/lib/indexerApi.ts+ API path helper tests.INV-INDEXER-231,INV-FRONTEND-231,timecurve-views §231).Acceptance criteria
velocity.buy_countandavg_buys_per_hourfor full-sale window.Related
marked as related to #231
mentioned in issue #234
mentioned in commit
81e600b3e7mentioned in merge request !393
marked the checklist item Third toggle Whole sale visible next to Last hour / Last day on protocol AUDIT Platform usage. as completed
marked the checklist item Indexer returns correct velocity.buy_count and avg_buys_per_hour for full-sale window. as completed
marked the checklist item Unit/integration tests cover new window; Playwright touches velocity toggle if feasible. as completed
marked the checklist item Docs + manual QA checklist updated. as completed
Opened MR !393, implements all 4 acceptance criteria. Ready for review when you're free @PlasticDigits
mentioned in commit
0099b640dementioned in commit
6893aa6643