BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine...

42
BITCOINS and CRYPTOCURRENCIES How It Works [email protected] Principal Consultant CISA, CISSP

Transcript of BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine...

Page 1: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

BITCOINS andCRYPTOCURRENCIES

How It Works

[email protected] Principal ConsultantCISA, CISSP

Page 2: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Requirement: Unlearn many things that you thought you were very certain about.Have an open mind.

Page 3: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Covered topics

● Bitcoin And Cryptocurrencies

● How Does It Work?

● Introduction To The Economics Of Bitcoin

Page 4: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Money and Currency

● Something that is generally accepted

● Currency– Store of value: an asset that can be used now or tomorrow

– Unit of account: allows a value to be expressed in an understandable way, and allows value of items to be compared

– Medium of exchange: allows good or services to be traded without barter system

Page 5: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Crypto Currency

● Cryptocurrency– A digital asset designed to work as a medium of exchange

using cryptography to secure the transactions, & to control the creation of additional units of the currency

– N.B. Does not rely on trust to work; Limited supply

● Virtual Currency (as per BSP Circular 944)– Any type of digital unit that is used as a medium of exchange

or a form of digitally stored value created by agreement within the community of Virtual Currency users.

– Virtual Currencies are not issued nor guaranteed by any jurisdiction and do not have legal tender status.

Page 6: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Bitcoin

● Releases as open-source software in 2009

● A unit of a cryptocurrency– Peer-to-peer system, without intermediary

– First decentralized digital currency;

others: Litecoin, Ethereum, Monero

– Renders PCI DSS obsolete

– Revolutionary, just like the Internet

or BitTorrent or Wikipedia or Linux

Page 7: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Bitcoin

● A digital payment system– Open-source design

– World-wide payments

– Cheap processing fees

– Accounting transparency; yet

pseudonymous; Privacy by design

– Transactions are verified by network

nodes; recorded in a public distributed

ledger called blockchain

Page 8: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

General Acceptance

● Merchants– PayPal

– Microsoft

– Dell

– Newegg

– Overstock

– TigerDirect

– Time Inc

– Virgin Galactic

– Sacramento Kings

● Non-Profits– Mozilla Foundation

– Electronic Frontier Foundation

– Greenpeace

– Free Software Foundation

– Against Malaria Foundation

Page 9: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Bitcoin Value, 201711071 BTC = 1 XBT = US$ 7,424.24 = PhP 380,216.95

Page 10: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Stock of Narrow Money

PH PesoUS$ 66.03B

BTC or XBT US$ 123.74B= BTC 16,667

Value of total quantity of currency in circulation

Page 11: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Fiat vs Crypto Currency

● Fiat money– Does not have intrinsic value

– Value comes from being declared as legal tender by the government of the issuing country

– Governments can take it away (e.g. India, 2016)

– Susceptible to inflation (e.g. government prints more)

– Expensive to produce and regulate

– Much easier to steal

Page 12: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Utility of Bitcoin

● Cheaper remittance fees– No 3rd party intermediary

