<!-- XE-13251 · [Minor] GET /accounts/{address}/balance reports spendable from a node's local unconfirmed frontier with no unconfirmed flag · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13251>. The page is the record; this is the same page for reading.*

XE-13251 · Bounty

# \[Minor\] GET /accounts/{address}/balance reports spendable from a node's local unconfirmed frontier with no unconfirmed flag

Closed · invalid
—claimed Minor
[xe#382](https://github.com/xeprotocol/xe/issues/382)
filed 2026-11-11 12:37 UTC
by Nughair

Verdict
:   Invalid

Tier
:   —

Claimed
:   Minor

Area
:   Node / API

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-20 00:25 UTC

Told
:   2026-11-20 00:24 UTC

### Patches

- [xe#881](https://github.com/xeprotocol/xe/pull/881) open by tipprb
  fix(xe): minor--get--accounts--address (fixes #382)

### History

- [549207](https://bounty.xe.network/log/549207) 2026-11-20 00:24 UTC reply.mirrored
- [548720](https://bounty.xe.network/log/548720) 2026-11-20 00:24 UTC reply.sent
- [544615](https://bounty.xe.network/log/544615) 2026-11-20 00:09 UTC github.state\_pushed
- [544608](https://bounty.xe.network/log/544608) 2026-11-20 00:09 UTC github.labels
- [544508](https://bounty.xe.network/log/544508) 2026-11-20 00:08 UTC proposal.adopted
- [544457](https://bounty.xe.network/log/544457) 2026-11-20 00:08 UTC proposal.adopted
- [544456](https://bounty.xe.network/log/544456) 2026-11-20 00:08 UTC ticket.status new → closed
- [544359](https://bounty.xe.network/log/544359) 2026-11-20 00:08 UTC proposal.adopted
- [544358](https://bounty.xe.network/log/544358) 2026-11-20 00:08 UTC ticket.facts area
- [544357](https://bounty.xe.network/log/544357) 2026-11-20 00:08 UTC proposal.adopted
- [544356](https://bounty.xe.network/log/544356) 2026-11-20 00:08 UTC ticket.facts
- [536189](https://bounty.xe.network/log/536189) 2026-11-19 23:40 UTC note.added

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

### Report

Suggested severity tier: Minor / Informational. This is not a double-spend and not a consensus break. A lagging or partitioned node can briefly serve a conflicting unconfirmed send as the account’s `balances` / `spendable`. Standard “wait for finality” guidance already mitigates it. Closest official class is Medium (“inconsistent API responses”); we ask for Minor because the `finalized` flag on `GET /blocks/{hash}` is correct, and the `/balance` body already carries `final_height`, which did not advance on the lagging node.

Affected component:

- HTTP API: `GET /accounts/{address}/balance` (`api/handler.go` `handleGetBalance`)
- Network: testnet-0005
- Reproduced 2026-11-11 (Asia/Jakarta) during a cross-node fork on our own wallets, submitting to `https://ldn.core.test.network` and `https://nyc.core.test.network`
- Not Critical/Severe — no `security@` disclosure needed.

Summary:
`GET /accounts/{address}/balance` reports `balances` and `spendable` from the node’s **local, possibly unconfirmed** account frontier, with no “unconfirmed / conflicted frontier” indicator on those fields. During a \~1–3 minute sync lag, a partitioned node served a conflicting unfinalized send as the account’s spendable balance, while the main cluster had already finalized a different sibling. An integrator that trusts a single node’s `spendable` without checking per-block `finalized` (or comparing `final_height`) could briefly honor a payment that is later rolled back.

Consensus itself held: exactly one of the two conflicting sends reached finality network-wide; the loser stayed `finalized: false` and never created a pending credit for its recipient. This report is about the `/balance` response shape, not about a ledger break.

Reproduction (own two wallets only; testnet-0005; 2026-11-11, times in Asia/Jakarta):

Wallet w1 `2dda1e8cead608801ed02791123da1e11bfc2b90862d68b2954e2995b7f57b18` had a finalized frontier `17f57de2bff381c0639be0b290c1aa1e789f5e3363cc4e4fafe92b1c2bc15368`. Two conflicting signed sends were built on that same `previous` and submitted concurrently:

- Send A (0.1 XE to w2 `26cb43c666848a35b50ba5e85b8822a0019973bf578bba5f4fa5dc2100711505`, resulting balance 800000 micro-XE), hash `4f9eb3e00cba5d4bea2fc7fa4bde49860f53a109e8b2fa6b72bb6f300237197e`, POST to `https://ldn.core.test.network` — accepted (201) at 18:50:09.
- Send B (0.3 XE to a fresh address `11112222333344445555666677778888aaaabbbbccccddddeeeeffff00001111`, resulting balance 600000 micro-XE), hash `237a18e1a24c66adca2889ad7484b09c510c618d4f69556c072183626d2c2c61`, POST to `https://nyc.core.test.network` — accepted (201) at 18:50:09.

`GET /accounts/{w1}/balance` and `GET /blocks/{hash}` were then polled on both nodes. Observed at 18:50:17 (and still at every poll through 18:51:14):

On ldn (then, from 18:50:25, with A `finalized: true`):

```
{"address":"2dda1e8cead608801ed02791123da1e11bfc2b90862d68b2954e2995b7f57b18","balances":{"XE":800000},"spendable":{"XE":800000},"final_height":3}
```

On nyc (B visible locally with `finalized: false`; A was 404):

```
{"address":"2dda1e8cead608801ed02791123da1e11bfc2b90862d68b2954e2995b7f57b18","balances":{"XE":600000},"spendable":{"XE":600000},"final_height":2}
```

So for at least \~65 seconds (and, per the full probe write-up, for roughly 2–3 minutes before nyc caught up) a client that asked only nyc’s `/balance` was told w1’s spendable was 0.6 XE, which is the unconfirmed loser, not the finalized history. `final_height` on nyc stayed at 2 (it did not advance with the unconfirmed send), while `balances` / `spendable` followed the local unfinalized frontier. The response has no field that says “this spendable is unconfirmed.”

A same-node variant (two siblings posted back-to-back to one node) also staged both blocks; ORV finalized exactly one (`3aa61d11f125f8f915e11f065960b13b0c2edc5e58ce8c6d33a7a905c7436624` `finalized: true`; sibling `9071ffadedf6d483e9ff57664dcc3f846d38a9a3b864aeeac3c3c6d2975fc1f6` stayed `finalized: false`); w1 was debited once. `/balance` on that node then matched the finalized winner, so the misleading case is the lagging/partitioned node, not a fully caught-up one.

Expected vs actual:

- Expected: `/balance` either reports only finalized balances (for example a `final_balance` / `final_spendable`), or it keeps serving the local frontier but marks it, e.g. `has_unconfirmed_frontier: true`, when `balances` / `spendable` include a block that is not yet `finalized`.
- Actual: `balances` and `spendable` follow the local frontier with no such flag. (`final_height` does stay on the last finalized height, which is a partial hint if the client compares it, but that contract is not documented on the spendable fields.)

Impact:
Low / Informational. No double-spend, no fund theft, no finality reversal. The window is the lagging node’s sync delay (observed on the order of minutes on a node that was already behind, with a pre-existing `dropped_blocks` count of 1306). The worst case is an integrator that treats a single node’s `spendable` as final and briefly honors a payment that is later rolled back. Checking `GET /blocks/{hash}` for `finalized: true`, or treating `final_height` as the safety signal, already avoids this. This is arguably expected “wait for finality” behaviour; the gap is that `/balance` does not say so.

Suggested fix:
Expose a `has_unconfirmed_frontier` and/or `final_balance` / `final_spendable` field on `GET /accounts/{address}/balance`, and/or document in the API docs that `balances` / `spendable` are local-frontier views and that only blocks with `finalized: true` (and the account’s `final_height`) are safe to treat as settled.

Proposed tier: Minor / Informational (API hygiene / missing indicator). Not a consensus or funds bug.

Reporter:

- XE address for reward: `2dda1e8cead608801ed02791123da1e11bfc2b90862d68b2954e2995b7f57b18`
- Only my own two accounts were used; no third-party funds, keys, or workloads were targeted.

### Thread

**XE desk**team2026-11-20 00:24 UTCgithub

Thanks for the report. We read it against the code and could not confirm a bug in what it describes.

This report is closed as invalid. If we have missed something, file a new report that links
https://bounty.xe.network/XE-13251 and says what; it is read like any other.
