<!-- XE-12725 · TopUpPendingAmount cast to int64 can wrap negative above MaxInt64, decreasing escrow · testnet -->
*Markdown view of <https://bounty.xe.network/XE-12725>. The page is the record; this is the same page for reading.*

XE-12725 · Bounty

# TopUpPendingAmount cast to int64 can wrap negative above MaxInt64, decreasing escrow

Closed · duplicate
—claimed Minor
web
filed 2026-11-14 10:08 UTC
by xe:a507b0bb

Verdict
:   Duplicate

Tier
:   —

Claimed
:   Minor

Area
:   Leasing / ledger

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-20 19:45 UTC

Told
:   2026-11-20 19:45 UTC

### Patches

None linked.

### History

- [626410](https://bounty.xe.network/log/626410) 2026-11-20 19:45 UTC proposal.adopted
- [626409](https://bounty.xe.network/log/626409) 2026-11-20 19:45 UTC reply.sent
- [626408](https://bounty.xe.network/log/626408) 2026-11-20 19:45 UTC ticket.status new → closed
- [622758](https://bounty.xe.network/log/622758) 2026-11-20 19:45 UTC proposal.adopted
- [622756](https://bounty.xe.network/log/622756) 2026-11-20 19:45 UTC proposal.adopted
- [622755](https://bounty.xe.network/log/622755) 2026-11-20 19:45 UTC ticket.facts
- [622753](https://bounty.xe.network/log/622753) 2026-11-20 19:45 UTC proposal.adopted
- [622752](https://bounty.xe.network/log/622752) 2026-11-20 19:45 UTC ticket.facts
- [612244](https://bounty.xe.network/log/612244) 2026-11-20 15:25 UTC note.added
- [612243](https://bounty.xe.network/log/612243) 2026-11-20 15:25 UTC proposal.created
- [612242](https://bounty.xe.network/log/612242) 2026-11-20 15:25 UTC proposal.created
- [612241](https://bounty.xe.network/log/612241) 2026-11-20 15:25 UTC proposal.created

[Full history](https://bounty.xe.network/log?ref=XE-12725) · [JSON](https://bounty.xe.network/v1/tickets/XE-12725) · [markdown](https://bounty.xe.network/XE-12725.md)

### Report

Ringkasan:
store/badger\_store.go:867 melakukan cast TopUpPendingAmount ke int64

### Thread

**xe:a507b0bb**2026-11-14 10:13 UTCweb

Klarifikasi terhadap XE-9350 dan XE-9026: laporan ini bukan tentang overflow yang sama. XE-9350 membahas LeaseArchiveGap\=MaxInt64 (archive check), XE-9026 membahas LeaseForceSettleGap (force-settle eligibility). Temuan ini spesifik pada store/badger\_store.go:867 yang me-cast TopUpPendingAmount (lebar) ke int64 tanpa guard, sehingga nilai di atas MaxInt64 membungkus menjadi negatif dan mengurangi escrow; mem\_store.go:338-347 juga tanpa guard overflow. Ini adalah cacat konversi tipe pada lapisan penyimpanan (store), bukan pada logika gap konfigurasi. Perbedaan lokasi (store vs config gap) dan mekanisme (int64 cast wrap vs eligibleAt wrap) menjadikannya temuan terpisah.

**Joseph Denne**team2026-11-20 19:45 UTCdesk

Thanks. This is the same finding as an earlier report that is not public, which was filed first; the programme pays the
first verifiable submission, so this one closes as a duplicate. If you believe it is a different
bug, file a new report that links https://bounty.xe.network/XE-12725 and says what differs; it is read like any other.