● Serve those without bank access– ~71M Filipinos (from World

Bank's Global Findex Database)

– Coinciding with National Broadband Plan of DICT

– Anti-poverty tool

Page 13: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Fundamentals of Bitcoin

● Blockchain– Shared public ledger

– All confirmed transactions are included here and for public viewing

● Address (Wallet)– Stores info / credentials

necessary for transactions

– Similar to bank accounts

● Transactions– Transfer of value between

Bitcoin wallets

– Payee verifies signature to verify chain of ownership

● Mining– Record-keeping service

– Awards Bitcoins and transaction fees to Miner

Page 14: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Bitcoin Address

3JpQhaaz2CGbtZuz8TyWKq3RCH7AXZ5zC3

Page 15: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

● Can be software, online, or physical XBT wallets

● Stores credentials for Bitcoin holdings– Uses public-key cryptography (ECDSA)

– Stores a collection of public and private keys● Private Key - unsigned 256-bit integer● Public Key - derived from Private Key,

but not in reverse - used to determine if a Signature is authentic

● Signature - proves that a signing

operation took place– 1.461501637×10 possible wallets ⁴⁸

Bitcoin Address

Page 16: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

● Blockchain is a 21st-century a transaction ledger– to determine ownership, establish valuations or delineate liabilities

– to track & chronologically journal any transaction that involves the exchange of value between parties

● whether that value is rooted in monetary funds, stocks, bonds, real estate or commodities such as corn, rice or even pork bellies

– to record birth and death certificates to provide an attestable record of these bookends of life events

Page 17: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Blockchain

● Decentralized DB

of transactions,

visible to public● 140+ GB now,

growing every 10m● Cryptographic

nature allows for

verified trust, not

inherent trust

Page 18: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Blockchain vs Bank Ledger

https://www.YouTube.com/user/CuriousInventor

Page 19: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Transactions

● English: Transfer of value between Bitcoin wallets

● Geek: wallets reassign the Bitcoins, from one owner to another, by adding a transaction to public ledger

Page 20: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Transaction Process

● To simplify:

1. Payer learns Bitcoin address of Payee (i.e. Public Key)

2. Payer broadcasts to network that he will give Payee, 1 BTC

3. Payer uses own Bitcoin wallet, signing transaction with own

Private Key, then is propagated & validated by the network

4. Miners process the transaction, each verifies intent of Payer

(using his Public Key), & a Confirmation is given after success

5. Updated Blockchain (i.e. public ledger) gets propagated

6. Payee is now assured that Payer has given payment of 1 BTC

Page 21: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Transactions

● Input: identify Bitcoins are being spent; from Payer

● Output: assigns Bitcoins to new owners; to Payee– Unspent Output: used as Input for future transactions

Page 22: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Transaction Chain

● Stored history of ownership in a list

● Record of all transactions between different Bitcoin wallets (i.e. Bitcoin addresses) since the beginning– There are no records of Accounts And Balances

– Instead, ownership of funds is verified through links to previous transactions

– Validity of each new transaction is dependent on validity of each previous transaction

● Stored in blockchain

Page 23: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Transaction

● Each transaction can only be used once as Input– Prevents “double-spending” attack

● Verified by:– checking if Input is from Payor

– funds of Payor are equal or more than the intended payment for Payee

– Input transactions are unspent, or new

– checking the Bitcoin address, or wallet, of Payee

Page 24: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Transaction Order

● Prevents “double-spending” fraud

● Transactions are grouped together in blocks, then linked together called the Block Chain

● Each block of transactions is a reference to the previous block

● Transactions in each block are considered to have happened in the same time– Transactions not in a block are Unconfirmed, or unordered

Page 25: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Transaction Order

● Any node on network can collect any set of Unconfirmed transactions, and put them in a block– Then broadcasts this on network as suggestion to be next for

Confirmation, or included in blockchain

● Blocks are not chained by order of time

● Miners calculate new (SHA256) hash values based on combination of previous hash value, the new transaction block, and a random number – Easy to verify, but extremely time-consuming to generate

– A success is called a Confirmation of a transaction block, happens every 10 minutes because of all world computers

Page 26: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Transaction Fees

● Fees: optional, but note that Miners can prioritize transactions that pay higher fees– better payout than Money Market!

Page 27: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Unit Of Account

● Bitcoin: Symbol can be BTC, or XBT, or

● Satoshi: smallest amount, 0.00000001 BTC

● mBTC: 0.001 BTC

Page 28: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Bitcoin Mining

● Bitcoins are rewarded to Miners every time they find a new block (with proof-of-work)

● Total amount to be mined is only 21,000,000 coins

● Record-keeping service

● Maintains consistency of blockchain, complete, and tamper proof

Page 29: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Supply

● A successful Miner finding the new block is rewarded with new Bitcoins and transaction fees– Rewards get harder to get every 210,000 blocks, or 4 years

– Estimated that by year 2140, all 21 million BTCs are mined● Satoshi Nakamoto set monetary policy to be based on scarcity

● Coinbase transaction– First transaction in a block, always created by a Miner

– All BTCs started in a coinbase transaction

Page 30: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Bitcoin Mining Pools

Page 31: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Bitcoin Mining Pools

Page 32: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Ownership

● Bitcoin users can spend funds associated with a specific Bitcoin wallet– Payer must digitally sign a transaction using his Private Key

– The network verifies the signature of Payer using the Payer's Public Key

● Loss of Private Key, means loss of ownership– Payer can only accept funds, but not spend it, ever.

– Loss can be due to irrecoverable password, forgotten wallets, damaged hard disk drive or USB flash drive, or death of person

– Computationally improbable, or effectively impossible,to recover lost Private Keys

Page 33: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Ownership

Page 34: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Privacy

● Bitcoins are pseudonymous– Bitcoin owners are not explicitly identified, but all transactions

on the blockchain are public

– Regulators can unveil Bitcoin wallet owners through KYC controls

– Transactions that spend coins from multiple inputs may indicate one owner

● Privacy is increased by generating new Bitcoin address for each transaction

● Mixers aggregate multiple Bitcoins and output to new addresses increase privacy

Page 35: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Governance

● Originally led by Satoshi Nakamoto, then Gavin Andresen, then Bitcoin Core for the reference implementation– Proposed various governance and blocksize standard

alternatives are Bitcoin XT, Bitcoin Classic, and Bitcoin Unlimited

Page 36: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Buying and Selling

● https://www.BloomRemit.net

● https://www.BuyBitcoin.ph

● https://CoinATMradar.com/bitcoin_atm/475/bitcoin-atm-genesis-coin-makati-sunette-towers/

● https://www.Coins.ph

● https://LocalBitcoins.com

● https://www.Rebit.ph

Page 37: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Pricing

● Determined by the market in which it trades– Supply versus demand

– Traded like ForEx, or commodities

● Crypto currency trading platforms– https://www.Bitfinex.com

– https://www.Bitstamp.net

– https://CEX.IO

– https://www.Coinbase.com

– https://www.itBit.com/

– https://www.Luno.com

Page 38: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

PH Regulation for Bitcoin

● BSP Circular 649 (E-Money)– Also dated 2009, just like start of Bitcoin

– Differentiated against crypto currencies

● BSP Circular 944 (Virtual Currency Exchanges)– Dated 06 February 2017 (Monday)

– Doesn't endorse Bitcoin as currency

– Regulates Virtual Currency when used for delivery of financial services, particularly payments and remittances

Page 39: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Bitcoin

LAGGUI AND ASSOCIATES, INC.

Page 40: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

PH Regulation for Bitcoin

● BSP Circular 944 (Virtual Currency Exchanges)– Very welcome development

– Impact is yet to be understood, as everyone, including a regular person, is to be treated as a remittance company

● Brings to mind fees to be paid, as well as controls required, reporting requirements

Page 41: BITCOINS and CRYPTOCURRENCIES · Blockchain is a 21st-century a transaction ledger – to determine ownership, establish valuations or delineate liabilities – to track & chronologically

Exercise: Create BTC Wallet

https://Coins.PH/invite/nzvlpk

● Receive Bitcoin, now