0% found this document useful (0 votes)
123 views97 pages

Complete Course On Blockchain and Crypto Currency

Uploaded by

larteylarkai24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
123 views97 pages

Complete Course On Blockchain and Crypto Currency

Uploaded by

larteylarkai24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 97

Complete Course on Blockchain

and Crypto Currency

Introduction to Crypto and Block chain

Navdeep Yadav
Co-Founder Float
Product Manager |MBA|
Course Overview Block Chain and Crypto currency

Introduction to Evolution of Web and Introduction to Bitcoin Mining and


blockchain Currency Blockchain Blockchain technology
• Evolution of Money • Introduction to Digital • overview of blockchain • How does bitcoin use
• Bitcoin and financial crisis Signature? technology? blockchain technology?
2008 • Block, Hash and sale in • Types of Blockchain • How does mining work in
• Bitcoin vs Gold Blockchain? technology? bitcoin?
• Fiat Currency vs • What is proof of work • Benefits of blockchain • Types of Crypto Wallets?
Cryptocurrency • Web 1.0, Web 2.0 & Web 3.0 technology • Wallet address, Public and
• Explain Bitcoin Like I’m 5? • What is Block in a Private key of your wallet
• What is blockchain Blockchain?
• Block and decentralize • Hash and Merkle tree in a
ledger block

Ethereum: The NeXT Web 3.0 with Defi and 9. How to Scale
Internet Protocol Dapps Ethereum
• What is Ethereum? • Types of token • Problems with Ethereum
• Smart Contract • What is Dapps • Blockchain Trilemma
• Ethereum Request for • Building decentralised • Ethereum Scaling Solution
Comment (ERC) standard social media app • Off-Chain and on-chain
• Building Tik-Tok on • Civic token built on Scaling
Ethereum Ethereum • L0, L1 and L2 Scaling
• Ethereum benefits and real • Proof of Work Vs Proof of solution
use case Stake • Introduction to oracle
• Difference between Coin vs • Ethereum virtual machine
Token
Blockchain in the most simplest form
Blockchain in the most simplest form

There are 2 friends sitting in a park.


You are Alice, I am Mary

I have a toy. You have none.


I give the toy to you.
Now you have a toy. I have none.

Pretty Straightforward, right?

Mary Alice
Blockchain in the most simplest form
I had a toy.
I gave it to you. We did not need a third person to
make the transfer for us.

I can’t give the toy to someone else because I


don’t have it anymore.

Whereas you can give it to whomsoever you wish


to.

And they can give it to whoever they want to and


so on. Mary Alice
Blockchain in the most simplest form

Now suppose I have a digital toy.

I give you my digital toy.

But I have saved a million copies on my


laptop and given it to every kid on the
internet

Mary Alice
So, sending digital toys is not the same as giving physical toys.

This problem is called the double-spending problem which is


solved by blockchain
How do we solve the problem of Double spending
We can maintain a ledger.

Similar to what people at shops maintain.


An account book, where all the transactions
are recorded.

So, there will be a ledger where all the transactions of


digital toys will be recorded. Someone, say Danny will be
in charge of it.

Problem Solved, right?


No.
How do we solve the problem of Double spending
Because how do we know if Danny is not cheating and adding
digital toys to his and his girlfriend’s account anytime he wants?

Also, why do we need to involve Danny in transactions that


concern only you and me?

Enters Blockchain!
How do we solve the problem of Double spending

What if everyone had a copy of the accounting


book on their computer and all the transactions
will be recorded in the ledger at the same time.

This is tough to beat. Now Danny can’t add toys


that he doesn’t have to his account.

Because then it wouldn’t match with everyone


else’s book.
How do we solve the problem of Double spending

Everyone who has a copy of the ledger on their system


and maintains it by validating the transactions get digital
toys as rewards. This is the way digital toys are ever
produced.

This is blockchain. And these toys that I was talking about


are bitcoins or for that matter anything of value.

The ledger is visible to everyone.

Now we don’t rely on a third person (Danny) to maintain our


balances for us.

We don’t need to worry about the double spending problem.


It’s a wrap

Blockchain Bitcoin
What is Blockchain and Crypto currency
Various Centralized ledger
Centralize ledger

Value added services

