0% found this document useful (0 votes)
43 views74 pages

Module 2

The CSA3006 course on Blockchain Technology aims to educate students on blockchain concepts and applications, focusing on skill development through problem-solving methodologies. Key topics include Bitcoin mechanics, transaction processes, and the role of blockchain in various domains, with an emphasis on understanding and applying Bitcoin scripts. The course also addresses the limitations and proposed improvements of the Bitcoin network, such as scalability, transaction fees, and energy consumption.

Uploaded by

coxakef689
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)
43 views74 pages

Module 2

The CSA3006 course on Blockchain Technology aims to educate students on blockchain concepts and applications, focusing on skill development through problem-solving methodologies. Key topics include Bitcoin mechanics, transaction processes, and the role of blockchain in various domains, with an emphasis on understanding and applying Bitcoin scripts. The course also addresses the limitations and proposed improvements of the Bitcoin network, such as scalability, transaction fees, and energy consumption.

Uploaded by

coxakef689
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/ 74

CSA3006 – Blockchain Technology

Department of Information Science

School of Engineering
•Course Objectives
•Course Content
•Reading Materials
•Course Outcomes
•Overview of the Prerequisite

CSA3006– Blockchain Technology


•Course Objectives
The objective of the course is to familiarize the
learners with the concepts of Blockchain
Technology and Applications and attain Skill
Development through Problem solving
methodologies.

CSA3006– Blockchain Technology


•Course Outcomes
On successful completion of this course the students shall be able to:

• Understand the concepts of Blockchain technology (Knowledge).


• Explain the methods for verification and validation of Bitcoin
transactions (Comprehension).
• Explore the use the Ethereum programming (Application).
• Illustrate the role of blockchain in various domain
(Comprehension).

CSA3006– Blockchain Technology


Module II - Syllabus
➢ Bitcoin Mechanics:
➢ Bitcoin transactions,
➢ Bitcoin Scripts,
➢ Applications of Bitcoin scripts,
➢ Bitcoin blocks,
➢ The Bitcoin network,
➢ Limitations and improvements.
➢ Bitcoin mining:
➢ The task of Bitcoin miners,
➢ Mining Hardware,
➢ Energy consumption,
➢ Mining pools,
➢ Mining incentives and
strategies.

CSA1002 – Web Design and Development


Textbook(s):
1. Mastering Blockchain 3rd Edition, August 2020, Edition:
3rd, Publisher: Packt, ISBN: 978-1839213199, Authors:,
Imran Bashir, Royal Holloway, University of London.
2. Tiana Laurence, Blockchain for Dummies, 2nd Edition
2019, John Wiley & Sons.

CSA1002 – Web Design and Development


Introduction to Bitcoin
➢ In 2008, Bitcoin was introduced through a paper called,
Bitcoin: A Peer-to-Peer Electronic Cash System.
➢ Bitcoin is the first application of blockchain technology.
➢ Bitcoin has started a revolution with the introduction of the
very first fully decentralized digital currency, and the one that
has proven to be extremely secure and stable from a network
and protocol point of view.
➢ Since its introduction in 2008 by Satoshi Nakamoto
➢ Bitcoin has gained massive popularity, and it is currently the
most successful digital currency in the world with billions of
dollars invested in it.

CSA3006– Blockchain Technology 7


Introduction to Bitcoin
➢Bitcoin is the first application of blockchain
technology.
➢Bitcoin has started a revolution with the introduction
of the very first fully decentralized digital currency,
and the one that has proven to be extremely secure
and stable from a network and protocol point of view.
➢Since its introduction in 2008 by Satoshi Nakamoto
➢ Bitcoin has gained massive popularity, and it is
currently the most successful digital currency in the
world with billions of dollars invested in it.

CSA3006– Blockchain Technology 8


Introduction to Bitcoin

Bitcoin is a decentralized digital currency that enables peer-to-peer transactions


