Implement always-live autoroll and onchain-enforced WarBow podium finalize #312
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#312
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?
Parent
Gap analysis follow-up from #309.
Current codebase
_requireLive()blocks all buys and WarBow whenblock.timestamp > deadlineuntilrollPodiumEpoch(0)(TimeArena.solL831–835).finalizeWarbowPodium(epoch, first, second, third)isonlyOwnerwith off-chain winner addresses; no on-chain BP ranking enforcement (TimeArena.solL404–418).arena-v2.md) expects always-live when not paused.Why needed
Approved: After last-buy deadline, buys/WarBow should autoroll (not block) unless paused.
finalizeWarbowPodiummust be replaced/enforced by on-chain autoroll with cheap ranking for up to ~10k players. Benchmark required.Constraints / guardrails
--code-size-limit 524288).WarbowPodiumFinalizedprojection (#112 bundle).Relevant files
contracts/src/arena/TimeArena.sol—_requireLive,rollPodiumEpoch,finalizeWarbowPodium,_updateTopThreecontracts/src/arena/libraries/ArenaPodiumSettlement.solcontracts/test/TimeArena.t.soldocs/product/arena-v2.md,docs/product/time-arena.mdsimulations/WarBow ranking referencesRecommended direction
_requireLive; trigger epoch autoroll when timer expires (in buy/WarBow path or dedicated keeper hook).finalizeWarbowPodiumif autoroll supersedes it.Acceptance criteria
Test plan
cd contracts && forge test --match-contract TimeArena.bash scripts/verify-podium-live-anvil.shafter indexer alignment.Attack / abuse test plan
Verification criteria
"TimeArena: timer expired"on buy when unpaused and autoroll enabled.mentioned in issue #309
mentioned in merge request !463
mentioned in commit
a80b465b34mentioned in commit
b01baa52c6mentioned in commit
a1e35f6915Verification — GitLab #312 (agent:verify)
Independent verification on branch
issue-312-autoroll-warbow-finalize(MR !463).Acceptance criteria
cd contracts && forge test --match-test test_buy_autorolls_after_last_buy_deadlinecd contracts && forge test --match-test test_warbow_steal_autorolls_after_last_buy_deadlinetest_warbow_roll_auto_pays_onchain_winners;finalizeWarbowPodiumreverts"TimeArena: superseded"forge test --match-contract TimeArenaWarbowBenchmark -vv→ update 368,100, roll 125,594; docdocs/testing/warbow-ranking-benchmark-312.mdforge test --match-contract TimeArena— 126 tests, 0 failedTimeArena: timer expiredon buy when unpaused_requireLive()no longer checksdeadline;_requireLiveAndAutoroll()rolls expired podiumstest_warbow_ranking_matches_brute_forcetest_warbow_tie_break_lower_address_winstest_autoroll_no_double_payout_same_txfinalizeWarbowPodiumalways revertsverify-podium-live-anvil.sh)arena_wallet_stats_two_epochs_and_bonus_fieldsfailure (1000 vs 750 BP) — same onmain, unrelated to #312Doc cross-links (verify loop)
Pushed commit
a1e35f69:skills/README.mdWarBow index,docs/product/time-arena.mdautoroll copy, benchmark gas range indocs/testing/warbow-ranking-benchmark-312.md.Invariants
INV-TIME-ARENA-AUTOROLL-312,INV-TIME-ARENA-WARBOW-RANK-312, updatedINV-TIME-ARENA-WARBOW-EPOCH-RESET— present indocs/testing/invariants-and-business-logic.md.Follow-ups
WarbowPodiumFinalizedprojection (#112 bundle).arena_wallet_stats_two_epochs_and_bonus_fieldsexpectation (out of #312 scope).warbowLeaderboardFinalizeAutofilladmin tooling.Issue left open pending MR merge.
Verify new wallet when top 6 already filled can enter top 6
mentioned in commit
082d27f3a0mentioned in commit
e84483343fmentioned in commit
0388c86b3bmentioned in merge request !484
mentioned in commit
862964dbc7Verification — GitLab #312 (agent:verify)
Independent verification on
mainafter MR !463 merge (862964db).Acceptance criteria
cd contracts && forge test --match-test test_buy_autorolls_after_last_buy_deadlinecd contracts && forge test --match-test test_warbow_steal_autorolls_after_last_buy_deadlinetest_warbow_roll_auto_pays_onchain_winners;finalizeWarbowPodiumreverts"TimeArena: superseded"forge test --match-contract TimeArenaWarbowBenchmark -vv→ update 466,535, roll 127,536; docdocs/testing/warbow-ranking-benchmark-312.mdcd contracts && forge test --match-contract TimeArena— 137 tests (incl. fork/router suites), 0 failedTimeArena: timer expiredon buy when unpaused_requireLive()checks onlyarenaStart+paused;_requireLiveAndAutoroll()rolls expired podiumstest_warbow_ranking_matches_brute_forcetest_warbow_tie_break_lower_address_winstest_autoroll_no_double_payout_same_txfinalizeWarbowPodiumalways reverts;test_finalize_warbow_podium_reverts_*verify-podium-live-anvil.sh)bash scripts/verify-podium-live-anvil.sh—integration_stage24/4,live_rows=12Comment follow-up (2026-06-14): new wallet enters top-6 when buffer full
test_warbow_off_podium_tie_break_promotes_to_global— greg untracked (battlePoints == 0) with alice/bob/carol/d/e/f occupying six slots; first WarBow buy promotes greg into global top-3 via off-podium mergetest_warbow_higher_bp_buy_enters_podiumInvariants
INV-TIME-ARENA-AUTOROLL-312,INV-TIME-ARENA-WARBOW-RANK-312, updatedINV-TIME-ARENA-WARBOW-EPOCH-RESET— present indocs/testing/invariants-and-business-logic.md.Follow-ups
WarbowPodiumFinalizedprojection (#112 bundle).warbowLeaderboardFinalizeAutofilladmin tooling.Closing — implementation merged and verified on
main.mentioned in issue #330
mentioned in issue #342
mentioned in issue #349
mentioned in issue #353
mentioned in merge request !524