-Bank transfer
-Stock purchase
-Collaterals
What is Blockchain and Crypto currency
Blockchain is the technology of distributed ledger that give control to people instead of bank
Centralize ledger Distributed ledger
Blockchain is Peer to peer and Decentralise

Peer to Peer Decentralized System


-No Intermediary -No one owner
-No Commission -No tampering and leakage
-No approval -Everyone validates the transaction
How does “blockchain” Work ?
A blockchain is a shared ledger that stores information about transactions in a
distributed manner.

• These transactions are performed between people


within a blockchain, which is formed by its
participant’s computers.

• These computers provide the computing power to


constantly maintain the blockchain (by performing
computations and verifying transactions).

• Such computers are called nodes, and each node in


the network owns a full copy of the blockchain.
Cryptocurrency vs Fiat currency

“The root problem with conventional currency is all the trust that's required to make it
work. The central bank must be trusted not to debase the currency, but the history of fiat
currencies is full of breaches of that trust. Banks must be trusted to hold our money and
transfer it electronically, but they lend it out in waves of credit bubbles with barely a
fraction in reserve.” - Satoshi Nakamoto
Cryptocurrency vs Fiat currency
What is crypto currency

Blockchain is the technology that is used to transfer cryptographic currency

DLT or Web 3.0

Crypto + Currency
Blockchain

Crypto :- Block chain is secured by cryptography


Hash function (SHA-256)

Currency :- Value of money like bitcoin ,Ethereum etc Cryptocurrency

Block chain is used for the first time to transfer


currency hence created confusion among people
What is a Block in the Blockchain Technology ?
What is a Block in the Blockchain Technology ?

Blockchain ledger behind the scene

Who Invented Blockchain?


Stuart Haber and W. Scott Stornetta discovered
blockchain while working on a cryptographically
secured chain of blocks whereby no one could
tamper with timestamps of documents.

In 1992, they upgraded their system to


incorporate Merkle trees that enhanced
efficiency thereby enabling the collection of
more documents on a single block
Block in a blockchain technology

The blockchain is a chain of data blocks. Each block can be thought of as a page in a ledger.
Block head and block body

cockpit of a truck
Block in a blockchain technology

The blockchain is a chain of data blocks. Each block can be thought of as a page in a ledger.
What is a block in a blockchain

The individual blocks are composed of several components. Roughly these can be
differentiated into the head of the block (block header) and his body (block body).
Block header
The head of the block is divided into six components:

• the version number of the software


• the hash of the previous block
• the root hash of the Merkle tree
• the time in seconds since 1970–01–01 T00: 00 UTC
• the goal of the current difficulty
• the nonce
The block header plays a fundamental role in Bitcoin because it
connects all blocks together.

You can imagine it like the cockpit of a truck.


Here are the important papers with which the truck comes
through the controls of the network.
Block body in the block chain

Block body

A block body is a ledger that can store data

• amount of money
• share in a company
• digital certificate of ownership
• vote during an election

The block body is conceivable as the loading space of a truck. It


contains all transactions that are confirmed with the block.

When a miner constructs a block, it validates the transactions. The


miner looks in the past blocks to see if the sender has even gotten
ten Bitcoins if he wants to send ten Bitcoins.
The hash of the previous block

Because the hash of the previous block is contained in the hash of the new block, the blocks
of the blockchain all build on each other.

Genesis Block

Without this component, there would be no connection and chronology


between each block.
What if anyone changes the data

If anyone changes the data in a single block, the hash of that particular block changes,
but it also makes the whole chain invalid.

Genesis Block

A hash is a great tool for identifying attempts to change data in blocks


Length of Hash function decides the block size

All these hash will form a Merkle tree and every hash has a size
in bits.

The lower the goal in bits is, the harder it is to find a matching
hash.

Example:- A hash with many zeros at the beginning is smaller


than a hash without zeros.

Less the zero bigger the block size and more the data you can
store

More about this in proof of work consensus mechanism

Upcoming topic
Summarise Block chain technology
Bitcoin and Blockchain network
What Is Bitcoin ?
How does “Bitcoin” Work ?
What is Blockchain Technology ?
What makes blockchain so unique

More about this in the next video

