SMART CONTRACTS, DEFI & WEB3 SECURITY - Chapter 2, Exercise 2 Solution ========================================================== Calculating a Real Fee and Explaining Why the Base Fee Is Burned PROBLEM ------- Calculate the real total fee for a transaction using 45,000 gas, with a base fee of 15 gwei and a priority fee of 3 gwei, using this chapter's own formula. Then explain, in your own words, why the base fee portion doesn't go to the validator who included the transaction. SOLUTION -------- CALCULATION Using this chapter's own formula: total fee = gas used x (base fee + priority fee) total fee = 45,000 x (15 + 3) total fee = 45,000 x 18 total fee = 810,000 gwei total fee = 0.00081 ETH WHY THE BASE FEE ISN'T PAID TO THE VALIDATOR This chapter describes the base fee as being "set automatically by the protocol itself, and permanently burned (destroyed) rather than paid to anyone." The base fee isn't a payment to any specific party at all - it's an amount the protocol itself removes from circulation entirely, functioning more like a network-wide toll that reduces total ETH supply than like a service fee paid to a specific worker. The priority fee (tip) is the part that's actually designed as direct payment TO the validator - it's the real, optional incentive a sender adds specifically to reward whichever validator includes their transaction promptly, especially useful when the network is busy and many transactions are competing for limited block space. Splitting the fee into these two separate pieces - one burned by protocol rule, one paid directly to whoever does the real work of including the transaction - is exactly what EIP-1559 introduced, replacing the earlier single-gas-price-bid system this chapter contrasts it against. ANSWER: The total fee is 810,000 gwei (0.00081 ETH). The base fee isn't paid to the validator because it's automatically burned by the protocol itself, by design - it's not a service payment to anyone at all; only the separate priority fee (tip) is actually paid to the validator as a direct incentive for including the transaction. ---- WHY THIS WORKS AS AN ANSWER This correctly applies the chapter's own formula with real substituted numbers, then explains the base-fee-burning design choice using the chapter's own stated reasoning rather than treating it as an arbitrary protocol detail.