Gap Analysis Report #309
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#309
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?
Gap Analysis Report — Yieldomega (GitLab #309)
Date: 2026-06-13
Branch:
main(synced withorigin/main)Scope: Full-repo gap analysis — contracts, frontend, indexer, scripts, CI, docs, bots
Method: Product spec review (
time-arena.md,arena-v2.md, invariants), automated test runs, codebase explorationExecutive Summary
Yieldomega Arena v2 is substantially implemented across all three packages: onchain core (
TimeArena,PodiumVaults, routing libraries), indexer HTTP API (GET /v1/arena/*), and a unified play surface at/with AUDIT at/arena/protocol. Automated gates are strong at the unit layer (157/162 Forge tests, 632 Vitest tests, 43 Rust tests) but integration and E2E coverage lag behind documented invariants.The largest gaps fall into five themes:
time-arena.md,arena-views.md, content audit) stale vs shipped UI (route/vs/arena, podiums on AUDIT only).TimeArenaevents lack durable Postgres projections (LevelUp,FeatureUnlocked,FirstBuyCredScheduled,PausedSet,WarbowPodiumFinalized,WarBowFlagClaimedno-op persist).ArenaSimplePage,useArenaSaleSession).DoubPresaleVestingin mainnet registry without indexer ingest path.Risk posture: No obvious fund-theft vectors without owner keys. Highest risks are economic (CRED dilution), centralization (
finalizeWarbowPodium), stranded WarBow DOUB, and stale derived indexer state wheneth_callside-effects fail silently.Test Suite Results
forge testDoubAirdropMegaethFork(missingdoub.csv); 1×DevStackIntegration(cooldown env)cargo clippy -D warnings+cargo testtypecheck+npm testFindings by Area
1. Contracts — Features vs Spec
WARBOW_AMBUSH_BONUS_BP(200) andWARBOW_STREAK_BREAK_MULT_BP(100) declared inTimeArena.solbut never applied in_applyBuyWarBowBpor steal/revenge pathsbuyWithCreddilutes epoch CRED pool_accrueCharmOnlyaddsepochCharmWadwithout contributing toepochCredPool; CRED-only buyer can claim pro-rata share of DOUB-funded 35-CRED poolTimeArena_requireLive()blocks all buys/WarBow after Last Buy deadline untilrollPodiumEpoch(0); conflicts with arena-v2 "always live when not paused"claimWarBowFlaguses_requireLive()→ blocked when paused; ops doc says flag claim is not paused (#264)finalizeWarbowPodiumowner-trustedamount % 4to cat 3 (WarBow)time-arena.mdstaleMAX_PLAYER_LEVEL = 5; first-buy 150 CRED vsFIRST_BUY_CRED_BONUS = 1100e18in codetotalDoubRaisedor prize vaults — should be explicit in specsafeTransfers per buy; bubble-sort on 3 podium slots (negligible)2. Contracts — Security & Testing
NonStandardERC20.t.solreferenced but absent)AdminSellVaultlegacy surfacenotifyFundednever called fromTimeArena(0% admin on buys #300)doubOwedForBuynotviewbuyFor, UUPS + onlyOwner, fee-on-transfer check3. Frontend — Features & UX
/not/arena; four-podium grid only on AUDIT (/arena/protocol); decision row removed;ArenaSubnav(BUY+AUDIT) not renderedArenaSimplePage.tsx: "The sale has not opened yet…" — violates content audit (#298) always-live framingArenaWarbowHeroPanelPlayerIdentitylacksonOpenProfile→ explorer links instead of modal (#258)ArenaSimplePage,ArenaWarbowHeroPanel,ArenaCharmCredCard,useArenaSaleSession(~1600 LOC),WalletProfileModalshellTimerHeroLiveBuys.tsx,ArenaBuyModals.tsxnot imported;arena-live-buys-modals.spec.tstests retired UIuseArenaSaleSession)4. Indexer — API & Ingest
INV-INDEXER-112incompleteTimeArenaevents lack durable projections:FirstBuyCredScheduled,LevelUp,FeatureUnlocked,PausedSet,WarbowPodiumFinalized,WarBowFlagClaimed(decode + no-op persist)DoubPresaleVestingregistry without ingestBuyViaKumbayablind spotTimeArenaBuyRouterexcluded fromindex_addresses(); Kumbaya-routed buys may be invisibleeth_callfailures log warn but don't fail block tx → stale derived tablesfilter_mapwithout errorGET /v1/realtime/*; browsers must polldesign.mdomitslast-buy-epoch-pricingandwarbow/latest-bp(both implemented)5. Testing, CI & Ops
verify-podium-live-anvil.sh,verify-wallet-profile-anvil.sh,verify-cred-buy-anvil.sh, etc. — invariant gates, local-onlyanvil-*.spec.tsskip unlessANVIL_E2E=1e2e-anvil.shsets emptyVITE_INDEXER_URLverify-rabby-chain-mismatch.shCloud Agent onlynpm run lintmissing from CIfrontend-testjob runs typecheck + test onlye2e-anvil.ymlmanual; excludesanvil-referrals.spec.tsby defaulte2e-anvil.mdreferences nonexistentanvil-collection.spec.tsverify-timecurve-post-end-gates-anvil.shstill present6. Documentation & Agent Phases
time-arena.mdvsarena-v2.md— progression, CRED bonus, remainder routing disagree7. Bots & Simulations
bots/timearena/but Python packagetimecurve_bot; CI jobbots-timecurve-testsimulations-testandbots-timecurve-testin merge gateCoverage Matrix (Spec → Code → Test → CI)
buyWithCred(#268)Recommended Next Steps (Priority Order)
P0 — Economic / security clarity (contracts)
epochCharmWadpro-rata, or document + test intentional economics._applyBuyWarBowBpor delete dead constants.P1 — Indexer completeness
LevelUp,FeatureUnlocked,WarBowFlagClaimed,PausedSet,WarbowPodiumFinalized,FirstBuyCredScheduled.eth_callfails.BuyViaKumbayascope — Add router to registry + decode, or document co-emission ofBuy.P2 — Frontend / docs reconciliation
arena-views.md, content audit,time-arena.mdto match shipped IA (/play, AUDIT podiums, header nav).onOpenWalletProfiletoPlayerIdentity.TimerHeroLiveBuys,ArenaBuyModals, orphaned E2E spec.P3 — CI / testing pyramid
npm run linttofrontend-testjob — Align with invariant #301.verify-issue-237-wss-deferred.sh,check-frontend-vite-env.sh, one representative Anvil+PG script.verify-podium-live-anvil.sh-class script on schedule.anvil-referrals.spec.ts; run with indexer URL set for #301 smoke.P4 — Ops / production
DoubPresaleVesting— Add indexer path or remove from mainnet registry until ready.Artifacts
gaps/GAP_1781334121.mddocs/testing/invariants-and-business-logic.mddocs/testing/strategy.mdApproved
Rejected
P0
P1
P2
P3
P4
mentioned in issue #310
mentioned in issue #311
mentioned in issue #312
mentioned in issue #313
mentioned in issue #314
mentioned in issue #315
mentioned in issue #316
mentioned in issue #317
mentioned in issue #318
mentioned in issue #320
mentioned in issue #319
mentioned in issue #321
mentioned in issue #322
mentioned in issue #323
mentioned in issue #324
Child issues opened from gap analysis triage
Approved items from the 2026-06-13 triage comment were bundled into 15 child issues. No prior child issues existed on #309.
Opened (15)
buyWithCreddilutes epoch CRED pool (add 35 CRED per buy)finalizeWarbowPodiumowner-trusted → onchain autoroll + 10k benchmarkAdminSellVaultlegacy surfacedoubOwedForBuynotviewINV-INDEXER-112incomplete; best-effort ingest side-effectsDoubPresaleVestingremove;BuyViaKumbaya; platform-usage API; silent API data loss; cursor paginationtime-arena.mdstale; dual product specs; content audit vs E2E vs code; docs/spec drift; pause docs; indexerdesign.mddriftnpm run lintmissing from CI; indexer-first not in E2E; Anvil E2E dispatch-only; GitLab vs GitHub CI (minimal GitLab)Skipped — rejected
Skipped — already tracked elsewhere
Bundle notes
mentioned in merge request !457
mentioned in commit
d034ca7be7mentioned in merge request !458
mentioned in merge request !461
mentioned in merge request !462
mentioned in merge request !465
mentioned in merge request !466
mentioned in merge request !467
mentioned in merge request !468
mentioned in merge request !471
mentioned in merge request !476
mentioned in commit
f8484fc658mentioned in merge request !480
mentioned in merge request !486