without the need for intermediaries like banks or governments. It was
introduced in 2008 by an anonymous person or group using the pseudonym
Satoshi Nakamoto and launched in 2009 as open-source software.

CSA3006– Blockchain Technology 9


Introduction to Blockchain

Key Features of Bitcoin


1.Decentralization – Bitcoin operates on a distributed ledger called the
blockchain, maintained by a network of computers (nodes) worldwide.
2.Limited Supply – There will only ever be 21 million bitcoins, making it a scarce
digital asset.
3.Transparency & Security – Transactions are recorded on the blockchain and
are publicly visible while maintaining user anonymity.
4.No Central Authority – Unlike traditional currencies, Bitcoin is not controlled
by any government or financial institution.
5.Mining Process – New bitcoins are created through mining, where powerful
computers solve complex mathematical problems to validate transactions.

CSA3006– Blockchain Technology 10


Introduction to Blockchain

How Bitcoin Works


•Transactions are verified by miners and added to blocks in the blockchain.
•Bitcoin wallets store private keys that allow users to send and receive BTC
securely.
•Bitcoin can be used for payments, investment, and as a store of value, often
referred to as "digital gold."

CSA3006– Blockchain Technology 11


Introduction to Blockchain

CSA3006– Blockchain Technology 12


Introduction to Bitcoin

Advantages of Bitcoin
Low transaction fees compared to traditional banking.
Global accessibility with no borders or restrictions.
Protection from inflation due to its fixed supply.
Challenges of Bitcoin
Price volatility can make it unpredictable.
Regulatory uncertainty in many countries.
Scalability issues and high energy consumption in mining.

CSA3006– Blockchain Technology 13


As of February 11, 2025, Bitcoin is trading at approximately
$96,370.

CSA3006– Blockchain Technology 14


Introduction to Blockchain

CSA3006– Blockchain Technology 15


Bitcoin Mechanics

Bitcoin operates on a decentralized network and uses cryptographic principles to


secure transactions. Below are the core mechanics:

CSA3006– Blockchain Technology 16


Bitcoin Transactions

A Bitcoin transaction is a transfer of value recorded on the blockchain. Each


transaction consists of inputs (where the coins come from) and outputs (where
the coins go).
Key Components of a Bitcoin Transaction:
1.Inputs: Refer to unspent outputs from previous transactions.
2.Outputs: Define the destination of the bitcoins, specifying the recipient's address.
3.Transaction Fee: The difference between the input and output values, which
incentivizes miners to process the transaction.
4.Digital Signatures: Transactions are signed using the sender’s private key to
prove ownership and authorize the transfer.
5.Transaction ID (TXID): A unique identifier assigned to each transaction.

CSA3006– Blockchain Technology 17


Bitcoin Transactions

Transaction Lifecycle:
1.The sender creates a transaction using their Bitcoin wallet.
2.The transaction is broadcasted to the Bitcoin network.
3.Miners validate and include the transaction in a new block.
4.Once confirmed, the transaction becomes part of the blockchain.

CSA3006– Blockchain Technology 18


Bitcoin Scripts

Bitcoin uses a simple, stack-based scripting language called


Bitcoin Script to define transaction validation rules. This
enables programmable conditions for spending bitcoins.
Key Concepts of Bitcoin Script:
1.Locking Script (ScriptPubKey): Attached to an output and
defines conditions for spending (e.g., requiring a signature from
a specific address).
2.Unlocking Script (ScriptSig): Provided by the spender to
satisfy the conditions in the locking script.
3.Script Execution: The unlocking script and locking script are
combined and executed to verify if the conditions are met.

CSA3006– Blockchain Technology 19


Bitcoin Scripts

Common Bitcoin Script Types:


•Pay-to-PubKey-Hash (P2PKH): The standard script for
sending bitcoins to a Bitcoin address.
•Pay-to-Script-Hash (P2SH): Allows complex conditions like
multi-signature wallets.
•MultiSig: Requires multiple signatures to authorize a
transaction.
•Time-Locked Transactions: Delays spending until a specific
time or block height.
Bitcoin Script is not Turing-complete, meaning it does not
support loops, preventing infinite execution and improving
security.

