Indexer zeros claimable_cred after CredClaimed despite residual pendingCred (migrateLastBuyEpochToPodium) #368
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#368
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?
Summary
Wallet
0xA5F424182E8E94c328EC6441ebf508e1cb48f8bAcannot claim CRED for ended Last Buy epoch 0 via the play UI whilelastBuyEpoch == 1.Evidence (MegaETH 4326 · indexer.yieldomega.com)
pendingCred(wallet, 0)≈ 2828.69 CRED (weight + first-buy bonus still set).eth_call claimCred(0)from the wallet succeeds.GET /v1/arena/wallet/.../statsreturnsclaimable_cred_epoch: "0"butclaimable_cred: "0"because anyidx_play_cred_claimrow for epoch 0 forced pending to zero.0x27f8c3c92ceb5bce5d63520b39e78ed7a5ece4e74d571fecfe9d2b3acba05368(epoch 0, ~1865 CRED) beforemigrateLastBuyEpochToPodium(tx0x75b885888ce062bb824ca851d572736d433210ad544e918b8ddf8ad1676f4162, alignedlastBuyEpoch13→0 and consolidated drift balances into epoch 0, including this wallet).Root cause
arena_wallet_statstreated “claimed once” as “nothing left”, and SQL buy reconstruction cannot see remappedepochCharmWad/epochFixedCredBonusafter migration. Frontend Claim CRED is gated on indexerclaimable_cred > 0(INV-FRONTEND-301indexer-first).Fix
Prefer live
TimeArena.pendingCredforclaimable_cred/pending_cred_accrual(schema ≥ 2.26.0).INV-INDEXER-CRED-PENDING-ONCHAIN.Workaround (until indexer redeploy)
Call
claimCred(0)on TimeArena0xba39cea0e5ef6808d8cb926c722877480049e0eedirectly (wallet already has residual pending).Verify
claimable_cred≈ on-chainpendingCred.cargo clippy --all-targets -- -D warnings·cargo testinindexer/.mentioned in commit
0c44894e14mentioned in merge request !539
mentioned in commit
54fdfac458