Upcoming topic
What is Bitcoin and who created this

Bitcoin Is a Digital currency with no banks or government

You have to be expert at these to make a Bitcoin :-

• Game theory
• Cryptography
• Mathematics
• Computer science

So bitcoin was developed by a group of people and not by one person


Track of payments with a communal ledger.

Alice Bob

Ledger
Alice Pays bob $20

Bob pays Charlie $40


Tally Up
Charlie Pays you $30

You pays Alice $10


You Charlie
Track of payments with a communal ledger.
Alice Bob
Protocol of this Ledger

• Anyone can add lines to the ledger

• Settles up with real money every month

Anyone can add or remove anything


from this ledger

You Charlie

Ledger – Trust + Cryptography = Cryptocurrency


List of all cryptocurrency on exchanges
Digital Signatures in Cryptography - Security

Alice Bob
Ledger
Transaction Signature

Alice Pays bob $20 Alice

Bob pays Charlie $40 Bob

Charlie Pays you $30 Charlie


You Charlie

But anyone else can create or duplicate


the normal signature ?
Ways to prevent forge in Digital Signatures

Public key & private key pair

Alice Bob Charlie You


101001101001 10101000111 1000100111 100111000

Pk : 1001010.. Pk : 1001110.. Pk : 1101010.. Pk : 101110..


Sk: 10001.. Sk: 10011.. Sk: 1011001.. Sk: 1101..

Bob You Charlie


Alice

Sign{Message + sk) = Digital Signature


Digital Signatures in Cryptography

Alice Bob
People can’t create it but they can still
duplicate the created signature.

Ledger
Alice Pays bob $20 101001101001..

Alice Pays bob $20 101001101001..

Alice Pays bob $20 101001101001..


You Charlie
Alice Pays bob $20 101001101001..
Ways to prevent forge in Digital Signatures

Public key & private key pair

Alice Bob Charlie You


101001101001 10101000111 1000100111 100111000

Pk : 1001010.. Pk : 1001110.. Pk : 1101010.. Pk : 101110..


Sk: 10001.. Sk: 10011.. Sk: 1011001.. Sk: 1101..

Bob You Charlie


Alice

Sign{Message + sk) = Digital Signature


Verify = {Message + Signature + Pk) = T/F
Verifying Digital Signature with PK

Sign{Message + sk) = 256 bit Digital Signature I am sending


100 dollars to
you
Alice Bob
1010101010101010101010101010101101010101010
01010000111111010101010101010101010101
01010101010101001010100101 0010100101001 $ 100

Verify = {Message + 256 bit Signature + pk) = Yes or No


Digital Signatures in Cryptography

Alice Bob
Ledger
Alice Pays bob $20 101001101001..

Bob pays Charlie $40 10101000111…

Charlie Pays you $30 1000100111…

You pays Alice $10 100111000…

You Charlie
It should be infeasible for anyone else to forge
her signature.
Digital Signatures in Cryptography

Alice Bob
Protocol of ledger
• Anyone can add lines to the ledger
• Settles up with real money every month
• Only Signed transactions are valid

What if Charlie overspend and don’t settle in cash?

You Charlie
What if some one overspend the money

Let’s pay $100


What if Charlie overspends and doesn’t settle in cash? into the pot and
then settle
Alice Bob

$ 100 $ 100
Ledger
Charlie Pays bob $100 101001101001.. $ 400

$ 100
Charlie Pays Alice $200 10101000111… $ 100

You Charlie
Charlie Pays you $200 1000100111…

Over spending problem is solved now

No more connection with USD


How Exchanges Really work

Bitcoin = USDT = ETH = SOL = ADA


Verifying Digital Signature with PK

Sign{Message + sk) = 256 bit Digital Signature

Verify = {Message + 256 bit Signature + pk)

1010101010101010101010101010101101010101010
01010000111111010101010101010101010101
01010101010101001010100101 0010100101001
256
2 Signatures are possible

It should be infeasible for anyone else to forge


her signature.
Hash and Sale for encryption
Why do we need salt
Explain consensus mechanism like I am five
How will all these people agree on the same transaction at the same time

Did you guys


Alice Pays
also noted that
bob $20 transaction

Alice Bob