CSA3006– Blockchain Technology 20


Applications of Bitcoin Scripts
Bitcoin scripts enable various types of smart contract functionality and advanced
transaction mechanisms. Here are some key applications:

1. Multi-Signature Transactions (MultiSig)


•Requires multiple private key signatures to authorize a transaction.
•Used in escrow services, joint accounts, and institutional security.
•Example: A 2-of-3 MultiSig wallet requires at least 2 out of 3 keyholders to sign a
transaction.
2. Pay-to-Script-Hash (P2SH)
•Allows complex scripts to be hidden behind a Bitcoin address.
•Simplifies transaction validation by requiring only a redeem script.
•Commonly used for MultiSig wallets and advanced spending conditions.

CSA3006– Blockchain Technology 21


Applications of Bitcoin Scripts

3. Time-Locked Transactions
•CheckLockTimeVerify (CLTV): Prevents bitcoins from being spent before a
specific time or block height.
•CheckSequenceVerify (CSV): Requires a minimum wait time before an output
can be spent.
•Use Cases:
• Trustless Escrow: Funds are locked until conditions are met.
• Savings Wallets: Bitcoins remain unspendable for a period.
• Payment Channels: Lightning Network implementations use time locks
for scalability.

CSA3006– Blockchain Technology 22


Applications of Bitcoin Scripts

4. Atomic Swaps
•Enables direct, trustless exchange of cryptocurrencies
between different blockchains.
•Uses hashed timelock contracts (HTLCs) to ensure both
parties fulfill their obligations or the transaction is reversed.
•Reduces reliance on centralized exchanges.
5. Lightning Network (Off-Chain Scaling)
•Uses HTLCs and multi-signature scripts to create off-chain
payment channels.
•Enables instant, low-fee transactions between participants.
•Helps Bitcoin scale for microtransactions and everyday
payments.

CSA3006– Blockchain Technology 23


Applications of Bitcoin Scripts
6. Decentralized Escrow Services
•Escrow transactions ensure that funds are released only when predefined
conditions are met.
•Example: Buyer and seller agree on an escrow script, requiring a third-party
arbitrator in case of disputes.
7. Colored Coins & Tokenization
•Bitcoin scripts can track and manage assets beyond BTC, such as real estate,
stocks, or in-game items.
•Represents ownership of assets through specially marked UTXOs.
8. Privacy Enhancements
•CoinJoin: Merges multiple transactions into one, obfuscating transaction
history.
•PayJoin (P2EP): Enhances privacy by making CoinJoin transactions look like
normal transactions.

CSA3006– Blockchain Technology 24


Applications of Bitcoin Scripts

9. Automated Payments & Smart Contracts


•Recurring payments can be programmed using time-locked scripts.
•Enables simple smart contracts without requiring an external platform
like Ethereum.
10. Bitcoin Covenants (Restricted Spending Conditions)
•Can enforce spending rules, such as restricting how funds are spent or
where they can be sent.
•Example: A wallet that only allows transactions below a certain amount
per day.

CSA3006– Blockchain Technology 25


Bitcoin Blocks

A Bitcoin block is a collection of transactions recorded on the Bitcoin blockchain.


Each block is linked to the previous one, forming a secure and immutable chain of
data.

CSA3006– Blockchain Technology 26


Bitcoin Blocks

Structure of a Bitcoin Block


A Bitcoin block contains several important components:
1.Block Header
1. Previous Block Hash: A reference to the previous block, ensuring
continuity.
2. Merkle Root: A cryptographic summary of all transactions in the block.
3. Timestamp: The time the block was created.
4. Difficulty Target: Defines how hard it is to mine the block.
5. Nonce: A unique number used in the mining process.
2.Transaction List
1. Contains all transactions included in the block, including the coinbase
transaction, which rewards the miner.
3.Block Hash
1. A unique identifier for the block, created using the SHA-256 hashing
algorithm.

CSA3006– Blockchain Technology 27


Bitcoin Blocks

How Bitcoin Blocks Work


1.Transactions are broadcasted to the network.
2.Miners collect transactions and form a new block.
3.Miners compete to solve a cryptographic puzzle (Proof-of-Work).
4.The winning miner adds the block to the blockchain and gets rewarded.
5.The process repeats approximately every 10 minutes.

CSA3006– Blockchain Technology 28


Bitcoin Blocks

Key Features of Bitcoin Blocks


Immutable – Once a block is added, it cannot be changed.
Decentralized – No central authority controls the blocks.
Secure – Uses cryptographic hashing and consensus mechanisms.
Limited Block Size – Each block is capped at 1 MB (approximately 2,000
transactions).

CSA3006– Blockchain Technology 29


The Bitcoin Network

The Bitcoin Network: A Decentralized Digital Economy


The Bitcoin network is a decentralized, peer-to-peer system that allows users to
send and receive Bitcoin without a central authority like a bank. It is maintained
by a global network of nodes and miners, ensuring security, transparency, and
trustless transactions.

CSA3006– Blockchain Technology 30


The Bitcoin Network

Key Components of the Bitcoin Network


1.Nodes
1. Nodes are computers that run the Bitcoin software and help maintain the
blockchain.
2. They store a full copy of the blockchain and verify transactions.
3. There are full nodes (which validate all rules) and light nodes (which
rely on full nodes).
2.Miners
1. Miners process transactions and secure the network using Proof-of-
Work (PoW).
2. They compete to solve complex mathematical puzzles to add new blocks
to the blockchain.
3. Successful miners are rewarded with newly minted Bitcoin (block
reward) + transaction fees.

CSA3006– Blockchain Technology 31


The Bitcoin Network

3. Blockchain
• A public, decentralized ledger that records all Bitcoin
transactions.
• Every ~10 minutes, a new block is added to the chain.
• Transactions are grouped into blocks, which are linked
cryptographically.
4. Wallets
• Bitcoin wallets store private keys, allowing users to send
and receive BTC.
• Types of wallets:
• Hot Wallets (online, convenient but less secure)
• Cold Wallets (offline, more secure)

CSA3006– Blockchain Technology 32


The Bitcoin Network

Consensus Mechanism
•The network follows Proof-of-Work (PoW) to ensure
transaction validity.
•51% Attack Resistance: No single entity can take control
unless it owns over 50% of the mining power.

CSA3006– Blockchain Technology 33


How the Bitcoin Network Works

How the Bitcoin Network Works


1.A user initiates a transaction (e.g., sending BTC to
another wallet).
2.The transaction is broadcast to the network and
verified by nodes.
3.Miners group transactions into a new block and
attempt to solve the PoW puzzle.
4.The first miner to solve the puzzle adds the block to the
blockchain.
5.The block is validated by the network, and the
transaction is finalized.

CSA3006– Blockchain Technology 34


How the Bitcoin Network Works

Advantages of the Bitcoin Network


Decentralized – No central authority controls it.
Secure – Uses cryptographic encryption.
Transparent – Transactions are publicly recorded on
the blockchain.
Borderless – Anyone with an internet connection can
use Bitcoin.

CSA3006– Blockchain Technology 35


Limitations of the Bitcoin Network

CSA3006– Blockchain Technology 36


Limitations and Improvements in the
Bitcoin Network

While Bitcoin is a revolutionary financial system, it


has several limitations that affect its scalability, speed,
and energy efficiency. Over the years, various
improvements have been proposed and implemented
to enhance the network.

CSA3006– Blockchain Technology 37


Limitations of the Bitcoin Network

1. Scalability Issues
•Bitcoin processes around 7 transactions per second (TPS),
which is much lower than traditional payment systems like
Visa (24,000 TPS).
•The block size is limited to 1 MB, which restricts the number
of transactions per block.
proposed Solutions:
SegWit (Segregated Witness) – Optimizes block space by
separating transaction data.
Layer 2 Scaling (Lightning Network) – Enables off-chain
transactions to reduce congestion.

CSA3006– Blockchain Technology 38


Limitations of the Bitcoin Network

2. High Transaction Fees


•As network activity increases, transaction fees can become
expensive.
•Fees fluctuate based on demand, making microtransactions
impractical.
Proposed Solutions:
Lightning Network – Facilitates near-instant, low-cost
payments.
Taproot Upgrade – Improves transaction efficiency and
lowers costs.

CSA3006– Blockchain Technology 39


Limitations of the Bitcoin Network

3. Energy Consumption
•Bitcoin mining requires massive computational power,
consuming energy comparable to small countries.
•This raises environmental concerns and regulatory
challenges.
Proposed Solutions:
Transition to Renewable Energy Sources – Many miners
now use hydro, solar, and wind energy.
Alternative Consensus Mechanisms (e.g., Proof-of-
Stake) – Though controversial, some advocate moving away
from Proof-of-Work (PoW) to a more energy-efficient model.

CSA3006– Blockchain Technology 40


Limitations of the Bitcoin Network

4. Slow Transaction Speed


•Bitcoin transactions take about 10 minutes to be confirmed,
which is slow compared to traditional banking systems.
•In times of congestion, confirmation can take even longer.
Proposed Solutions:
Lightning Network – Processes transactions instantly off-
chain.
Layer 2 Solutions – Developments like Rollups could
enhance transaction throughput.

CSA3006– Blockchain Technology 41


Limitations of the Bitcoin Network

5. Privacy Concerns
•Bitcoin transactions are pseudonymous, not anonymous,
meaning they can be traced on the blockchain.
•Governments and organizations use blockchain analysis tools
to track user activity.
Proposed Solutions:
CoinJoin & CoinSwap – Techniques that mix transactions
to increase privacy.
Taproot Upgrade – Enhances privacy for multi-signature
transactions.

CSA3006– Blockchain Technology 42


Improvements in the Bitcoin Network

Improvements and Future Upgrades


1. Lightning Network (Layer 2 Scaling)
•Allows instant, low-cost payments by processing
transactions off-chain.
•Ideal for small transactions and merchant payments.
2. Taproot Upgrade
•Improves privacy, scalability, and smart contract
functionality.
•Enables Schnorr Signatures, reducing blockchain congestion.

CSA3006– Blockchain Technology 43


Improvements in the Bitcoin Network

3. Smart Contracts on Bitcoin


•While Ethereum dominates in smart contracts, Bitcoin is
improving with Rootstock (RSK) and Taro.
•Taproot enhances Bitcoin’s ability to handle smart contracts
efficiently.
4. Cross-Chain Interoperability
•Efforts are being made to connect Bitcoin with other
blockchains for seamless asset transfers.
•Atomic Swaps allow users to trade BTC for other
cryptocurrencies without intermediaries.

CSA3006– Blockchain Technology 44


Bitcoin Mining

Bitcoin Mining: The Backbone of the Bitcoin Network


Bitcoin mining is the process of validating and adding new
transactions to the blockchain by solving complex
mathematical problems. It ensures network security, prevents
fraud, and releases new bitcoins into circulation.

CSA3006– Blockchain Technology 45


Bitcoin Mining

How Bitcoin Mining Works


1.Transaction Verification
1. Bitcoin users send transactions, which are collected into
a mempool (waiting area).
2. Miners verify the validity of these transactions.
2.Block Creation
1. Miners gather verified transactions into a block (up to
1MB in size).

CSA3006– Blockchain Technology 46


Bitcoin Mining

3. Proof-of-Work (PoW) Puzzle Solving


• Miners compete to solve a cryptographic puzzle using SHA-
256 hashing.
• The goal is to find a nonce (a random number) that
produces a valid block hash.
• The first miner to solve it broadcasts the new block to the
network.
4. Block Confirmation & Rewards
• The network verifies the block, and it gets added to the
blockchain.
• The winning miner receives a block reward + transaction
fees.

CSA3006– Blockchain Technology 47


Bitcoin Mining

Bitcoin Mining Rewards & Halving


•Block Reward (New BTC Minted)
• Initially: 50 BTC per block (2009)
• Reduces by half every 4 years (Bitcoin Halving event).
• Current reward (as of 2024): 6.25 BTC per block.
• Next halving (2024): 3.125 BTC per block.
•Transaction Fees
• Miners also earn fees from transactions included in the
block.

CSA3006– Blockchain Technology 48


Bitcoin Mining

Bitcoin Mining Difficulty & Security


•Mining Difficulty adjusts approximately every 2,016 blocks
(~2 weeks) to keep block times around 10 minutes.
•Hash Rate: A measure of the total mining power in the
network. A higher hash rate = stronger security.
•51% Attack: If a miner controls over 50% of the network’s
computing power, they could manipulate transactions (but
this is extremely difficult and costly).

CSA3006– Blockchain Technology 49


Bitcoin Mining

Types of Bitcoin Mining


1.Solo Mining – An individual miner competes alone (rare due
to high difficulty).
2.Mining Pools – Miners combine computational power and
share rewards.
3.Cloud Mining – Renting mining power from companies (risk
of scams).

CSA3006– Blockchain Technology 50


Bitcoin Mining

Mining Hardware
•ASIC Miners (Application-Specific Integrated Circuits) –
Specialized, highly efficient machines.
•GPU (Graphics Processing Unit) Mining – Less efficient for
Bitcoin (better for other cryptocurrencies).

CSA3006– Blockchain Technology 51


Bitcoin Mining

Challenges of Bitcoin Mining


1. High Energy Consumption
•Bitcoin mining consumes electricity comparable to small
countries.
•Solution: Shift to renewable energy sources (hydro, solar,
wind).
2. Expensive Equipment
•High upfront costs for ASIC miners.
•Mining difficulty makes it hard for small miners to profit.
3. Centralization Concerns
•Large mining farms dominate the industry, reducing
decentralization.

CSA3006– Blockchain Technology 52


Bitcoin Mining

The Future of Bitcoin Mining


More eco-friendly mining solutions (solar, geothermal
energy).
Efficient ASIC miners reducing energy usage.
Layer 2 solutions (Lightning Network) reducing reliance
on mining.

CSA3006– Blockchain Technology 53


The Task of Bitcoin Miners & Mining
Hardware

Bitcoin miners play a crucial role in maintaining the security


and functionality of the Bitcoin network. They validate
transactions, add new blocks to the blockchain, and secure the
network from attacks.

CSA3006– Blockchain Technology 54


The Task of Bitcoin Miners & Mining
Hardware

The Task of Bitcoin Miners


1. Transaction Validation
•Miners collect transactions from the mempool (a waiting
area for unconfirmed transactions).
•They verify that:
The sender has enough Bitcoin.
The transaction follows Bitcoin’s rules (e.g., correct digital
signature).
2. Block Creation
•Miners bundle verified transactions into a block (up to 1MB
in size).
•They add a special transaction called the coinbase
transaction, which rewards them with new BTC.

CSA3006– Blockchain Technology 55


The Task of Bitcoin Miners & Mining
Hardware

3. Proof-of-Work (PoW) Puzzle Solving


•Miners compete to solve a complex cryptographic puzzle.
•The goal is to find a valid nonce (a random number) that
produces a hash below a certain target.
•The SHA-256 hashing algorithm is used.
4. Adding the Block to the Blockchain
•The first miner to solve the puzzle broadcasts the block to the
network.
•Other nodes verify it, and if valid, it’s added to the blockchain.

CSA3006– Blockchain Technology 56


The Task of Bitcoin Miners & Mining
Hardware

5. Reward Collection
•The winning miner receives:
Block reward (Newly minted BTC)
Transaction fees from the transactions in the block
•The block reward is currently 6.25 BTC (as of 2024) and
halves every 4 years (next halving in 2024 will reduce it to
3.125 BTC).

CSA3006– Blockchain Technology 57


The Task of Bitcoin Miners & Mining
Hardware

Bitcoin Mining Hardware


Bitcoin mining started with regular CPUs, but as difficulty
increased, more powerful hardware was developed.
1. CPU Mining (2009-2010)
•Used standard computer processors.
•Very slow and inefficient today.
2. GPU Mining (2010-2013)
•Used powerful graphics cards to mine Bitcoin.
•Faster than CPUs but still inefficient today.
•Still used for other cryptocurrencies (e.g., Ethereum before its
transition to Proof-of-Stake).

CSA3006– Blockchain Technology 58


The Task of Bitcoin Miners & Mining
Hardware

3. FPGA Mining (2013-2015)


•Field-Programmable Gate Arrays (FPGAs) offered better
performance than GPUs.
•More energy-efficient but hard to program.
4. ASIC Mining (2015-Present)
•Application-Specific Integrated Circuits (ASICs) are
custom-designed for Bitcoin mining.
•Extremely fast and efficient but expensive.
•Popular ASIC brands: Bitmain Antminer, MicroBT
WhatsMiner, Canaan AvalonMiner.

CSA3006– Blockchain Technology 59


The Task of Bitcoin Miners & Mining
Hardware

CSA3006– Blockchain Technology 60


The Task of Bitcoin Miners & Mining
Hardware

Choosing the Best Mining Hardware


When selecting mining hardware, consider:
Hash Rate – Higher means more mining power.
Power Efficiency – Less electricity usage per TH/s.
Cost – Initial investment vs. long-term profitability.

CSA3006– Blockchain Technology 61


Bitcoin Mining Profitability Calculation &
Setup Guide

Bitcoin Mining Profitability Calculation & Setup Guide


Mining Bitcoin can be profitable, but it depends on several
factors like electricity costs, hardware efficiency, and BTC
price. Let’s break it down!

CSA3006– Blockchain Technology 62


Bitcoin Mining Profitability Calculation &
Setup Guide

Factors Affecting Mining Profitability


1. Hash Rate (Mining Power)
•The speed at which a miner solves mathematical puzzles.
•Measured in TH/s (terahashes per second).
2. Power Consumption
•How much electricity your mining rig uses.
•Measured in watts (W).

CSA3006– Blockchain Technology 63


Bitcoin Mining Profitability Calculation &
Setup Guide

3. Electricity Cost
•The most significant expense for miners.
•Measured in $/kWh (cost per kilowatt-hour).
•Lower costs = higher profitability.
4. Bitcoin Price
•If BTC’s price rises, mining becomes more profitable.
•A sudden drop can make mining unprofitable.
5. Mining Difficulty
•Adjusts every 2,016 blocks (~2 weeks) based on network
competition.
•Higher difficulty = lower individual miner rewards.

CSA3006– Blockchain Technology 64


Bitcoin Mining Profitability Calculation &
Setup Guide
Mining Profitability Calculation (Example)
Let’s calculate profitability for the Antminer S19 XP (one of
the best ASIC miners today).
Antminer S19 XP Specs:
•Hash Rate: 140 TH/s
•Power Consumption: 3010W
•Electricity Cost: $0.10 per kWh (example)
•BTC Price: $50,000 (example)
•Block Reward: 6.25 BTC
We use the standard mining formula:
Daily Profit=(Daily Earnings)−(Electricity Cost)Let’s
calculate!
I'll run the numbers now.

CSA3006– Blockchain Technology 65


Bitcoin Mining Profitability Calculation &
Setup Guide
Mining Profitability Results (Antminer S19 XP)
•Daily Earnings: ~$14.00
•Daily Electricity Cost: ~$7.22
•Net Daily Profit: ~$6.78
At this rate, monthly profit = ~$203.28 and yearly profit =
~$2,439.36.
Break-Even Time:
If the miner costs $5,000, it would take ~2 years to break
even, assuming BTC price and difficulty remain stable.

CSA3006– Blockchain Technology 66


How to Set Up a Bitcoin Mining Rig
1. Choose Your Mining Hardware
•Best ASIC miners (2024):
Antminer S19 XP (140 TH/s, 3010W)
WhatsMiner M50S (126 TH/s, 3276W)
2. Get a Bitcoin Wallet
•Store your mined BTC safely.
•Use hardware wallets (Ledger, Trezor) for extra security.

CSA3006– Blockchain Technology 67


How to Set Up a Bitcoin Mining Rig
3. Join a Mining Pool (Recommended)
•Mining alone is difficult, so join a pool like:
F2Pool
Slush Pool
Antpool
4. Set Up Mining Software
•Popular options: CGMiner, BFGMiner, NiceHash.
5. Optimize for Profitability
•Use cheap electricity (solar, hydro, or low-cost regions).
•Keep cooling costs low (use proper ventilation).

CSA3006– Blockchain Technology 68


Energy Consumption in Bitcoin Mining

Bitcoin mining is an energy-intensive process due to the


Proof-of-Work (PoW) mechanism. Miners use powerful
computers (ASICs) to solve complex mathematical puzzles
to validate transactions and secure the network.
•High Electricity Usage – Bitcoin mining consumes vast
amounts of electricity, often compared to the energy
consumption of entire countries.
•Environmental Concerns – Critics argue that mining
contributes to carbon emissions, especially in regions using
non-renewable energy sources.
•Transition to Renewable Energy – Many miners are
shifting to hydro, solar, and wind energy to reduce
environmental impact.

CSA3006– Blockchain Technology 69


Energy Consumption in Bitcoin Mining

Mining Pools
A mining pool is a group of miners who combine their
computational power to increase the chances of solving
blocks and earning rewards. The rewards are distributed
among participants based on their contributed computing
power.
Popular Mining Pools:
•F2Pool
•AntPool
•Slush Pool
•Foundry USA

CSA3006– Blockchain Technology 70


Energy Consumption in Bitcoin Mining

Advantages of Mining Pools:


Higher probability of earning consistent rewards.
Reduced variance in mining income.
Lower hardware and electricity costs for individual
miners.
Disadvantages:
Centralization concerns (fewer pools control most of the
Bitcoin network).
Pool fees reduce earnings.

CSA3006– Blockchain Technology 71


Mining Incentives

Bitcoin mining rewards serve as incentives for miners to


continue securing the network. The incentives include:
•Block Rewards – Miners earn a fixed number of bitcoins
for solving a block (currently 6.25 BTC, halving
approximately every four years).
•Transaction Fees – Miners also collect transaction fees
from users sending Bitcoin. As block rewards decrease over
time, fees become a more significant source of income.
•Mining Difficulty Adjustments – The Bitcoin network
adjusts difficulty every 2016 blocks (~2 weeks) to ensure
blocks are mined approximately every 10 minutes.

CSA3006– Blockchain Technology 72


Mining Strategies

To maximize profitability, miners adopt different strategies:


•Solo Mining vs. Pool Mining – Solo mining is riskier but
offers full rewards. Pool mining ensures steady payouts.
•Geographic Optimization – Miners move operations to
regions with cheaper electricity and favorable regulations.
•Efficient Hardware & Cooling – Upgrading to energy-
efficient ASIC miners and optimizing cooling systems help
reduce costs.
•Strategic HODLing – Some miners hold Bitcoin instead of
selling immediately, hoping for price appreciation.

CSA3006– Blockchain Technology 73


74
CSA1002 – Web Design and Development

You might also like