Wire WarBow ambush/streak-break BP and route WarBow DOUB like buys #310
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#310
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
contracts/src/arena/TimeArena.soldeclaresWARBOW_AMBUSH_BONUS_BP(200) andWARBOW_STREAK_BREAK_MULT_BP(100) at L52–53 but_applyBuyWarBowBp(L719–725) only applies base, hard-reset, and clutch bonuses.warbowSteal,warbowRevenge,warbowActivateGuard) pull DOUB via_pullDoubExactonly; DOUB accumulates onTimeArenawith no_routeDoubPrizeSplit/ vault transfer. Tests assert stranded balance (TimeArena.t.solsteal/guard/revenge tests).buyroutes 100% DOUB to podium vaults and incrementstotalDoubRaised; WarBow spends do neither.simulations/timecurve_sim/model.pyimplements streak-break and ambush BP.Why needed
Approved gap items: unwired ambush/streak-break BP; WarBow DOUB stranded; WarBow DOUB not prize-funded. Economic parity requires WarBow DOUB to behave like buy DOUB for prize accounting and vault routing.
Constraints / guardrails
.cursor/skills/yieldomega-guardrails/SKILL.mdanddocs/product/arena-v2.md.AdminSellVault.contracts/PARAMETERS.mdwhen constants change.Relevant files
contracts/src/arena/TimeArena.sol—_applyBuyWarBowBp, WarBow spend paths,_routeDoubPrizeSplitcontracts/src/arena/libraries/ArenaBuyRouting.solcontracts/test/TimeArena.t.solsimulations/timecurve_sim/model.py,simulations/ecostrategy/warbow_pvp.pycontracts/PARAMETERS.mdRecommended direction
active_streak × WARBOW_STREAK_BREAK_MULT_BP) and ambush (+WARBOW_AMBUSH_BONUS_BPon hard reset + streak break) in_applyBuyWarBowBp, ordering BP after_processDefendedStreakconsistent with sim.buy(incrementtotalDoubRaised, vault transfers).Acceptance criteria
totalDoubRaisedand lands in podium vaults like normal buys.TimeArenaafter WarBow actions (beyond rounding dust).PARAMETERS.mdand any progression docs updated.Test plan
cd contracts && forge test --match-contract TimeArena(WarBow BP + routing cases).cd contracts && forge testfull suite (skipdoub.csvfork tests if absent).bash scripts/verify-podium-live-anvil.shif routing touches deploy/indexer path.Attack / abuse test plan
nonReentrant; confirm no double-route on callback tokens.Verification criteria
mentioned in issue #309
mentioned in merge request !465
mentioned in commit
daf39b3099mentioned in commit
28fbbba370Verification report — #310 (loop 1/5)
Verdict: FAIL — acceptance criteria are not met on
main. Implementation gap matches the issue body’s “Current codebase” section; no MR opened (no repo changes).Acceptance criteria
_applyBuyWarBowBp(TimeArena.solL719–725) applies onlyWARBOW_BASE_BUY_BP, timer-reset, and clutch — constantsWARBOW_STREAK_BREAK_MULT_BP/WARBOW_AMBUSH_BONUS_BPare declared (L52–53) but unused. No Forge tests assert ambush/streak-break BP. Sim reference:simulations/timecurve_sim/model.py::warbow_buy_bp_delta.totalDoubRaised+ routes to podium vaults likebuywarbowSteal/warbowRevenge/warbowActivateGuardcall_pullDoubExactonly (L429–474); no_routeDoubPrizeSplitortotalDoubRaised +=. Existing tests assert DOUB stranded onTimeArena(test_warbow_steal_pulls_doub,test_warbow_guard_pulls_doub,test_warbow_revenge_pulls_doub).TimeArenaafter WarBow actionsdoub.balanceOf(address(arena))to increase by pulled amounts (1000 / 10000 / 51000 DOUB).PARAMETERS.md+ progression docs updatedPARAMETERS.mdL74–75 documents streak-break/ambush constants, but L77 still claims WarBow steal/revenge/guard spends are “routed likebuy” — not true in code. No#310-specific invariant or Forge cases.Test plan (issue body)
cd contracts && forge test --match-contract TimeArenacd contracts && forge testDoubAirdropMegaethForktests SKIP/FAIL (missingairdrop/doub.csv, expected)bash scripts/verify-podium-live-anvil.sh/v1/statusunavailable during first-run compile; out of scope for #310 until WarBow DOUB routing lands (indexer only ingests buy-sourcedPodiumEpochFundedtoday)Verification criteria (issue body)
test_warbow_bp_bonus_uses_last_buy_hard_reset_not_warbow_timeronly checks reset bonus absencebuytest_buy_routes_doub_split,test_buy_routes_epoch_tranches_worked_examplepassAttack / abuse plan
nonReentrantwarbowSteal,warbowRevenge,warbowActivateGuard,claimWarBowFlagallnonReentranttest_feeOnTransfer_buy_reverts_erc20ParitycoversbuyonlyImplementation notes for follow-up
_applyBuyWarBowBpbefore_processDefendedStreakmutates_dsLastUnderWindowBuyer/activeDefendedStreak(sim order inwarbow_buy_bp_delta)._pullDoubExactin WarBow spend paths, call_routeDoubPrizeSplit(spent)andtotalDoubRaised += spent; flip existing #252 tests from stranded-balance assertions to vault/totalDoubRaisedparity.activeStreak × 100BP).PARAMETERS.mdL77 and addINV-TIME-ARENA-WARBOW-PRIZE-ROUTING(or extendINV-TIME-ARENA-WARBOW-DOUB) in invariants.Issue left open — requires implementation MR before re-verify.
mentioned in issue #308
mentioned in commit
0bc2582912mentioned in commit
bc74435db9mentioned in merge request !466
mentioned in commit
6dda90975bmentioned in merge request !479
mentioned in commit
082d27f3a0mentioned in merge request !463
mentioned in issue #366
mentioned in issue #367