Ledger
Ledger -------------
-------------
-------------
-------------
-------------
-------------

Ledger Ledger
------------- -------------
------------- -------------
------------- -------------

You Charlie
What is consensus mechanisms?

“Consensus mechanism is a group decision-making process to support a decision in the best


interest of the whole.”

A consensus mechanism is used as a fault-tolerant mechanism in blockchain systems to


achieve the necessary agreement among distributed processes such as with
cryptocurrencies.
Proof of Work vs Proof of Stake explanation like I am five

So suppose there are a bunch of kids in a kindergarten

They are maintaining stacks of wooden blocks toys


They also have duplicates of the same stack
They want to make sure all the blocks are same kept in the same order.
Proof of Work vs Proof of Stake explanation like I am five

If Someone wants to add a new wooden block on top of the stack,


that wooden block is sent to all the kids to prove the solution(Puzzle).

All the kids try to solve the puzzle/math problem (mining).

Solving the puzzle (problem) also verifies that the block is valid.

However, the only way to solve the puzzle is brute force and luck.

The first person to solve it receives one candy (fee for mining).

Once the math puzzle is solved, it is easy to verify the solution by


arranging that on the top of the stack

If more than 50% of the kids verify it is correct, then they all add that block
to the top of their blocks.

Thus making sure the only agreed upon blocks are added (Consensus).
Proof of Work vs Proof of Stake explanation like I am five

If a bad kid wants to insert a bad block (or replace a good block) into the stack

He’d have to convince/bribe more than 51% of the kids to follow along
And redo all the math puzzles for each of the blocks on top of the block
This can be very costly and time-consuming

Proof of work prevents the bad actors from tampering with the blockchain.
Consensus mechanisms in BTC and ETH?

These consensus mechanisms also ensure new blocks get added to any blockchain.

An example of a consensus mechanism is proof-of-work (PoW), often referred to as “mining.”

Mining isn’t universal to all blockchains; it’s just one type of consensus mechanism currently used
by Bitcoin and Ethereum, though Ethereum plans to move to another—proof-of-stake (PoS)— by
2022.
Blockchain Consensus Algorithms Popular in the Market

1. Proof of Work (PoW)


Developed by Satoshi Nakamoto, Proof of Work is the
oldest consensus mechanism used in the Blockchain
domain and Ethereum up to till 2021

2. Proof of Stake (PoS)


Unlike that in the case of PoW, miners are provided with a
privilege to take their transaction fees in this algorithm for
there is no reward system in this consensus model.
Ex:- used by Ethereum 2.0
Byzantine Generals Problem
How do you make sure that multiple entities, which are separated by distance, are in
absolute full agreement before an action is taken?
Imagine divisions of a Byzantine army, attacking a completely encircled city

To proceed, the generals of each


division, who are dispersed around the
city’s periphery, must agree on a battle
plan.

However, while some generals want to


attack, others may want to retreat.

In order to achieve consensus, the commanding general and


every lieutenant must agree on the same decision.
Byzantine Generals Problem
Now the generals are so far apart from each other that messengers are required in order
for the generals to communicate.
Also, one or more lieutenants may be a traitor, intending to sabotage the situation.

The loyal lieutenants will all do what the


algorithm says they should, but the
traitors may do anything they wish.

The algorithm must guarantee the first


condition regardless of what the traitors
do.

The loyal lieutenants should not only


reach an agreement but should agree
upon a reasonable plan.
Who controls this ledger ?

Alice Bob
Who Owns the website?
Who hosts the ledger?
Who controls the rules of the game?

$400
Ledger
Alice Pays bob $20 101001101001..

Bob pays Charlie $40 10101000111… You Charlie

Charlie Pays you $30 1000100111…

You pays Alice $10 100111000…


We own our own ledger - Decentralize

Alice Bob

Ledger
Ledger -------------
-------------
-------------
-------------
-------------
-------------

Ledger Ledger
------------- -------------
------------- -------------
------------- -------------

You Charlie
We own our own ledger - Decentralize

Did you guys


Alice Pays
also noted that
bob $20 transaction

Alice Bob

Ledger
Ledger -------------
-------------
-------------
-------------
-------------
-------------

Ledger Ledger
------------- -------------
------------- -------------
------------- -------------

