Cryptocurrency for Dummies
-
Upload
miguel-duarte -
Category
Technology
-
view
849 -
download
6
description
Transcript of Cryptocurrency for Dummies
Cryptocurrency
Who am I?
• Miguel Duarte
• Robotics & AI PhD Student @ ISCTE-IUL
• Geek, Hacker, Maker
• Sci-fi, Tech and Robotics enthusiast
• IEEE, NodecopterLX, GDG, IT
Outline• Context
• Transactions and the block chain
• Mining
• Issues
• Altcoins
• Discussion
What is a cryptocurrency?
Digital currency that uses cryptography for security. Cryptocurrencies are generally
anonymous and not issued by any central authority.
Why does it matter?• Transactions are irreversible, fast, and have low
fees
• Universal (within the internet)
• Decentralised, no trust necessary
• The supply of coins is regulated by software and the agreement of users of the system and cannot be manipulated by any government, bank, organization or individual
1 BTC = 100,000,000 Satoshi
Account Balance
Alice 10
Bob 20
Celso 9999
… …
Bitcoin is a public ledger, kept by every node
in the network
________________________
________________________
________________________
________________________
________________________
________________________
________________________
________________________
Addresses
• 27-34 alphanumeric characters
• Generated via public-key cryptography
• Any user can generate multiple addresses
31uEbMgunupShBVTewXjtqbBv5MndwfXhb
Private Key Public Key
Public-key Cryptography
Wallet
Digital Signature
Hello World0601d109d0d2b0fa9c4484b4a5c94ee5ecc62ccec3bd7d99e972d18994d0e2e42f6d0fcfc41216a5ab72ee7af96d213e1c314abdde40f52731ff24c
2bf8f7323Hello World
Private Key Public Key
Alice Bob
Send 20 BTC from ALICE to BOB
Address: ALICE
Address: BOB
Balance: 30 BTC
Balance: 20 BTC
Alice Bob
Send 20 BTC from ALICE to BOB
Address: ALICE
Address: BOB
Balance: 10 BTC
Balance: 40 BTC
Transaction
Transactions
Sender: Alice Receiver: Bob
Amount: 20 Digital Signature
Transactions
Previous TX: tx550 Index: 0
Sender: Alice Receiver: Bob
Amount: 20 Digital Signature
tx550: Celso->Alice(20) status: unspent
Transactions
Previous TX: tx550 Index: 0
Sender: Alice Receiver: Bob
Amount: 20 Digital Signature
tx550: Celso->Alice(20) status: spent
Transactions
Previous TX: tx550,tx1600 Index: 0
Sender: Alice Receiver: Bob
Amount: 20 Digital Signature
Previous TX: tx550,tx1600 Index: 1
Sender: Alice Receiver: Alice
Amount: 2 Digital Signature
tx550: Celso->Alice(15) status: unspent
tx1600: Bob->Alice(7) status: unspent
Transactions
Previous TX: tx550,tx1600 Index: 0
Sender: Alice Receiver: Bob
Amount: 20 Digital Signature
Previous TX: tx550,tx1600 Index: 1
Sender: Alice Receiver: Alice
Amount: 2 Digital Signature
tx550: Celso->Alice(15) status: spent
tx1600: Bob->Alice(7) status: spent
Account Balance
Alice 10
Bob 20
Celso 9999
… …
Blocks
Alice -> Bob (20) Alice -> Celso (10)
… Bob -> Marley (33)
!Previous Block Hash Current Block Hash
Block chain
Alice -> Bob (5) Alice -> Celso (10)
… Bob -> Marley (33)
……hash_block100
… hash_block101
Bob -> Alice (20) hash_block99
… hash_block100
…
The public ledger contains transactions, not balances.
block 100
Block chain
Alice -> Bob (5) Alice -> Celso (10)
… Bob -> Marley (33)
……hash_block100
… hash_block101
Bob -> Alice (50) hash_block99
… hash_block100
…
block 100
Block chain
Alice -> Bob (5) Alice -> Celso (10)
… Bob -> Marley (33)
……hash_block100
… hash_block101
Bob -> Alice (50) hash_block99
… hash_block100
…
block 100
Block chain forks
………
…
… …
Block chain forks
………
…
… …
Mining• Mining is the process of adding blocks to the block
chain, thereby confirming a set of transactions
• It uses a proof-of-work algorithm
• The text of the block + a nonce are hashed using SHA256
• A block is considered valid when the resulting hash starts with a certain number of 0s
Mining
"Hello, world!0" 1312af178c253f84028d480a6adc1e25e81caa44c749ec81976192e2ec934c64
"Hello, world!1" e9afc424b79e4f6ab42d99c81156d3a17228d6e1eef4139be78e948a9332a7d8
...
"Hello, world!4249" c004190b822f1669cac8dc37e761cb73652e7832fb814565702245cf26ebb9e6
"Hello, world!4250" 0000c3af42fc31103f1fdc0151fa747ff87349a4714df7cc52ea464e12dcd4e9
The difficulty (number of zeros) varies depending on the hashrate of the network, which
approximates the block time to 10 minutes
Mining
• Miners that generate valid blocks are rewarded
• The rewards halves every 4 years (geometric progression) — current reward is 25 BTC
• Max number of BTC: 21 million
• After 2033, rewards will be based on transaction fees
Mining
• CPU (< 0.04GH/s)
• GPU (< 1GH/s)
• FPGA (< 1GH/s)
• ASIC (< 1,000GH/s)
• Pool mining1 G = 1,000,000,000
(1 billion)
Issues
• Potential loss/theft of private keys
• Not truly anonymous
• Double spending and the 51% attack
Double Spending
Previous TX: tx551 Sender: Trudy!Receiver: Alice!
Amount: 20
tx551: Bob->Trudy(20) status: unspent
Previous TX: tx551 Sender: Trudy!
Receiver: Trudy!Amount: 20
Altcoins
Litecoin
• One of the first Bitcoin forks (2011)
• Introduced the scrypt proof-of-work algorithm
• Block time: 2.5 minutes, limited to 21 million LTC like BTC
• Currently #2 cryptocurrency
Dogecoin• A fork of Litecoin
• Made as a joke, features the famous Doge meme with the friendly Shiba Inu
• No coin limit (100 billion until 2014 + 5 billion per year afterwards)
• much fast (1 minute block time)
• Amazing community that loves to tip and fund charities (/r/dogecoin)
$30k
$55k
$30k
Ɖ30M
$30k
ping @miguelduarte42
10k giveaway