CS595 Homework 3: Ethereum Basics - Short Answer
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
Homework 3: Ethereum Basics - Short Answer
Due electronically via Gradescope on Monday February 23rd 11:59PM ET
Please note that there is also a programming portion of this assignment worth 50 points.
Submission Instructions
Please submit to Gradescope. All answers must fit in the provided solution box. You may either use LaTeX (recommended and encouraged) or handwrite your solutions legibly. There are 50 points total in the short answer section. The final question (worth 0 points) requires you to acknowledge use of AI and external resources.
Important: Points will be deducted from submissions that fail to answer this final question.
1 Ethereum Mechanics
Problem 1.1. (12 points) Comparing Account Types
In Bitcoin, the UTXO model treats all participants by the same rules. In Ethereum, there are two distinct types of accounts: Externally Owned Accounts (EOA) and Smart Contract Accounts. Briefly explain the diference between an EOA and a Smart Contract Account regarding the following three specific dimensions:
1. Control: Who (or what) controls the account?
2. Code: Does the account store EVM code?
3. Transactions: Can the account initiate a new transaction?
Problem 1.2. (8 points) Smart Contract Sender Authentication
Solidity developers often use the global variable msg .sender to authenticate users
(e.g., require(msg.sender == owner)).
How does the Smart Contract (and the EVM in general) know who msg .sender is? Specifically, explain how cryptography is used to prevent a malicious user from spoofing someone else’s address when sending a transaction.
Problem 1.3. (8 points) Sending 1 ETH
Gas is the unit of computation on Ethereum. Consider the following two transactions:
• Transaction A: You send 1 ETH to 1 friend (Alice) using a standard transfer.
• Transaction B: You send a transaction to a “BulkSender” smart contract which distributes 0.001 ETH to 1000 diferent friends (Alice, Bob, Carol, etc.) in a single loop.
Which transaction consumes more Gas? Explain your reasoning.
Problem 1.4. (10 points) USDT-only Wallet
Alice has a crypto wallet containing 1,000 USDT (a stablecoin ERC-20 token) and 0 ETH. She wants to send 10 USDT to Bob. Can she do this? Explain why or why not.
Problem 1.5. (12 points) The “Out of Gas” Exception
Alice sends a transaction to a smart contract to execute a function. She sets a Gas Limit of 30,000.
However, the function is more complex than she realized. After the Ethereum Virtual Machine (EVM) executes 30,000 units worth of opcodes, the function has not yet finished.
1. Fees: Does Alice get a refund for the gas she didn’t use, or does she pay for the full 30,000 limit?
2. Rationale Behind Fees: Explain why Alice does or doesn’t get her refund.
3. State Changes: What happens to the changes the transaction made to the blockchain state (e.g., updating balances or storage variables) before it ran out of gas?
4. Rational Behind State Changes: Explain why the protocol is designed like this.
Hint: Consider a smart contract like Uniswap that allows a user to swap asset A for asset B.
2 Acknowledgment of AI and external resources
Problem 2.1. (0 points) Please provide links to external references you used for this portion of the assignment and any prompts, session links or session copies for substantial use of generative AI, or attest that you did not use any external resources. NOTE: Five points will be deducted for all submissions that fail to answer this question.
2026-02-25