feat(arena): autoroll expired podiums and on-chain WarBow finalize (#312) #463
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!463
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-312-autoroll-warbow-finalize"
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?
Summary
Implements GitLab #312: always-live autoroll and on-chain WarBow podium finalize.
TimeArena: timer expiredhard-block from_requireLive(); buys and WarBow actions now call_autorollExpiredPodiums()when unpaused.rollPodiumEpoch/ autoroll pays 4∶2∶1 from the on-chain incremental top-3 BP leaderboard and emitsWarbowPodiumFinalized.finalizeWarbowPodiumis superseded (reverts"TimeArena: superseded")._sortPodium.docs/testing/warbow-ranking-benchmark-312.md).Acceptance checklist
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_deadlinecd contracts && forge test --match-test test_warbow_roll_auto_pays_onchain_winnerscd contracts && forge test --match-test test_benchmark_warbow_10k_player_ranking -vvcd contracts && forge test --match-contract TimeArenacd contracts && forge test --match-test test_warbow_roll_auto_pays_onchain_winners(finalize reverts)cd contracts && forge test --match-test test_warbow_tie_break_lower_address_winscd contracts && forge test --match-test test_autoroll_no_double_payout_same_txcd contracts && forge test --match-test test_warbow_ranking_matches_brute_forcebash scripts/verify-podium-live-anvil.sh/v1/statusunavailable in agent VM run;PodiumEpochRolledingest unchanged)Verification for third parties
issue-312-autoroll-warbow-finalize.cd contracts && forge test --match-contract TimeArenacd contracts && forge test --match-contract TimeArenaWarbowBenchmark -vv— confirm gas logs.bash scripts/verify-podium-live-anvil.shwith Postgres + Anvil.INV-TIME-ARENA-AUTOROLL-312,INV-TIME-ARENA-WARBOW-RANK-312indocs/testing/invariants-and-business-logic.md.Follow-ups
WarbowPodiumFinalizedprojection (#112 bundle).warbowLeaderboardFinalizeAutofilladmin tooling now that finalize is on-chain.changed the description
changed the description
Stale Security Review comment
Stale Security Review comment
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.
Reviewed by Cursor Bugbot for commit
2fe5181a56. Configure here.Autoroll order skips WarBow payout
High Severity
When several podium timers are expired,
_autorollExpiredPodiumsrolls categories in fixed ascending order in one transaction. Each roll paysdoub.balanceOf(activePools(cat)), which on deployedPodiumVaultsis the full vault balance. An earlier roll (typically Last Buy) can drain the vault before WarBow rolls, yet WarBow still setswarbowEpochFinalizedand emitsWarbowPodiumFinalizedwith no DOUB transfer, andfinalizeWarbowPodiumis superseded.Additional Locations (1)
contracts/src/arena/TimeArena.sol#L376-L409Reviewed by Cursor Bugbot for commit
2fe5181a56. Configure here.Severity: High
Issue: WarBow autoroll now pays DOUB from
_podiums[CAT_WARBOW], but_updateTopThreecan retain a stale third-place entrant when a new player displaces the second slot.Impact: On
rollPodiumEpoch/ autoroll,payPodiumWinnersmay send the 4∶2∶1 WarBow pool slice to the wrong address(es). A sybil with an early low-BP podium slot can keep third place after a higher-BP player is evicted from second, stealing ~1/7 of the epoch pool from the legitimate third-place holder.Attack path (reproduced on this commit):
_updateTopThreereplaces Bob at rank 2 but leaves Charlie at rank 3.Evidence:
_updateTopThreeonly inserts at the first slot wherevalue > p.values[r](lines 889–895); it never re-evaluates evicted entrants still represented by a lower slot. Forge repro: podium[Alice, David, Charlie]with Bob at 50 BP still live.Sink:
podiumVaults.payPodiumWinners(category, winners[0], winners[1], winners[2], …)at this line reads the flawedwinnerssnapshot.Security review — MR !463
Commit reviewed:
2fe5181a5641497477fea8e73ad5e6d0ae9ae8c8Scope:
TimeArena.solautoroll / always-live liveness, on-chain WarBow 4∶2∶1 settlement,_sortPodiumtie-break, Forge tests + docs/skills only (no indexer/frontend/runtime changes in diff).Outcome:
FINDINGS: 1medium+Findings (inline)
TimeArena.solL393_rollPodiumEpochnow pays WarBow from_podiums[CAT_WARBOW]._updateTopThree(unchanged insertion logic, now funds-critical) can leave a stale third-place address when a higher-BP player is evicted from second — verified with a Forge repro on this SHA (Alice/David/Charlie on podium while Bob at 50 BP is the true third).Prior threads re-checked
warbowActivateGuardtrigger).warbowEpochFinalized[0]is set and WarBow first-place balance increases; not a zero-payout / finalize-lockout on this repro. CommingledPodiumVaults.activePoolsbalances predate this MR; not elevated to a separate finding here.Not reported
finalizeWarbowPodium(intentional #312).Label
block:securityapplied pending fix or accepted risk on the High finding.Security fixes —
bb5497de_updateTopThree)_updateTopThreenow re-evaluates the evicted address via_podiumMetricand re-inserts it when still top-3 eligible. Regression:test_warbow_top_three_reinserts_displaced_entrant.PodiumVaultsbalances predate this MR.Tests:
forge test --match-contract TimeArena— 104 passed.Labels:
block:securitycleared; all low+ findings addressed.added 1 commit
bb5497de- fix(arena): reinsert displaced podium entrants on top-3 updateCompare with previous version
changed the description
Severity: High
Issue:
_autorollExpiredPodiumsrolls expired categories in ascending order (0→3). Each_rollPodiumEpochpaysdoub.balanceOf(podiumVaults.activePools(cat)). With defaultPodiumVaultswiring, allactivePools[i]point at the same holder (address(this)), so every roll reads the entire vault balance, not that category's 25% tranche.Impact: When multiple podium timers expire together, the first roll (typically Last Buy, cat 0) pays the full combined vault (all four categories) to its top-3. Later rolls — including WarBow — see
poolBal == 0, yet WarBow still setswarbowEpochFinalized[epoch]and emitsWarbowPodiumFinalizedwith no DOUB transfer. AdminfinalizeWarbowPodiumis superseded (revert "TimeArena: superseded"), so WarBow winners cannot recover.Attack path (reproduced on
bb5497de):podiumDeadline[cat].buy().Sink:
podiumVaults.payPodiumWinnersat L393, fed by sharedpoolBalat L390 inside the autoroll loop at L836–841.Security review — MR !463
Commit reviewed:
bb5497de4e25c6634f39afb3dcb97f74fd223321Scope:
TimeArena.solalways-live autoroll (_requireLiveAndAutoroll,_autorollExpiredPodiums), on-chain WarBow 4∶2∶1 settlement,_updateTopThree/_podiumMetricdisplaced-entrant reinsert,_sortPodiumtie-break; Forge tests + docs/skills only (no indexer/frontend/runtime changes in diff).Outcome:
FINDINGS: 1medium+Findings (inline)
activePoolsbalance → WarBow epoch finalized with no payout; earlier category captures full vaultTimeArena.solL839Prior threads — disposition on this SHA
_updateTopThreeL393)bb5497devia displaced-entrant reinsert (_podiumMetric+ recursive_updateTopThree); covered bytest_warbow_top_three_reinserts_displaced_entrantbb5497de; see fresh inline aboveSecurity review: 1 high finding remains on this diff.
added 1 commit
840b5bfc- fix(arena): ledger per-category pool balances for commingled vaultsCompare with previous version
Security fixes —
840b5bfcactivePoolsbalance drains full vault on first roll; WarBow epoch finalized with zero DOUB payoutPodiumVaultstracks per-category active/seed/future ledger balances when pools are commingled (address(this)).TimeArenacredits tranches on buy/top-up routing;_rollPodiumEpochpays fromactivePoolBalance(category)instead ofdoub.balanceOf(activePools(cat)). Regression:test_autoroll_multi_expired_pays_each_category_tranche._updateTopThree)bb5497de(displaced-entrant reinsert); unchanged in this commit.Tests:
forge test --match-contract TimeArena— 105 passed.All low+ findings addressed on this branch.
changed the description
Security review — MR !463
Commit reviewed:
840b5bfc86c74ffcc0d330e227dd2fcdfd348ec7Scope:
TimeArena.solalways-live autoroll (_requireLiveAndAutoroll,_autorollExpiredPodiums,_rollPodiumEpoch), on-chain WarBow 4∶2∶1 settlement,_updateTopThreedisplaced-entrant reinsert,_sortPodiumtie-break;PodiumVaults.solper-category commingled-vault ledger (creditTranche,activePoolBalance, ledger-awarepayPodiumWinners/rollEpochTranches); Forge tests + docs/skills only (no indexer/frontend/runtime changes in diff).Outcome:
FINDINGS: 0medium+Verification on this SHA
test_autoroll_multi_expired_pays_each_category_tranchetest_warbow_top_three_reinserts_displaced_entrant,test_warbow_ranking_matches_brute_forcetest_warbow_roll_auto_pays_onchain_winners,test_autoroll_no_double_payout_same_txwarbowEpochFinalized; no double-settle same txcreditTranchecall sites paired withsafeTransferin_routeDoubPrizeSplit/_routeActiveAndSeedVaults;payPodiumWinnersdebits ledger beforedoub.transfernonReentrantbuy/WarBow entrypointsPrior threads — disposition on this SHA
_updateTopThree)bb5497de; verified on this SHAactivePoolsbalance drains full vault / WarBow zero-payout finalize lockout840b5bfcvia per-category ledger settlement; verified on this SHANot reported
finalizeWarbowPodium(intentional #312).rollPodiumEpochcallable whilepaused(pre-existing; unchanged auth surface).Security review: no medium+ findings on this diff.
added 22 commits
maina80b465b- Merge main into issue-312-autoroll-warbow-finalizeCompare with previous version
Resolved merge conflicts with
main:TimeArena.sol: Combined #316 batched vaultsafeTransferwith #312 per-tranchecreditTrancheledger updates in_routeDoubPrizeSplit/_routeActiveAndSeedVaults.invariants-and-business-logic.md: Kept #312 autoroll/WarBow ranking rows and merged in #316 pause/revert/routing invariants.TimeArenaWarbowBenchmark.t.solfor removedAdminSellVault; alignedtest_finalize_warbow_podium_reverts_*with supersededfinalizeWarbowPodium.Sanity:
forge test --match-contract "TimeArena|TimeArenaWarbowBenchmark"— 126 passed.changed the description
Stale Security Review comment
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issues.
Reviewed by Cursor Bugbot for commit
a80b465b34. Configure here.WarBow podium stale after drain
High Severity
WarBow steals and revenges reduce a victim’s live battle points but only refresh the attacker in
_updateTopThree. Existing podium slots keep peak stored scores because_updateTopThreenever lowers an entrant’s cached value._rollPodiumEpoch/ autoroll pays 4∶2∶1 from that stale top-3, so DOUB can go to the wrong wallets after PvP drains.Additional Locations (2)
contracts/src/arena/TimeArena.sol#L915-L922contracts/src/arena/TimeArena.sol#L377-L393Reviewed by Cursor Bugbot for commit
a80b465b34. Configure here.Router blocks post-deadline buys
Medium Severity
TimeArenanow allows buys after the Last Buy deadline via_requireLiveAndAutoroll, butTimeArenaBuyRouter.buyViaKumbayastill reverts whenblock.timestamp > ta.deadline(). ETH/USDM/CL8Y single-tx entry stays dead after timer expiry while direct DOUBbuystill works.Reviewed by Cursor Bugbot for commit
a80b465b34. Configure here.added 1 commit
b01baa52- fix(arena): sync WarBow podium on drain and allow router post-deadline buysCompare with previous version
changed the description
Security review — MR !463
Commit reviewed:
b01baa52c6e7af7945906746ef5f2804dbd50159Scope:
TimeArena.solalways-live autoroll (_requireLiveAndAutoroll,_autorollExpiredPodiums,_rollPodiumEpoch), on-chain WarBow 4∶2∶1 settlement,_updateTopThree/_podiumMetricdisplaced-entrant reinsert + BP-drain podium sync,_sortPodiumtie-break;PodiumVaults.solper-category commingled-vault ledger (creditTranche, ledger-awarepayPodiumWinners/rollEpochTranches);TimeArenaBuyRouter.solpost-deadline gate removal; Forge tests + docs/skills only (no indexer/frontend/runtime changes in diff).Outcome:
FINDINGS: 0medium+Verification on this SHA
test_autoroll_multi_expired_pays_each_category_tranchetest_warbow_top_three_reinserts_displaced_entrant,test_warbow_ranking_matches_brute_forceb01baa52victim/stealer_updateTopThree+ allow score decrease on existing entranttest_warbow_roll_auto_pays_onchain_winners,test_autoroll_no_double_payout_same_txcreditTranchepaired with batchedsafeTransfer;payPodiumWinnersdebits ledger beforedoub.transfernonReentrantbuy/WarBow entrypointsPrior threads — disposition on this SHA
_updateTopThree)bb5497deactivePoolsbalance drains full vault / WarBow zero-payout finalize lockout840b5bfcb01baa52(victim/stealer podium refresh + score decrease)Not reported
finalizeWarbowPodium(intentional #312).TimeArenaBuyRouterpost-deadline alignment (product consistency; not an authz bypass).rollPodiumEpochcallable whilepaused(pre-existing; unchanged auth surface).Security review: no medium+ findings on this diff.
mentioned in commit
a1e35f6915added 1 commit
a1e35f69- docs(arena): align WarBow autoroll cross-links for issue #312 verifyCompare with previous version
mentioned in issue #312
changed the description
Severity: High
Issue: When an existing podium entrant's score decreases (e.g. WarBow steal/revenge),
_updateTopThreeonly writes the lower value into their current slot and returns — it never promotes a higher-BP player who was previously below the top-3 cutoff.Impact: Autoroll /
rollPodiumEpochnow pays 4∶2∶1 from the on-chain podium snapshot. A sybil holding rank #3 can stay on the podium after being stolen down while a legitimate off-podium player with higher live BP is excluded, receiving ~1/7 of the category active pool.Attack path (reproduced on
a1e35f69):Sink:
podiumVaults.payPodiumWinners(category, winners[0], winners[1], winners[2], …)in_rollPodiumEpochreads the stalewinnersarray.Note: The prior displacement-on-insert thread is fixed by displaced-entrant reinsert at L933–936; this is a separate in-place decrease path.
Security review — MR !463
Commit reviewed:
a1e35f6915c8f2d1ace655232272ea740f6d9181Scope:
TimeArena.solalways-live autoroll, on-chain WarBow 4∶2∶1 settlement,PodiumVaultscommingled ledgers,_updateTopThreeranking/tie-break,TimeArenaBuyRouterphase gate, Forge tests + docs/skills.Outcome:
FINDINGS: 1medium+Findings (inline)
TimeArena.solL922_updateTopThreereinserts displaced entrants on insert (L933–936), but when an existing slot holder's score drops (steal/revenge), it only updates that slot and returns (L921–924). Off-podium players with higher live metrics are never promoted. With on-chain autoroll payout, a sybil can retain a podium slot after being stolen below a legitimate challenger and collect ~1/7 of the active pool. Reproduced on this SHA (Charlie 450 BP remains #3 while Eve 500 BP is off-podium).Prior threads re-checked
a1e35f69PodiumVaultsledgers +test_autoroll_multi_expired_pays_each_category_tranchetest_warbow_top_three_reinserts_displaced_entrantadded 1 commit
297e79aa- fix(arena): recompute WarBow podium after BP drain promotes challengersCompare with previous version
Security fixes —
297e79aavalue < oldValin_updateTopThree), call_recomputeWarbowPodium()over_warbowBpHolders(populated in_addBattlePoints, cleared on epoch roll). Forge:test_warbow_podium_promotes_challenger_after_bp_decrease.840b5bfc— per-categoryPodiumVaultsledgers.bb5497de— displaced-entrant reinsert.b01baa52— victim/stealer podium refresh; this commit closes the remaining off-podium promotion gap.b01baa52—TimeArenaBuyRouterdeadline gate removed.Verification:
cd contracts && forge test --match-contract TimeArena— 127 tests PASS on this SHA.changed the description
Security review — MR !463
Commit reviewed:
297e79aa12f6a16be7f968db4907638465e6513eScope:
TimeArena.solalways-live autoroll (_requireLiveAndAutoroll,_autorollExpiredPodiums, on-chain WarBow 4∶2∶1 payout), WarBow incremental ranking (_updateTopThree,_recomputeWarbowPodium,_warbowBpHolders),PodiumVaults.solper-category commingled ledgers (creditTranche,activePoolBalance),TimeArenaBuyRouter.solpost-deadline phase gate removal, Forge tests + docs/skills.Outcome:
FINDINGS: 0medium+ — Security review: no medium+ findings on this diff.Prior threads re-checked (not re-reported)
_updateTopThree)bb5497de/297e79aa: displaced-entrant re-insert +_recomputeWarbowPodium()on in-place BP drain. Regression tests pass:test_warbow_top_three_reinserts_displaced_entrant,test_warbow_podium_promotes_challenger_after_bp_decrease._activeLedger/creditTrancheaccounting (840b5bfc). Regression:test_autoroll_multi_expired_pays_each_category_tranche.297e79aa: victim/stealer_updateTopThreerefresh + full recompute when cached value drops. Covered bytest_warbow_podium_promotes_challenger_after_bp_decrease.Areas reviewed (no medium+ issues)
_rollPodiumEpochpays fromactivePoolBalance(category); ledger underflow guard inpayPodiumWinners; autoroll cannot double-pay same epoch (test_autoroll_no_double_payout_same_tx).creditTranche/payPodiumWinners/ tranche rolls remain arena-only;finalizeWarbowPodiumhard-reverts (superseded by design).nonReentrant; autoroll payout transfers cannot re-enter guarded paths.Verification run
forge test --match-contract TimeArena— 104 passed; targeted security regressions above — all PASS.No inline threads opened (zero current medium+ findings).
block:securitynot applied.Requires gas optimization. WarBow is expected to have 100s to thousands of participants. Make sure to test gas on large boards & use a more optimized solution.
added 1 commit
f59e284d- fix(arena): O(1) WarBow ranking merge replaces full-holder recomputeCompare with previous version
resolved all threads
Fix bugfix —
f59e284d_updateTopThree)bb5497de; preserved via O(1) off-podium merge inf59e284d. Regression:test_warbow_top_three_reinserts_displaced_entrantPASS840b5bfc(per-categoryPodiumVaultsledgers). Regression:test_autoroll_multi_expired_pays_each_category_tranchePASSb01baa52+ off-podium merge inf59e284df59e284d: track off-podium top-3 + merge ≤6 candidates instead of_recomputeWarbowPodium()O(n) scan. Regression:test_warbow_podium_promotes_challenger_after_bp_decreasePASSb01baa52(TimeArenaBuyRouterdeadline gate removed)f59e284dremoves_warbowBpHolderslinear recompute; steal at 10k seeded state 245,841 gas (test_benchmark_warbow_steal_10k_player_ranking)Verification:
cd contracts && forge test --match-contract TimeArena— 128 tests PASS (incl. new steal benchmark).All listed threads resolved.
changed the description
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit
f59e284db0. Configure here.Off-podium evicts without reinsert
High Severity
In
_updateOffWarbowPodium, a new entrant overwrites an off-podium slot without re-evaluating the displaced address, unlike_updateTopThreefor other categories._mergeWarbowGlobalPodiumonly merges up to six tracked addresses, so a displaced player with live BP can disappear from the snapshot and autoroll may pay the wrong WarBow top-3.Additional Locations (1)
contracts/src/arena/TimeArena.sol#L985-L1053Reviewed by Cursor Bugbot for commit
f59e284db0. Configure here.Equal BP skips off-podium slot
High Severity
_updateOffWarbowPodiumonly inserts whenvalueis strictly greater than an off-podium value, so equal BP does not compete using the lower-address tie-break used elsewhere. A tied challenger with better tie-break can fail to enter_warbowOffPodium, never reach the merge set, and lose a podium slot autoroll should award.Reviewed by Cursor Bugbot for commit
f59e284db0. Configure here.Severity: High
Issue:
_updateOffWarbowPodiumonly inserts whenvalue > o.values[r](strict). When the off-podium top-3 is full and a challenger ties an existing off-podium BP, the challenger is never added to the ≤6-address merge set._mergeWarbowGlobalPodiumcannot promote them, even when the tie-break rule (lower address wins — same as_sortPodium) would rank them above an incumbent global third-place holder.Impact: Autoroll /
rollPodiumEpoch(CAT_WARBOW)pays 4∶2∶1 from a stale_podiums[CAT_WARBOW]snapshot. A sybil can occupy global #3 plus three equal-BP off-podium slots; a legitimate challenger with the same BP and a better tie-break is dropped from tracking and loses ~1/7 of the WarBow active pool.Attack path (reproduced on
f59e284d):0x300), D/E/F each make one level-4 buy (shared 500 BP).0x100) buys once → 500 BP, better tie-break than Carol, but50 > 50fails for every off slot → Greg is untracked.Sink:
_rollPodiumEpoch→podiumVaults.payPodiumWinners(category, winners[0], winners[1], winners[2], …)reads the flawedwinnerssnapshot.Fix hint: Mirror
_sortPodiumtie-break on insert (value > o.values[r] || (value == o.values[r] && uint160(entrant) < uint160(o.winners[r]))), and/or reinsert displaced off-podium entrants the way_updateTopThreedoes for other categories.Security review — MR !463
Commit reviewed:
f59e284db0c9905096ff1eb5d896369341df179aScope:
TimeArena.solalways-live autoroll (_requireLiveAndAutoroll,_autorollExpiredPodiums,_rollPodiumEpoch), O(1) WarBow ranking (_updateWarbowRanking,_warbowOffPodium,_mergeWarbowGlobalPodium), on-chain WarBow 4∶2∶1 settlement;PodiumVaults.solper-category commingled-vault ledgers (creditTranche,activePoolBalance);TimeArenaBuyRouter.solpost-deadline buy path; Forge tests + docs/skills.Outcome:
FINDINGS: 1medium+Findings (inline)
TimeArena.solL973_updateOffWarbowPodiumuses strictvalue > o.values[r]. When off-podium is full at the same BP, a challenger with a better tie-break (lower address, per_sortPodium) never enters the ≤6-address merge set; global #3 can stay a worse-address sybil. Reproduced locally on this SHA (Carol0x300keeps third at 500 BP while Greg0x100at 500 BP is untracked).Prior threads — disposition on this SHA
_updateTopThree/ displacement)bb5497de+_updateWarbowRankingmerge (f59e284d);test_warbow_top_three_reinserts_displaced_entrantPASS840b5bfc(per-category ledgers);test_autoroll_multi_expired_pays_each_category_tranchePASSf59e284doff-podium merge;test_warbow_podium_promotes_challenger_after_bp_decreasePASS2fe5181) — autoroll order / sharedbalanceOf840b5bfc)Acceptable tradeoff for gas efficiency.
Acceptable tradeoff for gas efficiency
Must document 6 tracking tradeoff, gas efficiency for slightly less accurate podium standings. Verify that if a user is NOT on the podium and has higger BP than podium, it will at least put them in podium when they buy.
added 1 commit
0e789579- fix(arena): WarBow off-podium equal-BP tie-break on insertCompare with previous version
resolved all threads
Fix bugfix —
0e789579_updateOffWarbowPodiumstrictvalue >skips equal-BP tie-break challenger (Greg vs Carol)_sortPodium:value > slot || (value == slot && lower address). Regression:test_warbow_off_podium_tie_break_promotes_to_globalPASSINV-TIME-ARENA-WARBOW-RANK-312updated;arena-v2.mdcross-link. Regression:test_warbow_higher_bp_buy_enters_podiumPASSVerification:
cd contracts && forge test --match-contract TimeArena— 130 tests PASS.changed the description
Security review — MR !463
Commit reviewed:
0e7895790ca39b32cb844ad0f1a52d71ab476c22Scope:
TimeArena.solalways-live autoroll (_requireLiveAndAutoroll,_autorollExpiredPodiums,_rollPodiumEpoch), on-chain WarBow 4∶2∶1 settlement (_updateWarbowRanking,_warbowOffPodium,_mergeWarbowGlobalPodium,finalizeWarbowPodiumsuperseded);PodiumVaults.solper-category commingled-vault ledgers (creditTranche, ledger-awarepayPodiumWinners/activePoolBalance);TimeArenaBuyRouter.solpost-deadline buy path; Forge tests + docs/skills.Outcome:
FINDINGS: 0medium+Security review: no medium+ findings on this diff at
0e789579.Inline threads
None on this pass (no new medium+ issues).
Prior threads — disposition on
0e789579_updateTopThree)bb5497de+_updateWarbowRankingmerge);test_warbow_top_three_reinserts_displaced_entrantPASS840b5bfcper-category ledgers);test_autoroll_multi_expired_pays_each_category_tranchePASSf59e284doff-podium merge);test_warbow_podium_promotes_challenger_after_bp_decreasePASS0e789579);test_warbow_off_podium_tie_break_promotes_to_globalPASSVerification (this pass)
cd contracts && forge test --match-contract TimeArena— 130 PASStest_autoroll_multi_expired_pays_each_category_tranche,test_warbow_top_three_reinserts_displaced_entrant,test_warbow_podium_promotes_challenger_after_bp_decrease,test_warbow_off_podium_tie_break_promotes_to_global,test_warbow_higher_bp_buy_enters_podium,test_autoroll_no_double_payout_same_tx— PASSNotes (informational, below threshold)
rollPodiumEpochremains callable whilepaused(pre-existing; autoroll on buys/WarBow is correctly gated via_requireLive).creditTrancheaccounting assumes defaultaddress(this)pool wiring; external pool addresses would revert on buy routing (owner config).added 40 commits
main082d27f3- Merge branch 'main' into issue-312-autoroll-warbow-finalizeCompare with previous version
Resolved merge conflicts with
main(merge commit082d27f3).Conflicts resolved in:
contracts/PARAMETERS.md— combined #310 WarBow DOUB routing / streak-ambush BP with #312 autoroll on-chain top-3 payout docsdocs/testing/invariants-and-business-logic.md— kept #312 autoroll/ranking invariants alongside #310 DOUB routing and BP streak-ambush rowsskills/README.md—effectiveCharmPriceWad()from main + #312 WarBow autoroll skill blurbskills/play-active-time-arena/SKILL.md— #312 always-live autoroll step +/play surface from #320Sanity:
forge test --match-contract TimeArenaPASS after merge.changed the description
Security review — MR !463
Commit reviewed:
082d27f3a08929eca7e48c992cafd35dcf5827e9Scope: Merge commit re-validates #312 (
TimeArena.solalways-live autoroll, on-chain WarBow 4∶2∶1 settlement,_updateWarbowRanking/_warbowOffPodiummerge,finalizeWarbowPodiumsuperseded;PodiumVaults.solper-category commingled ledgers +creditTranche) plusmainmerge-ins (TimeArenaBuyRouter.solpost-deadline buys, #310 WarBow DOUB routing / streak-break BP). Forge security regressions +TimeArenasuite.Outcome:
FINDINGS: 0medium+Security review: no medium+ findings on this diff at
082d27f3.Inline threads
None on this pass (no new medium+ issues).
Prior threads — disposition on
082d27f3bb5497dedisplaced reinsert +_updateWarbowRanking);test_warbow_top_three_reinserts_displaced_entrantPASS840b5bfcper-category ledgers);test_autoroll_multi_expired_pays_each_category_tranchePASSf59e284doff-podium merge);test_warbow_podium_promotes_challenger_after_bp_decreasePASS0e789579);test_warbow_off_podium_tie_break_promotes_to_globalPASSbalanceOfVerification (this pass)
forge test --match-contract TimeArena— PASStest_autoroll_multi_expired_pays_each_category_tranche,test_warbow_top_three_reinserts_displaced_entrant,test_warbow_podium_promotes_challenger_after_bp_decrease,test_warbow_off_podium_tie_break_promotes_to_global,test_warbow_higher_bp_buy_enters_podium,test_autoroll_no_double_payout_same_tx,test_warbow_ranking_matches_brute_force— PASSNotes (informational, below threshold)
TimeArenaBuyRoutercorrectly drops the Last Buy deadline gate;buyFor→_requireLiveAndAutoroll()rolls before settlement._routeWarbowDoubSpenduses the same_routeDoubPrizeSplit+creditTranchepath as buys; no stranded-DOUB or cross-category ledger skew observed in tests.rollPodiumEpochremains callable whilepaused(pre-existing); user buys/WarBow paths stay gated via_requireLive.address(this)pool wiring.mentioned in commit
e84483343fmentioned in merge request !484