BLOCKCHAIN & WEB3 FUNDAMENTALS - Chapter 10, Exercise 3 Solution ========================================================== An ERC-20 Version of the Payment: No UTXO Step At All PROBLEM ------- Using this chapter's own Ethereum comparison, explain specifically what would need to happen differently if Bob's payment were 0.5 BTC worth of a fungible ERC-20 token instead of native ETH — is there still a "consuming a UTXO" step anywhere in that version of the story? SOLUTION -------- No - there is no UTXO-consuming step anywhere in the ERC-20 version of this story, because UTXOs are specifically a Bitcoin (and Bitcoin-model) concept, and this chapter's own comparison section explains that Ethereum uses a structurally different accounting system entirely: the account-based model from Chapter 6. Here's what actually happens instead, replacing Step 3 of the original Bitcoin flow: Instead of building a transaction that consumes an existing UTXO and creates new output UTXOs, Alice's wallet would construct a call to the ERC-20 token contract's own standardized transfer function (Chapter 8), specifying Bob's address and the amount. There's no discrete "coin object" being consumed at all - the token contract simply holds an internal record of every address's own balance, and executing the transfer function directly decreases the number stored against Alice's address and increases the number stored against Bob's, inside the contract's own state. Everything else in the ERC-20 version still closely parallels the original flow, just running on Ethereum's own mechanics instead: - Alice's wallet still signs the transaction with her private key (Chapter 2's ECDSA signing works identically here; it isn't Bitcoin-specific). - The transaction still gets broadcast and independently verified by network participants. - It still gets included in a block and mined/validated (Chapter 4's consensus mechanisms apply to Ethereum too, just using its own proof-of-stake process since 2022). - Alice still pays a fee for this to happen - gas, rather than a Bitcoin-style transaction fee. The one genuinely missing piece, compared to the original Bitcoin scenario, is any notion of "change" at all - since there's no discrete UTXO being spent in full, there's nothing left over to return to Alice; her account balance simply decreases by exactly the amount sent plus whatever gas fee was paid. ANSWER: There is no UTXO-consuming step in the ERC-20 version - it's replaced by a call to the token contract's own transfer function, which directly updates two stored balance numbers (Alice's down, Bob's up) rather than consuming and creating discrete coin objects. Signing, broadcasting, and block inclusion still happen in a directly comparable way, but the underlying accounting mechanism is genuinely different, not just renamed. ---- WHY THIS WORKS AS AN ANSWER This directly answers the yes/no question first (no UTXO step exists) and then correctly substitutes the actual mechanism that replaces it (a direct balance update via the token contract's transfer function), while accurately identifying which parts of the original flow still carry over unchanged and which don't.