{"id":"XE-16973","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"688","source_url":"https://github.com/xeprotocol/xe/issues/688","reporter_id":2920,"title":"[Medium] No address checksum + no send confirmation: one mistyped hex char permanently locks funds","area":"sdk-docs-web","claimed_tier":"medium","assessed_tier":null,"verdict":"duplicate","duplicate_of":"XE-0933","tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"duplicate","github_state":"open","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-17T08:11:51.720474+00:00","updated_at":"2026-11-22T23:26:12.021485+00:00","source_created_at":"2026-11-17T08:11:22+00:00","told_at":"2026-11-22T23:26:12.048971+00:00","status_changed_at":"2026-11-22T23:26:12.032751+00:00","url":"https://bounty.xe.network/XE-16973","body":"## Summary\n\nXE 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.\n\n## Root Cause\n\n- `MarshalBlock` (`core/encoding.go:126-136`) rejects non-hex or wrong-length destinations, but any 64-hex string passes.\n- `validateAndAddSend` (`core/ledger.go:1060-1064`) checks only that the destination is non-empty and not the sender — no checksum, no existence check.\n- 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.\n- `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.\n\n## Verification\n\nExecuted PoC against a real ledger (in-memory):\n\n```\nsend to \"xyz\"                    -> REJECTED: MarshalBlock: invalid destination hex\nsend to 63-char hex              -> REJECTED: MarshalBlock: invalid destination hex (odd length)\nsend 10,000 XCU to 64x\"0\"        -> ACCEPTED\nsend 100,000 XCU to a real address with 1 hex char flipped -> ACCEPTED\nreceive typo'd funds (intended key) -> REJECTED: pub_key does not derive account address\ncontrol send+receive to the correct address -> works\n=> 110,000 XCU permanently locked\n```\n\nMalformed destinations fail safe; only valid-format typos get through — and they are silent and irreversible.\n\n## Note on related reports\n\nSearched \"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.\n\n## Suggested fix\n\nAdd 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).\n","patch_refs":[],"thread":[{"id":18803,"source":"desk","source_ref":"reply:16480","author":"Joseph Denne","team":true,"body":"Thanks. This is the same finding as https://bounty.xe.network/XE-0933, which was filed first; the programme pays the\nfirst verifiable submission, so this one closes as a duplicate. If you believe it is a different\nbug, file a new report that links https://bounty.xe.network/XE-16973 and says what differs; it is read like any other.","created_at":"2026-11-22T23:26:12.021485+00:00"}]}