You Charlie
Cryptographic Hash Function

Hash Function
101010101010101010101010101
01011010101010100101000011
1111010101010101010101010101
SHA 256 (“Navdeep”) = 01010101010101001010100101
0010100101001

Message or
“Hash” or “Digest”
transaction

256
2 Signatures are possible

Hash is always random even with a small change in input


Trillion dollar Security Hash Function

Hash Function
101010101010101010101010101
01011010101010100101000011
1111010101010101010101010101
SHA 256 (“ ”) = 01010101010101001010100101
0010100101001

??????
“Hash” or “Digest”
256 Signatures are
2 possible
Inverse is infeasible
00000000000000000000000000000000000
SHA 256 (“ Guess 1”) = 00000000000000000000000000000000000
000000000000000000000000001
00000000000000000000000000000000000
SHA 256 (“ Guess 2”) = 00000000000000000000000000000000000
000000000000000000000000002
Who own this distributed ledger ?

Someone will do the proof of work and find a new block from the previous block

Alice Pays bob $2 0


Alice Bob

Ledger
Ledger -------------
-------------
-------------
-------------
-------------
-------------

Ledger Ledger
------------- -------------
------------- -------------
------------- -------------

You Charlie
How to Guess the next block with SHA 256 Hash

Ledger 30 Zeros
Alice Pays bob $20
000000000000000000000
Bob pays Charlie $40 SHA 256 0000000000000111101010101
010101010101010101010101010
10100101010010100101001010
Charlie Pays you $30
01
You pays Alice $10

Now find a next number with first 30 zero

1010101011 1
Probability of finding this is = 30
~ 1 in a billion
2

Block Creator/Miner
How Blocks are created and connected

Ledger Ledger Ledger


Charlie Pays you $30 Bob pays Charlie $40
Alice Pays bob $20
You pays Alice $10 Charlie Pays you $30
Bob pays Charlie $40

POW (10101010110) POW (101010110101) POW (101101010101)


How to Guess the next block with SHA 256 Hash

Ledger Ledger Ledger


Alice Pays bob $20 Charlie Pays you $30 Bob pays Charlie $40
Bob pays Charlie $40 You pays Alice $10 Charlie Pays you $30
POW (10101010110) POW (101010110101) POW (101101010101)

SHA 256 SHA 256 SHA 256

000000000000000000000 000000000000000000000 000000000000000000000


0000000000000111101010101 0000000000000111101010101 0000000000000111101010101
010101010101010101010101010 010101010101010010101010101 0101010101010101010111111000
10100101010010100101001010 000001111110100101001 10101011110010101001
01
How the blocks are connected with previous hash

Previous Hash Previous Hash Previous Hash


Charlie Pays you $30 Bob pays Charlie $40
Alice Pays bob $20
You pays Alice $10 Charlie Pays you $30
Bob pays Charlie $40
POW (10101010110) POW (101010110101) POW (101101010101)

SHA 256 SHA 256 SHA 256

0000000000000000000000000000 0000000000000000000000000000 0000000000000000000000000000


0000001111010101010101010101010101 0000001111010101010101010101010100 0000001111010101010101010101010101
0101010101010100101010010100101001 10101010101000001111110100101001 01011111100010101011110010101001
01001
Block creator broadcasting blocks (Mining)

Bob
Ledger Ledger

Alice
Ledger Ledger

----- ----- ----- -----

Previous Hash
Miner 1
Alice Pays bob $20

Bob pays Charlie $40


POW (10101010110)
Ledger Ledger
Ledger Ledger
----- -----
----- -----
Miner 1
I created this
SHA 256
block with my
computer You Charlie

0000000000000000000000000000
0000001111010101010101010101010101
0101010101010100101010010100101001
01001
How the blocks are connected with previous hash

Previous Hash Previous Hash Previous Hash


Charlie Pays you $30 Bob pays Charlie $40
Alice Pays bob $20
You pays Alice $10 Charlie Pays you $30
Bob pays Charlie $40
POW (10101010110) POW (101010110101) POW (101101010101)

SHA 256 SHA 256 SHA 256

0000000000000000000000000000 0000000000000000000000000000 0000000000000000000000000000


