1. Homepage
  2. Homework
  3. COMP0143: Cryptocurrencies Coursework 2: Bitcoin Blockchain and Stablecoin
This question has been solved

COMP0143: Cryptocurrencies Coursework 2: Bitcoin Blockchain and Stablecoin

Engage in a Conversation
UCLCOMP0143CryptocurrenciesBitcoinCluster and Tagging AnalysisStablecoinCOMP 0143

COMP0143: Cryptocurrencies Coursework 2 (Resit) CourseNana.COM

Released: August 8, 2022
Due: August 29, 2022 at 16:00 UK time
CourseNana.COM

CourseNana.COM

  • This assignment is part of the mandatory assessment of the COMP0143: Cryptocurrencies module and will count 75% towards your final overall mark.
  • Assignment submission is due via Moodle through the TurnItIn interface on August 29, 2022 at 16:00 UK time. Late submissions will be accepted with deductions according to UCL’s late submission policy.
  • This assignment is open note, open book, and open course resources. Students must identify sources as accurately and fully as possible. UCL plagiarism policies will be strictly enforced. For more details, see

http://www.ucl.ac.uk/current-students/guidelines/plagiarism. CourseNana.COM

  • Students are not allowed to consult other people (outside of course staff) on this work. Each student has to work on the assignment individually.
  • All questions have to be answers. Answers will be judged in terms of their quality, the depth of un-

derstanding, and also their clarity. Explain your answers clearly, but succinctly. Partial credit may be awarded. Marks available for each question are indicated in square brackets. The assignment has a maximum of 100 marks allocated as follows: CourseNana.COM

• For the submission create a single zip archive that contains: CourseNana.COM

  1. A single LaTeX PDF file with your answers created from the provided LaTeX template. Only PDF submissions that are typeset with LaTeX, e.g., via https://www.overleaf.com/edu/ucl, will be accepted. Submissions must not include screenshots, e.g., of handwritten solutions or of code, unless explicitly permitted. Students with disability accommodations are excluded from this requirement.
  2. A single Python3 code file called bitcoin.py that contains your code for Q1 and Q2. Do not submit files in Jupyter/IPython format!
  3. A single Solidity code file called TicTacToe.sol that contains your code for Q3.

Data description for questions Q1 and Q2: You are given a truncated version of the Bitcoin blockchain, starting from the genesis block and ending at block height 100017. This is real Bitcoin data, but the transaction data is simplified and some transactions have been removed or modified. Thus, it does not work to use an external version of the Bitcoin blockchain (e.g., one parsed from an online block explorer), and the code you write for the project would need to be adapted to work on the real Bitcoin blockchain. The data is split across four CSV files, transactions.csv, inputs.csv, outputs.csv, tags.csv, containing different types of identifiers. The on-chain identifiers would all be 256-bit hashes in the real Bitcoin data, but for the sake of this assignment identifiers are numeric. CourseNana.COM

Note: To answer questions Q1 and Q2 you are allowed to use the Python 3 Standard Library and the data analysis module pandas. CourseNana.COM

Question 1: Bitcoin Blockchain - Basic Analysis [20 marks] CourseNana.COM

Answer the following questions with respect to the given dataset: CourseNana.COM

(a)  How many transactions are there in total? [1 mark] CourseNana.COM

(b)  How many transactions have one input and one output? [1 mark] CourseNana.COM

(c)  How many transactions have one input and two outputs? [1 mark] CourseNana.COM

(d)  How many UTXOs are there in total? [1 mark] CourseNana.COM

(e)  Which UTXO has the highest associated value? [1 mark] CourseNana.COM

(f)  How many distinct public keys were used across all blocks? [1 mark] CourseNana.COM

(g)  Which public key received the highest number of bitcoins and how many bitcoins did it receive? [2 marks] CourseNana.COM

Question 2: Bitcoin Blockchain - Cluster and Tagging Analysis [30 marks] CourseNana.COM

The multi-input heuristic says that public keys used as input to the same transaction are controlled by the same entity. Assuming there is no mixing or other obfuscation in place, write code to cluster the public keys in the given dataset according to this heuristic. Use commenting to mark this code clearly in your file. CourseNana.COM

(a)  How big is the cluster that contains public key (pk id) 41442? Identify the cluster according to its keys with the lowest and highest numeric values. [4 marks] CourseNana.COM

(b)  Which cluster has the largest number of keys, and how many keys does it contain? Identify it according to its keys with the lowest and highest numeric values. [4 marks] CourseNana.COM

(c)  Which cluster controls the most unspent bitcoins, and how many bitcoins does it control? Identify it according to its keys with the lowest and highest numeric values. [4 marks] CourseNana.COM

(d)  Which transaction is responsible for sending the largest number of bitcoins to the cluster with the most unspent bitcoins, i.e., to one or more of the keys in this cluster? [4 marks] CourseNana.COM

(e)  Is this clustering heuristic accurate? Identify at least one potential source of false positives (keys that are clustered together but are not actually owned by the same entity) and one source of false negatives (keys that were not clustered together but are owned by the same entity). What strategy could you use to make your clustering heuristic more accurate? [3 marks] CourseNana.COM

Question 3: Solidity - Tic Tac Toe [15 marks] CourseNana.COM

You are given a decentralized application for a tic-tac-toe game with a backend written in Solidity. The game is not yet functional and your task is to complete it. Please read the following instructions carefully. CourseNana.COM

