feat(timecurve-protocol): add Whole sale buy-velocity window (GitLab #233) #393
No reviewers
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!393
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/233-whole-sale-velocity"
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?
Closes #233.
Adds a third
Whole saletoggle to the Buy velocity widget on/timecurve/protocol(AUDIT). The window counts all indexed buys fromsale_startthrough the velocity anchor, withwindow_hoursderived dynamically from elapsed seconds since sale start (min 1).Indexer
velocity_windowquery param acceptssalealongside1h/24h.parse_velocity_windowrefactored to return aVelocityWindowenum so theSalevariant can resolvewindow_startandwindow_hoursat request time fromchain_timer.timer.sale_start_sec.sale_start_secis unset (0) oranchor < sale_start, returns zero buys + avg 0 without divide-by-zero. Matches#200empty-state contract.SCHEMA_VERSIONbumped to1.27.0.Frontend
PlatformUsageVelocityWindowtype union extended with"sale".TimeCurveProtocolPlatformUsageSectiontoggle adds third pill labeledWhole sale. Existingflex-wrap: wrapon.platform-usage-velocity__togglehandles mobile layout cleanly — no CSS changes needed. Active-state arcade-green token reused so the third pill matches branding.Tests
indexerApi.test.tsgets asalepath-helper case (assertsvelocity_window=salein the constructed URL).postgres_gitlab233_platform_usage_velocity_window_saleinintegration_stage2.rscovers:sale_start = 1_000_000, anchor =1_010_000, 3 in-window + 1 pre-sale buy →buy_count = 3,avg = 1.5(window_hours = 2).timer.sale_start_sec = "0"→buy_count = 0,avg = 0.7dstill rejected (saleaccepted but error message extended).cargo test --lib48/48, frontendnpm test572/572.Docs
INV-INDEXER-231-PLATFORM-USAGERoute row listssaleoption; Velocity row documentswindow_start = sale_start_secandwindow_hours = floor((anchor - sale_start) / 3600)math + pre-open behavior.INV-FRONTEND-231-PLATFORM-USAGEVelocity UI row updated withLast hour / Last day / Whole saletoggles.timecurve-views §231Buy velocity bullet updated.manual-qa-checklists.md #231step 5 adds the Whole sale toggle case.1.27.0.Acceptance criteria
Whole salevisible next toLast hour/Last day.velocity.buy_countandavg_buys_per_hourfor full-sale window.Out of scope
timecurve-protocol-platform-usage-velocity-saleis auto-derived from the existing template literal).mentioned in issue #233
added 1 commit
0099b640- perf(indexer): tighten platform-usage velocity queries (GitLab #233)Compare with previous version
mentioned in commit
6893aa6643