PAYMENT fails with PAYMENT_UNDERFUNDED although the balance covers it: selling liabilities reserve it
A transaction whose PAYMENT operation fails at apply is still written into the closed ledger: its fee is charged, its sequence number is consumed, and none of its operations change state.
The shape
A transaction whose PAYMENT operation fails at apply is still written into the closed ledger: its fee is charged, its sequence number is consumed, and none of its operations change state. The result carries the operation's result code (underfunded). Readers that skip failed transactions lose the fee and sequence change; readers that assume a failed transaction changed something record effects that never happened. The account holds 100 XPF but has an offer selling 60, so only 40 is available: a payment of 41 fails although the balance covers it.
Variants
| Variant | Protocol | Network | Source | Size | sha256 |
|---|---|---|---|---|---|
p30-mainnet-generated | P30 | mainnet passphrase | generated by stellar-core v30.0.0 | 2,908 B | 1fe54eff6d73… |
p30-testnet-generated | P30 | testnet passphrase | generated by stellar-core v30.0.0 | 2,908 B | b2019fd2bf58… |
What a correct reader returns
| A correct reader finds | Value | Backed by |
|---|---|---|
| The operation fails with underfunded. | underfunded | constructionsnapshotcorewalker |
| No operation changed state: the operation meta is empty. | length 0 | snapshot |
| The sequence number is still consumed: the source account changes before apply (state, updated). | length 2 | snapshot |
| The fee is still charged: the fee source changes in fee processing. | length 2 | snapshot |
Check it yourself
make verify # schema, hashes, the byte-for-byte round trip and every fact above
make oracle # the facts' values, re-read by stellar-core and the schema walkerEntry id failure.payment.underfunded-by-selling-liabilities · compiled from catalog/failure.payment.underfunded-by-selling-liabilities.json · entry.json
PAYMENT fails with PAYMENT_SRC_NOT_AUTHORIZED
A transaction whose PAYMENT operation fails at apply is still written into the closed ledger: its fee is charged, its sequence number is consumed, and none of its operations change state.
REVOKE_SPONSORSHIP fails with REVOKE_SPONSORSHIP_DOES_NOT_EXIST
A transaction whose REVOKE_SPONSORSHIP operation fails at apply is still written into the closed ledger: its fee is charged, its sequence number is consumed, and none of its operations change state.