AUDIT page: DOUB projection card (supply, market cap, CHARM rate) #229
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#229
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?
Context
The TimeCurve AUDIT surface (
/timecurve/protocol, subnav label AUDIT) is the operator-facing protocol view (TimeCurveProtocolPage). It already exposes semilive sale reads, total raise, immutable parameters, and a collapsed Raw contract and operator context accordion with liquidity anchors and a charm redemption curve — but those projection economics are buried and not summarized for quick scanning.Product ask: add a prominent “DOUB projection” card on this page showing projected full supply, implied market cap, price per DOUB, CHARM→DOUB conversion, and related launch economics.
Note on supply figure: Request cites 251M projected supply. Canonical genesis policy in
launchplan-timecurve.md§4 is 250M DOUB (200M TimeCurve sale + 21.5M presale + 28.5M V3 LP). Confirm with product whether the UI constant should be 250M (doc-aligned) or 251M (updated policy) before hard-coding.Current codebase (research)
frontend/src/pages/TimeCurveProtocolPage.tsxfrontend/src/pages/timecurve/TimeCurveSubnav.tsx/timecurve/protocol, label AUDITfrontend/src/pages/timecurve/TimeCurveProtocolDataContext.tsxtotalRaised,totalTokensForSale,totalCharmWeight,currentPricePerCharmWadfrontend/src/lib/timeCurvePodiumMath.tsdoubPerCharmAtLaunchWad,projectedReservePerDoubWad,launchLiquidityAnchorWad,kumbayaBandLowerWadfrontend/src/pages/timecurve/useTimecurveProtocolRawAccordion.tsliquidityAnchorsfrom onchain totalsfrontend/src/pages/TimeCurveSimplePage.tsx1 CHARM = N DOUB = M CL8Y at launch— keep formulas alignedfrontend/src/pages/timecurve/timecurveUi.tsxStatCard+.stats-gridEmptyDataPlaceholder,statFromContractReaddocs/product/primitives.mdtotalRaisedAuthoritative rule: Displayed economics must be derivable from onchain views + documented constants — do not invent offchain “market cap” from external oracles on this surface. USD lines may follow existing illustrative pattern (
1 CL8Y = $1, same as TOTAL USD on this page — GitLab #192).Recommended solution
1. New UI block on
TimeCurveProtocolPageAdd a
PageSection(ordata-panel data-panel--stack) titled “DOUB projection” with a short lede: Live redemption and launch-liquidity economics from onchain sale totals; full-supply figure is policy constant.Use a
stats-gridofStatCardrows (4 sigfig compact formatting via existingformatBuyHubDerivedCompact/formatCompactFromRawwhere appropriate — GitLab #191).2. Proposed stat rows
launchplan-timecurve.md§4TimeCurve.totalTokensForSale()doubPerCharmAtLaunchWad({ totalTokensForSale, totalCharmWeight })projectedReservePerDoubWad(totalRaised, totalTokensForSale)launchLiquidityAnchorWad(clearing)kumbayaBandLowerWad(launchAnchor)projectedSupplyWei × clearingWad / 1e18marketCapCl8y× static $1/CL8YcurrentPricePerCharmWad()totalCharmWeight / totalTokensForSaleor % of sale bucket “allocated” via weightReuse protocol page’s existing
totalRaiseSerialized/ freshness affordance where market cap should show “seen X ago”.3. Implementation sketch
frontend/src/lib/doubProjectionStats.ts, that takes bigint inputs +projectedSupplyWholeTokensand returns formatted stat payloads (unit-tested).TimeCurveProtocolDoubProjectionSection.tsxto keepTimeCurveProtocolPagereadable.useTimeCurveProtocolData()/get(3..5,8)indices — no new RPC surface unless product requires total ERC20Doubloon.totalSupply()(not needed for launch projection card).liquidityAnchorsin the raw accordion.4. Out of scope (unless product expands)
Verification criteria (definition of done)
Automated
doubProjectionStats.test.ts(or extendtimeCurvePodiumMath.test.ts): fixturetotalRaised+totalTokensForSale+totalCharmWeightproduce expected CHARM→DOUB, clearing CL8Y/DOUB, launch anchor, market cap at fixed projected supply.timeCurvePodiumMathtests remain green.Manual / visual QA
/timecurve/protocol(AUDIT tab) withVITE_TIMECURVE_ADDRESSset and sale live on Anvil or devnet.totalCharmWeight == 0): CHARM→DOUB shows intentional empty placeholder per INV-FRONTEND-200, not0orInfinity.launchplan-timecurve.md.stats-gridwraps; no horizontal overflow on ≤479px.E2E (optional but recommended)
frontend/e2e/timecurve.spec.tsAUDIT navigation test: assertdata-testid="timecurve-protocol-doub-projection"(or section heading) is present after clicking AUDIT.Docs / invariants (light touch)
docs/frontend/timecurve-views.mdunder protocol/AUDIT section.INV-FRONTEND-*row indocs/testing/invariants-and-business-logic.mdif maintainers want guardrail coverage.Dependencies / decisions needed
saleStartPending) with static policy rows only.mentioned in issue #231
251m is updated supply, with 1m for airdrops
marketcap should use launch anchor (27.5% higher than current cl8y/doub ratio)
No should not appear while sale start pending.
mentioned in commit
b0f3447edeImplementation summary (pushed to
main@b0f3447)Added a DOUB projection section on
/timecurve/protocol(AUDIT tab), visible only while the sale is live (hidden duringsaleStartPendingper product sign-off).What changed
TimeCurveProtocolDoubProjectionSection—stats-gridof operator-facing launch economics (data-testid="timecurve-protocol-doub-projection").doubProjectionStats.ts— pure helpers reusingtimeCurvePodiumMath(clearing, 1.275× launch anchor, Kumbaya floor, CHARM→DOUB).INV-FRONTEND-229-DOUB-PROJECTION, timecurve-views §229, manual QA #229,launchplan-timecurve.md§4 footnote,skills/README.md,.cursor/skills/yieldomega-guardrailsitem 55.Tests run
npx vitest run src/lib/doubProjectionStats.test.ts src/lib/timeCurvePodiumMath.test.ts— 18 passedtsc -bon commitVerification checklist (please confirm)
/timecurve/protocolwith live sale — projection card visible without expanding raw accordionsaleStartPending) — card not shown0/Infinity)timecurve-protocol-doub-projection(when Anvil E2E stack available)@nullvector_ux — could you run through the checklist above on Anvil/devnet and confirm UX/copy?
Issue left open until verified.
Verification checklist (please confirm) @PlasticDigits
/timecurve/protocolwith live sale — projection card visible without expanding raw accordionsaleStartPending) — card not shown0/Infinity)timecurve-protocol-doub-projection(when Anvil E2E stack available)mentioned in issue #234
mentioned in issue #235
marked as related to #235