feat(arena): epoch DOUB/CHARM anchor + 10%/day growth (#305) #453
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!453
Loading…
Reference in a new issue
No description provided.
Delete branch "local1/305-impl-epoch-charm-price"
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 #305 — Last Buy epoch–scoped DOUB/CHARM pricing:
effectiveCharmPriceWad()grows epoch anchor at ~10%/day; hard-reset buy re-samples TWAP/Anvil spot before DOUB pull; emitsLastBuyEpochCharmAnchored; CRED path unchangedGET /v1/arena/last-buy-epoch-pricingINV-TIME-ARENA-EPOCH-CHARM-GROWTH,INV-TIME-ARENA-CRED-FLAT, product/skill crosslinksTest plan
cd contracts && forge test --match-contract TimeArenaEpochCharmPricecd contracts && forge test --match-contract TimeArenaTestcd indexer && cargo clippy --all-targets -- -D warnings && cargo testcd frontend && npm run typecheck && npm test -- --run src/pages/arena/arenaV2SaleSessionBridge.test.ts src/lib/timeArenaBuySubmitSizing.test.tsbash scripts/verify-podium-live-anvil.sh— timerscharm_price_wad= effectivecast call effectiveCharmPriceWad≈ anchor × 1.1mentioned in issue #305
changed the description
changed the description
Cursor Bugbot has reviewed your changes 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
fc4fc99173. Configure here.Fee-stable oracle uses wrong token
Low Severity
In
deployBuyRouterFixtureFeeStable, the charm anchor spot usesfeeStablebutsetCharmAnchorOraclestores unsetusdm(zero). Any hard-reset re-anchor on that fixture would call spot pricing with a zero USD leg instead offeeStable.Reviewed by Cursor Bugbot for commit
fc4fc99173. Configure here.Router hard-reset price mismatch
High Severity
buyViaKumbayasizes the Kumbaya swap fromeffectiveCharmPriceWad()before the arena runs_prepareBuyBeforeTimer()on hard-reset buys. Re-anchoring insidebuyForcan change the DOUB owed versusgrossDoub, so pulls can revert or users overpay while surplus goes to the router recipient.Additional Locations (1)
contracts/src/arena/TimeArena.sol#L530-L533Reviewed by Cursor Bugbot for commit
fc4fc99173. Configure here.changed this line in version 2 of the diff
changed this line in version 2 of the diff
added 1 commit
8118e98d- fix: align router hard-reset quoting and fee-stable oracle (#305)Compare with previous version
changed the description
resolved all threads
mentioned in commit
168d8de150