An introduction to the basic working mechanism of bitcoin and blockchain: how bitcoin works, bitcoin network, nodes, miners, hashing, difficulty and nonce, etc, why bitcoin mining consumes so much energy. Variations of blockchain, MDL.
9. IF YOU HAVE A BITCOIN……
Bitcoin is the receipt of transaction that you
received the bitcoin.
Bitcoin transaction is recorded in the blockchain.
You can print a copy or keep in your computer
(cold storage) or keep on-line (hot storage). 9
You have an address (public key) and password
(private key) as proof that you have the bitcoin.
10. IF YOU LOSE THE PRIVATE KEY, YOU LOSE THE
BITCOIN….
10
11. POST OFFICE BOX
11
• address
• key
Receiver creates a bitcoin address by
downloading a bitcoin wallet software.
12. PUBLISH
To announce the transaction to the bitcoin network
that payer’s address is used and no longer valid.
This is to prevent the same bitcoin used twice.
12
tx
tx
Nodes are computers running bitcoin software.
13. BITCOIN NETWORK
Bitcoin network is a part of internet.
It is formed by the computers running bitcoin
software.
These computers are called nodes.
There are two types of nodes:
Miners – validate transactions and build blocks.
Full nodes – keep a copy of blockchain and verify
blocks.
13
14. MINERS VALIDATE AND RECORD
TRANSACTIONS
Miners collect transactions and validate them.
After validation, miners record them in the ledger
called “block”.
Block can fit up to 3,000 transactions and takes 10
min.
14
The first miner to complete
the block sends the new
block to all nodes in the
network.
All other miners stop working
on the block.
15. FULL NODES VERIFY BLOCKS
Nodes verify the block to make sure that all
transactions in the block are valid.
If a node finds that the miner cheats, he rejects the
block.
They can do so because all nodes keep a complete
copy of the bitcoin blockchain.
If majority of the nodes accept the new block, it is
then attached to the blockchain.
This process is called consensus.
The transactions included in the block are then
eliminated from the network. 15
16. HOW BITCOIN IS CREATED?
When miner builds a block, the bitcoin software
creates new bitcoins as reward to him.
In the first 4 years, the reward was 50 bitcoins.
Every 4 years, the reward is reduced by half.
Now the reward is 12.5 bitcoins.
This limits the total bitcoin that can be created by
21 million.
16
18. WHO CAN RUN NODE?
Nodes are voluntary. The requirements are:
Node computer needs 300 GB of disk space, 2GB of
RAM, and a fast internet connection.
Download a copy of Bitcoin Core software.
All nodes carry a complete copy of the blockchain (in
Jan., 2019 ~225GB)
Currently, there are 10,000 bitcoin nodes.
https://bitcoin.org/en/download
18
21. HASHING – A CRYPTOGRAPHIC
FUNCTION
Hashing is to encrypt data.
Hash is like “fingerprint”, is difficult to make but
easy to verify.
21
22. A SIMPLE HASH FUNCTION
=1.73205080756888
=1.73207967484178
=1.73202193981485
=207.66078108299600
22
Square root function can be a hash for
the numbers.
23. SHA-256 HASH
23
SHA means Secured Hash Algorithm.
There are 2256 possible combinations of Hash value
(1.15792 x 1077)
https://www.xorbin.com/tools/sha256-hash-calculator
25. DIFFICULTY AND NONCE
25
Requiring more 0’s at the beginning of hash
makes hash number smaller and
needs more iterations to get hash
26. WHY INCREASES DIFFICULTY?
To offset increasing computing power in the
bitcoin network
In Aug.,2019, a valid bitcoin hash starts with 19
zeros.
Difficulty = block 0 difficulty / current target difficulty
Difficulty is adjusted every 2016 blocks to
maintain one block output per 10 minutes.
Or, average time to build a block * hash rate =
constant
26
27. WHY NONCE?
Nonce is a random number.
It makes the number of iterations of hash change
randomly.
It is like lottery.
The chance of winning becomes proportional to the
hashing power.
This is to equalize the chance of winning the
reward.
27
37. PROOF OF WORK
All the above tasks performed by the miners is
called Proof of Work.
PoW is energy intensive.
Bitcoin mining consumes 30 TWh in 2017 alone,
more energy than 159 countries.
PoW makes the bitcoin trustable.
Any process which builds trust in a blockchain is
called consensus.
37
38. BITCOIN IS DIVISABLE
38
5 Bitcoins
In address 1
3 Bitcoins
In address 2
2 Bitcoins
In address 3
John Mary
John
When John pays out of address 1, address 1 is no longer
valid.
Mary created address 2 to receive 3 bitcoins.
John created address 3 to receive 2 bitcoins as change.
If John does not create address 3, miner will create address 3
to receive the difference.
It is considered as transaction fee.
INPUT OUTPUT
40. BLOCKCHAIN IS
Distributed database – to make the database
immutable
Cryptography – to make the database safe
Consensus – to allow database to obey
established protocol
Blockchain is also known as Mutual Distributed
Ledger (MDL).
40
41. BLOCKCHAIN APPLICATIONS
Cryptocurrencies.
There are more than 1,000 cryptocurrencies today.
Since blockchain is a database, it can be used for
all database applications.
Most important applications are in financial area –
Fintech.
41
43. FINTECH USING BLOCKCHAIN
Fintech gets a boost from blockchain technology.
Secure
Fast
Built-in trust
Indestructible
Immutable
New applications
43
44. VARIATIONS OF BLOCKCHAIN
Different applications of blockchain require different
characteristics
Decentralized vs. centralized
Permissionless vs. permissioned
Different levels of permission
44
46. SMART CONTRACT
Contract is a document, which can be stored in the
database.
A smart contract is computerized transaction
protocol that executes the terms of a contract.[
Smart contracts allow the performance of credible
transactions without third parties.
46
47. ETHEREUM – BLOCKCHAIN WITH SMART CONTRACT
Ethereum is programmable blockchain.
These decentralized applications (or “dapps”) have
the benefits of cryptocurrency and blockchain
technology.
The Ethereum community is the largest and most
active blockchain community in the world.
47
49. MDL IS VARIATION OF BLOCKCHAIN
Independent MDL’s can work with each other.
MDL has all the quality of blockchain
Different organizations can have different MDL’s
and they can share data.
49
50. THREE TYPES OF MDL
Identity MDL
National ID, driver license, passport, tax ID, insurance card,
library card, fingerprint, face photo, etc. all in one with
security, immutability
Transaction MDL
All events require ID
Doctor visit, traffic ticket, boarding airplane, bank activity
Content MDL
Each entity has its own content MDL
50
60. CONCLUSION
Blockchain is a revolutionary invention.
We are at the starting point to see the impact of
blockchain in all aspects of the financial industry.
For more detail, refer to the book “Bitcoin,
blockchain and fintech” by Len Mei in Amazon
online bookstore.
https://www.amazon.com.br/dp/B07MJW4QPX
60