{"id":"XE-10235","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":730,"title":"Supply Conservation Accounting Discrepancy: termsFromChain omits BlockLeaseForceSettle breaking supply invariants on force-settled leases","area":"leasing-ledger","claimed_tier":null,"assessed_tier":null,"verdict":"invalid","duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"invalid","github_state":"","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-12T11:05:33.296321+00:00","updated_at":"2026-11-20T00:48:52.588343+00:00","source_created_at":null,"told_at":"2026-11-20T00:48:52.591105+00:00","status_changed_at":"2026-11-20T00:33:25.986006+00:00","url":"https://bounty.xe.network/XE-10235","body":"## Vulnerability Summary\n\nIn `core/supply.go:74-115`, `termsFromChain` parses all historical blocks across lattice account chains to tally macroeconomic token supply invariants (Genesis, Minted, Burned, EscrowBurned, and Emissions):\n\n```go\nfunc termsFromChain(blocks []*Block) *chainTerms {\n...\n\t\tswitch b.Type {\n\t\tcase BlockGenesis:\n\t\t\tc.genesis[b.Asset] += b.Balance\n\t\tcase BlockMint:\n\t\t\tc.minted[b.Asset] += b.Amount\n\t\tcase BlockBurn:\n\t\t\tc.burned[b.Asset] += b.Amount\n\t\tcase BlockLease:\n\t\t\tc.leaseCost[b.Hash] = b.Amount\n\t\tcase BlockLeaseAccept:\n\t\t\tc.acceptStake[b.Source] = b.Amount\n\t\tcase BlockLeaseSettle:\n\t\t\tc.settleEmission[b.Source] = b.Amount\n\t\tdefault:\n\t\t\t// other block types do not affect macro terms directly\n\t\t}\n\t}\n\treturn c\n}\n```\n\nNotice that `termsFromChain` accounts for `BlockLeaseSettle`, but completely omits `BlockLeaseForceSettle` (`core/ledger.go:1880-1990`).\n\nWhen a consumer force-settles a failed or non-responsive lease via `BlockLeaseForceSettle`:\n1. The burned portion of the lease escrow (consumed during uptime prior to the failure) is permanently burned from circulation.\n2. The remaining unused escrow balance is refunded to the consumer.\n3. The provider's locked stake is forfeited and slashed.\n\nBecause `termsFromChain` has no case for `BlockLeaseForceSettle`:\n1. `c.settleEmission` is never populated for force-settled leases.\n2. In `SupplyAuditor.walk()` (lines 240-252), the consumed escrow portion is never added to `AssetXUSD.EscrowBurned`.\n3. The supply conservation check (`a.Accounted == a.Created`) fails, reporting a permanent false-negative supply discrepancy (`rep.Conserved = false`).\n\n## Impact & Severity\n\n1. Supply Audit Desynchronization: `GET /supply` and automated consensus health monitors will perpetually report broken supply conservation invariants on any node once a lease is force-settled.\n2. Macro Monitoring Invalidation: False alarms mask genuine inflation or double-spend exploits because the supply auditor's conservation status is permanently corrupted.\n\n## Proposed Remediation\n\nIn `core/supply.go`, add handling for `BlockLeaseForceSettle` within `termsFromChain`:\n```go\n\t\tcase BlockLeaseSettle, BlockLeaseForceSettle:\n\t\t\tc.settleEmission[b.Source] = b.Amount\n```","patch_refs":[],"thread":[{"id":13367,"source":"desk","source_ref":"reply:11389","author":"XE desk","team":true,"body":"Thanks for the report. We read it against the code and could not confirm a bug in what it describes.\n\nThis report is closed as invalid. If we have missed something, file a new report that links\nhttps://bounty.xe.network/XE-10235 and says what; it is read like any other.","created_at":"2026-11-20T00:48:52.588343+00:00"}]}