[High] SwapBlock unwinding a settled BlockLease refunds the full escrow while the XE settle emission stands (inflation, live on BadgerStore)
Report
Summary
When a fork wins a conflict whose loser is a settled lease's root BlockLease, SwapBlock unwinds the lease block -- restoring the consumer's balance and deleting the lease record -- while the XE settle emission minted by burning the escrow stays minted. Net: the escrow is back in circulation AND the emission still exists. Repeatable per lease. Reproduces identically on MemStore AND BadgerStore (the production store).
Relationship to XE-6375
XE-6375 ("SwapBlock unwinding a BlockLeaseRenew after settle...") was closed 2026-11-16 as a duplicate of an earlier non-public report. The team wrote: "If you believe it is a different bug, file a new report that links XE-6375 and says what differs; it is read like any other." This report links XE-6375 and states what differs:
- Different unwound block:
BlockLease(lease root) vsBlockLeaseRenew; different undo arm (buildBlockUndoBlockLease arm); noReducePendinginvolved at all. - Reproduces on BadgerStore (the production store). XE-6375's renewal variant FAILS on Badger (
addToPendingAmount: pending not found, the XE-5826 wedge); its own text calls the inflation "currently latent on production". This variant is LIVE on production. - Bigger blast radius: the ENTIRE lease record is deleted and the FULL escrow refunded with the FULL emission standing; XE-6375 refunds only one renewal segment.
Root Cause
planSwap(core/ledger.go:3316-3321) -- onlyBlockSendold blocks get cross-chain cascade planning (planCascade); aBlockLeaseold block is appended unchecked, with no settled-state guard.buildBlockUndoBlockLease arm (core/rollback.go:227-229) -- deletes pending escrow + lease record unconditionally (deletePendingID = b.Hash; deleteLeaseHash = b.Hash).confirmConflict(core/quorum.go:329) -- the production trigger viaswapBlockLocked.- The swap cascade only unwinds the loser's own chain. A settled lease's provider-side effects (accept, settle block, XE emission minted by burning the escrow) live on the provider's chain and are never touched.
Impact
Inflation: the escrow burned at settle returns to circulation while the XE emission stands. Precondition: the fork must win >=67% final-vote weight and the lease block must be unfinalized; deterministic once met.
Verification (executed PoC)
Lease 40,000 XCU, accept, settle at expiry -> 40,000 XE emission, escrow burned; then SwapBlock(consumer, leaseHash, forkSend). Identical on MemStore and BadgerStore:
- Before swap: provider XE=40,000, total XCU=1,060,000 (40k burned)
- After swap: consumer XCU=960,000, provider XE=40,000 (kept), total XCU=1,100,000, lease record=nil
- Net: the 40,000 XCU burned at settle is back in circulation AND the 40,000 XE emission still exists. Repeatable per lease. Audited at HEAD
8cc209d(testnet-0006).
Suggested fix
Refuse to unwind any lease-family block when the lease is Settled or its escrow pending is gone, or extend the cascade to unwind the provider chain's accept/settle and claw back the emission.
Thread
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-16714 and says what differs; it is read like any other.