Route buy prize remainder to Last Buy category (#313) #458
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!458
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-313-buy-remainder-last-buy"
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
Routes the cross-category buy prize remainder (
amount % 4wei) to Last Buy (category 0) instead of WarBow (category 3), per approved economics from #309. Tied to #313.ArenaBuyRouting.splitBuyAmount: remainder assignment moved fromi == 3toi == 0.PARAMETERS.md, product specs, onchain routing docs, invariants, andskills/play-time-arena-doub/SKILL.mdnow document Last Buy remainder rule.100% podium routing invariant (#300) unchanged — only the remainder bucket moves.
Acceptance checklist
amount % 4wei routes to Last Buy vault/tranchecd contracts && forge test --match-contract ArenaPrizeRouting -vv(test_split_remainder_to_last_buy_and_t10_tranche,testFuzz_epoch_split_per_category_bps)cd contracts && forge test --match-test buy_routes -vvPARAMETERS.md,docs/product/arena-v2.md,docs/product/time-arena.md,docs/onchain/fee-routing-and-governance.mdVerification for third parties
Confirm
contracts/src/arena/libraries/ArenaBuyRouting.solassignscatRemwheni == 0and docs cite Last Buy for category remainder.Related
changed the description
changed the description
Security review — MR !458
Commit reviewed:
d034ca7be7d74fdbfa64621544734c053b786617Scope:
ArenaBuyRouting.splitBuyAmountremainder bucket (cat 3 → cat 0), associated Forge tests, and documentation updates for #313.Method
splitBuyAmount→TimeArena._routeDoubPrizeSplit(unchanged transfer/notify loop).testFuzz_splitBuy_no_dust: Σ tranches ==amount) still holds; only the remainder recipient index changes.Outcome
FINDINGS: 0 medium+
No inline threads — nothing met the reporting bar.
Notes (informational, not findings)
amount % 4) moves from category 3 (WarBow) to category 0 (Last Buy). Callers cannot redirect remainder elsewhere; fuzz tests enforce exact allocation and zero dust.splitPrizeTopUpAmountuntouched.Security review: no medium+ findings on this diff.
mentioned in commit
729570edf4