0000001111010101010101010101010101 0000001111010101010101010101010100 0000001111010101010101010101010101
0101010101010100101010010100101001 10101010101000001111110100101001 01011111100010101011110010101001
01001
How the blocks are connected with previous hash

Previous Hash Previous Hash Previous Hash


Charlie Pays you $30 Bob pays Charlie $40
Alice Pays bob $20
You pays Alice $10 Charlie Pays you $30
Bob pays Charlie $40

POW (10101010110) POW (101010110101) POW (101101010101)


Bitcoin Block element
Bitcoin Proof of Work in Layman Terms

Find the mathematical sum = 5+7

The answer is 12.

Between all the miners who so ever will solve the puzzle first will get some mining fees

Miner 1 Miner 2

Attempt 1: 5+7 = 17 *Incorrect* Attempt 1: 5+7 = 17 *Incorrect*

Attempt 2: 5+7 = 8 *Incorrect* Attempt 2: 5+7 = 8 *Incorrect*

Attempt 3: 5+7 = 13 *Incorrect* Attempt 3: 5+7 = 12 *Correct*


Proof of work consensus mechanism?

Proof of Work is the consensus algorithm of the Bitcoin


and currently Ethereum blockchain(as of 2022)

Bitcoin is using a Hash cash proof of work system

In a Proof of Work blockchain, the participants ready to


spend computational power to solve cryptographic
problems have the right to add new blocks to the
blockchain.

Proof of Work eliminates the need for trust in a bank or


the requirement for a third party during transaction
processing
Block in blockchain

If anyone changes the data in a single block, the hash of that particular block changes,
but it also makes the whole chain invalid.

Genesis Block

A hash is a great tool for identifying attempts to change data in blocks


Proof of work consensus mechanism?

Let say that you have everything you need to start computing.

The hash from previous blockchain block is


00000000000000000028c91a95cd6a5b6cbd913c203510eab269208df6c64091, you have a bunch with 100
transactions, and you pick a random number 1.

So, you will choose another random number


The resulting string starts with only three zeros
and start another calculation. This time we will
and you have to get a string with 18 zeros.
choose number 2.

This time, you chose the right number and as a result, you got a string that starts with 18 zeros.
Problem with proof of work

Proof of work is a great consensus algorithm, but it’s not perfect.

A machine or computer must keep incrementing a nonce until it finds the right one.

It means a computer has to brute force that number and generate millions of hashes per
second to generate the one that will have the same number of starting zeros as defined.

Electricity and Computer power

To execute PoW we have to spend high amounts of electricity and computer power just to brute force
hashes. The power used for PoW is just a waste of resources.

Just imagine if some cryptocurrency that uses Pow, like Bitcoin, goes to mainstream adoption.

How much electricity would be used to have the network running?


Problem with proof of work

Centralization and Mining pools.


Someone who mines with just one CPU will not have a good chance for a reward, but someone who has a
mining pool with a thousand CPUs will have a better chance.

Today, almost 50% of Bitcoin hash power is coming from a few mining pools.

That means that only a few people have to meet at the same desk to agree on a 51% attack and changing the
blockchain if they have a reason to do that. Ie (Not decentralize)

More than 70% of the mining power is coming from China due to low electricity cost
How and Why Mining happens in Bitcoin
Bitcoin mining in layman terms

You are the teacher of a math class and decide to play a game:

First we’re going to put a number on every chair”

“Then every 10 minutes I’m going to give out a blank sheet of


paper with “50c(Reward)” attached to it.”

“Then I’m going to call out a math problem and the first kid to
solve that problem will be given that sheet of paper.”

“The only thing you have to do to keep the “50c” is to write


down the ‘chair numbers’ of the person giving and the person
receiving and the amount given every time a kid gives some
money to another kid.”
Bitcoin mining in layman terms

5 minutes pass and then one girl says:

“Bingo! I have the solution”

You check the solution and then give the girl the piece of
paper and she begins to write down any transactions
between the other kids.

“Hmm..” you think to yourself.. “that was too easy and she
solved it too quickly.. I know I'll give them a much harder one
next time.”

So you give them a harder problem to solve and sure enough


11 minutes later another kid yells out “Bingo! I found the
solution!”..
Bitcoin mining in layman terms

