[Medium] No address checksum + no send confirmation: one mistyped hex char permanently locks funds
Report
Summary
XE addresses are bare 64-hex strings with no checksum, and xe send shows no confirmation. A one-character typo inside a valid 64-hex destination is undetectable — the marshal layer only checks hex-ness and length, the ledger only checks non-empty/non-self — and the funds are permanently locked: addresses are SHA-256-derived from ed25519 pubkeys, enforced at account open, so a typo'd address has no recoverable key and the PendingSend can never be claimed.
Root Cause
MarshalBlock(core/encoding.go:126-136) rejects non-hex or wrong-length destinations, but any 64-hex string passes.validateAndAddSend(core/ledger.go:1060-1064) checks only that the destination is non-empty and not the sender — no checksum, no existence check.- Addresses are SHA-256-derived from pubkeys, enforced at open by
ValidatePubKeyDeclaration(core/crypto.go:119-143, error "pub_key does not derive account address"), so a typo'd address can never be opened: claiming its pending funds would require a SHA-256 preimage. xe send(cmd/xe/main.go:667-730) submits with no confirmation and no destination review; the web wallet validates format client-side only (web/assets/wallet.js:813,/^[0-9a-f]{64}$/) and also shows no confirmation.
Verification
Executed PoC against a real ledger (in-memory):
send to "xyz" -> REJECTED: MarshalBlock: invalid destination hex
send to 63-char hex -> REJECTED: MarshalBlock: invalid destination hex (odd length)
send 10,000 XCU to 64x"0" -> ACCEPTED
send 100,000 XCU to a real address with 1 hex char flipped -> ACCEPTED
receive typo'd funds (intended key) -> REJECTED: pub_key does not derive account address
control send+receive to the correct address -> works
=> 110,000 XCU permanently locked
Malformed destinations fail safe; only valid-format typos get through — and they are silent and irreversible.
Note on related reports
Searched "checksum" — only #659 (downloadImage, different) and unrelated hits. #69 is about API lookup case-sensitivity, distinct. A companion report on the missing send confirmation (different root cause/fix) is filed in the same batch.
Suggested fix
Add a checksum to the address format (e.g. base58check/bech32-style), or at minimum add a destination review + confirmation step to xe send and the web wallet, and warn when the destination has no prior activity (no open block).
Thread
Thanks. This is the same finding as https://bounty.xe.network/XE-0933, 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-16973 and says what differs; it is read like any other.