BLOCKCHAIN & WEB3 FUNDAMENTALS - Chapter 10, Exercise 1 Solution ========================================================== Rewriting the Scenario for a Full-UTXO Payment (No Change) PROBLEM ------- Rewrite this chapter's own Alice-to-Bob scenario for a payment of exactly 0.62 BTC (Alice's entire UTXO, with no change left over except the fee). Which specific output from Step 3 of the flow disappears, and why? SOLUTION -------- In the original scenario, Alice's 0.62 BTC UTXO was larger than the 0.5 BTC she actually wanted to send, so the transaction needed two outputs: one paying Bob, and one sending the leftover "change" back to Alice herself (per Chapter 5's own UTXO mechanics, a UTXO has to be spent as a whole, so any leftover value needs its own output). If Alice instead pays exactly her entire 0.62 BTC UTXO to Bob (minus only the small transaction fee), there's no leftover value left to return to herself at all. The transaction would look like this instead: INPUT: - Alice's full 0.62 BTC UTXO (consumed entirely, as before) OUTPUTS: - One output only: approximately 0.6199 BTC to Bob (0.62 BTC minus a 0.0001 BTC fee) The "change back to Alice" output from Step 3 of the original flow disappears entirely in this version - there's simply nothing left over to send back to her once the whole UTXO's value (minus the fee) has gone to Bob. Every other step in the chapter's own flow (broadcasting, Merkle tree inclusion, mining, confirmation, Bob receiving a new UTXO) still happens exactly the same way; only the number and shape of the outputs in Step 3 change. ANSWER: The change output disappears, because change only exists to return whatever value is left over after the intended payment and fee are subtracted from the consumed UTXO - if the entire UTXO's value (minus the fee) is being paid to Bob, there's nothing left over to return to Alice, so the transaction has only a single output instead of two. ---- WHY THIS WORKS AS AN ANSWER This correctly identifies that the change output is conditional on there being leftover value, and traces through exactly which part of Step 3's own construction changes as a direct, mechanical consequence of a different payment amount, rather than treating the whole transaction as needing to be rebuilt from scratch.