a cryptocurrency (or crypto currency) is a digital asset ... · bitcoin wallet is a piece of...

16
11/21/18 1 A cryptocurrency (or crypto currency) is a digital asset (anything in a binary form that comes with the right to use, such as digital documents, photographs, videos, presentations, spreadsheets, etc.) designed to be a medium of exchange (i.e., that functions as money) that uses cryptography (math algorithms) to secure financial transactions, verify the transfer of assets, and control the creation of additional units. [Wikipedia] Bitcoin (BTC) is a crypto currency (electronic cash), which, unlike traditional banking, is decentralized Has a monetary value (1 BTC = 5,840.78 $ Cdn on 21 Nov) Does not look like but like it’s a large hexadecimal number!

Upload: others

Post on 18-Oct-2019

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A cryptocurrency (or crypto currency) is a digital asset ... · Bitcoin wallet is a piece of software which manages an individual’s balance of bitcoins (individual = one person,

11/21/18

1

A cryptocurrency (or crypto currency) is a

digital asset (anything in a binary form that comes with the right to use, such as digital documents, photographs, videos, presentations, spreadsheets, etc.)

designed to be a medium of exchange (i.e., that functions as money)

that uses cryptography (math algorithms)

to secure financial transactions, verify the transfer of assets, and control the creation of additional units.

[Wikipedia]

Bitcoin (BTC) is a crypto currency (electronic cash), which, unlike traditional banking, is decentralized

Has a monetary value (1 BTC = 5,840.78 $ Cdn on 21 Nov)

Does not look like

but like

it’s a large hexadecimal number!

Page 2: A cryptocurrency (or crypto currency) is a digital asset ... · Bitcoin wallet is a piece of software which manages an individual’s balance of bitcoins (individual = one person,

11/21/18

2

BTC has a smaller unit, often called Satoshi

(after Satoshi Nakamoto, the inventor of the bitcoin – it’s not known who it is)

1 Bitcoin has 100 million Satoshis, so 0.0001, 0.00000035 are legal amounts of Bitcoin

The software infrastructure that makes bitcoin work is called a blockchain (“chain of blocks”)

The so-called genesis block (block zero) for bitcoin was created on 3 January 2009. The first true block was chained to it on 9 January 2009, and this is when the first bitcoin was created (mined)

Page 3: A cryptocurrency (or crypto currency) is a digital asset ... · Bitcoin wallet is a piece of software which manages an individual’s balance of bitcoins (individual = one person,

11/21/18

3

Bitcoin wallet is a piece of software which manages an individual’s balance of bitcoins (individual = one person, organization, etc.)

Each individual is assigned a: •  unique public key (aka “bitcoin address”) used to identify the owner; it’s 34-characters long string (and a corresponding hexadecimal number) •  private key (used to authorize transactions); it’s a hexadecimal number derived from the public key

(think of the two keys as a function and its inverse)

If you wish to try - to start, look online for a wallet provider (some wallets are free, some require a fee)

Page 4: A cryptocurrency (or crypto currency) is a digital asset ... · Bitcoin wallet is a piece of software which manages an individual’s balance of bitcoins (individual = one person,

11/21/18

4

public key

There is no “password recovery” system: if one loses their private key (i.e., have no backup and/or no way to retrieve) they lost all their bitcoins.

Why? Identity of an individual is completely protected.

If one makes their private key known, someone can steal all their money. No way to get that money back.

Safest option: have backups of the private key; also, keep the wallet on a usb, or on a computer which is not connected to internet.

Page 5: A cryptocurrency (or crypto currency) is a digital asset ... · Bitcoin wallet is a piece of software which manages an individual’s balance of bitcoins (individual = one person,

11/21/18

5

Options for safe wallets:

A wallet keeps track of all transactions that the wallet owner has done, and these are used to update/keep the balance

Amazing features of blockchain:

All transactions are public: everyone can have access to the ledger (called blockchain) which keeps track of every single transaction with bitcoins, from the first ever transaction in 2009.

Privacy is fully protected: the only thing one knows about a user is their public key

There is no central governing mechanism (such as a bank)

The entire system (network of computers called nodes) is controlled by software

Page 6: A cryptocurrency (or crypto currency) is a digital asset ... · Bitcoin wallet is a piece of software which manages an individual’s balance of bitcoins (individual = one person,

11/21/18

6

How many people/individuals have bitcoins?

As of end of September 2018: over 28 million individuals

As of September 2018: about 17.3 million bitcoins are in use total number available: 21 million software generates a slowdown in earning (mining) bitcoins, so they will all be mined by 2140

It is known exactly where all bitcoins are ...

Page 7: A cryptocurrency (or crypto currency) is a digital asset ... · Bitcoin wallet is a piece of software which manages an individual’s balance of bitcoins (individual = one person,

11/21/18

7

Two levels of involvement:

•  ordinary users: individuals/companies/entities that trade bitcoins, and/or use them to buy or sell goods and services

•  nodes in the network, called miners

presently: a bit over 28 million ordinary users

no one knows exactly how many miners, estimates from 15,000 to over 100 thousand

How does it work?

Nodes (each node is a computer) are connected into a network (so called P2P, peer to peer network)

Page 8: A cryptocurrency (or crypto currency) is a digital asset ... · Bitcoin wallet is a piece of software which manages an individual’s balance of bitcoins (individual = one person,

11/21/18

8

Nodes maintain a log all transactions (in the blockchain), and, in continuous communication with each other, share copies of it. An individual’s balance is computed from the transactions in the blockchain.

The blockchain does not sit on any particular computer, but is shared across the network. As new transactions are added, it grows in size (presently, about 185 gigabytes)

The blockchain contains information about every single transaction involving bitcoins, from the moment it started in 2009.

What exactly is a blockchain? It’s a database (think about Excel file)

but with one major difference:

[https://medium.com/swlh/the-blockchain-for-dummies-guide-part-2-2d0d821b5148]

Page 9: A cryptocurrency (or crypto currency) is a digital asset ... · Bitcoin wallet is a piece of software which manages an individual’s balance of bitcoins (individual = one person,

11/21/18

9

There is a starting entry (called genesis), and every other entry points at the preceding one

in this example, coloured stars are used as links

Thus, all entries in the blockchain are linked (chained together)

Blockchain is a guarantee on the order of all entries/data

If someone tries to tamper ...

we know it right away (yellow is still pointing to green, but there is no green)

Page 10: A cryptocurrency (or crypto currency) is a digital asset ... · Bitcoin wallet is a piece of software which manages an individual’s balance of bitcoins (individual = one person,

11/21/18

10

Page 11: A cryptocurrency (or crypto currency) is a digital asset ... · Bitcoin wallet is a piece of software which manages an individual’s balance of bitcoins (individual = one person,

11/21/18

11

Page 12: A cryptocurrency (or crypto currency) is a digital asset ... · Bitcoin wallet is a piece of software which manages an individual’s balance of bitcoins (individual = one person,

11/21/18

12

Page 13: A cryptocurrency (or crypto currency) is a digital asset ... · Bitcoin wallet is a piece of software which manages an individual’s balance of bitcoins (individual = one person,

11/21/18

13

We want to add a crayon (block) to the blockchain. Alice wants to add a cyan crayon, and Bob wants to add a pink one.

How do they (in general, a large network of nodes) agree on which one should be linked first?

Consensus problem – we need a protocol on agreement which crayon (block) comes next

Easy solution: have a central authority that decides about it. But this is unacceptable, because bitcoin does not want central authority.

The consensus is achieved by the so-called proof of work; in the case of a bitcoin, it is known as mining.

Mining involves miners: individuals who maintain the blockchain; they compete against each other in an effort to gain the right to make the decision about what colour crayon comes next, i.e., what is the next blockin the blockchain.

Competition – solving a math problem!

The fastest miner has a way of proving to everyone that they have done it. When the majority of the network confirms that that’s indeed the case, the fastest miner then links a new block to the blockchain, and is awarded bitcoins for their effort.

Page 14: A cryptocurrency (or crypto currency) is a digital asset ... · Bitcoin wallet is a piece of software which manages an individual’s balance of bitcoins (individual = one person,

11/21/18

14

Mining is done using special software, these days running on a specially built hardware

https://www.ccn.com/700-million-bitcoin-mining-farm-coming-to-upstate-new-york/

Page 15: A cryptocurrency (or crypto currency) is a digital asset ... · Bitcoin wallet is a piece of software which manages an individual’s balance of bitcoins (individual = one person,

11/21/18

15

https://www.cbc.ca/news/canada/calgary/bitcoin-mining-medicine-hat-crytocurrency-electricity-deal-hut-8-1.4584257

How does it work with bitcoins?

Alice wants to send BTC to Bob

She looks up his address (public key), fills up the amount she wants to send, and asks her wallet to sign for her transaction using her private key.

The wallet combines Alice’s transaction information and her private key into the so-called “digital signature”

At this moment, Alice’s request is propagated to all network nodes for verification and approval.

Page 16: A cryptocurrency (or crypto currency) is a digital asset ... · Bitcoin wallet is a piece of software which manages an individual’s balance of bitcoins (individual = one person,

11/21/18

16

Using Alice’s public key only, the software can decode Alice’s signature file and check that it’s indeed Alice, and that she has sufficient funds to send to Bob.

How do the nodes know that Alice has enough money? They know Alice’s public key, and all transactions are recorded in the blockchain.

Once approved, Alice’s request (her transaction) is included into the next block. To be added to the blockchain, the block needs to be mined.

Miners start working on the computational problem of finding a solution to a problem that involves a huge amount of guessing, or potentially some clever work.

The miner (node) who solves the problem first propagates the block to the network; the nodes verify the result (check the proof of work) and include it into the blockchain.

It takes on average 9.3 minutes to mine a block.

The ledger is updated with all new transactions in the blockchain.

The miner is paid 12.5 BTC.

Alice receives a confirmation that her transaction has been completed.