Snapshot-weight-zero stall: a conflict becomes permanently unresolvable when >33% of snapshot weight drops to live weight 0, freezing the account
Report
Suggested tier: Medium
XE address (reward destination): 9b663fdac108be34a3b715ef78a9f9bd878af6ef8142f388c6514918e6852dd7
Summary
A conflict's weight snapshot is frozen at detection time and never re-snapshotted, while votes are gated on live weight. If representatives holding >33% of the frozen snapshot total drop to exactly 0 live weight before voting, the maximum achievable vote is <67% forever — the conflict can never reach quorum, and while it is unresolved Ledger.AddBlock rejects EVERY further block on that account, so the account is fully frozen, not just unfinalized. There is no in-protocol recovery path: sweepStaleConflicts only revotes / pulls votes / evicts phantoms; it never re-snapshots or expires a conflict.
Preconditions, stated honestly: this needs (a) a conflict on the victim's account (requires the victim's signature — an accidental double-sign by a buggy client, or a malicious account owner), AND (b) a rep (or coalition) holding >33% of snapshot weight moving ALL of its delegated stake to zero before voting. The stake move is reversible and the funds are not lost (they sit in the whale's other account), so the cost to the attacker is opportunity cost, not loss. This is NOT a whole-network stall — it freezes ONE account and its funds/leases. The team may reasonably downgrade to Low given these preconditions; the mechanism itself (live gate vs frozen denominator, no re-snapshot) is a real logic inconsistency, not a misreading.
Note the reverse asymmetry is by design (a rep with live weight 1 still votes at full snapshot weight), so this report is only about the zero-weight gate contradicting the frozen denominator.
Impact
Permanent single-account finality stall + frozen funds with no in-protocol recovery path. The whale can hold the victim account hostage and release it at will (re-funding restores the weight and the conflict finalizes — proven in the PoC). Hence Medium.
Steps to reproduce
Unit test against the real ledger code (github.com/xeprotocol/xe, testnet-0005, commit 89a542e):
git clone https://github.com/xeprotocol/xe
cd xe
cp trackb_quorum_test.go core/
cp trackb_attestation_test.go core/
go test ./core -run TestTrackB_SnapshotWeightZeroStall -v -count=1
Note: trackb_quorum_test.go / trackb_attestation_test.go are NOT in the public repository — the PoC test files are attached to this issue; without them, the XE team cannot run this reproduction.
TestTrackB_SnapshotWeightZeroStall — harness: ledger on MemStore, Difficulty: 0, TimestampWindow: 0. Three funded reps: RA = 1e14 XE, RB = 6e13 XE, RC = 6e13 XE, plus the embedded genesis rep (4.2e13 XE, never votes) and victim account V (1000 XE, self-delegated). Snapshot totals observed: total=262000000000990, repA=100000000000000, repB=60000000000000, repC=60000000000000. 67% bar = 175,540,000,000,670. RA+RB+RC = 2.2e14 (83.9%) can finalize; any two cannot (max RA+RB = 61.1%).
Flow: create a conflict on V (two blocks S1/S2), then repA's funder sends ALL its XE to a fresh account → repA live weight 0.
Expected: the conflict remains resolvable (e.g. by re-snapshotting, or by counting repA's vote at its snapshot weight). Actual (reproduced 2026-11-13):
repA vote rejected as expected: ValidateVote: representative efe61efd has zero vote weight
child block rejected while conflict unresolved: account has unresolved conflict — block rejected pending resolution
STALL REPRODUCED: snapshot total 262000000000990 counted repA 100000000000000, but repA live weight 0 -> its vote rejected, B+C=45.8% <67%, conflict unresolvable and account frozen until weight restored
RepB+repC final votes (45.8%) produced no winner; the conflict record persisted; a child block on the victim account was rejected. The test then re-funded funderA (restoring repA's live weight) and repA's vote finalized S1 — proving the stall lasts exactly as long as the whale keeps its weight at zero.
Root cause
core/ledger.go: recordConflictpath (~line 867): at conflict creation the weight snapshot is FROZEN (WeightSnapshot,TotalWeight= sum of live weights at detection time). Nothing ever re-snapshots it.core/vote.go: ValidateVote— rejects any vote whose rep's LIVEGetVoteWeightis ≤ 0 ("representative has zero vote weight"), even thoughreceiveVoteInnerwould have counted the vote at its frozen SNAPSHOT weight.core/quorum.go: finalTally— denominator is the frozenconflict.TotalWeight; numerator can only come from reps whose live weight is still > 0. If reps holding >33% of the snapshot total drop to exactly 0 live weight before voting, the maximum achievable vote is <67% forever.
Suggested fix
(a) Re-snapshot weights (or fall back to live total) when a conflict has been unresolved for a long time; (b) let a vote from a snapshot-weighted rep be accepted even at live weight 0 (count it at snapshot weight, consistent with receiveVoteInner); or (c) expire a conflict whose snapshot weight can provably never reach quorum and re-detect it with a fresh snapshot. Any of these closes the hostage primitive.
Controls verified (same PoC file, all PASS)
- Duplicate / replayed / equivocating votes: vote store keyed by (account, prev, rep), so a rep flipping a non-final vote overwrites (1 stored vote), an exact replay leaves 1 entry, and a final vote LOCKS (equivocating final vote dropped). 45.8% does not finalize; 84% finalizes (
TestTrackB_DuplicateAndEquivocatingVotes). - Vote timestamp window: 6-min-old and 6-min-future votes rejected; fresh votes accepted (5-minute window).
- Finalize-then-conflict: after S1 finalized by 84% final votes, a new conflicting block is rejected ("block conflicts with finalized block … — rejected");
core/rollback.gorefuses to roll back finalized blocks. Happy path also passes: staged winner S2 swaps in, loser S1 demoted off-chain, S2 finalized at height 2, conflict record cleaned up. - Attestations: duplicates count once, non-timekeeper ignored, forged attestation rejected, ±10 min skew enforced, threshold enforced after filtering.
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-13373 and says what differs; it is read like any other.