You repeat this process over and over, every few hours
adjusting the difficulty of the math problems to ensure that a
new sheet of paper is given out roughly every 10 minutes….

That is essentially all that mining is.

A bunch of kids in a classroom solving problems to get a


reward, except instead of paper they are using very expensive
and very sophisticated computers called ASICs.

The number of kids doesn’t matter, nor does it matter how


smart they are, because every few hours you change the
solution just enough to make sure they are able to complete it
in roughly 10 minutes.
Mining high level overview
Bitcoin mining explained

Let’s imagine If Alice is sending 1 Bitcoin to Bob

The transaction will happen in the public ledger which is running


around the world.
The machine which solve this mathematical puzzle fast will get
some bitcoin in reward (mining)
Block creator broadcasting blocks (Mining)

Bob
Ledger Ledger

Alice
Ledger Ledger

----- ----- ----- -----

Previous Hash
Miner 1
Alice Pays bob $20

Bob pays Charlie $40


POW (10101010110)
Ledger Ledger
Ledger Ledger
----- -----
----- -----
Miner 1
I created this
SHA 256
block with my
computer You Charlie

0000000000000000000000000000
0000001111010101010101010101010101
0101010101010100101010010100101001
01001
What will happen in case of Conflicting Block

Conflicting Block

Ledger Ledger Ledger Ledger Ledger Ledger Ledger

----- ----- ----- ----- ----- ----- -----

Bob
Block creator broadcasting blocks (Mining)

Ledger Ledger Ledger


Ledger Ledger

Alice fool bob with fake transaction ----- -----


----- ----- -----

Alice tried adding a block only to the Alice I will fool bob
with a fake Bob
transaction
bob’s ledger

You Charlie
Ledger Ledger Ledger Ledger

----- ----- ----- -----


Conflicting situation while adding block

Previous Hash

Alice Pays bob $20 Bob Ledger Ledger Ledger

----- ----- -----


Bob pays Charlie $40 Ledger Ledger

----- -----
POW (10101010110)
Ledger Ledger Ledger Ledger Ledger

----- ----- ----- ----- -----

To do 51%
attack I have to
be faster than
everyone SHA 256
Alice
0000000000000000000000000000
0000001111010101010101010101010101
0101010101010100101010010100101001
01001
Conclusion of block chain in context of bitcoin

• Digital Signature as encryption


Alice Bob
• The ledger is the currency
• Fully decentralize
• Proof of work
Ledger Ledger Ledger
Ledger Ledger

----- ----- ----- ----- -----


• Block chain

Miner 1 Miner 2

Ledger Ledger
Ledger Ledger

----- -----
----- -----

You Charlie
How the first few bitcoins are created

Alice Bob

$ 400

You Charlie
Mining Reward and Pool Hopping Problem

All the money in the form of bitcoin comes from block reward and it will cut in half
every four year

210,000(50+25+12.5+6.25….) = 21 Million Bitcoin


How mining work in Bitcoin

The Bitcoin network is secured by mining, as mining validates the transactions on the
network and mints new bitcoin at the same time.

• Mining also ensures that no one entity (nodes) is in control of the blockchain or
protocol that governs it, making Bitcoin resistant to being controlled (or shut down) by
any government or central authority.

• computers on the network — nodes known as “miners” — race to solve a


computationally-intensive, proof of work (PoW) puzzle

• The first miner to find a solution that is accepted by a majority of miners is permitted
to write a "block" of new transactions to the “blockchain” — Bitcoin's distributed
ledger.

• Return for her efforts, she is awarded a predetermined amount


of newly minted bitcoin called the “block reward.
Are you still confused?

What is web 3.0?


What is metaverse and NFTs?
Types of blockchain technology?
Types of cryptocurrency?
Types of Wallets and exchanges?
Most Popular Udemy Course about Metaverse and Startup

1 Complete Metaverse 31 Start-up Business 2


Course: Everything about Model : Best Course for
AR, VR, and NFTs Entrepreneurs

Click here Click here

112,806 Students 67,658 Students

Complete MBA course: SaaS Marketing, Metrics


Marketing and Business for Managers and
Strategy Founders
Click here Click here

112,806 Students 11,696 Students


3 4

You might also like