Add missing Forge negative tests and TimeArena DRY/gas fixes (#316) #461
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!461
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-316-forge-negative-tests-dry-gas"
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
GitLab #316 — gap follow-up from #309:
_requireLivemutators (buy,buyWithCred, WarBow steal/guard/revenge,claimWarBowFlag); WarBow revert matrix (steal band, daily cap, revenge expiry, flag holder/silence, double finalize, bad victim/epoch).ArenaCharmBoundslibrary shared byTimeArena,ArenaXp, andArenaCharmPriceTwap(sameTimeArena: charm boundsrevert string).PodiumVaultsmaps every pool slot toaddress(vaults), buy and top-up routing batch DOUB into onesafeTransferper call; per-tranche funding events and economics unchanged (#300).NonStandardERC20.t.solcovers buy, WarBow DOUB pulls, andtopUpPodiumPoolsparity (INV-ERC20-123).Acceptance checklist
cd contracts && forge test --match-test test_pause_blocks -vvArenaCharmBounds.sol+ existingtest_buy_reverts_charm_*/ fuzz charm tests_routeDoubPrizeSplit;test_buy_routes_doub_splitstill greenforge test(except knowndoub.csvfork skips)cd contracts && forge testDoubAirdropMegaethFork+ 1DevStackIntegrationsetUp fail withoutdoub.csv/ env — pre-existing)cd contracts && forge test --match-contract TimeArenaTest -vvcd contracts && forge test --match-contract NonStandardERC20Test -vvVerification for third parties
issue-316-forge-negative-tests-dry-gas.cd contracts && forge test --match-contract "TimeArenaTest|NonStandardERC20Test" -vv— all tests green.cd contracts && forge test— expect only known skips:DoubAirdropMegaethForkTest(missing gitignoredairdrop/doub.csv) andDevStackIntegrationTestsetUp (deploy env).docs/testing/invariants-and-business-logic.md§ TimeArena negative tests (#316).Related: #316
changed the description
changed the description
Security review — MR !461
Commit reviewed:
18a24e5101e012f9e6c5f388439624d54bf850d8Scope: Onchain changes in
ArenaCharmBounds.sol,TimeArena.sol(_routeDoubPrizeSplit/_routeActiveAndSeedVaultsbatch routing), constant re-exports inArenaXp.solandArenaCharmPriceTwap.sol; new Forge tests (TimeArena.t.sol,NonStandardERC20.t.sol); docs/skills only elsewhere.Method: Diff review with sink tracing on batched DOUB routing (attacker-controlled buy/top-up amounts →
_pullDoubExact→safeTransfer/notifyPodiumEpochFunded). Prior MR notes checked — no prior security-review threads to re-report.Outcome: FINDINGS: 0 (no medium, high, or critical issues on this diff).
Inline threads: None (no qualifying findings).
Notes (informational, below reporting threshold)
PodiumVaultspool slot resolves toaddress(podiumVaults)(default deploy layout). OnesafeTransferreplaces N transfers to the same recipient; per-tranchePodiumEpochFunded/PodiumFunded/SeedFundedemissions and split math are unchanged.notify*handlers are emit-only andonly arena; buy/top-up remainnonReentrant. Indexer ingest usesPodiumEpochFunded(not ERC-20Transfercount).ArenaCharmBounds: Pure DRY of existing 0.99–10 CHARM envelope; no new external surface.Security review: no medium+ findings on this diff.
mentioned in commit
adb400d006mentioned in issue #316