Docker. To keep setup overheads to a minimum, the entire app is packaged inside a Docker container. To get ready, please install the Docker desktop app on your machine. It may be helpful to go through the Docker tutorial to get familiar with the tool even though it is not strictly necessary to finish this coursework as all instructions provided here are self-contained. After installing the Docker desktop app, you can start the tutorial container via CourseNana.COM

Running the Game. The smart contract you should complete for this assignment is located at contracts/TicTacToe.sol. The missing code snippets are marked with /*Please complete the code here.*/. In total there are 7 functions that you need to complete: CourseNana.COM

To set up and play your tic-tac-toe game, you need to: CourseNana.COM

  1. Install and start the Ganache test chain:

docker run -p 8545:8545 -d trufflesuite/ganache-cli:latest -g 0 CourseNana.COM

  1. Build the tic-tac-toe game:

docker build -t tic-tac-toe . CourseNana.COM

Ensure you run this command from the directory containing the Dockerfile for the project. Note: This command will fail the first time you execute it because the smart contract is not yet complete and still has some syntax errors. Hence, your first task is to fix these syntax errors after which you can start the app. For testing purposes you can temporarily comment out the line RUN npx hardhat compile in the Dockerfile which omits compiling the smart contract. Make sure to re-include it later on otherwise your app will not work! CourseNana.COM

  1. Start the web server:

docker run -p 8080:8080 -d tic-tac-toe CourseNana.COM

  1. Browse to http://localhost:8080/ in two separate web browsers, each with its own MetaMask installation and connected to the local test chain. Follow the instructions on the site to start the game.

Question 4: Transaction Privacy [15 marks] CourseNana.COM

The Wasabi wallet is often touted as one of the most widely used privacy-enhancing technologies that builds on top of Bitcoin. It is an open-source and non-custodial Bitcoin wallet that implements trustless Coinjoins to break the link between inputs and outputs of a Bitcoin transaction. CourseNana.COM

(a) Imagine a user who runs a single Wasabi wallet. Answer the following questions: [5 marks] CourseNana.COM

 (c) Bitcoin’s public, auditable nature allows regulators to trace any arbitrary Bitcoin they would like. CourseNana.COM

 (i)  Many claim that by tracing Bitcoin, that this makes Bitcoin not fungible. Do you agree? Explain. CourseNana.COM

(ii)  Some cryptocurrency exchanges look at only the last n transactions that a coin has been involved in and won’t accept the coin if one of those transactions involved an address tied to a known drug market (or other illegal activity). Explain why or why not you think this is a good idea. CourseNana.COM

  CourseNana.COM

Question 5: Stablecoins [20 marks] CourseNana.COM

Stablecoins are one of the most important and promising developments of the cryptocurrency ecosystem as they provide a solution to address the volatility and instability of cryptocurrencies’ values. Answer the following questions on stablecoins. CourseNana.COM

(a)  There are various types of stablecoins depending on the stabilization mechanism and the nature of the peg. Name three different types of stablecoins and clarify for each: [6 marks] CourseNana.COM

 (b)  The Diem Association (former Libra) has released its new white paper in April 2020, updating its previous 2019 white paper. Read the Diem white paper and the technical documentation of the Libra blockchain and answer the following questions: CourseNana.COM

 (c)  Consider the Terra stablecoin. Terraform Labs developed a stablecoin similar to the one developed by the Diem Association. However, there are fundamental differences between the two. Answer the following questions limiting your answers to a couple of points. CourseNana.COM

(i)  What are the main similarities between the stablecoins issued by the Diem Association and Terraform Labs? Are they native currencies? [2 marks] CourseNana.COM

(ii)  Terraform Labs developed a dual-token system. What is the purpose of this dual-token system? [2 marks] CourseNana.COM

(iii)  Does the Diem Association have a dual-token? Why or why not is this the case? [2 marks] CourseNana.COM

  CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
UCL代写,COMP0143代写,Cryptocurrencies代写,Bitcoin代写,Cluster and Tagging Analysis代写,Stablecoin代写,COMP 0143代写,UCL代编,COMP0143代编,Cryptocurrencies代编,Bitcoin代编,Cluster and Tagging Analysis代编,Stablecoin代编,COMP 0143代编,UCL代考,COMP0143代考,Cryptocurrencies代考,Bitcoin代考,Cluster and Tagging Analysis代考,Stablecoin代考,COMP 0143代考,UCLhelp,COMP0143help,Cryptocurrencieshelp,Bitcoinhelp,Cluster and Tagging Analysishelp,Stablecoinhelp,COMP 0143help,UCL作业代写,COMP0143作业代写,Cryptocurrencies作业代写,Bitcoin作业代写,Cluster and Tagging Analysis作业代写,Stablecoin作业代写,COMP 0143作业代写,UCL编程代写,COMP0143编程代写,Cryptocurrencies编程代写,Bitcoin编程代写,Cluster and Tagging Analysis编程代写,Stablecoin编程代写,COMP 0143编程代写,UCLprogramming help,COMP0143programming help,Cryptocurrenciesprogramming help,Bitcoinprogramming help,Cluster and Tagging Analysisprogramming help,Stablecoinprogramming help,COMP 0143programming help,UCLassignment help,COMP0143assignment help,Cryptocurrenciesassignment help,Bitcoinassignment help,Cluster and Tagging Analysisassignment help,Stablecoinassignment help,COMP 0143assignment help,UCLsolution,COMP0143solution,Cryptocurrenciessolution,Bitcoinsolution,Cluster and Tagging Analysissolution,Stablecoinsolution,COMP 0143solution,