Skip to content

Glyph-UTXO spend UX: auto-include fee-source input when spending dust Glyphs #2

Description

@Zyrtnin

Problem

Once #1 (Glyph-aware script parser) lands and the Send tab can spend Glyph UTXOs, there's still a UX cliff: Glyph UTXOs are typically dust-sized (1k–10k sats) while Radiant's min relay fee is 10,000 sats/byte. A 1-input 1-output tx spending a 10k-sat Glyph would need ~1.9M sats fee — impossible from the Glyph UTXO alone.

The Send flow needs to auto-select at least one additional fee-source UTXO from the same wallet when spending a Glyph.

Repro (will apply once #1 lands)

  1. Wallet holds a Glyph UTXO worth 10,000 sats (0.0001 RXD)
  2. User clicks the UTXO in Coins tab → Spend, destination = another address
  3. Fee calculation says 1.9M sats minimum
  4. Either the wallet errors out ("insufficient funds") or attempts to broadcast a tx that violates min relay

Fix (proposal)

In the coin-selection algorithm for Radiant sends:

  1. If any selected input is a Glyph UTXO (i.e., its scriptPubKey matches the wrapped-P2PKH pattern from Script parser doesn't recognize Glyph-prefixed P2PKH — UTXOs invisible in GUI #1) AND the combined input value < tx_size × min_relay_rate, auto-add plain P2PKH UTXOs from the same wallet until the fee is covered.
  2. Show a clear UI note: "This spend includes extra inputs to pay the network fee (0.03 RXD required). Change goes to [change_address]."
  3. Optionally, warn: "This tx burns the Glyph NFT (ref not forwarded to any output). To transfer the Glyph instead, use Advanced → Transfer NFT." (v1.1 scope — forwarding the ref requires constructing a Glyph-carrying output, which is not today's scope.)

Privacy caveat worth surfacing in UI

Combining a Glyph UTXO with a plain P2PKH UTXO from the same wallet on-chain proves both belong to the same owner. If the Glyph came from a source with different provenance than the rest of the wallet (e.g., minted by a separate service), this combination breaks that privacy boundary. Consider a one-time warning on the first Glyph-spend send.

Scope clarification

  • v1.1 (this issue): spend-and-burn — Glyph ref dropped, value returned to wallet as plain P2PKH change.
  • v1.2+ (future): forward the Glyph — ref stays alive in an output that carries it to a new address.

Spend-and-burn matches the validated mainnet test: 22d4e0e07200….

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions