You are on page 1of 42

Decentralizati

on
&
Blockchain

Blockchain
Outline
● What is Decentralization?
● Decentralization in Blockchains
● Aspects of Decentralization in Blockchain
● Distributed Consensus
● Double Spending
● Five Questions
Centralization
● The process of transferring and assigning decision making
authority to higher levels of an organisational hierarchy.
● Knowledge, ideas and information are cascaded down the
organisation.
● The span of control of top managers is relatively broad.
● Examples: Private Organization, Dictatorship, Central
Storage, Facebook, Google, etc.
Decentralization
● The process of transferring and assigning decision making
authority to lower levels of an organisational hierarchy.
● Knowledge, ideas and information are flowing from the
bottom to the top of the organisation.
● The span of control of top managers is relatively small.
● Examples: Energy Generation, Democracy, Torrents, Open
Source Communities (GITHUB, Firefox, Linux,
Wikipedia, etc.)
Decentralization in Blockchains
● A decentralized network relies on a host of computers,
hence blockchain technology resides on a P2P network.
● It physically cannot work with a single computer or point-
of-connection. Instead, it requires other computers to join
in, in order to complete a specific task on the network.
● Decentralization is the backbone of Blockchain
● Without decentralization, blockchain could not achieve
permissionless-ness, openness, transparency and
censorship resistance.
Aspects of Decentralization in
Blockchains
● Peer-to-peer networking
○ open to anyone, low barrier entry
● Mining
○ open to anyone; but requires high consumption of
computational power
● Updates to the Software
○ trusted, core developers have higher power and
authority
● Distributed Consensus
Distributed Consensus
● Decades of research has been done on developing reliable
consensus algorithms
● Main goal is to achieve consensus over distributed network
● Distributed key-value stores: DNS, stock trading, public
key directory, etc.
Defining Distributed Consensus
● In a network of ‘n’ number of nodes, where each node has
an input, the distributed consensus has following
conditions:
○ The protocol terminates and all correct nodes decide on
same value
○ This value must have been proposed by a valid node
rather than an arbitrary value
Consensus Example: Bitcoin
Transaction
When Alice wants to pay Bob, she broadcasts the
transaction to all Bitcoin
Consensus Example: Bitcoin
Transaction
● Alice owns a Bitcoin which she wants to sell
● Bob wants to purchase Bitcoin
● Alice and Bob makes a deal to perform this transaction
● Bob shares his public key with Alice
● Alice creates a new block with data:
○ Alice’s digital signature
○ Bob’s public key
○ Hash
○ Confirmation of selling the Bitcoin
● Alice sends the block to whole network (not to Bob!)
● The network verifies that this transaction is valid and adds a new block
● Bob does not have to be online in order to receive Bitcoin, the whole
network verifies the transaction so the Bitcoin is Bob’s property now
How does a transaction get into the
blockchain?
What to agree on?
● Which transactions are broadcasted
● The sequence of blocks of transaction
● The validity of the hashes
● Validity of the digital signature of seller (Alice)
● Validity of public key of buyer (Bob)
● Confirmation that there is no double spending

Consensus is difficult because of:


○ Malicious/Faulty nodes
○ Latency
○ No concept of global timestamping
Double Spending
● Double-spending is a problem in which the same digital
currency can be spent more than once
● In real life, it is same as someone pays you with a bank
cheque and before you could cash it, they withdraws
money from their account
● Digital currencies such as Bitcoin, can be thought of as
being a digital file. Hence, nothing can prevent someone
from sharing same file with multiple people
● Protection against double spending is purely by consensus
Double Spending Example
Double Spending Example
Types of Double Spending in Proof of
Work
● Race Attack
● Finney Attack
● Dusty attack
● 51% Attack
Double Spending
Double Spending
Double Spending: Race Attack
● A race attack becomes possible when merchants accept
payments before receiving block confirmations on the
transaction.
● An end user sends two transactions almost simultaneously,
one to the merchant and another one back to another
wallet.
● In this case, miners could validate the operation toward the
wallet, which would mean that the merchant wouldn’t
receive the funds.
● All an attacker needs is mining power in order to perform
rce attack, however if Proof of Stake is used instead of
Double Spending: Race Attack
Double Spending: Finney Attack
● A Finney attack also occurs when the merchant doesn’t
wait for confirmation of the transaction.
● In this case, a miner transfers funds from one wallet to
another but doesn’t validate the block immediately.
● Then, he or she uses the source wallet to make a purchase.
● Once the second transaction is set, the miner broadcasts the
previously mined block, which also includes the first
transaction.
Double Spending: Finney Attack
Dusting attack : What is Bitcoin dust?
● A dusting attack is an attack in which a trace amount of crypto, called
dust, is sent to thousands — sometimes even hundreds of thousands —
of wallet addresses. This attack is deployed in order to track these
addresses with the hope of “un-masking” or de-anonymizing them.

● Bitcoin dust refers to the small amount of bitcoin leftover or unspent in a


transaction that is lower in value than the minimum limit of a valid
transaction. Thus, processing the transaction is impossible, trapping a tiny
amount of Bitcoin in a wallet or address.
Dusty Attack
● This is done by sending a tiny amount of the asset to multiple addresses.
A dust attack does not give an attacker access to your funds.
Double Spending: 51% Attack
● A 51% attack in this situation is called a majority attack
because it requires the attacker to control more than half of
a network’s hash rate.
● This could be possible if one miner or a group of miners
managed to generate blocks faster than the rest of the other
users on a network.
● All consensus algorithms are built to eliminate the risks of
a 51% attack.
● Example: Slushpool has 200,000 miners and owns 12% of
the network
Incentive and Proof of Work
● Despite the extremely secure blockchain platform and
robust Proof of Work algorithm, it is practically not
possible to prevent double spending attacks automatically
● Bitcoin proposes a system to give incentives to its users in
return of their honest behavior
● The Proof of Work incentive system pays in form of digital
currency, i.e. Bitcoin!
● Complex and smart mechanism of Proof of Work makes
sure that these incentives are given to legitimate miners
PoW Incentive 1: Block Reward
● Creator of block gets to:
○ Include special coin-creation transaction in the block
○ Choose the recipient of this coin

Value is fixed: 12.5 BTC, halves every 4 years


Reason: limiting the supply increases the demand, e.g.
diamond

Block creator gets to “collect” the incentive only if the block


ends up on the long-term consensus branch!
Incentive Halving Rule
PoW Incentive 2: Transaction Fees
● Creator of the block can choose to make the output value
less than the input value
● Remainder is the transaction fee that goes to the block
creator
● Examples: Property dealer, matchmaker, etc.
● The transactions which has a fee attached to them,
naturally attracts the miners, hence they are picked by
miners straightaway
● The transactions without fee are pushed back in the queue
PoW Incentive 2: Transaction Fees
Five Questions
● Who maintains the ledger?
● Who has authority over which transactions are valid?
● Who creates new Bitcoins/Blocks?
● Who determines how rules of the system change?
● How do Bitcoins acquire exchange value?
Reference Book
Bitcoin and Cryptocurrency Technologies
Authors: Arvind Narayanan, Joseph Bonneau,
Edward Felten, Andrew Miller, Steven Goldfeder

Publisher: Princeton University Press

You might also like