Recent Question/Assignment

1. Proof of Work (13 points total) (First Name: JY Last name: Gong)
Visit the website, which simulates the mining of blocks on a blockchain similar to Bitcoin’s. Enter your first and last name into the “Data” field. To generate a valid block, this website requires a Nonce to be discovered. A valid Nonce has the property such that, when combined with the Data field (your name) and the hashcode of the previous block (“Prev”), the output hashcode begins with at least four zeroes.
(1) (1 point) If you were to enter a single random integer into the Nonce field, what would be the probability of generating an output hashcode that begins with four or more zeroes? Hint: each digit of the hashcode can take 16 different values, either an integer from 0 to 9 or a letter from a to f.
(2) (2 points) If you set out to mine a block by trial-and-error, how many Nonces would you need to attempt such that the cumulative probability of finding a satisfactory hashcode that begins with four or more zeroes is at least 50%? Hint: The probability of not finding a satisfactory Nonce on any guess is 1-p, where p is the value obtained in question 1 above.
(3) (1 point) Hit the “Mine” button underneath each block, and you will see that the website is programmed to search for a Nonce that solves this problem. How quickly can the website find a satisfactory Nonce? Hint: To improve the precision of your estimate, see how many blocks you can mine successfully in 60 seconds by hitting the Mine button, and then divide 60 by that number. Feel free to continue for longer.
(4) (1 point) Answer question (2) again, but with the requirement that a satisfactory hashcode begins with at least 17 zeroes (the current BTC target) instead of at least four.
(5) (1 points) Based on your answers to (2), (3), and (4), approximately how long would you expect the website to take to find a Nonce that generates a hashcode beginning with 17 zeroes, if you reprogrammed it?
(6) (7 points) Using your answers to the questions above, explain in a paragraph of 300 words or less how proof of work mining contributes to the security of a decentralized public blockchain (also known as an “open” blockchain).
2. Decentralized lending (7 points total)
Read the recent story on Coindesk, “DeFi Lending: 3 Major Risks to Know.”
Near the end of the article, a sub-section titled “How to Avoid These DeFi Lending Threats” offers advice about how to mitigate the risks highlighted in the article. In a paragraph of 300 words or less, give your opinion about how easy this advice would be to follow, and how likely DeFi credit investors would be to do so.