Retire TimeCurve v1 surfaces — routes, indexer aliases, env, and legacy UX

Summary

Remove remaining TimeCurve v1 launchpad surfaces from the product, indexer HTTP API, frontend routes/naming, deploy env, and contributor docs — after Arena v2 (TimeArena) is the sole live game contract. This is the cross-repo retirement umbrella; contract deletion is largely done (#243 (closed)); docs cleanup is tracked in #263 (closed).

Coordinate with: #264 (closed) (Arena frontend buy/router migration) — retirement should not leave /timecurve/arena on TimeCurve ABI; finish #264 (closed) first or in the same release train.

Parent epic: #238 (closed).


Current codebase

Contracts (mostly retired)

  • contracts/src/ ships Arena v2 only: TimeArena, PodiumVaults, AdminSellVault, Doubloon, PlayCred, ReferralRegistry, TimeArenaBuyRouter, fixtures.
  • No TimeCurve.sol, FeeRouter, RabbitTreasury, or Leprechaun in contracts/src/.
  • DeployDev.s.sol deploys Arena stack only.
  • Legacy still in repo: deploy scripts (scripts/deploy-megaeth-contracts.sh), DeployProduction references, fork tests, public ABIs under frontend/public/abis/TimeCurve*.json, README mainnet TimeCurve proxy row.

Indexer (Arena-primary, TimeCurve-named HTTP)

  • Ingestion decodes Arena v2 + ReferralRegistry only (INV-INDEXER-260-NO-TIMECURVE-DECODE).
  • Registry watches TimeArena, PodiumVaults, AdminSellVault, ReferralRegistry.
  • Legacy HTTP paths remain, e.g.:
    • GET /v1/timecurve/sale-state — head-RPC snapshot reused for Simple session (sale_state.rs)
    • GET /v1/timecurve/chain-timer, platform-usage, warbow/battle-feed, etc.
  • Arena-native routes exist: GET /v1/arena/buys, timers, podium-pool-donations, etc.

Frontend (mixed naming and routes)

Route Today Issue
/ (post-launch) TimeArenaPage OK — rename internals optional
/arena Simple Arena (TimeCurveSimplePage + bridge) Uses VITE_TIMECURVE_ADDRESS alias + arenaV2SaleSessionBridge
/timecurve Redirect → /arena Legacy path kept
/timecurve/arena TimeCurvePageuseTimeCurveArenaModel (TimeCurve ABI) Must migrate or remove (#264 (closed))
/timecurve/protocol AUDIT (TimeCurveProtocolPage) TimeCurve-named components; donate pools card works
/vesting Presale vesting (if routed) #243 (closed) scope
  • addresses.ts: timeCurve alias from VITE_TIMECURVE_ADDRESS ?? VITE_TIME_ARENA_ADDRESS.
  • Hundreds of TimeCurve* filenames and CSS classes (timecurve-*).
  • Kumbaya env: VITE_KUMBAYA_TIMECURVE_BUY_ROUTER (TimeCurve-era name).
  • FeeTransparency already Arena vault copy when VITE_TIME_ARENA_ADDRESS set.

Docs / ops / skills


Why this is needed

  1. Product truth: Arena v2 is always-live; there is no TimeCurve sale-end, CHARM redemption, or FeeRouter CL8Y buy path. Keeping TimeCurve routes and env names confuses operators, agents, and participants.
  2. Safety: A misconfigured VITE_TIMECURVE_ADDRESS pointing at an old proxy while /arena uses VITE_TIME_ARENA_ADDRESS can re-enable wrong ABI reads (#264 (closed) addresses Advanced view; retirement removes the alias footgun).
  3. Indexer clarity: Dual /v1/timecurve/* and /v1/arena/* APIs duplicate concepts; frontend should consume arena routes only for game state.
  4. Maintenance cost: E2E, manual QA, and agent skills still mention retired flows — grep noise blocks confident refactors.

Constraints and guardrails

  • Do not reintroduce Leprechaun (#241 (closed)), Rabbit/Burrow (#242 (closed)), TimeCurve sale-end/redemption (#243 (closed)), FeeRouter five-sink CL8Y (#244 (closed)).
  • Preserve /vesting + DoubPresaleVesting only if product still requires claims on mainnet — otherwise fold into #243 (closed) and remove here.
  • Onchain authority unchanged: TimeArena economics per arena-v2.md.
  • AGPL-3.0; one SQL transaction per block for indexer (#140 (closed)).
  • Production indexer guards (#142 (closed), #156 (closed)).
  • Breaking changes OK for env vars and HTTP paths if versioned (x-schema-version bump) and documented in deploy runbooks.
  • Historical mainnet data: indexer may still serve read-only legacy tables for archived TimeCurve txs if needed — separate from removing decode of new blocks (already off). Do not delete historical DB tables without migration plan.

Relevant files

Layer Files
Routing frontend/src/app/LaunchGate.tsx, RootLayout.tsx, surfaceContent.ts, footerSiteLinks.ts
Pages to remove/redirect TimeCurveBranchPage.tsx, legacy stake/redemption sections, TimeCurveProtocolDoubProjectionSection.tsx (sale projection)
Env / addresses addresses.ts, .env.example, scripts/check-frontend-vite-env.sh, scripts/e2e-anvil.sh, scripts/start-local-anvil-stack.sh
Indexer HTTP indexer/src/api.rs, sale_state.rs, api_arena.rs, indexer/README.md
Kumbaya naming kumbayaRoutes.ts, timeCurveKumbayaSingleTx.ts
ABIs / artifacts frontend/public/abis/TimeCurve*.json, TimeCurveBuyRouter.json (keep only if historical pages remain)
Deploy / registry indexer/address-registry.megaeth-mainnet.json, scripts/deploy-megaeth-contracts.sh, scripts/write-production-registry-from-broadcast.sh
Docs #263 (closed) files + docs/frontend/arena-views.md, docs/integrations/kumbaya.md
Tests / E2E frontend/e2e/timecurve*.spec.ts, timecurve-live-buys-modals.spec.ts — rename or retire

Phase A — Product routes (breaking OK)

  1. Canonical routes: /arena (play), /arena/protocol or /protocol (AUDIT) — drop /timecurve/* or 301 to arena equivalents in LaunchGate.
  2. Remove /timecurve/arena after #264 (closed) merges Advanced features into shared Arena session or redirect to /arena with sub-nav query.
  3. Env: require VITE_TIME_ARENA_ADDRESS (+ vault vars); remove VITE_TIMECURVE_ADDRESS from checklists and scripts.
  4. Rename user-visible “TimeCurve” → “Time Arena” where still shown (hero titles, subnav).

Phase B — Indexer HTTP migration

  1. Add/rename GET /v1/arena/sale-state (or extend GET /v1/arena/timers) with fields Simple session needs; deprecate GET /v1/timecurve/sale-state (410 or redirect doc).
  2. Migrate platform-usage / WarBow feed to arena semantics (DOUB spends) or mark deprecated.
  3. Bump x-schema-version; document in README.

Phase C — Code hygiene

  1. Delete unused TimeCurve ABIs and frontend modules tied to sale-end/redemption/envelope curve.
  2. Rename files incrementally (TimeCurveSimplePageArenaSimplePage) or one-shot rename PR — team preference; avoid dual names long-term.
  3. Update play skills to GET /v1/arena/* only.
  4. Trim deploy guide to Arena + TimeArenaBuyRouter (coordinate env rename with #264 (closed)).

Phase D — Docs (#263 (closed))

Land doc deletion in parallel or as sub-task — do not block route removal on full invariant file rewrite.


Acceptance criteria

  • No production route requires VITE_TIMECURVE_ADDRESS.
  • /timecurve paths redirect or 404 with clear migration note (no empty outlets).
  • Simple + Advanced play surfaces read TimeArena only (no timeCurveReadAbi for session state).
  • Frontend indexer reads use /v1/arena/* for timers/sale snapshot (not /v1/timecurve/sale-state).
  • scripts/check-frontend-vite-env.sh validates Arena env only.
  • Grep contracts/src stays clean of TimeCurve / FeeRouter implementations.
  • Retired E2E specs removed or rewritten for /arena only.
  • README quick-reference reflects TimeArena proxy addresses (not TimeCurve launchpad).
  • #243 (closed) items either done or explicitly deferred with issue link (vesting, presale pages).

Test plan — functional paths

# Path Expected
1 Visit /timecurve Lands on /arena (or documented redirect)
2 Visit /timecurve/arena Redirect to /arena or equivalent Advanced tab
3 Visit /timecurve/protocol AUDIT page at new canonical URL
4 make check-frontend-env with only Arena vars Pass
5 Anvil stack start Writes VITE_TIME_ARENA_* only
6 Indexer GET /v1/arena/timers + sale fields Powers Simple UI without timecurve path
7 Deep link old URL bookmark Still reaches correct content (redirect)
8 /vesting Per #243 (closed): removed or still works independently

Automated: npm test, cargo test, ANVIL_E2E=1 arena specs; grep CI job or script for forbidden strings (buyFeeRoutingEnabled on Arena, redeemCharms, endSale in frontend src).


Test plan — attack / abuse vectors

Vector Test Expected
Wrong env alias Set only legacy VITE_TIMECURVE to random contract App fails closed / does not send buys to wrong ABI
Stale indexer path Point frontend at deprecated /v1/timecurve/sale-state after removal 404 handled — no fake “sale active” UI
Open redirect New redirects only to same-origin arena routes No arbitrary URL redirects
Historical ABI phishing UI never loads retired TimeCurve write ABI for /arena Only timeArenaReadAbi / router ABI

Verification criteria

  • CI green across contracts (unchanged), indexer, frontend.
  • Manual QA checklist updated — no /timecurve/arena TimeCurve-only rows.
  • rg -l 'VITE_TIMECURVE_ADDRESS' frontend scripts → empty or migration shim with deprecation comment + removal date.
  • Indexer README lists canonical Arena HTTP table; timecurve paths marked deprecated/removed.
  • Deploy runbook for next mainnet release uses Arena registry fields only.
  • Close or link child issues: #243 (closed), #263 (closed), #256 (closed), #264 (closed).

Out of scope

  • Mainnet decommission of deployed TimeCurve proxy (onchain artifact may remain forever).
  • Full CSS/class rename (timecurve-*arena-*) — optional follow-up if too large for one PR.
  • Indexer ingest of PodiumFunded / SeedFunded / AdminVaultFunded — separate issue (buy funding events).