Route buy prize remainder to Last Buy category #485
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!485
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/313-buy-prize-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
ArenaBuyRouting.splitBuyAmountsoamount % 4remainder wei routes to Last Buy (cat 0) instead of WarBow (cat 3).ArenaPrizeRouting.t.solunit/fuzz tests, including newtestFuzz_remainder_lands_on_cat0.PARAMETERS.md,arena-v2.md,time-arena.md, fee-routing, security, and invariants docs with the approved remainder rule (#313).Verification checklist
amount % 4wei routes to Last Buy vault/tranchetest_split_remainder_to_last_buy_and_t10_trancheasserts cat 0 share = 253 for amount 1003cd contracts && forge test --match-test testFuzz_remainder_lands_on_cat0cd contracts && forge test --match-contract ArenaPrizeRoutingcd contracts && forge test --match-test buy_routesamountexactlytestFuzz_splitBuy_no_dustin ArenaPrizeRoutingPARAMETERS.mdmatches codedocs/product/arena-v2.md,docs/product/time-arena.mdRelated issue: #313
changed the description
changed the description
Security review — MR !485
Commit reviewed:
f306d4d73939392e873232f37f9252aa0d7aeba7Scope:
ArenaBuyRouting.splitBuyAmountremainder bucket change (cat 3 → cat 0), associated Forge fuzz/unit tests, and documentation/invariant updates (#313).Method: Diff review; traced
splitBuyAmountthroughTimeArena._routeDoubPrizeSplit(sole on-chain caller); verified fund conservation fuzz (testFuzz_splitBuy_no_dust,testFuzz_remainder_lands_on_cat0); confirmed no indexer/frontend mirrors of category-remainder math; checked for reentrancy, access-control, overflow, and economic manipulation surfaces on the changed path.Outcome:
FINDINGS: 0medium+Security review: no medium+ findings on this diff.
Inline threads: none (no findings to anchor).
Notes:
amount % 4remainder wei moves from WarBow (cat 3) to Last Buy (cat 0).splitPrizeTopUpAmountand tranche 70/20/10 math are unchanged.amount;_pullDoubExactERC20 parity andnonReentrantbuy guards are unchanged; remainder magnitude is bounded 0–3 wei per buy (not a meaningful theft or griefing vector).added 100 commits
main24dca3ef- Merge branch 'main' into fix/313-buy-prize-remainder-last-buyCompare with previous version
Resolved merge conflicts with
main(merge commit24dca3ef).Conflicts (6 docs):
PARAMETERS.md,fee-routing-and-governance.md,security-and-threat-model.md,arena-v2.md,time-arena.md,invariants-and-business-logic.md— keptmainwording (issue #313 links, #314 AdminSellVault removal,testFuzz_split_remainder_on_cat0test name).Cleanup: dropped duplicate
testFuzz_remainder_lands_on_cat0fromArenaPrizeRouting.t.sol(identical totestFuzz_split_remainder_on_cat0onmain).Sanity:
forge test --match-contract ArenaPrizeRouting— 7/7 PASS.changed the description
Security review — MR !485
Commit reviewed:
24dca3ef0b06cf7a028fb83bf435282a4e6f722aScope:
ArenaBuyRouting.splitBuyAmountremainder-bucket change (category 3 → category 0 / Last Buy) in commitf306d4d7, merge-resolution withmainat24dca3ef, associated Forge fuzz/unit tests, and documentation/invariant updates (#313). Current MR diff vs base is limited to an e2e build stamp; substantive on-chain change reviewed from MR history andorigin/mainparity.Method: Diff and commit-history review; traced
splitBuyAmountthroughTimeArena._routeDoubPrizeSplit(sole on-chain caller); verified fund-conservation fuzz (testFuzz_splitBuy_no_dust,testFuzz_split_remainder_on_cat0); confirmedbuy/buyWithCrednonReentrantguards and_pullDoubExactERC20 parity unchanged; checked indexer/frontend for off-chain mirrors of category-remainder math (none).Outcome:
FINDINGS: 0medium+Security review: no medium+ findings on this diff.
Inline threads: none (no findings to anchor).
Notes:
amount % 4remainder wei (0–3 per buy) moves from WarBow (cat 3) to Last Buy (cat 0).splitPrizeTopUpAmountand 70/20/10 tranche math are unchanged; total routed DOUB still equalsamountexactly.buyflows; remainder magnitude is not a meaningful theft, griefing, or MEV extraction vector.f306d4d7): still no medium+ findings — re-verified on24dca3ef.mentioned in commit
2f6522d04b