Blocky saysGas is the unit of computation on Ethereum — you pay for every operation a transaction performs.
Each EVM operation costs gas; a transaction's fee is gas used × gas price (in gwei). You set a gas limit (max you'll spend) — run out and the transaction reverts but you still pay for work done. Since EIP-1559, fees split into a base fee (burned, adjusts with demand) plus a priority fee (tip to validators). Gas rations block compute and prices congestion.
Power-ups you unlock
Gas = compute units; fee = gas × gas price
Set a gas limit; out-of-gas → revert (still pay)
EIP-1559: base fee (burned) + priority tip
Gas prices congestion
Double-Spend Dan attacks — common mistakes
Setting gas limit too low (revert)
Ignoring volatile base fees during congestion
Thinking a reverted tx is free
Boss battleCompute the fee for 21,000 gas at 30 gwei (in ETH terms, conceptually).
Example code
<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>fee = gasUsed × gasPrice
21000 gas × 30 gwei = 630,000 gwei = 0.00063 ETH
EIP-1559: base fee (burned) + tip</pre></body></html>