Blockchain and Bitcoin Applications Part1
Blockchain and Bitcoin Applications Part1
C.NANDA KISHORE
Created by Nandakishore 1
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
PART-1
Created by Nandakishore 2
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
CONTENT
1.Basics of Blockchain Technologies
• What is BLOCKCHAIN
• Decentralized
• Why it matters
• Blockchain structure and operations
• Application and Uses
2.General Blockchain Knowledge
• Storage and Mining and incentive models
• Decentralized vs trust
• Blockchain Forking and Cryptocurrency
• Crypowallets and cryptography
• Consensus protocols
• Blockchain interoperability
•
3.Blockchain
• Ton
• Solana
• EVM based
• TVM based
Created by Nandakishore 3
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Guide to Blockchain
Definition
Blockchain is a decentralized digital ledger that securely stores records across a network of
computers in a way that is transparent, immutable, and resistant to tampering. Each “block”
contains data, and blocks are linked in a chronological “chain.”
What Is a Blockchain?
A blockchain is a distributed database or ledger shared across a computer network’s nodes. They
are best known for their crucial role in cryptocurrency systems, maintaining a secure and
decentralized record of transactions, but they are not limited to cryptocurrency uses. Blockchains
can be used to make data in any industry immutable—meaning it cannot be altered.
Created by Nandakishore 4
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Since a block can’t be changed, the only trust needed is at the point where a user or program
enters data. This reduces the need for trusted third parties, such as auditors or other humans, who
add costs and can make mistakes.
Since Bitcoin’s introduction in 2009, blockchain uses have exploded via the creation of various
cryptocurrencies, decentralized finance (DeFi) applications, non-fungible tokens (NFTs), and
smart contracts.
Key Takeaways
• Blockchain is a type of shared database that differs from a typical database in the way it
stores information; blockchains store data in blocks linked together via cryptography.
• Different types of information can be stored on a blockchain, but the most common use
has been as a transaction ledger.
• In Bitcoin’s case, the blockchain is decentralized, so no single person or group has
control—instead, all users collectively retain control.
• Decentralized blockchains are immutable, which means that the data entered is
irreversible. For Bitcoin, transactions are permanently recorded and viewable to anyone.
Transaction Process
1. Transactions follow a specific process, depending on the blockchain. For example, on
Bitcoin’s blockchain, if you initiate a transaction using your cryptocurrency wallet—the
application that provides an interface for the blockchain—it starts a sequence of events.
Created by Nandakishore 5
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
2. In Bitcoin, your transaction is sent to a memory pool, where it is stored and queued until
a miner picks it up. Once it is entered into a block and the block fills up with transactions,
it is closed, and the mining begins.
Blockchain
1. Every node in the network proposes its own blocks in this way because they all choose
different transactions. Each works on their own blocks, trying to find a solution to the
difficulty target, using the “nonce,” short for number used once.
2. The nonce value is a field in the block header that is changeable, and its value
incrementally increases with every mining attempt. If the resulting hash isn’t equal to or
less than the target hash, a value of one is added to the nonce, a new hash is generated,
and so on. The nonce rolls over about every 4.5 billion attempts (which takes less than
one second) and uses another value called the extra nonce as an additional counter. This
continues until a miner generates a valid hash, winning the race and receiving the reward.
3. Generating these hashes until a specific value is found is the “proof-of-work” you hear so
much about—it “proves” the miner did the work. The sheer amount of work it takes to
validate the hash is why the Bitcoin network consumes so much computational power
and energy.
4. Once a block is closed, a transaction is complete. However, the block is not considered
confirmed until five other blocks have been validated. Confirmation takes the network
about one hour to complete because it averages just under 10 minutes per block (the first
block with your transaction and five following blocks multiplied by 10 equals 60
minutes).
5. Not all blockchains follow this process. For instance, the Ethereum network randomly
chooses one validator from all users with ether staked to validate blocks, which are then
confirmed by the network. This is much faster and less energy intensive than Bitcoin’s
process.
Blockchain Decentralization
• A blockchain allows the data in a database to be spread out among several network
nodes—computers or devices running software for the blockchain—at various locations.
This creates redundancy and maintains the fidelity of the data. For example, if someone
tries to alter a record on one node, the other nodes would prevent it from happening by
comparing block hashes. This way, no single node can alter information within the chain.
• Because of this distribution—and the encrypted proof that work was done—the
blockchain data, such as transaction history, becomes irreversible. Such a record could be
a list of transactions, but private blockchains can also hold a variety of other information
like legal contracts, state identifications, or a company’s inventory. Most blockchains
wouldn’t “store” these items directly; they would likely be sent through a hashing
algorithm and represented on the blockchain by a token.
Blockchain Transparency
Because of the decentralized nature of the Bitcoin blockchain, all transactions can be
transparently viewed by downloading and inspecting them or by using blockchain explorers that
allow anyone to see transactions occurring live. Each node has its own copy of the chain that gets
Created by Nandakishore 6
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
updated as fresh blocks are confirmed and added. This means that if you wanted to, you could
track a bitcoin wherever it goes.
For example, exchanges have been hacked in the past, resulting in the loss of large amounts of
cryptocurrency. While the hackers may have been anonymous—except for their wallet address—
the crypto they extracted is easily traceable because the wallet addresses are stored on the
blockchain.
Of course, the records stored in the Bitcoin blockchain (as well as most others) are encrypted.
This means that only the person assigned an address can reveal their identity. As a result,
blockchain users can remain anonymous while preserving transparency.
Is Blockchain Secure?
Blockchain technology achieves decentralized security and trust in several ways. To begin, new
blocks are always stored linearly and chronologically. That is, they are always added to the “end”
of the blockchain. After a block has been added to the end of the blockchain, previous blocks
cannot be altered.
A change in any data changes the hash of the block it was in. Because each block contains the
previous block’s hash, a change in one would change the following blocks. The network would
generally reject an altered block because the hashes would not match. However, a change can be
accomplished on smaller blockchain networks.
Not all blockchains are 100% impenetrable. They are distributed ledgers that use code to create
the security level they have become known for. If there are vulnerabilities in the coding, they can
be exploited.
A new and smaller chain might be susceptible to this kind of attack, but the attacker would need
at least half of the computational power of the network (a 51% attack). On the Bitcoin and other
larger blockchains, this is nearly impossible. By the time the hacker takes any action, the
network is likely to have moved past the blocks they were trying to alter. This is because the rate
at which these networks hash is exceptionally rapid—the Bitcoin network hashed at a rate of
around 640 exahashes per second (18 zeros) as of September 2024.
1.The Ethereum blockchain is not likely to be hacked either—again, the attackers would need to
control more than half of the blockchain’s staked ether. As of September 2024, over 33.8 million
ETH has been staked by more than one million validators.
2. An attacker or a group would need to own over 17 million ETH, and be randomly selected to
validate blocks enough times to get their blocks implemented.
3.Bitcoin vs. Blockchain
Blockchain technology was first outlined in 1991 by Stuart Haber and W. Scott Stornetta, two
researchers who wanted to implement a system where document timestamps could not be
tampered with.
4. But it wasn’t until almost two decades later, with the launch of Bitcoin in January 2009, that
blockchain had its first real-world application.
Bitcoin
Created by Nandakishore 7
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
The Bitcoin protocol is built on a blockchain. In a research paper introducing the digital
currency, Bitcoin’s pseudonymous creator, Satoshi Nakamoto, referred to it as “a new electronic
cash system that’s fully peer-to-peer, with no trusted third party.”
5.The key thing to understand is that Bitcoin uses blockchain as a means to transparently record
a ledger of payments or other transactions between parties.
Blockchain
• Blockchain can be used to immutably record any number of data points. The data can be
transactions, votes in an election, product inventories, state identifications, deeds to
homes, and much more.
• Currently, tens of thousands of projects are looking to implement blockchains in various
ways to help society other than just recording transactions—for example, as a way to vote
securely in democratic elections.
• The nature of blockchain’s immutability means that fraudulent voting would become far
more difficult. For example, a voting system could work such that each country’s citizens
would be issued a single cryptocurrency or token.
• Each candidate could then be given a specific wallet address, and the voters would send
their token or crypto to the address of whichever candidate they wish to vote for. The
transparent and traceable nature of blockchain would eliminate the need for human vote
counting and the ability of bad actors to tamper with physical ballots.
Blockchain vs. Banks
• Blockchains have been heralded as a disruptive force in the finance sector, especially
with the functions of payments and banking. However, banks and decentralized
blockchains are vastly different.
• To see how a bank differs from blockchain, let’s compare the banking system to Bitcoin’s
blockchain implementation.
How Are Blockchains Used?
• As we now know, blocks on Bitcoin’s blockchain store transactional data. Today, tens of
thousands of other cryptocurrencies run on a blockchain. But it turns out that blockchain
can be a reliable way to store other types of data as well.
• Some companies experimenting with blockchain include Walmart, Pfizer, AIG, Siemens,
and Unilever, among others. For example, IBM has created its Food Trust blockchain to
trace the journey that food products take to get to their locations.
• Why do this? The food industry has seen countless outbreaks of E. coli, salmonella, and
listeria; in some cases, hazardous materials were accidentally introduced to foods. In the
past, it has taken weeks to find the source of these outbreaks or the cause of sickness
from what people are eating.
Using blockchain allows brands to track a food product’s route from its origin, through each stop
it makes, to delivery. Not only that, but these companies can also now see everything else it may
have come in contact with, allowing the identification of the problem to occur far sooner—
potentially saving lives. This is one example of blockchain in practice, but many other forms of
blockchain implementation exist or are being experimented with.
Created by Nandakishore 8
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
• Perhaps no industry stands to benefit from integrating blockchain into its business
operations more than personal banking. Financial institutions only operate during
business hours, usually five days a week. That means if you try to deposit a check on
Friday at 6 p.m., you will likely have to wait until Monday morning to see the money in
your account.
• Even if you make your deposit during business hours, the transaction can still take one to
three days to verify due to the sheer volume of transactions that banks need to settle.
Blockchain, on the other hand, never sleeps.
• By integrating blockchain into banks, consumers might see their transactions processed in
minutes or seconds—the time it takes to add a block to the blockchain, regardless of
holidays or the time of day or week. With blockchain, banks also have the opportunity to
exchange funds between institutions more quickly and securely. Given the sums
involved, even the few days the money is in transit can carry significant costs and risks
for banks.
• The settlement and clearing process for stock traders can take up to three days (or longer
if trading internationally), meaning that the money and shares are frozen for that period.
Blockchain can, in theory, drastically reduce that time.
Currency
Blockchain forms the bedrock for cryptocurrencies like Bitcoin. This design also allows for
easier cross-border transactions because it bypasses currency restrictions, instabilities, or lack of
infrastructure by using a distributed network that can reach anyone with an internet connection.
Healthcare
Healthcare providers can leverage blockchain to store their patients’ medical records securely.
When a medical record is generated and signed, it can be written into the blockchain, which
provides patients with proof and confidence that the record cannot be changed. These personal
health records could be encoded and stored on the blockchain with a private key so that they are
only accessible to specific individuals, thereby ensuring privacy.
Property Records
If you have ever spent time in your local Recorder’s Office, you will know that recording
property rights is both burdensome and inefficient. Today, a physical deed must be delivered to a
government employee at the local recording office, where it is manually entered into the county’s
central database and public index. In the case of a property dispute, claims to the property must
be reconciled with the public index.
Created by Nandakishore 9
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
This process is not just costly and time-consuming, it is also prone to human error, where each
inaccuracy makes tracking property ownership less efficient. Blockchain has the potential to
eliminate the need for scanning documents and tracking down physical files in a local recording
office. If property ownership is stored and verified on the blockchain, owners can trust that their
deed is accurate and permanently recorded.
Proving property ownership can be nearly impossible in war-torn countries or areas with little to
no government or financial infrastructure and no Recorder’s Office. If a group of people living in
such an area can leverage blockchain, then transparent and clear timelines of property ownership
could be maintained.
Smart Contracts
A smart contract is computer code that can be built into the blockchain to facilitate transactions.
It operates under a set of conditions to which users agree. When those conditions are met, the
smart contract conducts the transaction for the users.
Supply Chains
As in the IBM Food Trust example, suppliers can use blockchain to record the origins of
materials that they have purchased. This would allow companies to verify the authenticity of not
only their products but also common labels such as “Organic,” “Local,” and “Fair Trade.”
As reported by Forbes, the food industry is increasingly adopting the use of blockchain to track
the path and safety of food throughout the farm-to-user journey.
Voting
As mentioned above, blockchain could facilitate a modern voting system. Voting with blockchain
carries the potential to eliminate election fraud and boost voter turnout, as was tested in the
November 2018 midterm elections in West Virginia.
Using blockchain in this way would make votes nearly impossible to tamper with. The
blockchain protocol would also maintain transparency in the electoral process, reducing the
personnel needed to conduct an election and providing officials with nearly instant results. This
would eliminate the need for recounts or any real concern that fraud might threaten the election.
Created by Nandakishore 10
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Pros
5. Transparent technology
6. Provides a banking alternative and a way to secure personal information for citizens of
countries with unstable or underdeveloped governments
Cons
Benefits of Blockchains
Transactions on the blockchain network are approved by thousands of computers and devices.
This removes almost all people from the verification process, resulting in less human error and
an accurate record of information. Even if a computer on the network were to make a
computational mistake, the error would only be made to one copy of the blockchain and not be
accepted by the rest of the network.
Cost Reductions
Created by Nandakishore 11
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Decentralization
Blockchain does not store any of its information in a central location. Instead, the blockchain is
copied and spread across a network of computers. Whenever a new block is added to the
blockchain, every computer on the network updates its blockchain to reflect the change.
By spreading that information across a network, rather than storing it in one central database,
blockchain becomes significantly more difficult to tamper with.
Efficient Transactions
Transactions placed through a central authority can take up to a few days to settle. If you attempt
to deposit a check on Friday evening, for example, you may not actually see funds in your
account until Monday morning. Financial institutions operate during business hours, usually five
days a week—but a blockchain runs 24 hours a day, seven days a week, and 365 days a year.
On some blockchains, transactions can be completed and considered secure in minutes. This is
particularly useful for cross-border trades, which usually take much longer because of time zone
issues and the fact that all parties must confirm payment processing.
Private Transactions
Many blockchain networks operate as public databases, meaning anyone with an internet
connection can view a list of the network’s transaction history. Although users can access
transaction details, they cannot access identifying information about the users making those
transactions. It is a common misperception that blockchain networks like Bitcoin are fully
anonymous; they are actually pseudonymous because there is a viewable address that can be
associated with a user if the information gets out.
Secure Transactions
Once a transaction is recorded, its authenticity must be verified by the blockchain network. After
the transaction is validated, it is added to the blockchain block. Each block on the blockchain
contains its unique hash and the unique hash of the block before it. Therefore, the blocks cannot
be altered once the network confirms them.
Transparency
Created by Nandakishore 12
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Many blockchains are entirely open source. This means that everyone can view its code. This
gives auditors the ability to review cryptocurrencies like Bitcoin for security. However, it also
means there is no real authority on who controls Bitcoin’s code or how it is edited. Because of
this, anyone can suggest changes or upgrades to the system. If a majority of the network users
agree that the new version of the code with the upgrade is sound and worthwhile, then Bitcoin
can be updated.
Private or permission blockchains may not allow for public transparency, depending on how they
are designed or their purpose. These types of blockchains might be made only for an
organization that wishes to track data accurately without allowing anyone outside of the
permissioned users to see it.
Alternatively, there might come a point where publicly traded companies are required to provide
investors with financial transparency through a regulator-approved blockchain reporting system.
Using blockchains in business accounting and financial reporting would prevent companies from
altering their financials to appear more profitable than they really are.
Banking the Unbanked
Perhaps the most profound facet of blockchain and cryptocurrency is the ability for anyone,
regardless of ethnicity, gender, location, or cultural background, to use it. According to The
World Bank, an estimated 1.4 billion adults do not have bank accounts or any means of storing
their money or wealth.
Moreover, nearly all of these individuals live in developing countries where the economy is in
its infancy and entirely dependent on cash.
These people are often paid in physical cash. They then need to store this physical cash in hidden
locations in their homes or other places, incentivizing robbers or violence. While not impossible
to steal, crypto makes it more difficult for would-be thieves
.Drawbacks of Blockchains
Technology Cost
Although blockchain can save users money on transaction fees, the technology is far from free.
For example, the Bitcoin network’s proof-of-work system to validate transactions consumes vast
amounts of computational power. In the real world, the energy consumed by the millions of
devices on the Bitcoin network is more than the country of Pakistan consumes annually.
10
Created by Nandakishore 13
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Some solutions to these issues are beginning to arise. For example, bitcoin-mining farms have
been set up to use solar power, excess natural gas from fracking sites, or energy from wind
farms.
Bitcoin is a perfect case study of the vinefficiencies of blockchain. Bitcoin’s PoW system takes
about 10 minutes to add a new block to the blockchain. At that rate, it’s estimated that the
blockchain network can only manage about seven transactions per second (TPS).
11
Although other cryptocurrencies, such as Ethereum, perform better than Bitcoin, the complex
structure of blockchain still limits them. Legacy brand Visa, for context, can process 65,000 TPS.
12
Solutions to this issue have been in development for years. There are currently blockchain
projects that claim tens of thousands of TPS. Ethereum is rolling out a series of upgrades that
include data sampling, binary large objects (BLOBs), and rollups. These improvements are
expected to increase network participation, reduce congestion, decrease fees, and increase
transaction speeds.
13
The other issue with many blockchains is that each block can only hold so much data. The block
size debate has been and continues to be one of the most pressing issues for the scalability of
blockchains in the future
Illegal Activity
While confidentiality on the blockchain network protects users from hacks and preserves
privacy, it also allows for illegal trading and activity on the blockchain network. The most cited
example of blockchain being used for illicit transactions is probably the Silk Road, an online
dark web illegal-drug and money laundering marketplace operating from February 2011 until
October 2013, when the FBI shut it down.
14
The dark web allows users to buy and sell illegal goods without being tracked by using the Tor
Browser and make illicit purchases in Bitcoin or other cryptocurrencies. This is in stark contrast
to U.S. regulations, which require financial service providers to obtain information about their
customers when they open an account. They are supposed to verify the identity of each customer
and confirm that they do not appear on any list of known or suspected terrorist organizations.
Created by Nandakishore 14
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
15
Illicit activity accounted for only 0.34% of all cryptocurrency transactions in 2023.
16
This system can be seen as both a pro and a con. It gives anyone access to financial accounts, but
allows criminals to transact more easily. Many have argued that the good uses of crypto, like
banking the unbanked, outweigh the bad uses of cryptocurrency, especially when most illegal
activity is still accomplished through untraceable cash.
Regulation
Many in the crypto space have expressed concerns about government regulation of
cryptocurrencies. Several jurisdictions are tightening control over certain types of crypto and
other virtual currencies. However, no regulations have yet been introduced that focus on
restricting blockchain uses and development, only certain products created using it.
What is decentralization?
• Currently, data storage is centralized in large centers. But if the world transitions to
blockchain for every industry and use, its exponentially growing size would require
more advanced techniques to make storage more efficient, or force participants to
continually upgrade their storage.
Created by Nandakishore 15
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
• This could become significantly more expensive in terms of both money and
physical space needed, as the Bitcoin blockchain itself was over 600 gigabytes as of
September 15th, 2024—and this blockchain records only bitcoin transactions.
• This is small compared to the amount of data stored in large data centers, but a
growing number of blockchains will only add to the amount of storage already
required for the digital world.
Created by Nandakishore 16
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
blockchain stands to make business and government operations more accurate, efficient,
secure purposes, and cheap, with fewer intermediaries.
As we head into the third decade of blockchain, it’s no longer a question of if legacy
companies will catch on to the technology—it’s a question of when. Today, we see a
proliferation of NFTs and the tokenization of assets. Tomorrow, we may see a combination
of blockchains, tokens, and artificial intelligence all incorporated into business and
consumer solutions.
Created by Nandakishore 17
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
resources, periodic outages, bottlenecks, lack of sufficient incentives for good service, or
corruption.
Blockchain
Each network architecture has its benefits and tradeoffs. For example, decentralized
blockchain systems, unlike distributed systems, typically prioritize security over
performance. So, when a blockchain network scales up or out, the network becomes more
secure, but performance slows down because each member node must validate all data
being added to the ledger. Adding members to a decentralized network can make it safer,
but not necessarily faster.
Created by Nandakishore 18
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
A real-world example
• Contura Energy, a leading U.S.-based coal supplier, has depended on an outdated
letters of credit system to manage its international trade payments.
• These letters of credit, issued by an intermediary bank on behalf of its client, serve
as a guarantee of payment for buyers. While this system is trustworthy, it’s also
manually driven, slow, and highly inefficient.
• Contura Energy understands the importance and value of digitizing and automating
their letters of credit process. The challenge they face, however, is enabling mutual
trust and verification between sellers and buyers.
• They are working with AWS on a decentralized, blockchain-based innovation that
provides a more efficient, cost saving, and less risky system to manage international
trade payments.
• This decentralized solution also increases transparency, giving all parties real-time
visibility into the data and documentation.
Created by Nandakishore 19
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
4. Data is essential for social coordination, i.e., for services, and digital
information is the advanced example of data. This implies that the states of
the digital domain influence administration and services considerably.
5. AI and blockchain platforms are among the most unmistakable
representations of this trend. Increasingly more of our social associations
are being molded by these technologies.
6. The political and monetary sectors are additionally getting progressively
organized and directed by the impacts of AI and DLT, expanded availability,
and the administrations encompassing them.
7. Analysts and experts are prophesying an information upheaval that is as
equivalent in power and troublesome in intensity as the modern industrial
revolution.
Why is decentralization important?
Decentralization is actually not a new idea. When assembling a technological
arrangement, three essential network structures are commonly thought of: centralized,
decentralized, and disseminated. While blockchain technologies frequently utilize
decentralized networks, a blockchain application itself simply can’t be sorted as being
decentralized or not.
Maybe, decentralization is a sliding scale and should be applied to all parts of a blockchain
application. By decentralizing the administration of and admittance to assets in an
application, more prominent and more pleasant assistance can be accomplished.
Decentralization typically has a few setoffs, for example, lower exchange. However, such
setoffs are worth it in comparison to the improved security and services they provide.
Benefits of decentralization:
Created by Nandakishore 20
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Created by Nandakishore 21
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Created by Nandakishore 22
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Blockchain technology serves as the backbone of the Bitcoin network, which was launched
in 2009 when its implementation was released as open-source software. Interestingly, the
word blockchain is never mentioned in the Bitcoin whitepaper — the term has been
popularized by later proponents of the technology.
How Does a Blockchain Work?
A ledger is a book or computer file that keeps track of economic activity. Ledgers can track
individual account balances and/or the ongoing movement of money within entire
economies. Today, most ledgers are handled by centralized entities such as a bank, which
maintain and store ledgers on their own servers in opaque databases.
Users propose additions to the ledger by submitting transactions that transfer value from
one account to another. User accounts are known as public keys (also called public
address) and each public key has an associated private key. The public key is akin to an
email address and the private key is similar to a password that the public key owner must
enter (called a digital signature) to transfer funds stored on their address.
Pending transactions are grouped together into “blocks”, where they are processed and
validated by each node in the network. Having each node check each transaction ensures
that changes to the ledger are redundantly validated, making it nigh impossible to make
malicious changes to the ledger or state of the network. For a transaction to be valid, the
digital signature must be correct and the public key must have sufficient funds to cover the
transaction.
Created by Nandakishore 23
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Nodes are rewarded for their services with transaction fees and/or newly minted
cryptocurrency (referred to as a block reward).
There are many different ways to design a blockchain, with each design having advantages
and disadvantages.
• Network Access & Participation – Blockchains can vary in terms of how open or
limited the network is to use and participate in. The three main types of blockchains:
public (completely open), private (completely closed), and permissioned (open
access, limited participation).
• Consensus Mechanism – Blockchains can reach consensus about transactions
through different means. Some of the most popular consensus mechanisms are
proof of work (Bitcoin), proof of stake (Solana), and proof of authority (most private
blockchains).
• Design Features – Blockchains currently cannot satisfy all desired qualities. Instead,
blockchains make tradeoffs to optimize certain feature sets over others between
security, decentralization, and scalability — commonly known as the Scalability
Trilemma. Other important design features include privacy, transaction finality, and
more.
Benefits of Blockchain
• Blockchains offer several value propositions not available in centralized systems.
Created by Nandakishore 24
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Smart Contracts
Blockchains such as Ethereum show how a public permissionless blockchain can be used
as a highly secure and reliable distributed computer for processing conditional agreements
known as smart contracts. Instead of tracking the movement of a single currency, users
send instructions to the blockchain that state “if x event happens, then execute y action.”
The blockchain processes these predefined instructions by producing outputs (transferring
value) based on inputs (data). This capability has enabled an entirely new financial
ecosystem of permissionless, transparent financial services known as decentralized
finance (DeFi).
Asset Tokenization
Several projects are using the blockchain as a global public registry for assets. Through a
smart contract, developers can create a unique non-fungible token (NFT) that represents
ownership of a real-world asset such as a building, car, rare trading card, or more.
Blockchains provide authenticity to asset ownership, transparent tracking of an asset’s life
cycle, and global liquidity to previously illiquid assets.
Enterprise Middleware
Created by Nandakishore 25
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Blockchains can act as a middleware to ensure two or more enterprise databases have
matching records without putting their sensitive internal data on a public blockchain. Since
a public blockchain is always online, easily auditable, resistant to manipulation, and
permissionless to access, enterprises can use it to inform one another on actions taken by
either side by storing them as data on the blockchain. The data is stored using a privacy
technique known as a zero-knowledge proof (ZKP) where only parties in the agreement
have the context to understand its meaning. The proof serves as a common frame of
reference for the state of the business process; e.g. the current terms of a volume discount
agreement between a seller and buyer.
Ledger of Record
Blockchains can serve as immutable environments for storing historical records. Having a
highly trusted set of records reduces friction within fragmented markets which often
contain many disparate databases. Blockchains offer a “Ledger of Record” that can
improve the tracking of financial contracts, storing of medical records, tracking of
identities, and much more.
Utility
Blockchains can be designed to provide a specific utility. For example, to provide
distributed video streaming using a decentralized network of nodes, host a tamper-proof
online game, or immutably store files. Similar to torrent systems, blockchains provide a
way to harness the power of a decentralized network to produce a shared public utility.
Blockchain Gaming
Blockchains can serve as a way to track and verify ownership of assets via NFTs that
represent ownership of in-game digital items and collectibles. Players can tap into a global
liquidity pool and trade in-game assets at decentralized marketplaces while maintaining
full custody over them, enabling fully community-owned blockchain games. With the
potential of interoperable blockchain games and the metaverse, players might be able to
trade in-game assets between different games in the future.
Supply Chain
As an immutable distributed database, blockchain can improve supply chain processes by
enhancing traceability and improving coordination between different participants, enabling
faster and more cost-efficient delivery of products. Since each participant has their own
copy of the blockchain, each party can identify errors, review the status of transactions,
and hold counterparties responsible for their actions. No participant can overwrite
Created by Nandakishore 26
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
historical data as doing so would require having to rewrite all subsequent blocks on all
shared copies of the blockchain.
Insurance
The combination of blockchains, smart contracts, and oracles has shown the potential to
solve the problem of transparency in the traditional insurance industry, streamline the
insurance process for all participants, and make insurance available to regions that
otherwise would be isolated from the global insurance industry. Smart contracts offer
automated execution of insurance policies based on if/then parameters that can replace
the traditional claims process in a way that is highly transparent and reliable.
Everyone has heard the term “Bitcoin,” especially when its price hit $20,000 per coin in late
2017. Despite this, I’ve found that few people know what the word “blockchain” means.
The blockchain is the distributed ledger that cryptocurrencies run on. Without the
blockchain, the entire cryptocurrency market would not exist.
As the CEO of a blockchain mining company that develops mining software and hardware,
I’d like to talk about how the blockchain works and where the industry may be heading.
The blockchain has been described as the biggest innovation since the internet. Billions of
dollars have been invested into projects that are building technology on the blockchain.
The most successful application of this technology to date has been in the use of
cryptocurrencies such as Bitcoin. (Full disclosure: My company holds Bitcoin, Ethereum,
XRP and other cryptocurrencies.) Cryptocurrency is special because it provides the
anonymity of physical cash without the need to be controlled by a central authority, such
as a bank.
Created by Nandakishore 27
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
E-gold was introduced in 1996 and became the first successful digital currency system.
Due to a lack of trust over the internet, we needed centralized authorities, such as banks,
through which to route our monetary transactions. Cryptocurrency, through the blockchain
ledger, created something like digital cash. It is anonymous, nontraceable, instant and
decentralized. Cryptocurrencies allow us to transfer value without a centralized authority.
Thus, the blockchain is often considered to be a solution to something known as the
Byzantine Generals problem.
Because we can’t trust everyone over the internet, the internet has filled up with a massive
number of third parties. The function of these parties is to store and verify our information.
Facebook, Google, PayPal and Amazon are examples of third parties that have monetized
our data. Unfortunately, the storage of our data by one central authority does have its
disadvantages. The central authority becomes a target for hacks and misuse of customer
data. Cambridge Analytica, which involved Facebook user data being used to manipulate
the electoral process, is an infamous example of this.
Despite the positives of the blockchain, it currently comes with limitations. Maintaining the
ledger takes a lot of work, and the machines that carry out this process consume a lot of
electricity. Recent data has estimated that the power consumed by the Bitcoin network
surpasses the power consumption of some countries. Furthermore, Bitcoin carries out less
than a dozen transactions per second, while Visa’s system can do 65,000 transactions per
second. It’s important to note that there are other cryptocurrencies that do not have these
limitations. XRP, a coin from the company Ripple, can purportedly do 1,500 transactions
per second at a negligible power cost. So, although there are other promising coins, Bitcoin
is still the most widely known in the market, perhaps because it was the blockchain’s first
trial run.
Just as gold’s value comes from what people perceive it to be worth, cryptocurrency value
stems from the same principle. In 2010, one Bitcoin was worth six cents; at the time of
writing this article, one Bitcoin is worth over $8,000. The billions invested into blockchain
projects are an indication that people are optimistic the blockchain can revolutionize more
than just money.
Entrepreneurs looking to break into the blockchain space should remember, however, that
there are many poor applications of this technology. I’ve seen companies using the
blockchain simply because they see so much hype around it. In many cases, a centralized
database is a better way of storing data. So, when considering the use of blockchain for
Created by Nandakishore 28
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
your company or for a specific project, it would be wise to thoroughly assess it to make
sure there’s a genuine need for the technology. You can find countless online courses on
the topic to learn more.
One thing that keeps surprising me is how quite a few people see absolutely nothing
redeeming in web3 (née crypto). Maybe this is their genuine belief. Maybe it is a reaction to
the extreme boosterism of some proponents who present web3 as bringing about a
libertarian nirvana. From early on I have tried to provide a more rounded perspective,
pointing to both the good and the bad that can come from it as in my talks at the Blockstack
Summits.
Today, however, I want to attempt to provide a cogent explanation for why bothering about
web3 makes sense. This requires telling a bit of a story and also understanding the nature
of disruptive innovation. The late Clayton Christensen characterized this type of innovation
as being worse at everything except for one dimension, but where that dimension really
winds up mattering a lot (and then over time everything else gets better also as the
innovation is widely adopted).
The canonical example here Is the personal computer (PC). The first PCs were worse
computers than every existing machine. They had less memory, less storage, slower CPUs,
less software, couldn’t multitask, etc. But they were better at one dimension: they were
cheap. And for those people who didn’t have a computer at all that mattered a great deal. It
is exactly this odd combination that made existing computer manufacturers (making
mainframes down to mini computers) ignore the PC. They only focused on all the bad parts
and ignored the one positive dimension or to the extent that they understood it they tried to
compete by making their own product cheaper. Other than IBM, they never embraced the
PC and went out of business or were absorbed by other companies.
A blockchain Is a worse database. It is slower, requires way more storage and compute,
doesn’t have customer support, etc. And yet it has one dimension along which it is radically
different. No single entity or small group of entities controls it – something people try to
convey, albeit poorly, by saying it is “decentralized.”
Ok, so how is this remotely the same as PCs being cheaper? Well because to some people
this matters a great deal. Why? Because much of the power held by large companies (and
by governments) comes from the fact that they operate and control databases. Facebook
Created by Nandakishore 29
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
alone gets to decide who can read and write from their database and what parts of it
anyone can see. They alone can make changes to this database. This turns out to be the
source of Facebook’s power in the world. Many people rightly see this power as a problem,
but fail to see how the structure of the original web technology directly contributed to this
extreme centralization.
It Is useful to go back to the beginning of the web to see how we got here. When (now Sir)
Tim Berners-Lee invented the HyperText Transfer Protocol (HTTP) he unleashed what we
now think of as permissionless publishing. Anyone can put up a web page and anyone with
a browser can access it. This was an amazing breakthrough, as pretty much all publishing
previously had required going through a publisher of some kind, who decided what should
and should not be published. And while some people bemoan this as a loss, I consider it a
gain in access to knowledge for many creators and learners who previously were kept at the
margins or shut out entirely.
HTTP though is a so-called stateless protocol. That means there is no memory built directly
into the protocol. It doesn’t have a notion of a database. So for example if you want to build
something as simple as a shopping cart that can hold multiple items, you need to
implement the data storage somewhere that’s not part of HTTP itself. Marc Andreessen and
his team at Netscape invented cookies to help solve this problem (sadly a far less elegant
mechanism than what Roy Fielding proposed in his dissertation on REST years later).
Cookies are files that get sent along with HTTP requests and can be read by and then
written to by the web server. In the early days people would literally write the items in a
shopping cart directly into cookie files. But because these files sit locally on a client
computer, it meant that someone couldn’t start shopping on their desktop computer at
work and then finish shopping once they got home. So instead these days cookies tend to
just contain user IDs and all the other database functions reside on the servers.
As a first approximation all the big powerful internet companies are really database
providers. Facebook is a database of people’s profiles, their friend graphs and their status
updates. Paypal is a database of people’s account balances. Amazon is a database of
SKUs, payment credentials and purchase histories. Google is a database of web pages and
query histories. Of course all of these companies have built a great deal more over time,
but operating a database has stayed at the core of why they are powerful. Only they get to
decide who has permission to read and write to this database and which parts of it they get
access to.
Created by Nandakishore 30
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Put differently: it turned out that permissionless publishing alone was insufficient. We also
need permissionless data. Why do we need this? Because otherwise we are left with a few
large corporations controlling much of what happens on the internet, which then leads us
to all sort of regulatory contortions aimed at rectifying the power imbalance but in practice
mostly cementing it. We of course know where this winds up and that’s why pretty much
everyone hates their cable company and their electric utility.
Now the important part to keep in mind here is that prior to the Bitcoin Paper we literally
didn’t know how to have permissionless. Yes, we had distributed databases. And yes, we
had federated databases. But all of those still had a small group of entities in charge (cf
pretty much every financial network such as ACH or VISA). We didn’t have a protocol for
maintaining consensus – meaning agreeing on what’s in the database – that would allow
anyone to join the protocol (as well as anyone to leave).
It is difficult to overstate how big an innovation this is. We went from not being able to do
something at all to having a first working version. Again to be clear, I am not saying this will
solve all problems. Of course it won’t. And it will even create new problems of its own. Still,
permissionless data was a crucial missing piece – its absence resulted in a vast power
concentration. As such Web3 can, if properly developed and with the right kind of
regulation, provide a meaningful shift in power back to individuals and communities.
And if widely adopted Web3/crypto technology will also start to improve along other
dimensions. It will become faster and more efficient. It will become easier and safer to use.
And much like the PC was a platform for innovation that never happened on mainframes or
mini computers, Web3 will be a platform for innovation that would never come from
Facebook, Amazon, Google, etc.
Created by Nandakishore 31
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
recorded information is hard to change without an agreement from all parties involved. IBM
explained that each new record becomes a block with a unique, identifying hash. Linking
the blocks into a chain of records forms a blockchain. Bitcoin cryptocurrency uses
blockchain technology.
Note: The data is recorded in chronological order. Also, once the data is recorded, it cannot
be changed.
Booz Allen Hamilton consulting firm wrote that the government could benefit from
blockchain-based applications because it offers transparency through decentralization,
allowing participating stakeholders to see and verify data. In addition, blockchain can
enable independent verification of governmental claims. The firm wrote that Sweden,
Created by Nandakishore 32
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Estonia, and Georgia are experimenting with blockchain-based land registries, which could
help quickly resolve or prevent property disputes.
Blockchain Security
One of the negatives of digital transformation has been the growth in personal data theft.
Government databases are a target of cyber hackers. Database hacks have exposed
names, Social Security numbers, birthdates, addresses, and driver’s license numbers of
millions of Americans, such as the 2017 Equifax database breach. Booz Allen Hamilton
wrote that blockchain data structures harden network security by reducing single-
point-of-failure risk, making a database breach difficult.
Created by Nandakishore 33
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Electronic Voting
Governments are considering blockchain-based voting platforms due to concerns about
election security, voter registration integrity, poll accessibility, and voter turnout.
Blockchain’s information security qualities could help address election tampering and
increase poll accessibility. WEF said a limitation would be blockchain’s vulnerability to
cyberattacks and other security issues.
Grant Disbursements
Because of the millions of dollars granted to various institutions, the opaque donation
process is ripe for inefficiency and corruption. Blockchain could reduce the number of
actors and managers, could streamline the process, and improve verification. WEF said a
limitation would be among the less technologically savvy who might be excluded from
grant disbursement processes. In addition, it would not address how recipients spend
grant money.
Created by Nandakishore 34
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Here are the top 5 prominent industries that will be disrupted by blockchain technology in
the near future:
1. Banking
2. Cyber Security
3. Supply Chain Management
4. Healthcare
5. Government
1. Banking
• Before Blockchain
Banking has transfer fees, which can be both expensive and time-consuming for people.
Also, sending money overseas becomes even more difficult due to the exchange rate and
other hidden costs.
• After Blockchain
Blockchain eliminates the need for a middleman. Blockchain is disrupting the banking
system by providing a peer-to-peer payment system with the highest security and low fees.
Blockchain technology provides instant and borderless payments across the globe
Cryptocurrencies (like Ethereum, bitcoin) remove the requirement for a third party to
perform transactions
Blockchain records all the transactions in a public ledger which is globally accessible by
bitcoin users
Let’s consider an example of ABRA
Abra is a financial cryptocurrency application which helps in performing peer-to-peer
money transfers
With this application, cryptocurrency users can save, send and receive their digital money
on their electronic devices
2. Cyber Security
• Before Blockchain
Earlier, cyberattacks were a significant threat to the public. Several organizations were
developing an effective solution to secure the data against unauthorized access and
tampering.
• After Blockchain
Blockchain quickly identifies malicious attack due to the peer-to-peer connections where
data cannot be tampered with
Every single piece of data stored on the blockchain network is verified and encrypted using
a cryptographic algorithm
Created by Nandakishore 35
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
By eliminating the centralized system, blockchain provides a transparent and secure way of
recording transactions (without disclosing your private information to anyone)
For example, a software security company called Guardtime offers blockchain-based
products and services.
Rather than following the centralized system, the company utilizes blockchain technology
and distributes data to its nodes.
• After Blockchain
• Tracking of a product can be done with blockchain technology, by facilitating
traceability across the entire Supply chain.
• Blockchain gives the facility to verify and audit transactions by multiple supply chain
partners involved in the supply chain management system.
• Blockchain records transaction (history, timestamp, date, etc.) of a product in a
decentralized distributed ledger
• Each transaction is recorded into a block
• With blockchain, anyone can verify the authenticity or status of a product being
delivered
• Let’s consider an example of the Pacific Tuna project.
Created by Nandakishore 36
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
For example, United Healthcare is an American healthcare company that has enhanced its
privacy, security, and medical records’ interoperability using Blockchain.
5. Government
Before Blockchain
Rigged votes is an illegal activity that occurs during most traditional voting systems. Also,
citizens who want to vote to wait a little longer in a queue and cast their votes to a local
authority, which is a very time-consuming process.
After Blockchain
Voters are allowed to vote without the need of disclosing their identity in public
The votes are counted with high accuracy by the officials knowing that each ID can be
attributed to just one vote
As soon the vote is added to the public ledger, the information can never be erased
Consider an example of MiVote
MiVote is a token-based blockchain platform that is similar to a digital ballot box
Using MiVote, through a smartphone, voters can cast their votes, where the records are
stored in the blockchain securely
Moving forward, let’s understand the fundamentals of Blockchain.
Fundamentals of Blockchain
1. Public Distributed Ledgers
A blockchain is a decentralized public distributed ledger that is used to record transactions
across many computers
A distributed ledger is a database that is shared among the users of the blockchain network
The transactions are accessed and verified by users associated with the bitcoin network,
thereby making it less prone to cyberattack
2. Encryption
Blockchain eliminates unauthorized access by using the cryptographic algorithm (SHA256)
to ensure the blocks are kept secure
Each user in the blockchain has their key
3. Proof of Work
Proof of work (PoW) is a method to validate transactions in a blockchain network by solving
a complex mathematical puzzle called mining.
Note: Users trying to solve the puzzle are called miners.
4. Mining
In Blockchain, when miners use their resources (time, money, electricity, etc.) to validate a
new transaction and record them on the public ledger, they are given a reward.
Note: As a reward, the miner gets 12.5 BTC (bitcoins)
FAQs
Created by Nandakishore 37
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Created by Nandakishore 38
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Conclusion
Blockchain technology is only going to grow in the fields of business, finance, law,
medicine, and real estate. Whether you’re an experienced Blockchain developer, or you’re
aspiring to break into this exciting industry, enrolling in our Blockchain Certification Training
program will help individuals with all levels of experience to learn Blockchain developer
techniques and strategies.
For starters, let’s first learn what is blockchain technology. Logically, a blockchain is a
chain of blocks which contain specific information (database), but in a secure and genuine
way that is grouped together in a network (peer-to-peer). In other words, blockchain is a
combination of computers linked to each other instead of a central server, meaning that
the whole network is decentralized.
To make it even simpler, the blockchain concept can be compared to work done with
Google Docs. You may recall the days of tossing over doc. Documents and waiting for other
participants to make necessary edits. These days, with the help of Google Docs, it is
possible to work on the same document simultaneously.
The blockchain technique allows digital information to be distributed, rather than copied.
This distributed ledger provides transparency, trust, and data security.
Blockchain architecture is being used very broadly in the financial industry. However, these
days, this technology helps create software development solutions for cryptocurrencies
and record keeping, digital notary, and smart contracts.
Created by Nandakishore 39
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
The traditional architecture of the World Wide Web uses a client-server network. In this
case, the server keeps all the required information in one place so that it is easy to update,
due to the server being a centralized database controlled by a number of administrators
with permissions.
In the case of the distributed network of blockchain architecture, each participant within
the network maintains, approves, and updates new entries. The system is controlled not
only by separate individuals, but by everyone within the blockchain network. Each member
ensures that all records and procedures are in order, which results in data validity and
security. Thus, parties that do not necessarily trust each other are able to reach a common
consensus.
Created by Nandakishore 40
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Blockchain Hashing
Logically, the first block does not contain the pointer since this one is the first in a chain. At
the same time, there is potentially going to be a final block within the blockchain database
that has a pointer with no value.
• Basically, the following blockchain sequence diagram is a connected list of records:
Blockchain Structure
Blockchain architecture can serve the following purposes for organizations and
enterprises:
• Cost reduction – lots of money is spent on sustaining centrally held databases (e.g.
banks, governmental institutions) by keeping data current secure from cyber crimes
and other corrupt intentions.
Created by Nandakishore 41
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
• Data validity & security – once entered, the data is hard to tamper with due to the
blockchain’s nature. It takes time to proceed with record validation, since the
process occurs in each independent network rather than via compound processing
power. This means that the system sacrifices performance speed, but instead
guarantees high data security and validity.
The following table provides a detailed comparison among these three blockchain
systems:
Created by Nandakishore 42
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
• In a public blockchain, all records are visible to the public and anyone could take
part in the agreement process. On the other hand, this is less efficient since it takes
a considerable amount of time to accept each new record into the blockchain
architecture.
• In terms of efficiency, the time for each transaction in a public blockchain is less
eco-friendly since it requires a huge amount of computation power compared to
private blockchain architecture.
Created by Nandakishore 43
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
• Miners – specific nodes which perform the block verification process before adding
anything to the blockchain structure
• Consensus (consensus protocol) – a set of rules and arrangements to carry out
blockchain operations
Any new record or transaction within the blockchain implies the building of a new block.
Each record is then proven and digitally signed to ensure its genuineness. Before this block
is added to the network, it should be verified by the majority of nodes in the system.
The following is a blockchain architecture diagram that shows how this actually works in
the form of a digital wallet.
Let’s have a closer look at what is a block in a blockchain. Each blockchain block consists
of:
• Certain data
• The hash of the block
• The hash from the previous block
• The data stored inside each block depends on the type of blockchain. For instance,
in the Bitcoin blockchain structure, the block maintains data about the receiver,
sender, and the amount of coins.
• A hash is like a fingerprint (long record consisting of some digits and letters). Each
block hash is generated with the help of a cryptographic hash algorithm (SHA 256).
Consequently, this helps to identify each block in a blockchain structure easily. The
moment a block is created, it automatically attaches a hash, while any changes
made in a block affect the change of a hash too. Simply stated, hashes help to
detect any changes in blocks.
Created by Nandakishore 44
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
• The final element within the block is the hash from a previous block. This creates a
chain of blocks and is the main element behind blockchain architecture’s security.
As an example, block 45 points to block 46. The very first block in a chain is a bit
special – all confirmed and validated blocks are derived from the genesis block.
• Any corrupt attempts provoke the blocks to change. All the following blocks then
carry incorrect information and render the whole blockchain system invalid.
• On the other hand, in theory, it could be possible to adjust all the blocks with the
help of strong computer processors. However, there is a solution that eliminates
this possibility called proof-of-work. This allows a user to slow down the process of
creation of new blocks. In Bitcoin blockchain architecture, it takes around 10
minutes to determine the necessary proof-of-work and add a new block to the
chain. This work is done by miners – special nodes within the Bitcoin blockchain
structure. Miners get to keep the transaction fees from the block that they verified as
a reward.
• Each new user (node) joining the peer-to-peer network of blockchain receives a full
copy of the system. Once a new block is created, it is sent to each node within the
blockchain system. Then, each node verifies the block and checks whether the
information stated there is correct. If everything is alright, the block is added to the
local blockchain in each node.
• For example, the Bitcoin blockchain has a consensus rule stating that a transaction
amount must be cut in half after every 200,000 blocks. This means that if a block
produces a verification reward of 10 BTC, this value must be halved after every
200,000 blocks.
• As well, there can only be 4 million BTC left to be mined, since there is a maximum
of 21 million BTC laid down in the Bitcoin blockchain system by the protocol. Once
the miners unlock this many, the supply of Bitcoins ends unless the protocol is
changed.
Created by Nandakishore 45
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
To make it more concrete, let’s take the example of diamonds. Risks and challenges
associated with diamonds exist during every part of the process, from the extraction of
diamonds to their final, commercial result. Consumers want to be sure they are purchasing
real and ethical diamonds. Government institutions want to keep track of their taxation and
exports. Blockchain architecture can be used to eliminate these risks.
Created by Nandakishore 46
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
• Diamond Sellers
Blockchain solutions organize all these parties into a peer-to-peer network that helps to
remove all the mentioned risks and build a transparent system. Everyone would receive
access to the synchronized data of a “shared, immutable ledger” and be able to keep track
of the diamond’s moving from manufacturing to the final consumer. The blockchain ledger
would hold the sequence of all actions occurring like diamond mining, refining, and
distribution.
In most cases, each organization within a network holds their own copy synced together
with clever protocols and technical layers of blockchain network (called peers). As well, in
order to outline a few processes happening at the same time, there is the Ordering Service.
This is shared among all parties deciding the transactions within the blockchain structure
and their order. In case with multiple users, there is a Membership Services Provider (MSP)
that allows access for particular users inside the network.
In the end, all the transactions during this path are kept in a general ledger (e.g data with
diamond photos, place of extraction, color, serial number, place where it was cut, purified,
sold, etc.). This information is complete and authentic.
Created by Nandakishore 47
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
After the blockchain network is set up, the next step is to agree upon the type of business
transactions happening inside the blockchain architecture. In reality, these rules are
written in legal agreements. Logically, within the blockchain code, this refers to a Smart
Contract (also called as Chaincode or Business Network Definition from Hyperledger
Composer).
As in the real world, the blockchain contract has participants, assets, and transactions. For
each transaction, a Transactional Processor Function is written (reflects JavaScript) and
lays out the things that will happen once the transaction has been generated.
Recently, the task of developing a blockchain has been simplified with the help of
Ethereum and other similar blockchain software. Ethereum is an open source software
platform based on blockchain technology allowing for the building and deployment of
decentralized applications (DApps).
In terms of the coding skills required to develop a blockchain solution, one should become
familiar with a range of programming languages, not one specifically. If the goal is to
implement a customizable blockchain system, programming languages such as C++,
Python, C, Java, and Ruby help to accomplish this task. As well, web development skills
like HTML, CSS, Node JS could become handy.
In case you are interested in writing smart contracts (smart contracts are the programs
stored in the blockchain system and used to automatically exchange coins or any other
funds based on predefined conditions) using Ethereum, the contract-based programming
language Solidity is required.
Aside from hard programming skills, custom software developers need to understand
business requirements and operations, as well as possess great cooperation and
negotiation skills.
Created by Nandakishore 48
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Blockchain architecture possesses a lot of benefits for businesses. Here are several
embedded characteristics:
• Cryptography – blockchain transactions are validated and trustworthy due to the
complex computations and cryptographic proof among involved parties
• Immutability – any records made in a blockchain cannot be changed or deleted
• Provenance – refers to the fact that it is possible to track the origin of every
transaction inside the blockchain ledger
• Decentralization – each member of the blockchain structure has access to the
whole distributed database. As opposed to the central-based system, consensus
algorithm allows for control of the network
• Anonymity- each blockchain network participant has a generated address, not user
identity. This keeps users’ anonymity, especially in a public bloc
Blockchain Architecture 101: Components, Structure, and Benefits
Key Takeaways
• Decentralized and Secure: Blockchain architecture revolutionizes data exchange
and security by offering a decentralized system, contrasting sharply with traditional
centralized models. This structure ensures transparent and secure transactions
across a peer-to-peer network.
• Historical Evolution: Originally conceptualized in 1991 to timestamp digital
documents, blockchain technology gained mainstream attention with the creation
of Bitcoin by Satoshi Nakamoto in 2008, marking a pivotal moment in its evolution.
• Core Characteristics: Blockchain’s fundamental features include decentralization,
robust security through advanced cryptographic techniques, and immutability of
recorded data, which together enhance its reliability and transparency.
• Layered Architecture: Blockchain is composed of multiple layers, including the data
layer (containing transactional information), the network layer (for peer-to-peer
communication), the consensus layer (ensuring ledger integrity), and the
application layer (enabling user-facing applications).
• Versatile Applications: Blockchain’s structure supports various types of networks,
such as public, private, hybrid, and consortium blockchains, each tailored for
specific use cases ranging from open, decentralized systems to controlled,
enterprise-focused environments.
• Historical Context and Evolution of Blockchain Technology
The journey of blockchain architecture began far before its mainstream popularity. Initially
conceptualized in 1991, the primary objective was to create a system for timestamping
Created by Nandakishore 49
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
The architecture of blockchain ensures that each block Is tamper-proof, maintaining the
integrity and trustworthiness of the entire chain. This structure of block in blockchain is not
just a technical feat but also a paradigm shift in how data security and transparency are
perceived and implemented. Understanding this structure is vital for appreciating the full
scope of blockchain’s potential in various sectors.
Although there is some variation among different chains, this example shows a standard
structure for a block.
Core Characteristics of Blockchain Architecture
Delving deeper into the blockchain architecture, its core characteristics emerge as pillars
of this revolutionary technology. The architecture of blockchain is fundamentally
decentralized, eliminating the need for a central authority and thereby enhancing the
system’s robustness against failures and attacks. In this structure of blockchain, each
participant, or node, plays a role in maintaining the network, leading to a more democratic
and equitable digital ecosystem.
Another key aspect is the unyielding blockchain security inherent in the blockchain
structure, provided by advanced cryptographic techniques. This blockchain security
feature, combined with the meticulous structure of block in blockchain, ensures that once
data is recorded, it becomes immutable – a permanent and unalterable part of the
blockchain. These characteristics not only define the blockchain architecture but also
open up a myriad of possibilities for its application in various sectors, from finance to
supply chain management.
Created by Nandakishore 50
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
base of this structure of blockchain is the data layer, where the actual blocks reside,
containing transactional information securely linked using cryptographic hashes.
• The network layer forms the next tier in the blockchain structure, responsible for the
peer-to-peer communication essential for distributing information across the
network.
• Above this lies the consensus layer, a critical component of the architecture of
blockchain, which ensures that all nodes agree on the state of the ledger, thus
maintaining its integrity and trustworthiness.
• The application layer sits at the top, where the structure of blockchain manifests
into user-facing applications and services, making blockchain technology
accessible and useful in real-world scenarios.
• Understanding these layers is crucial for comprehending the full scope and
versatility of blockchain architecture, paving the way for innovative applications that
extend beyond cryptocurrencies.
Each type of blockchain structure serves specific needs and scenarios, highlighting the
versatility and adaptability of blockchain architecture in various domains.
Created by Nandakishore 51
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
This design is a cornerstone of the architecture of blockchain, ensuring that once a block is
added to the chain, altering it retrospectively becomes nearly impossible. This immutability
is a defining feature of the structure of blockchain, providing a level of security and trust
that is unparalleled in traditional database systems. Understanding this block structure is
essential to appreciate the full security and transparency that blockchain architecture
offers.
In the structure of blockchain, this validation is typically done through a process known as
mining, particularly in public blockchains like Bitcoin. Cryptocurrency mining involves
solving complex cryptographic puzzles to validate transactions and add them to a block.
Once a transaction is verified and included in a block, it becomes an immutable part of the
blockchain structure. This meticulous validation process is what makes blockchain
architecture inherently secure and trustworthy.
Created by Nandakishore 52
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
This system, integral to the architecture of blockchain, requires nodes (or miners) to solve
complex mathematical problems, thus validating transactions and creating new blocks.
The proof-of-work model not only secures the blockchain structure but also mitigates the
risk of fraudulent transactions and double-spending. It is the backbone of the trust and
security that blockchain architecture promises, ensuring that each transaction is
accurately recorded and immutable once added to the structure of block in blockchain.
Key considerations when considering how to build a blockchain include selecting the right
consensus algorithm, ensuring scalability, and maintaining security protocols. Tools and
platforms, such as Ethereum for public blockchains or Hyperledger for private ones, offer
diverse functionalities tailored to different blockchain structures. These tools not only
facilitate the creation of a blockchain network but also empower developers to customize
the architecture of blockchain to fit specific use cases.
Created by Nandakishore 53
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Beyond technical prowess, a successful blockchain developer must also possess an acute
awareness of business processes and applications. This dual competency enables
developers to not only construct a technically sound blockchain structure but also ensure
that it aligns with business objectives and operational requirements. The blend of technical
skills and business acumen is key to unlocking the transformative potential of blockchain
architecture.
Conclusion
As we have explored, the blockchain architecture is not just a technological marvel but a
catalyst for innovation across various sectors. Its robust structure of blockchain,
characterized by decentralization, security, and transparency, paves the way for a future
where digital transactions and record-keeping are revolutionized. From the intricate
structure of block in blockchain to the comprehensive architecture of blockchain, this
technology offers a plethora of opportunities for businesses, governments, and individuals
alike.
In this guide, we’ll introduce the fundamental concepts of blockchain technology including
its structure, basic operations, and the Bitcoin blockchain.
Created by Nandakishore 54
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
This article is based on notes from the first course in this Blockchain Specialization and is
organized as follows:
• Finance
• Healthcare
• Government
• Manufacturing
• Supply chains and distribution
Specifically, a few real-world examples of blockchains application in these industries
include:
• Digital media transfer: for example the sale of art and collectibles with non-
fungible tokens (NFTs)
• Remote services delivery: for example in the travel and tourism industry
• Decentralized business logic: for example moving computing to data sources
• Distributed intelligence: for example in education credentialing
• Distributed resources: for example, in power generation and distribution
• Crowdfunding: for example in startup financing
• Crowd operations: for example, in electronic voting
• Identity management: for example, having a single ID
• And many more
Created by Nandakishore 55
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Blockchain offers the opportunity for people in remote corners of the world to take part in
democratic processes.
In short, there is a tremendous opportunity for entrepreneurs, developers, and innovators
to create new applications and use cases built on top of blockchain technology.
In order to better understand this technology, we’ll discuss both the Bitcoin and Ethereum
blockchain in more detail below.
We’ll also explain several of the algorithms and techniques that are commonly used in a
blockchain.
At a high level, it implemented cryptography and software that is used for validation,
verification, and consensus in a blockchain infrastructure.
A few years later in 2012, several computational elements were added to the blockchain
infrastructure that opened up a new level of opportunities beyond just currency transfers.
These innovations are the backbone of what is referred to as “Web 3.0”. To give you some
context, Web 2.0 was driven by three layers of innovation including mobile, social, and
cloud computing.
Created by Nandakishore 56
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
These peers are not necessarily known to each other, although they are able to establish
trust by having a process that can validate, verify, and confirm transactions.
Transactions are also recorded in a distributed ledger of blocks, which creates a chain of
blocks that cannot be tampered with.
A blockchain also has a consensus protocol that defines an agreement of how a block will
be added to the chain.
To learn more about the Bitcoin blockchain, you can find the original whitepaper here.
Blockchain Structure
In this section, we’ll review the basic structure of a blockchain.
Created by Nandakishore 57
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
A core concept of the bitcoin network is an Unspent Transaction Output, otherwise known
as UTXO.
• The set of all UTXOs in the Bitcoin network collectively translate the state of the
Bitcoin blockchain.
UTXOs are referenced as the inputs of a transaction and are also the outputs generated
from a transaction.
All UTXOs in the system are stored by the network’s participant nodes in a database.
In the Bitcoin blockchain, a transaction uses the amount specified by one or more UTXOs
and transmits it to one or more new output UTXOs.
The structure of a UTXO includes:
• A unique identifier of the transaction that created the UTXO
• An index of the position of the UTXO in the transaction output lists
• A value of the transaction
• An optional script that specifies the conditions of which the output can be spent
• The transaction itself includes the following elements:
Created by Nandakishore 58
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
The first participants are people that initiate the transfer of value by creating a transaction.
The second group of participants are called miners, which provide the computational
resources needed to:
• Verify transactions
• Broadcast transactions
• Compete for the right to create a block
• Reach consensus by validating the block
• Broadcast the new block
• Confirm transactions
For these computational resources provided by miners, they are incentivized and rewarded
with newly minted bitcoin, which is currently set at 6.25 BTC.
Created by Nandakishore 59
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
The algorithm that miners use to reach consensus is called the proof-of-work protocol,
which t requires the miner to provide the computational work required to solve a puzzle and
claim the right to add a new block to the chain.
The Ethereum blockchain extended this scripting feature into a complete execution
framework called smart contracts.
A smart contract provides the powerful capability of code execution that embeds
business logic into the blockchain.
Based on these capabilities, three major types of blockchains have emerged:
• Public: Bitcoin is an example of a public blockchain in which anyone can join and
transact with other participants
• Private: Access is limited to select participants of an organization
• Permissioned: Also called a consortium blockchain, this type is meant for a
consortium of collaborating partings to transact on a blockchain. Permissioned
Created by Nandakishore 60
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
blockchains have the benefit of a public blockchain while allowing only users with
permission to collaborate and transact.
In summary, smart contracts have taken the innovation of the Bitcoin blockchain to
another level by opening up broader applications of the technology.
Summary: Blockchain Basics
A few key takeaways about the basics of blockchain technology:
• One of the key innovations of the Bitcoin blockchain is that it enabled a platform for
the peer-to-peer transfer of value without any central authority
• Operations in a decentralized network are the responsibility of the peer participants
and their respective computational nodes.
• A smart contract provides the powerful capability of code execution that embeds
business logic into the blockchain.
Transactions
The following subsections briefly document core transaction details.
Opcodes
The opcodes used in the pubkey scripts of standard transactions are:
Created by Nandakishore 61
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
• Various data pushing opcodes from 0x00 to 0x4e (1–78). These aren’t typically
shown in examples, but they must be used to push signatures and public keys onto
the stack. See the link below this list for a description
• OP_TRUE/OP_1 (0x51) and OP_2 through OP_16 (0x52–0x60), which push the
values 1 through 16 to the stack.
• “OP_CHECKSIG” consumes a signature and a full public key, and pushes true onto
the stack if the transaction data specified by the SIGHASH flag was converted into
the signature using the same ECDSA private key that generated the public key.
Otherwise, it pushes false onto the stack.
• “OP_DUP” pushes a copy of the topmost stack item on to the stack.
• “OP_HASH160” consumes the topmost item on the stack, computes the
RIPEMD160(SHA256()) hash of that item, and pushes that hash onto the stack.
• “OP_EQUAL” consumes the top two items on the stack, compares them, and
pushes true onto the stack if they are the same, false if not.
• “OP_VERIFY” consumes the topmost item on the stack. If that item is zero (false) it
terminates the script in failure.
• “OP_EQUALVERIFY” runs “OP_EQUAL” and then “OP_VERIFY” in sequence.
• “OP_CHECKMULTISIG” consumes the value (n) at the top of the stack, consumes
that many of the next stack levels (public keys), consumes the value (m) now at the
top of the stack, and consumes that many of the next values (signatures) plus one
extra value.
• The “one extra value” it consumes is the result of an off-by-one error in the Bitcoin
Core implementation. This value is not used, so signature scripts prefix the list of
secp256k1 signatures with a single OP_0 (0x00).
• “OP_CHECKMULTISIG” compares the first signature against each public key until it
finds an ECDSA match. Starting with the subsequent public key, it compares the
second signature against each remaining public key until it finds an ECDSA match.
The process is repeated until all signatures have been checked or not enough public
keys remain to produce a successful result.
• Because public keys are not checked again if they fail any signature comparison,
signatures must be placed in the signature script using the same order as their
corresponding public keys were placed in the pubkey script or redeem script. See
the “OP_CHECKMULTISIG” warning below for more details.
• “OP_RETURN” terminates the script in failure when executed.
A complete list of opcodes can be found on the Bitcoin Wiki Script Page, with an
authoritative list in the opcodetype enum of the Bitcoin Core script header file
Created by Nandakishore 62
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Warning icon Signature script modification warning: Signature scripts are not signed, so
anyone can modify them. This means signature scripts should only contain data and data-
pushing opcodes which can’t be modified without causing the pubkey script to fail. Placing
non-data-pushing opcodes in the signature script currently makes a transaction non-
standard, and future consensus rules may forbid such transactions altogether. (Non-data-
pushing opcodes are already forbidden in signature scripts when spending a P2SH pubkey
script.)
OP_0 <A sig> <B sig> OP_2 <A pubkey> <B pubkey> <C pubkey> OP_3
OP_0 <B sig> <A sig> OP_2 <A pubkey> <B pubkey> <C pubkey> OP_3
Created by Nandakishore 63
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Failure, aborted: two signature matches required but none found so far, and there’s
only one pubkey remaining
Address Conversion
The hashes used in P2PKH and P2SH outputs are commonly encoded as Bitcoin
addresses. This is the procedure to encode those hashes and decode the addresses.
First, get your hash. For P2PKH, you RIPEMD-160(SHA256()) hash a ECDSA public key
derived from your 256-bit ECDSA private key (random data). For P2SH, you RIPEMD-
160(SHA256()) hash a redeem script serialized in the format used in raw transactions
(described in a following sub-section). Taking the resulting hash:
1. Add an address version byte in front of the hash. The version bytes commonly used
by Bitcoin are:
• 0x00 for P2PKH addresses on the main Bitcoin network (mainnet)
• 0x6f for P2PKH addresses on the Bitcoin testing network (testnet)
• 0x05 for P2SH addresses on mainne.
• 0xc4 for P2SH addresses on testnet
2. Create a copy of the version and hash; then hash that twice with SHA256:
SHA256(SHA256(version . hash))
3. Extract the first four bytes from the double-hashed copy. These are used as a
checksum to ensure the base hash gets transmitted correctly.
4. Append the checksum to the version and hash, and encode it as a base58 string:
BASE58(version . hash . checksum)
Bitcoin’s base58 encoding, called Base58Check may not match other implementations.
Tier Nolan provided the following example encoding algorithm to the Bitcoin Wiki
Base58Check encoding page under the Creative Commons Attribution 3.0 license:
Code_string =
“123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz”
X = convert_bytes_to_big_integer(hash_result)
Output_string = “”
Created by Nandakishore 64
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
While(x > 0)
{
(x, remainder) = divide(x, 58)
Output_string.append(code_string[remainder])
}
Repeat(number_of_leading_zero_bytes_in_hash)
{
Output_string.append(code_string[0]);
}
Output_string.reverse();
Bitcoin’s own code can be traced using the base58 header file.
To convert addresses back into hashes, reverse the base58 encoding, extract the
checksum, repeat the steps to create the checksum and compare it against the extracted
checksum, and then remove the version byte.
Bitcoin Core and many other tools print and accept raw transactions encoded as hex.
As of Bitcoin Core 0.9.3 (October 2014), all transactions use the version 1 format
described below. (Note: transactions in the block chain are allowed to list a higher version
number to permit soft forks, but they are treated as version 1 transactions by current
software.)
A raw transaction has the following top-level format:
Byte Name Datatype Description
4 Version Int32_t Transaction version number (note, this is signed);
currently version 1 or 2. Programs creating
transactions using newer consensus rules may
use higher version numbers. Version 2 means
that BIP 68 applies.
Varies Tx_in.count Compact Number of inputs in this transaction.
size.unit
Varies Tx_in txIn Transaction inputs. See description of txIn below.
Created by Nandakishore 65
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
A transaction may have multiple inputs and outputs, so the txIn and txOut structures may
recur within a transaction. CompactSize unsigned integers are a form of variable-length
integers; they are described in the CompactSize section.
Created by Nandakishore 66
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Example
The sample raw transaction itemized below is the one created in the Simple Raw
Transaction section of the Developer Examples. It spends a previous pay-to-pubkey output
by paying to a new pay-to-pubkey-hash (P2PKH) output.
Created by Nandakishore 67
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Most (but not all) blocks prior to block height 227,836 used block version 1 which did not
require the height parameter to be prefixed to the coinbase script. The block height
parameter is now required.
Although the coinbase script is arbitrary data, if it includes the bytes used by any signature-
checking operations such as “OP_CHECKSIG”, those signature checks will be counted as
signature operations (sigops) towards the block’s sigop limit. To avoid this, you can prefix
all data with the appropriate push operation.
Created by Nandakishore 68
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
| | 062f503253482f0472d35454085fffed
| | f2400000f90f54696d65202620486561
| | 6c74682021 …………………… Arbitrary data
| 00000000 ………………………. Sequence
Bitcoin Core code and this document refers to these variable length integers as
compactSize. Many other documents refer to them as var_int or varInt, but this risks
conflation with other variable-length integer encodings—such as the CVarInt class used in
Bitcoin Core for serializing data to disk. Because it’s used in the transaction format, the
format of compactSize unsigned integers is part of the consensus rules.
For numbers from 0 to 252, compactSize unsigned integers look like regular unsigned
integers. For other numbers up to 0xffffffffffffffff, a byte is prefixed to the number to indicate
Created by Nandakishore 69
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
its length—but otherwise the numbers look like regular unsigned integers in little-endian
order.
Value Bytes used Format
>= 0 && <= 252 1 Uint8_t
>= 253 && <= 0xffff 3 0xfd followed by the
number as uint16_t
>= 0x10000 && <= 0xffffffff 5 0xfe followed by the
number as uint32_t
>= 0x100000000 && <= 9 0xff followed by the number
0xffffffffffffffff as uint64_t
What’s a transaction?
An Ethereum transaction refers to an action initiated by an externally-owned account, in
other words an account managed by a human, not a contract. For example, if Bob sends
Alice 1 ETH, Bob’s account must be debited and Alice’s must be credited. This state-
changing action takes place within a transaction.
Transactions, which change the state of the EVM, need to be broadcast to the whole
network. Any node can broadcast a request for a transaction to be executed on the EVM;
after this happens, a validator will execute the transaction and propagate the resulting
state change to the rest of the network.
Transactions require a fee and must be included in a validated block. To make this overview
simpler we’ll cover gas fees and validation elsewhere.
• From – the address of the sender, that will be signing the transaction. This will be an
externally-owned account as contract accounts cannot send transactions.
• To – the receiving address (if an externally-owned account, the transaction will
transfer value. If a contract account, the transaction will execute the contract code)
Created by Nandakishore 70
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
• Signature – the identifier of the sender. This is generated when the sender’s private
key signs the transaction and confirms the sender has authorized this transaction
• Nonce – a sequentially incrementing counter which indicates the transaction
number from the account
• Value – amount of ETH to transfer from sender to recipient (denominated in WEI,
where 1ETH equals 1e+18wei)
• Input data – optional field to include arbitrary data
• gasLimit – the maximum amount of gas units that can be consumed by the
transaction. The EVM specifies the units of gas required by each computational step
• maxPriorityFeePerGas – the maximum price of the consumed gas to be included
as a tip to the validator
• maxFeePerGas – the maximum fee per unit of gas willing to be paid for the
transaction (inclusive of baseFeePerGas and maxPriorityFeePerGas)
• Gas is a reference to the computation required to process the transaction by a
validator. Users have to pay a fee for this computation. The gasLimit, and
maxPriorityFeePerGas determine the maximum transaction fee paid to the validator.
More on Gas.
{
From: “0xEA674fdDe714fd979de3EdF0F56AA9716B898ec8”,
To: “0xac03bb73b6a9e108530aff4df5077c2b3d481e5a”,
gasLimit: “21000”,
maxFeePerGas: “300”,
maxPriorityFeePerGas: “10”,
nonce: “0”,
value: “10000000000”
}
But a transaction object needs to be signed using the sender’s private key. This proves that
the transaction could only have come from the sender and was not sent fraudulently.
Created by Nandakishore 71
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
{
“id”: 2,
“jsonrpc”: “2.0”,
“method”: “account_signTransaction”,
“params”: [
{
“from”: “0x1923f626bb8dc025849e00f99c25fe2b2f7fb0db”,
“gas”: “0x55555”,
“maxFeePerGas”: “0x1234”,
“maxPriorityFeePerGas”: “0x1234”,
“input”: “0xabcd”,
“nonce”: “0x0”,
“to”: “0x07a565b7ed7d7a678680a4c162885bedbb695fe0”,
“value”: “0x1234”
}
]
}
SExample response:
{
“jsonrpc”: “2.0”,
“id”: 2,
“result”: {
“raw”:
“0xf88380018203339407a565b7ed7d7a678680a4c162885bedbb695fe080a44401a6e40
00000000000000000000000000000000000000000000000000000000000001226a0223a7
c9bcf5531c99be5ea7082183816eb20cfe0bbc322e97cc5c7f71ab8b20ea02aadee6b34b
45bb15bc42d9c09de4a6754e7000908da72d48cc7704971491663”,
“tx”: {
“nonce”: “0x0”,
“maxFeePerGas”: “0x1234”,
“maxPriorityFeePerGas”: “0x1234”,
“gas”: “0x55555”,
“to”: “0x07a565b7ed7d7a678680a4c162885bedbb695fe0”,
“value”: “0x1234”,
“input”: “0xabcd”,
“v”: “0x26”,
Created by Nandakishore 72
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
“r”:
“0x223a7c9bcf5531c99be5ea7082183816eb20cfe0bbc322e97cc5c7f71ab8b20e”,
“s”:
“0x2aadee6b34b45bb15bc42d9c09de4a6754e7000908da72d48cc7704971491663”,
“hash”:
“0xeba2df809e7a612a0a0d444ccfa5c839624bdc00dd29e3340d46df3870f8a30e”
}
}
}
The raw is the signed transaction in Recursive Length Prefix (RLP) encoded form
The tx is the signed transaction in JSON form
With the signature hash, the transaction can be cryptographically proven that it came from
the sender and submitted to the network.
The first four bytes specify which function to call, using the hash of the function’s name
and arguments. You can sometimes identify the function from the selector using this
database(opens in a new tab).
The rest of the calldata is the arguments, encoded as specified in the ABI specs(opens in a
new tab).
For example, lets look at this transaction(opens in a new tab). Use Click to see More to see
the calldata.
The function selector is 0xa9059cbb. There are several known functions with this
signature(opens in a new tab). In this case the contract source code(opens in a new tab)
has been uploaded to Etherscan, so we know the function is transfer(address,uint256).
0000000000000000000000004f6742badb049791cd9a37ea913f2bac38d01279
000000000000000000000000000000000000000000000000000000003b0559f4
Created by Nandakishore 73
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
According to the ABI specifications, integer values (such as addresses, which are 20-byte
integers) appear in the ABI as 32-byte words, padded with zeros in the front. So we know
that the to address is 4f6742badb049791cd9a37ea913f2bac38d01279(opens in a new
tab). The value is 0x3b0559f4 = 990206452.
Types of transactions
• On Ethereum there are a few different types of transactions:
Created by Nandakishore 74
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Smart contracts can also contain functions known as view(opens in a new tab) or
pure(opens in a new tab) functions, which do not alter the state of the contract. As such,
calling these functions from an EOA will not require any gas. The underlying RPC call for
this scenario is eth_call
Unlike when accessed using eth_call, these view or pure functions are also commonly
called internally (i.e. from the contract itself or from another contract) which does cost gas.
Transaction lifecycle
Once the transaction has been submitted the following happens:
Ethereum has evolved to support multiple types of transactions to allow for new features
such as access lists and EIP-1559(opens in a new tab) to be implemented without affecting
legacy transaction formats.
Created by Nandakishore 75
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
EIP-2718(opens in a new tab) is what allows for this behavior. Transactions are
interpreted as:
TransactionType || TransactionPayload
TransactionType – a number between 0 and 0x7f, for a total of 128 possible transaction
types.
TransactionPayload – an arbitrary byte array defined by the transaction type.
Based on the TransactionType value, a transaction can be classified as
• Type 0 (Legacy) Transactions: The original transaction format used since Ethereum’s
launch. They do not include features from EIP-1559(opens in a new tab) such as
dynamic gas fee calculations or access lists for smart contracts. Legacy
transactions lack a specific prefix indicating their type in their serialized form,
starting with the byte 0xf8 when using Recursive Length Prefix (RLP) encoding. The
TransactionType value for these transactions is 0x0.
Created by Nandakishore 76
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
In blockchain storage, files are first broken apart in a process called sharding. Each shard is
copied to prevent loss of data should an error occur during transmission. The files are also
encrypted with a private key that makes it impossible for it to be viewed by other nodes in
the network.
The replicated shards are distributed among decentralized nodes all over the world. The
interactions are recorded in the blockchain ledger, allowing the system to confirm and
synchronize the transactions across the nodes in the blockchain. Blockchain storage is
designed to save these interactions forever and the data can never be changed.
Diagram showing how blockchain storage works.In blockchain storage, files are broken into
shards and encrypted.
Created by Nandakishore 77
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
• Providers of centralized cloud storage prevent data loss by making copies of the
data and storing it in different data centers. The large amount of data that is
duplicated in this process can create excessive amounts of surplus information.
Also, cloud storage requires enterprise-grade hardware for its data centers. These
factors can make centralized data storage significantly more expensive than
blockchain storage.
• By taking advantage of the empty space on users’ devices across the world,
blockchain storage can cut up to 90% of the cost of centralized cloud storage,
proponents claim. Individuals and businesses can profit by renting out the unused
space on their hard disks for others to use.
Blockchain storage could also allow faster and more customizable storage systems
because users are able to manipulate settings, such as the speed of retrieval and
redundancy.
BitTorrent’s decentralized storage network is based on its file-sharing protocol (BTFS) and
Tron’s decentralized blockchain platform. The network lets storage “renters” pay “hosts” for
their excess capacity.
Created by Nandakishore 78
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
The Filecoin distributed cloud storage network uses blockchain and the InterPlanetary File
System (IPFS) to let users purchase storage from providers on the network. IPFS is a peer-
to-peer (P2P) hypermedia distribution system designed to provide a decentralized method
for storing and sharing files. Nodes within the IPFS network form a distributed file system
that can be accessed in many ways, including the Linux-based FUSE interface and HTTP
(Hypertext Transfer Protocol). Local files can be added to the IPFS network and made
available to the world.
Sia is a decentralized storage marketplace built on open source software developed by the
SIA Foundation. The platform lets renters enter contracts with hosts that offer their excess
storage.
Storj, based on the Ethereum blockchain platform, aims to provide private, secure and
efficient P2P-based cloud storage. The Storj platform uses sharding and end-to-end
encryption (E2EE) to store and protect data.
BitTorrent, Filecoin, Sia and Storj provide their own cryptocurrencies (BTT, Siacoin, STORJ
token and FIL) in an attempt to create a market for buying and selling decentralized storage
and encouraging its use. The major obstacle that organizations launching blockchain
storage projects will face is scalability.
Decentralized Storage
Ethereum itself can be used as a decentralized storage system, and it is when it comes to
code storage in all the smart contracts. However, when it comes to large amounts of data,
that isn’t what Ethereum was designed for. The chain is steadily growing, but at the time of
writing, the Ethereum chain is around 500GB – 1TB (depending on the client(opens in a new
Created by Nandakishore 79
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
tab)), and every node on the network needs to be able to store all of the data. If the chain
were to expand to large amounts of data (say 5TBs) it wouldn’t be feasible for all nodes to
continue to run. Also, the cost of deploying this much data to Mainnet would be
prohibitively expensive due to gas fees.
Due to these constraints, we need a different chain or methodology to store large amounts
of data in a decentralized way.
When looking at decentralized storage (dStorage) options, there are a few things a user
must keep in mind.
For a piece of data to persist forever, we need to use a persistence mechanism. For
example, on Ethereum, the persistence mechanism is that the whole chain needs to be
accounted for when running a node. New pieces of data get tacked onto the end of the
chain, and it continues to grow – requiring every node to replicate all the embedded data.
The issue with blockchain-based persistence is that the chain could get far too big to
upkeep and store all the data feasibly (e.g. many sources(opens in a new tab) estimate the
Internet to require over 40 Zetabytes of storage capacity).
The blockchain must also have some type of incentive structure. For blockchain-based
persistence, there is a payment made to the validator. When the data is added to the chain,
the validators are paid to add the data on.
Created by Nandakishore 80
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Contract-based
Contract-based persistence has the intuition that data cannot be replicated by every node
and stored forever, and instead must be upkept with contract agreements. These are
agreements made with multiple nodes that have promised to hold a piece of data for a
period of time. They must be refunded or renewed whenever they run out to keep the data
persisted.
In most cases, instead of storing all data on-chain, the hash of where the data is located on
a chain gets stored. This way, the entire chain doesn’t need to scale to keep all of the data.
Created by Nandakishore 81
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Data retention
In order to retain data, systems must have some sort of mechanism to make sure data is
retained.
Challenge mechanism
One of the most popular ways to make sure data is retained, is to use some type of
cryptographic challenge that is issued to the nodes to make sure they still have the data. A
simple one is looking at Arweave’s proof-of-access. They issue a challenge to the nodes to
see if they have the data at both the most recent block and a random block in the past. If
the node can’t come up with the answer, they are penalized.
Created by Nandakishore 82
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Proof-of-stake based:
• Ethereum
• Filecoin
• Züs
• Crust Network
Related tools
IPFS – InterPlanetary File System is a decentralized storage and file referencing
system for Ethereum.
• Ipfs.io(opens in a new tab)
• Documentation(opens in a new tab)
• GitHub(opens in a new tab)
Storj DCS – Secure, private, and S3-compatible decentralized cloud object storage for
developers.
• Storj.io(opens in a new tab)
• Documentation(opens in a new tab)
• GitHub(opens in a new tab)
Skynet – Skynet is a decentralized PoW chain dedicated to a decentralized web.
• Skynet.net(opens in a new tab)
• Documentation(opens in a new tab)
• GitHub(opens in a new tab)
Filecoin – Filecoin was created from the same team behind IPFS. It is an incentive
layer on top of the IPFS ideals.
• Filecoin.io(opens in a new tab)
• Documentation(opens in a new tab)
• GitHub(opens in a new tab)
Arweave – Arweave is a dStorage platform for storing data.
• Arweave.org(opens in a new tab)
• Documentation(opens in a new tab)
• Arweave(opens in a new tab)
Züs – Züs is a proof-of-stake dStorage platform with sharding and blobbers.
• Zus.network(opens in a new tab)
• Documentation(opens in a new tab)
• GitHub(opens in a new tab)
Crust Network – Crust is a dStorage platform on top of the IPFS.
• Crust.network(opens in a new tab)
• Documentation(opens in a new tab)
• GitHub(opens in a new tab)
Created by Nandakishore 83
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Swarm – A distributed storage platform and content distribution service for the
Ethereum web3 stack.
• EthSwarm.org(opens in a new tab)
• Documentation(opens in a new tab)
• GitHub(opens in a new tab)
OrbitDB – A decentralized peer to peer database on top of IPFS.
• OrbitDB.org(opens in a new tab)
• Documentation(opens in a new tab)
• GitHub(opens in a new tab)
Aleph.im – Decentralized cloud project (database, file storage, computing and DID). A
unique blend of offchain and onchain peer-to-peer technology. IPFS and multi-chain
compatibility.
• Aleph.im(opens in a new tab)
• Documentation(opens in a new tab)
• GitHub(opens in a new tab)
Ceramic – User-controlled IPFS database storage for data-rich and engaging
applications.
• Ceramic.network(opens in a new tab)
• Documentation(opens in a new tab)
• GitHub(opens in a new tab)
Filebase – S3-compatible decentralized storage and geo-redundant IPFS pinning
service. All files uploaded to IPFS through Filebase are automatically pinned to the
Filebase infrastructure with 3x replication across the globe.
• Filebase.com(opens in a new tab)
• Documentation(opens in a new tab)
• GitHub(opens in a new tab)
4EVERLAND – A Web 3.0 cloud computing platform that integrates storage, compute
and networking core capabilities, is S3 compatible and provides synchronous data
storage on decentralized storage networks such as IPFS and Arweave.
• 4everland.org(opens in a new tab)
• Documentation(opens in a new tab)
• GitHub(opens in a new tab)
Kaleido – A blockchain-as-a-service platform with click-button IPFS Nodes
• Kaleido(opens in a new tab)
• Documentation(opens in a new tab)
• GitHub(opens in a new tab)
Created by Nandakishore 84
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Foundry – Foundry is a blazing fast, portable and modular toolkit for Ethereum
application development
Created by Nandakishore 85
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Created by Nandakishore 86
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Created by Nandakishore 87
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
• What is IPFS?
• IPFS and the problems it solves
• How IPFS works
• Subsystems overview
• How IPFS represents and addresses data
• How content routing works in IPFS
• How IPFS transfers data
• Further reading
What is IPFS
IPFS is a modular suite of protocols for organizing and transferring data, designed from the
ground up with the principles of content addressing and peer-to-peer networking. Because
IPFS is open-source, there are multiple implementations of IPFS. While IPFS has more than
one use case, its main use case is for publishing data (files, directories, websites, etc.) in a
decentralised fashion.
Created by Nandakishore 88
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
This guide is part 1 of a 3-part introduction to the basic concepts of IPFS. The second part,
IPFS and the problems it solves, covers the problems with the internet and current
protocols like HTTP that IPFS solves.
Defining IPFS
The term IPFS can refer to multiple concepts:
• An implementation of IPFS protocol specifications (opens new window), such as
Kubo. Learn more about the principles that define an IPFS implementation.
• A decentralized network composed of IPFS nodes that is open and participatory.
• A modular suite of protocols and standards for organizing and transferring content-
addressed data.
What IPFS isn’t
While IPFS shares similarities with, and is often used in architectures with the systems
described below, IPFS is not:
• A storage provider: While there are storage providers built with IPFS support
(typically known as pinning services), IPFS itself is a protocol, not a provider.
• A cloud service provider: IPFS can be deployed on and complement cloud
infrastructure, but it in of itself is not a cloud service provider.
Further reading
• For an overview of the problems that IPFS solves, see part 2 of a 3-part introduction
to the basic concepts of IPFS, IPFS and the problems it solves.
• Looking for a deeper dive on IPFS compared to other similar technologies? See the
IPFS Comparisons page.
Created by Nandakishore 89
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
In this guide, you’ll learn about each of the problems that IPFS solves.
This guide is part 2 of a 3-part introduction to the basic concepts of IPFS. The third part,
How IPFS Works, covers the different subsystems that IPFS is composed of and how each
one functions.
Verifiability
IPFS uses cryptographic hashes to verify the authenticity and integrity of files, making it
difficult for malicious actors to tamper with or delete files.
Resilience
IPFS has no single point of failure, and users do not need to trust each other. In other
words, the failure of a single or even multiple nodes in the network does not affect the
functioning of the entire network, and an IPFS node can fetch data from the network as
long as at least one other node in the network has that data, regardless of its location.
Centralization
IPFS is an open, distributed and participatory network that reduces data silos from
centralized servers, making IPFS more resilient than traditional systems. No single entity or
person controls, manages or owns IPFS; rather, it is a community-maintained project with
multiple implementations of the protocol, multiple tools and apps leveraging that protocol,
and multiple users and organizations contributing to its design and development.
Performance
IPFS provides faster access to data by enabling it to be replicated to and retrieved from
multiple locations, and allowing users to access data from the nearest location using
content addressing instead of location-based addressing. In other words, because data
can be addressed based on its contents, a node on the network can fetch that data from
any other node in the network that has the data; thus, performance issues like latency are
reduced.
Link rot
IPFS eliminates the problem of link rot by allowing data to be addressed by its content,
rather than by its location. So, in other words, content in IPFS is still reachable regardless of
its location, and does not depend on specific servers being available.
Data sovereignty
Created by Nandakishore 90
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
IPFS protects data sovereignty by enabling users to store and access data directly on a
decentralized network of nodes, rather than centralized, third-party servers. This eliminates
the need for intermediaries to control and manage data, giving users full control and
ownership over their data.
Off-chain storage
IPFS enables verifiable off-chain storage by creating a link between blockchain state and
content-addressed published to IPFS. This works by storing a Content Identifier (CID)
(explained in How IPFS works) in a smart contract.
Local-first software
IPFS benefits local-first software by providing a performant, decentralized, peer-to-peer
data addressing, routing, and transfer protocol that prioritizes data storage and processing
on individual devices. With IPFS, data can be stored, verified and processed locally, and
then synchronized and shared with other IPFS nodes when a network connection is
available.
Vendor lock-in
IPFS prevents vendor lock-in , as users have sovereignty over their data and infrastructure.
This is enabled by content-addressing, which decouples the data from a single location or
infrastructure provider. Unlike traditional cloud vendors, IPFS enables you to change data
storage locations without changing things like APIs and data management. In addition,
because IPFS is open-source, community-maintained and modular, users are not obligated
to use a particular subsystem (described in How IPFS works). Instead, users can customize
IPFS for their preferred technologies, needs and values.
Created by Nandakishore 91
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
This guide is part 3 of a 3-part introduction to the basic concepts of IPFS. The first part,
What IPFS is and isn’t, defines IPFS, while the second part, IPFS and the problems it solves,
covers the problems with the internet and current protocols like HTTP that IPFS solves.
4. Subsystems overview
All IPFS subsystems, ordered by purpose, are listed below, with links to the major
subsystems discussed in this guide.
Purpose Subsystem
Representing and organizing the data CIDs, IPLD, UnixFS, MFS, DAG-CBOR,
DAG-JSON, CAR files
Content routing, linking between CID and Kademlia DHT, Delegated routing over
IP addresses HTTP, Bitswap, mDNS
Transferring data Bitswap, HTTP Gateways, Sneakernet,
Graphsync, more in development
Addressing for data and peers Multiformats
Bridging between IPFS and HTTP IPFS Gateways, Pinning API Spec
Peer-to-peer connectivity libp2p (TCP, QUIC, WebRTC, WebTransport)
Mutability and dynamic naming IPNS (Interplanetary Naming System),
DNSLink
5. How IPFS represents and addresses data
IPFS represents data as content-addressed blocks, and operates on those data blocks
using the following subsystems:
• Content Identifier (CID)
• InterPlanetary Linked Data (IPLD)
• Content Addressable aRchive (CAR) files
Content Identifier (CID)
In IPFS, data is chunked into blocks, which are assigned a unique identifier called a
Content Identifier (CID). In general, the CID is computed by combining the hash of the data
with its codec. The codec is generated using Multiformats.
CIDs are unique to the data from which they were computed, which provides IPFS with the
following benefits:
• Data can be fetched based on its content, rather than its location.
• The CID of the data received can be computed and compared to the CID requested,
to verify that the data is what was requested.
Learn more Learn more about the concepts behind CIDs described here with the the CID
deep dive.
Created by Nandakishore 92
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
directories and other hierarchical structures, using a Directed Acyclic Graph (DAG) called a
Merkle DAG. Using IPLD for the general functionality, IPFS is able provide a more tailored,
specific mechanism for representing and addressing files, directories, and their symlinks,
called UnixFS. With UnixFS, IPFS can chunk and link data too big to fit in a single block, and
use the chunked representation to store and manage the data.
• The ability to represent and work with arbitrary data, whether that data is standard
files and directories, linked data, a Merkle DAG, or another data type.
• Base functionality to structure, serialize, traverse and link content-addressed data,
which can be leveraged by abstractions like UnixFS for more specific use cases.
• Interoperable protocols.
• Easy upgradeability.
• Backwards compatibility.
Created by Nandakishore 93
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
provides a highly efficient, self-organizing system that withstands node churn. Kademlia
uses libp2p to establish connectivity.
mDNS
To quickly and efficiently discover peers in local networks, IPFS uses Multicast Domain
Name System (mDNS), a type of DNS protocol that resolves human-readable internet
domain names to IP names without the use of a name server.
The use of mDNS enables quick and efficient discovery of IPFS nodes in local networks
without any coordination, e.g., without internet connectivity or access to bootstrap nodes.
Created by Nandakishore 94
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Sneakernet
For use cases where transfer of data over a network connection is not an option, IPFS
supports the use of sneakernet to transfer content-addressed data between IPFS nodes.
Using IPFS, CAR files (discussed in How IPFS represents and addresses data) can be
transferred between two network drives without any network connectivity. Because of IPFS,
the data is verifiable and will have the same CID on both sides of the air gap.
Further reading
• Are you looking for a deep dive into the design, architecture and theory of IPFS? See
the original IPFS whitepaper.
• Dive deeper into the related concepts of immutability, hashing, content-addressing
and CIDs.
• Learn about IPFS pinning, along with the differences between persistence,
permanence, and pinning.
• Understand privacy and encryption in IPFS.
• Learn more about IPFS nodes, including the different types.
Created by Nandakishore 95
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
1. Content-addressable representation
The file is transformed into a content-addressable representation using a CID. The basic
idea is that this representation makes files and directories content-addressable via CIDs by
chunking files into smaller blocks, calculating their hashes, and constructing a Merkle
DAG.
2. Pinning
In this stage, the blocks of the CID are saved on an IPFS node (or pinning service) and made
retrievable to the network. Simply saving the CID on the node does not mean the CID is
retrievable, so pinning must be used. Pinning allows the node to advertise that it has the
CID, and provide it to the network.
Advertising: In this step, a CID is made discoverable to the IPFS network by advertising a
record linking the CID and the server’s IP address to the DHT. Advertising is a continuous
process that repeats typically every 12 hours. The term publishing is also commonly used
to refer to this step.
3. Retrieval
In this stage, an IPFS node fetches the blocks of the CID and constructs the Merkle DAG.
This usually involves several steps:
Content routing: The IPFS node finds other IPFS nodes providing the CIDs you are
requesting. Content routing is facilitated by either the DHT, asking already connected peers
over Bitswap, or making an HTTP call to a delegated routing (opens new window)server like
the network indexer (opens new window). The term content discovery is also commonly
used to refer to this step.
Created by Nandakishore 96
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Block fetching: An IPFS node fetches the blocks of the Merkle DAG (of the file or folder)
from providers.
Verification: The IPFS node verifies the blocks fetched by hashing them and ensuring that
the resulting hash is correct. Note that this type of retrieval is trustless; that is, blocks can
come from any node in the network.
Local access: Once all blocks are present, the Merkle DAG can be constructed, making
the file or directory underlying the CID successfully replicated and accessible.
4. Deleting
At this point, the blocks associated with a CID are deleted from a node. Deletion is always
a local operation. If a CID has been replicated to other nodes, it will continue to be
available on the IPFS network.
Hashing
Cryptographic hashes are functions that take some arbitrary input and return a fixed-length
value. The particular value depends on the given hash algorithm in use, such as SHA-1
(opens new window)(used by git), SHA-256 (opens new window), or BLAKE2 (opens new
window), but a given hash algorithm always returns the same value for a given input. Have
a look at Wikipedia’s full list of hash functions (opens new window)for more.
Hashes can be represented in different bases (base2, base16, base32, etc.). In fact, IPFS
uses that as part of its content identifiers and supports multiple base representations at
the same time, using the Multibase (opens new window)protocol.
For example, the SHA-256 hash of “Hello world” from above can be represented as base 32
as:
Created by Nandakishore 97
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
Mtwirsqawjuoloq2gvtyug2tc3jbf5htm2zeo4rsknfiv3fdp46a
TIP
If you’re interested in how cryptographic hashes fit into how IPFS works with files in
general, check out this video from IPFS Camp 2019! Core Course: How IPFS Deals With
Files(opens new window)
• Deterministic – the same input message always returns exactly the same output
hash
• Uncorrelated – a small change in the message should generate a completely
different hash
• Unique – it’s infeasible to generate the same hash from two different messages
• One-way – it’s infeasible to guess or calculate the input message from its hash
These features also mean we can use a cryptographic hash to identify any piece of data:
the hash is unique to the data we calculated it from and it’s not too long so sending it
around the network doesn’t take up a lot of resource. A hash is a fixed length, so the SHA-
256 hash of a one-gigabyte video file is still only 32 bytes.
That’s critical for a distributed system like IPFS, where we want to be able to store and
retrieve data from many places. A computer running IPFS can ask all the peers it’s
connected to whether they have a file with a particular hash and, if one of them does, they
send back the whole file. Without a short, unique identifier like a cryptographic hash,
content addressing wouldn’t be possible.
Immutability
An immutable object is an object whose state cannot be altered or modified once created.
Once a file is added to the IPFS network, the content of that file cannot be changed without
altering the content identifier (CID) of the file. This feature is excellent for storing data that
does not need to change. However, when it comes to content that needs to be altered or
updated, immutability becomes a problem. This page discusses how to keep a mutable
state built from immutable building blocks.
A CID is an absolute pointer to content. No matter when we request a CID, the CID value
will always be the same. This is part of the content’s architecture and cannot be changed.
Created by Nandakishore 98
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
To manage immutable files in a mutable system, we need to add another layer that sits on
top of CIDs.
As a basic example, let’s have two blocks of content with the strings hello and world
hashed into two leaf nodes with the CIDs A and B. If we concatenate these two nodes, then
we are given CID C. On top of this root CID, we assign a pointer Pointer.
| Pointer |
+--| C |-+
| A | | B|
“hello” “world”
If we change the content of B to IPFS!, all the upstream paths will change as well. In this
simple example, the only upstream path is C. If we request content from the pointer we get
back new content since the pointer is now pointing at a completely different node. Node B
is not being edited, updated, or otherwise changed. Instead, we are creating a new DAG
where the pointer points to CID E that joins node A and a new node, node D.
| Pointer | --------------+
| A | | B| |A | |D |
Created by Nandakishore 99
BLOCKCHAIN DEVELOPER FULL ROADMAP(theory)
that contained the hello string into our new message; that would imply the location-
addressed paradigm that focuses on the where and not the what. In a content-addressed
system, any time someone writes the string hello it will always have CID A, regardless of
whether we copied the string from a previous location or we wrote it from scratch.
Example
In this example, we have a website that displays two headers called header_1 and
header_2. The content of the headers is supplied from the variables string_1 and string_2.
• #html
<body>
<h1 id=”header_1”></h1>
<h1 id=”header_2”></h1>
</body>
<script>
Let string_1 = ‘hello’
Let string_2 = ‘world’
Document.getElementById(‘header_1’).textContent = string_1
Document.getElementById(‘header_2’).textContent = string_2
</script>
The CID of this website is QmWLdyFMUugMtKZs1xeJCSUKerWd9M627gxjAtp6TLrAgP.
Users can go to example.com/QmWLdyFMUugMtKZs1xeJCSUKerWd9M627gxjAtp6TLrAgP
(opens new window)to view the site. If we change string_2 to IPFS then the CID of the
website changes to Qme1A6ofTweQ1JSfLLdkoehHhpbAAk4Z2hWjyNC7YJF9m5. Now users
can go to example.com/Qme1A6ofTweQ1JSfLLdkoehHhpbAAk4Z2hWjyNC7YJF9m5 (opens
new window).
Having a user visit the site using the CID is cumbersome since the CID will change every
time a variable is updated. So instead, we can use a pointer that maintains the CID of the
page with the latest update. This way, users can go to example.com, and always be
directed to the latest content. This pointer is mutable; it can be updated to reflect the
changes downstream.
In the website example, when we change a variable, the CID of the webpage is different.
The pointer must be updated to redirect users to the latest webpage. What’s important is
that the old CID still exists. Nothing is overwritten. The original CID
+ ------→ | Qme1A… |
This process is essentially what the InterPlantery Naming Service (IPNS) does! CIDs can be
difficult to deal with and hard to remember, so IPNS saves users from the cumbersome
task of dealing with CIDs directly. More importantly, CIDs change with the content because
they are the content. Whereas the inbound reference of URLs/pointers stay the same, and
the outbound referral changes:
| User | -→ | docs.ipfs.tech | -→ |
bafybeigsddxhokzs3swgx6mss5i3gm6jqzv5b45e2xybqg7dr3jmsykrku |
A 2011 study found that the average lifespan of a web page is 100 days (opens new
window)before it’s gone forever. It’s not good enough for the primary medium of our era to
be this fragile. IPFS can keep every version of your file you wish to store, and make it simple
to set up resilient networks for mirroring data.
Nodes on the IPFS network can automatically cache resources they download, and keep
those resources available for other nodes. This system depends on nodes being willing and
able to cache and share resources with the network. Storage is finite, so nodes need to
clear out some of their previously cached resources to make room for new resources. This
process is called garbage collection.
To ensure that data persists on IPFS, and is not deleted during garbage collection, data can
be pinned to one or more IPFS nodes. Pinning gives you control over disk space and data
retention. As such, you should use that control to pin any content you wish to keep on IPFS
indefinitely.
Garbage collection
Garbage collection (opens new window)is a form of automatic resource management
widely used in software development. The garbage collector attempts to reclaim memory
occupied by objects that are no longer in use. IPFS uses garbage collection to free disk
space on your IPFS node by deleting data that it thinks is no longer needed.
Pinning in context
An IPFS node can protect data from garbage collection based on different kinds of user
event
• The universal way is by adding a low-level local pin. This works for all data types and
can be done manually, but if you add a file using the CLI command ipfs add, your
IPFS node will automatically pin that file for you.
• When working with files and directories, a better way may be to add them to the
local Mutable File System (MFS). This protects the data from garbage collection in
the same way as local pinning but is somewhat easier to manage.
TIP
If you want to learn more about how pinning fits into the overall lifecycle of data in IPFS,
check out the course from IPFS Camp The Lifecycle of Data in DWeb (opens new window).
Pinning services
To ensure that your important data is retained, you may want to use a pinning service.
These services run lots of IPFS nodes and allow users to pin data on those nodes for a fee.
Some services offer a free storage allowance for new users. Pinning services are handy
when:
You don’t have a lot of disk space, but you want to ensure your data sticks around.
Your computer is a laptop, phone, or tablet that will have intermittent connectivity to the
network. Still, you want to be able to access your data on IPFS from anywhere at any time,
even when the device you added it from is offline.
You want a backup that ensures your data is always available from another computer on
the network if you accidentally delete or garbage-collect your data on your own computer.
Some available pinning service providers are:
WARNING
Some of the pinning services listed below are operated by third party companies. There is
no guarantee that these third party companies will continue to maintain their pinning
service. It is strongly recommended that you thoroughly research a pinning service before
using it to host your data.
• 4EVERLAND Bucket(opens new window)
• Filebase(opens new window)
• NFT.Storage(opens new window)
• Pinata(opens new window)
• Scaleway(opens new window)
• Web3.Storage(opens new window)
• See how to work with remote pinning services.
Long-term storage
Storing data using a personal IPFS node is easy, but it can be inconvenient since you have
to manage your own hardware. This problem gave rise to pinning services, paid services
that allow you to upload your data to a remotely hosted IPFS node and retrieve it whenever
you want. However, while paying a pinning service to store data is a convenient
workaround, it still requires someone to bear the cost of storing that data. If that one
sponsor stops paying for that pinning, the content may be lost entirely. While IPFS
guarantees that any content on the network is discoverable, it doesn’t guarantee that any
content is persistently available. This is where Filecoin (opens new window)comes in.
Filecoin provides users with a dependable, long-term storage solution. However, there are
some limitations to consider. The retrieval process is not always as fast as an IPFS pinning
service, and the minimum file size accepted by a Filecoin storage provider can be several
GiB. Also, the process for creating a storage deal may seem complicated to new users who
aren’t familiar with blockchain transactions or simply aren’t comfortable working within a
command line.
What this does mean, however, is that IPFS itself isn’t explicitly protecting knowledge about
CIDs and the nodes that provide or retrieve them. This isn’t something unique to the
distributed web; on both the d-web and the legacy web, traffic and other metadata can be
monitored in ways that can infer a lot about a network and its users. Some key details on
this are outlined below, but in short: While IPFS traffic between nodes is encrypted, the
metadata those nodes publish to the DHT is public. Nodes announce a variety of
information essential to the DHT’s function — including their unique node identifiers
(PeerIDs) and the CIDs of data that they’re providing — and because of this, information
about which nodes are retrieving and/or reproviding which CIDs is publicly available.
So, why doesn’t the IPFS protocol itself explicitly have a privacy layer built-in? This is in line
with key principles of the protocol’s highly modular design — after all, different uses of IPFS
over its lifetime may call for different approaches to privacy. Explicitly implementing an
approach to privacy within the IPFS core could “box in” future builders due to a lack of
modularity, flexibility, and future-proofing. On the other hand, freeing those building on
IPFS to use the best privacy approach for the situation at hand ensures IPFS is useful to as
many as possible.
If you’re worried about the implications of this, it might be worth taking additional
measures such as disabling reproviding, encrypting sensitive content, or even running a
private IPFS network if that’s appropriate for you.
TIP
While IPFS traffic between nodes is encrypted, the essential metadata that nodes publish
to the DHT — including their unique node identifiers (PeerIDs) and the CIDs of data that
they’re providing — is public. If you’re worried about the implications of this for your
personal use case, it’s worth taking additional measures.
Content identifiers
Because IPFS uses content addressing rather than the legacy web’s method of location
addressing, each piece of data stored in the IPFS network gets its own unique content
identifier (CID). Copies of the data associated with that CID can be stored in any number of
locations worldwide on any number of participating IPFS nodes. To make retrieving the data
associated with a particular CID efficient and robust, IPFS uses a distributed hash table
(DHT) to keep track of what’s stored where. When you use IPFS to retrieve a particular CID,
your node queries the DHT to find the closest nodes to you with that item — and by default
also agrees to re-provide that CID to other nodes for a limited time until periodic “garbage
collection” clears your cache of content you haven’t used in a while. You can also “pin”
CIDs that you want to make sure are never garbage-collected — either explicitly using
IPFS’s low-level pin API or implicitly using the Mutable File System (MFS) — which also
means you’re acting as a permanent reprovider of that data.
This is one of the advantages of IPFS over traditional legacy web hosting. It means retrieving
files — especially popular ones that exist on lots of nodes in the network — can be faster
and more bandwidth-efficient. However, it’s important to note that those DHT queries
happen in public. Because of this, it’s possible that third parties could be monitoring this
traffic to determine what CIDs are being requested, when, and by whom. As IPFS continues
to grow in popularity, it’s more likely that such monitoring will exist.
Node identifiability
The other half of the equation when considering the prospect of IPFS traffic monitoring is
that nodes’ unique identifiers are themselves public. Just like with CIDs, every individual
IPFS node has its own public identifier (known as a PeerID), such as
QmRGgYP1P5bjgapLaShMVhGMSwGN9SfYG3CM2TfhpJ3igE.
While a long string of letters and numbers may not be a “Johnny Appleseed” level of
human-readable specificity, your PeerID is still a long-lived, unique identifier for your node.
Keep in mind that it’s possible to do a DHT lookup on your PeerID and, particularly if your
node is regularly running from the same location (like your home), find your IP address. (It’s
possible to reset your PeerID if necessary, but similarly to changing your user ID on legacy
web apps and services, is likely to involve extra effort.) Additionally, longer-term monitoring
of the public IPFS network could yield information about what CIDs your node is requesting
and/or reproviding and when.
Encryption
There are two types of encryption in a network: transport-encryption and content-
encryption.
• Transport-encryption is used when sending data between two parties. Albert
encrypts a file and sends it to Laika, who then decrypts it once it has been received.
This stops a third party from viewing the data while it is moving from one place to
another.
Content encryption is used to secure data until someone needs to access it. Albert creates
a spreadsheet for his monthly budget and saves it with a password. When Albert needs to
access it again, he must enter his password to decrypt the file. Without the password,
Laika cannot view the file.
IPFS uses transport-encryption but not content encryption. This means that your data is
secure when being sent from one IPFS node to another. However, anyone can download
and view that data if they have the CID. The lack of content encryption is an intentional
decision. Instead of forcing you to use a particular encryption protocol, you are free to
choose whichever method is best for your project. This modular design keeps IPFS
lightweight and free of vendor lock-in.
Nodes
Participants in the IPFS network are called nodes. A node is an instance of an
implementation IPFS that you run on your local computer (directly or via a browser) to store
files and connect to the IPFS network. They’re the most crucial aspect of IPFS. Without
IPFS nodes, there would be no IPFS Network.
You’re likely to see the term node throughout the IPFS docs, issues, and related code. It’s a
very general term, so its meaning depends on the context. There are three main categories
of nodes: IPFS nodes, data nodes, and libp2p nodes for applications.
• IPFS Nodes are programs that run on a computer that can exchange data with other
IPFS nodes. They go by several different names, but we refer to them by a different
term, depending on the context:
Node: Use node when you’re referring to an individual point on the network. It’s a very
general term. For example, when you open IPFS Desktop, you establish yourself as a node
with the potential to interact with other nodes. See Configure a node.
Peer: Use peer when you’re talking about the relationship of one node (even your own) to
other nodes. It refers to their relationship as equals, with no central authority, so your node
is a peer to other peers. See Observe peers and Peering with content providers.
Daemon: Use daemon when talking about a node’s activity status. When a node is online
and running in the background, listening for requests for its data, it’s called a daemon. See
Take your node online. Note that an IPFS Helia node in the browser is not generally referred
to as a daemon. However, in the context of this document, we will refer to a Helia instance
acting as a node in the browser as a daemon . For more information, see the Helia
documentation (opens new window).
Instance: Use instance when talking about a library or program, such as a Go or JS version,
running on as an IPFS node at a particular point in time. The peer ID is the same, so it’s still
the same node as far as the IPFS network is concerned. See Kubo and Helia.
• Data nodes, Use data nodes when talking about actual pieces of data on IPFS, such
as DAG nodes, UnixFS nodes, and IPLD nodes. When you add a file with the ipfs add
myfile.txt command, IPFS breaks them up into several nodes that each contain a
chunk of the file and are linked to each other. See Merkle Directed Acyclic Graphs
(DAGs), Unix File System (UnixFS), and stay tuned for InterPlanetary Linked Data
(IPLD) model docs, which is in progress.
Libp2p peer Use libp2p peer when talking about libp2p nodes on which you can build
applications. They’re usually referred to as peers in libp2p, because it provides solutions
for essential peer-to-peer elements like transport, security, peer routing, and content
discovery. See concepts
Types
There are different types of IPFS nodes. And depending on the use-case, a single IPFS node
can serve one of many functions:
• Relay
• Bootstrap
• Delegated Routing
Relay
If an IPFS node deems itself unreachable by the public internet, IPFS nodes may choose to
use a relay node as a kind of VPN in an attempt to reach the unreachable node.
Bootstrap
Both Kubo and Helia nodes use bootstrap nodes to find peers on the DHT.
Features of a bootstrap node:
All default bootstrap nodes are part of the Amino DHT.
The list of bootstrap nodes a Helia node connects to is controlled by configuring libp2p’s
peerDiscovery option (opens new window).
Limitations of a bootstrap node:
If an IPFS node only has one bootstrap node listed in that configuration and that bootstrap
node goes offline, the IPFS node will lose access to the Amino DHT if it were to restart.
You can configure your peer store in your implementation to cache healthy connectable
peers so that you can connect to them again after a restart, instead of bootstrap nodes.
Issue 8856 in the Kubo repository (opens new window), which addressed this, provides
further information and context
Delegated Routing
IPFS nodes delegate the content and peer routing tasks to a Delegated Routing V1 HTTP API
(spec (opens new window)).
Delegated routing over HTTP is not a routing system but a general API to offload routing
work. This is useful in browsers and other constrained environments where it’s infeasible to
be a DHT server/client contacting many other peers. More broadly, it enables
experimentation and innovation in content routing while maintaining interoperability.
The HTTP API (opens new window)can used to resolve content, peer, and IPNS name
routing requests.
Core principles
IPFS implementations must:
• Name all the important resources exposed using CIDs. Consider anything that
another agent might legitimately wish to access as being in scope, and err on the
side of inclusion.
• Expose the logical units of data that structure a resource (e.g. a CBOR document, a
file or directory, a branch of a B-tree search index) using CIDs.
• Support incremental verifiability, notably so that it may process content of arbitrary
sizes.
• Should not rely on any one transport layer. The transport layer cannot dictate or
constrain the way in which CIDs map to
Subsystems and components
• Content Identifiers (CIDs)
• Bitswap
• Distributed Hash Tables (DHT)
• DNSLink
• File systems
• IPFS Gateway
• IPLD (InterPlanetaryLinkedData)(opens new window)
• IPNI (InterPlanetary Network Indexer)
• IPNS (InterPlanetary Name System)
• Libp2p
• Merkle Directed Acyclic Graphs (DAG)
Consensus mechanisms
The term ‘consensus mechanism’ is often used colloquially to refer to ‘proof-of-stake’,
‘proof-of-work’ or ‘proof-of-authority’ protocols. However, these are just components in
consensus mechanisms that protect against Sybil attacks. Consensus mechanisms are
the complete stack of ideas, protocols and incentives that enable a distributed set of
nodes to agree on the state of a blockchain.
Prerequisites
To better understand this page, we recommend you first read our introduction to Ethereum.
What is consensus?
By consensus, we mean that a general agreement has been reached. Consider a group of
people going to the cinema. If there is no disagreement on a proposed choice of film, then
a consensus is achieved. If there is disagreement, the group must have the means to
decide which film to see. In extreme cases, the group will eventually split.
In regard to the Ethereum blockchain, the process is formalized, and reaching consensus
means that at least 66% of the nodes on the network agree on the global state of the
network.
What is a consensus mechanism?
The term consensus mechanism refers to the entire stack of protocols, incentives and
ideas that allow a network of nodes to agree on the state of a blockchain.
Then, there is a protocol that governs how honest validators are selected to propose or
validate blocks, process transactions and vote for their view of the head of the chain. In the
rare situations where multiple blocks are in the same position near the head of the chain,
there is a fork-choice mechanism that selects blocks that make up the ‘heaviest’ chain,
measured by the number of validators that voted for the blocks weighted by their staked
ether balance.
Some concepts are important to consensus that are not explicitly defined in code, such as
the additional security offered by potential out-of-band social coordination as a last line of
defense against attacks on the network.
These components together form the consensus mechanism.
Block creation
Miners compete to create new blocks filled with processed transactions. The winner
shares the new block with the rest of the network and earns some freshly minted ETH. The
race is won by the computer which is able to solve a math puzzle fastest. This produces the
cryptographic link between the current block and the block that went before. Solving this
puzzle is the work in “proof-of-work”. The canonical chain is then determined by a fork-
choice rule that selects the set of blocks that have had the most work done to mine them.
Security
The network is kept secure by the fact that you’d need 51% of the network’s computing
power to defraud the chain. This would require such huge investments in equipment and
energy; you’re likely to spend more than you’d gain.
Proof-of-stake based
Ethereum now uses a proof-of-stake (PoS) based consensus protocol.
Block creation
Validators create blocks. One validator is randomly selected in each slot to be the block
proposer. Their consensus client requests a bundle of transactions as an ‘execution
payload’ from their paired execution client. They wrap this in consensus data to form a
block, which they send to other nodes on the Ethereum network. This block production is
rewarded in ETH. In rare cases when multiple possible blocks exist for a single slot, or
nodes hear about blocks at different times, the fork choice algorithm picks the block that
forms the chain with the greatest weight of attestations (where weight is the number of
validators attesting scaled by their ETH balance).
Security
A proof-of-stake system is secure crypto-economically because an attacker attempting to
take control of the chain must destroy a massive amount of ETH. A system of rewards
incentivizes individual stakers to behave honestly, and penalties disincentivize stakers
from acting maliciously.
Sybil resistance measures how a protocol fares against a Sybil attack. Resistance to this
type of attack is essential for a decentralized blockchain and enables miners and validators
to be rewarded equally based on resources put in. Proof-of-work and proof-of-stake protect
against this by making users expend a lot of energy or put up a lot of collateral. These
protections are an economic deterrent to Sybil attacks.
A chain selection rule Is used to decide which chain is the “correct” chain. Bitcoin uses the
“longest chain” rule, which means that whichever blockchain is the longest will be the one
the rest of the nodes accept as valid and work with. For proof-of-work chains, the longest
chain is determined by the chain’s total cumulative proof-of-work difficulty. Ethereum used
to use the longest chain rule too; however, now that Ethereum runs on proof-of-stake it
adopted an updated fork-choice algorithm that measures the ‘weight’ of the chain. The
weight is the accumulated sum of validator votes, weighted by validator staked-ether
balances.
Ethereum uses a consensus mechanism known as Gasper that combines Casper FFG
proof-of-stake(opens in a new tab) with the GHOST fork-choice rule(opens in a new tab).
Further reading
Staking Rewards
A Proof of Stake (PoS), (i.e. using in-protocol asset, SOL, to provide secure consensus)
design is outlined here. Solana implements a proof of stake reward/security scheme for
validator nodes in the cluster. The purpose is threefold:
• Align validator incentives with that of the greater cluster through skin-in-the-game
deposits at risk
• Avoid ‘nothing at stake’ fork voting issues by implementing slashing rules aimed at
promoting fork convergence
• Provide an avenue for validator rewards provided as a function of validator
participation in the cluster.
While many of the details of the specific implementation are currently under consideration
and are expected to come into focus through specific modeling studies and parameter
exploration on the Solana testnet, we outline here our current thinking on the main
components of the PoS system. Much of this thinking is based on the current status of
Casper FFG, with optimizations and specific attributes to be modified as is allowed by
Solana’s Proof of History (PoH) blockchain data structure.
General Overview
Solana’s ledger validation design is based on a rotating, stake-weighted selected leader
broadcasting transactions in a PoH data structure to validating nodes. These nodes, upon
receiving the leader’s broadcast, have the opportunity to vote on the current state and PoH
height by signing a transaction into the PoH stream.
• Warm-up period: which SOL is deposited and inaccessible to the node, however
PoH transaction validation has not begun. Most likely on the order of days to weeks
• Validation period: a minimum duration for which the deposited SOL will be
inaccessible, at risk of slashing (see slashing rules below) and earning rewards for
the validator participation. Likely duration of months to a year.
Penalties
As discussed in the Economic Design section, annual validator interest rates are to be
specified as a function of total percentage of circulating supply that has been staked. The
cluster rewards validators who are online and actively participating in the validation
process throughout the entirety of their validation period. For validators that go offline/fail
to validate transactions during this period, their annual reward is effectively reduced.
Decentralization vs trust
Blockchains, cryptocurrency, smart contracts, and oracles have emerged as new
technologies for coordinating social and economic activities in a more secure, transparent,
and accessible manner. Most importantly, these technologies are revealing the power of
cryptographic guarantees—what we often call cryptographic truth—in restoring users’ trust
in everyday interactions.
This is Part 1 of a two-part series on the future of trust. Read Part 2, Cryptographic Truth:
The Future of Trust-Minimized Computing and Record-Keeping, for a walkthrough of the
cryptographic fundamentals that underpin blockchain technology and how Chainlink
oracles extend the reach of cryptographic guarantees to the off-chain world.
The word “trust” is a heavily debated term in the blockchain industry, where engineers
often refer to zero-trust interaction systems, trustless transactions, and other trust-
minimized technologies. Though personal interpretations of its meaning in blockchain both
vary and overlap, trust will always be at the center of understanding what crypto is really
about.
Deriving from the Old Norse word traust, meaning “confidence” and also “shelter,” trust
has historically referred to the amount of belief one has that people and processes will stay
true to their commitments. Trust is foundational to well-functioning societies: high-trust
societies generally have increased economic activity and greater social harmony thanks to
reduced counterparty risk and fairer dispute resolution.
Unfortunately, trust in the institutions responsible for facilitating core social and economic
activities is beginning to break down. For instance, Gallup polls indicate that the U.S.
population’s confidence in many of the country’s major institutions has been declining over
the past 45 years. While the scope of distrust varies across industries and nations, it’s clear
from the current negative sentiment toward established systems that people are searching
for more equitable solutions.
Note: We use the word “app” in a broad sense to refer to any interface for interacting with a
company, government, or other users on the same platform, whether it be an application
you download on your phone or a website. Additionally, when explaining blockchains, we
focus on permissionless blockchains (e.g. Ethereum, Bitcoin) given their widespread
adoption as opposed to permissioned blockchains.
For example, apps can often unilaterally censor the actions of users. Though such actions
may be justified as clear violations of terms of service agreements such as the removal of
illicit activities, there are many instances where censorship is based on subjective
interpretations of vague policies. This puts into question the platform’s credible
neutrality—no discrimination for or against any specific people—particularly in situations
when the platform’s own financial interests are at stake, external political or social
pressure is applied, or users’ personal opinions don’t directly align with the platform’s own.
Such forces have resulted in polarizing debates as to whether social media, financial
services, content streaming, and various other platforms are justified in censoring or not
censoring certain content.
Users are also becoming more concerned about having to trust apps with their sensitive
data. Since users often have to create accounts to interact with apps, the apps are
responsible for storing users’ personal information. This centralized storage model opens
up a single point of attack for hackers that has resulted in numerous data breaches, as was
the case with Equifax, for example. It’s also why apps are able to monetize users’ data
without sharing revenue with users. As many have suggested, “if it’s free, then you’re the
product” is the basis for most Web2 economic models.
Look no further than the Wirecard scandal, which saw many financial services companies
take losses when the German company Wirecard was found to be engaging in fraudulent
accounting practices to cover up €1.9 billion in missing funds from its balance sheet.
Similarly, the 2007-2008 financial crisis severely impacted the global financial industry,
largely because of a poor shared understanding regarding its systemic overexposure to
toxic mortgage-backed securities (MBS) and MBS-linked derivatives.
Underpinning this dynamic is the fact that users don’t always understand the legal
relationship they have with an institution. Though the misunderstanding could be
interpreted as the fault of users for not reading terms of service agreements, it’s fair to ask
whether users should be expected to take time to read and understand long contracts with
dense legal jargon that’s purposely vague in order to enable a range of interpretations.
When things are going well, misunderstandings may never manifest. However, when
unexpected events occur, users often learn that their relationship with an institution is not
quite what they thought. Unclear legal relationships are why many traders were blindsided
when they learned Robinhood could halt purchases of the GME stock during a period of
high trade volume, or why Greek citizens were shocked in 2015 when their banks informed
them that they were only allowed to withdraw €60 a day from ATMs.
The same misunderstanding is often true regarding the relationship users think they have
with social media apps, particularly with regard to how their data is collected and shared
and how the app’s algorithm determines what they see in their news feeds. Algorithms in
particular have fueled distrust because of their opaque nature, with users unable to
understand why some material takes preference while other material is not shown at all.
This lack of clarity naturally leads to users suggesting political bias or undisclosed
influences around the news that’s deemed real and credible and the news that isn’t, further
causing a breakdown of trust.
digital technology, but not all banks trust each other. Thus, payments have to be routed
through several correspondent banks to get to their final destination, incurring fees and
extending the settlement time along the way.
In order to meet these goals, this infrastructure would have to embody two key design
principles: minimally extractive coordination and trust-minimized execution.
Decentralized consensus and cryptography are combined in blockchains to form the basis
for cryptographic truth—validation of new transactions based on the verification of
historical information already stored in the blockchain ledger and deemed true. In this
sense, blockchains are deterministic, since approving new transactions doesn’t require
new or external information.
Oracles are critical to creating advanced dApps. Because of the way blockchains are
secured, they are inherently disconnected from the outside world—akin to a computer
without the Internet. Oracles are supporting infrastructure for blockchains that allow them
to interact with external data and systems. In doing so, oracles enable smart contracts to
use external data to trigger their execution (e.g. sports match results to settle a wager),
send data to external systems for settlement (e.g. payment messages to execute a bank
Chainlink decentralized oracle networks connect smart contracts to the real world
Chainlink decentralized oracle networks provide smart contracts on any blockchain with
the ability to bidirectionally interact with any external system or resource in a secure,
reliable, and accurate manner.
The combination of blockchains and oracles provides an end-to-end trust network for
coordinating economic and social activities. Blockchains act as tamper-proof backends for
codifying, tracking, and enforcing digital contracts while oracles enable smart contracts to
accurately verify real-world events, seamlessly interact with legacy systems, and securely
interoperate across blockchains. This model shifts applications and digital contracts from
probabilistic and human-mediated to deterministic and verified through decentralized
consensus.
Future: Societal Trust Restored by the Power of Cryptographic Truth
By applying blockchain and oracle-powered trust networks to the original problems
outlined above, it becomes possible to build a world based on truth, where processes and
people stick to their agreements and records are highly reliable.
Shared Truth
Blockchains and dApps are generally open-source technologies where all users have a
shared understanding of the code powering the dApp and the data generated from its
operations. Essentially, the blockchain is a single, public repository of records that are
made equally available to all participants, removing reconciliation disputes and making
transparent any systemic risk. Transactions are also verified through a decentralized
consensus mechanism as opposed to the opinion of a single user or administrator,
meaning the relationship between users and dApps will follow the codified terms.
Other oracle solutions for generating shared truth include the Ledger of Record proposed
by Balaji Srinivasan, former Coinbase CTO and A16Z General Partner. The Ledger of Record
is a concept that uses oracles to cryptographically sign data on blockchains to prove its
origin, helping establish a verifiable provenance of information. Not only would it help
prevent fake news, deep fakes, and hidden news retractions, but it can be the basis for
reputation systems that track the historical credibility of data sources and analysts.
While blockchains and dApps can be built in a manner that enables changes, they
generally require social consensus amongst many independent users as opposed to the
unilateral decision-making seen in centralized Apps. This is why many dApps are governed
through decentralized autonomous organizations (DAOs), where users vote on changes. In
fact, many dApps have their own native token, which is used by their DAOs to decide on
proposals via token-weighted votes.
A highly tamper-proof and globally accessible blockchain platform for enforcing digital
contracts vastly reduces counterparty risk. Many blockchains and dApps even take it a step
further by introducing automatically enforced punishments for bad behavior from
participants. For instance, proof-of-stake blockchains can punish validators that act
maliciously by confiscating some of their staked tokens as a form of punishment. dApps
can also hold users’ capital in escrow and distribute it only after verifying certain events,
making it near impossible for the losing side to forgo payment.
One example of an oracle service that provides definitive truth is Chainlink Verifiable
Random Function (VRF). Chainlink VRF uses oracle technology to generate random
numbers and cryptographic proofs off-chain. It then publishes them on-chain, where the
blockchain uses the cryptographic proof to verify that the random number was not
tampered with by the oracles. NFT and gaming applications use the randomness provided
by Chainlink VRF to perform various on-chain functions, such as picking winners of special
NFT drops and determining the content of loot boxes. Importantly, users are able to
independently verify that the process is fair and unbiased, with even the game
developers/NFT creators not able to influence the randomized outcome.
If blockchain technology interests you and you want to begin working in the industry, check
out our walkthrough How to Become a Smart Contract Developer to learn how to start
building and explore careers at industry-leading organizations like Chainlink Labs, where
there are a wide range of open technical and non-technical roles.
BLOCKCHAIN FORK
Blockchain, a fork is defined variously as:
“What happens when a blockchain diverges into two potential paths forward”,
“A change in protocol”, or
A situation that “occurs when two or more blocks have the same block
height”.[1]: glossary [a]
Forks are related to the fact that different parties need to use common rules to maintain
the history of the blockchain. When parties are not in agreement, alternative chains may
emerge. While most forks are short-lived some are permanent. Short-lived forks are due to
the difficulty of reaching fast consensus in a distributed system. Whereas permanent forks
(in the sense of protocol changes) have been used to add new features to a blockchain,
they can also be used to reverse the effects of hacking such as the case with Ethereum and
Ethereum Classic, or avert catastrophic bugs on a blockchain as was the case with the
bitcoin fork on 6 August 2010.[citation needed] The concept of blockchain technology was
first introduced in 2008 by an unknown person or group of people using the pseudonym
“Satoshi Nakamoto” in a white paper describing the design of a decentralized digital
currency called Bitcoin. Blockchain forks have been widely discussed in the context of the
bitcoin scalability problem.[4][5][6]
Types of forks
Forks can be classified as accidental or intentional. Accidental fork happens when two or
more miners find a block at nearly the same time. The fork is resolved when subsequent
block(s) are added and one of the chains becomes longer than the alternative(s). The
network abandons the blocks that are not in the longest chain (they are called orphaned
blocks).
Intentional forks that modify the rules of a blockchain can be classified as follows:
Source code fork
See also: Fork (software development)
A source code fork or project fork is when developers take a copy of source code from one
cryptocurrency project and start independent development on it, creating a separate and
new piece of blockchain. Such examples are; Litecoin a source code fork of Bitcoin,
Monero fork of Bytecoin and Dogecoin fork of Litecoin.
Hard fork
A hard fork is a change to the blockchain protocol that is not backward compatible and
requires all users to upgrade their software in order to continue participating in the
network. In a hard fork, the network splits into two separate versions: one that follows the
new rules and one that follows the old rules.
For example, Ethereum was hard forked in 2016 to “make whole” the investors in The DAO,
which had been hacked by exploiting a vulnerability in its code. In this case, the fork
resulted in a split creating Ethereum and Ethereum Classic chains. In 2014 the Nxt
community was asked to consider a hard fork that would have led to a rollback of the
blockchain records to mitigate the effects of a theft of 50 million NXT from a major
cryptocurrency exchange. The hard fork proposal was rejected, and some of the funds were
recovered after negotiations and ransom payment. Alternatively, to prevent a permanent
split, a majority of nodes using the new software may return to the old rules, as was the
case of bitcoin split on 12 March 2013.[7]
A more recent hard-fork example is of Bitcoin in 2017, which resulted in a split creating
Bitcoin Cash.[8] The network split was mainly due to a disagreement in how to increase the
transactions per second to accommodate for demand.[9]
Soft fork
A soft fork is a backward-compatible change to the blockchain protocol that allows new
rules to be introduced without requiring all users to upgrade their software. In a soft fork, a
majority of the network’s miners implement the new rules and begin following the updated
version of the blockchain. The rest of the network can continue to follow the blockchain,
but they will be unable to validate that new blocks follow the updated rules. Because a soft
fork is backward-compatible, it does not result in the creation of a new blockchain or the
splitting of the network. Instead, it allows the network to gradually transition to the new
rules while still maintaining compatibility with the old rules. [10]
“Fork (software)” redirects here. For the operation whereby a process creates a copy of
itself, see fork (system call).
In software engineering, a project fork happens when developers take a copy of source
code from one software package and start independent development on it, creating a
distinct and separate piece of software.[example needed] The term often implies not
merely a development branch, but also a split in the developer community; as such, it is a
form of schism.[1] Grounds for forking are varying user preferences and stagnated or
discontinued development of the original software.
A timeline chart showing the evolution of Linux distributions, with each split in the diagram
being called “a fork”
Free and open-source software is that which, by definition, may be forked from the original
development team without prior permission, and without violating copyright law. However,
licensed forks of proprietary software (e.g. Unix) also happen.
Etymology
The word “fork” has been used to mean “to divide in branches, go separate ways” as early
as the 14th century.[2] In the software environment, the word evokes the fork system call,
which causes a running process to split itself into two (almost) identical copies that
(typically) diverge to perform different tasks.[3]
In the context of software development, “fork” was used in the sense of creating a revision
control “branch” by Eric Allman as early as 1980, in the context of Source Code Control
System:[4]
The term was in use on Usenet by 1983 for the process of creating a subgroup to move
topics of discussion to.[5]
“Fork” is not known to have been used in the sense of a community schism during the
origins of Lucid Emacs (now XEmacs) (1991) or the Berkeley Software Distributions (BSDs)
(1993–1994); Russ Nelson used the term “shattering” for this sort of fork in 1993, attributing
it to John Gilmore.[6] However, “fork” was in use in the present sense by 1995 to describe
the XEmacs split,[7] and was an understood usage in the GNU Project by 1996.[8]
The freedom to distribute copies of your modified versions to others (freedom 3). By doing
this, you can give the whole community a chance to benefit from your changes. Access to
the source code is a precondition for this.
3. Derived Works: The license must allow modifications and derived works, and must allow
them to be distributed under the same terms as the license of the original software.
Eric S. Raymond, in his essay Homesteading the Noosphere,[12] stated that “The most
important characteristic of a fork is that it spawns competing projects that cannot later
exchange code, splitting the potential developer community”. He notes in the Jargon
File:[13]
Forking is considered a Bad Thing—not merely because it implies a lot of wasted effort in
the future, but because forks tend to be accompanied by a great deal of strife and acrimony
between the successor groups over issues of legitimacy, succession, and design direction.
There is serious social pressure against forking. As a result, major forks (such as the Gnu-
Emacs/XEmacs split, the fissioning of the 386BSD group into three daughter projects, and
the short-lived GCC/EGCS split) are rare enough that they are remembered individually in
hacker folklore.
6. The death of the fork. This is by far the most common case. It is easy to declare a
fork, but considerable effort to continue independent development and support.
7. A re-merging of the fork (e.g., egcs becoming “blessed” as the new version of GNU
Compiler Collection.)
8. The death of the original (e.g. the X.Org Server succeeding and XFree86 dying.)
9. Successful branching, typically with differentiation (e.g., OpenBSD and NetBSD.)
Distributed revision control (DVCS) tools have popularised a less emotive use of the term
“fork”, blurring the distinction with “branch”.[14] With a DVCS such as Mercurial or Git, the
normal way to contribute to a project, is to first create a personal branch of the repository,
independent of the main repository, and later seek to have your changes integrated with it.
Sites such as GitHub, Bitbucket and Launchpad provide free DVCS hosting expressly
supporting independent branches, such that the technical, social and financial barriers to
forking a source code repository are massively reduced, and GitHub uses “fork” as its term
for this method of contribution to a project.
Forks often restart version numbering from numbers typically used for initial versions of
programs like 0.0.1, 0.1, or 1.0 even if the original software was at another version such as
3.0, 4.0, or 5.0. An exception is sometimes made when the forked software is designed to
be a drop-in replacement for the original project, e.g. MariaDB for MySQL[15] or LibreOffice
for OpenOffice.org.
The BSD licenses permit forks to become proprietary software, and copyleft proponents
say that commercial incentives thus make proprietisation almost inevitable. (Copyleft
licenses can, however, be circumvented via dual-licensing with a proprietary grant in the
form of a Contributor License Agreement.) Examples include macOS (based on the
proprietary NeXTSTEP and the open source FreeBSD), Cedega and CrossOver (proprietary
forks of Wine, though CrossOver tracks Wine and contributes considerably), EnterpriseDB
(a fork of PostgreSQL, adding Oracle compatibility features[16]), Supported PostgreSQL
with their proprietary ESM storage system,[17] and Netezza’s[18] proprietary highly
scalable derivative of PostgreSQL. Some of these vendors contribute back changes to the
community project, while some keep their changes as their own competitive advantages.
A notable proprietary fork not of this kind is the many varieties of proprietary Unix—almost
all derived from AT&T Unix under license and all called “Unix”, but increasingly mutually
incompatible.[19] See Unix wars.
Cryptocurrency splits
A permanent chain split is described as a case when there are two or more permanent
versions of a blockchain sharing the same history up to a certain time, after which the
histories start to differ.[11] Permanent chain splits lead to a situation when two or more
competing cryptocurrencies exist on their respective blockchains.[11]
Taxation
The taxation of cryptocurrency splits varies substantially from state to state. A few
examples include:
Australian Taxation Office (ATO)
The ATO does not classify cryptocurrency splits as taxation events.[11] The ATO classifies
the versions of the blockchain coming from the splits as the “original blockchain” and the
“new blockchain”[clarification needed]. In relation to the cost base, the cryptocurrency on
the original blockchain should be assigned all the original cost base, while the
cryptocurrency on the new blockchain should be assigned cost base zero.[11]
The UK HMRC does not classify cryptocurrency splits as taxation events. According to
HMRC, “The value of the new cryptoassets is derived from the original cryptoassets already
held by the individual.” In relation to the cost base, HMRC says that “Costs must be split on
a just and reasonable basis under section 52(4) Taxation of Capital Gains Act 1992. HMRC
does not prescribe any particular apportionment method. HMRC has the power to enquire
into an apportionment method that it believes is not just and reasonable.”[12]
As of September 2021, it is believed that more than 2.3 million people in the UK own a
cryptoasset. As these assets do not physically exist, HMRC has been forced to issue
guidance stating that cryptoassets will follow the residence of the beneficial owner.
Residents in the UK who trade cryptoassets, no matter where these assets are “held”, will
be liable to UK taxes. However, there is a growing belief that this guidance may well be
challenged in the courts. This could impact future HMRC tax income from those not
domiciled in the UK for tax purposes.”[13]
Bitcoin Classic
In its first 8 months, Bitcoin Classic promoted a single increase of the maximum block size
from one megabyte to two megabytes.[8][4] In November 2016 this changed and the
project moved to a solution that moved the limit out of the software rules into the hands of
the miners and nodes.[9]
Bitcoin Unlimited
All three software clients attempt to increase transaction capacity of the network. None
achieved a majority of the hash power.[10][4]
The following is a list of notable hard forks splitting bitcoin by date and/or block:
• Bitcoin Cash: Forked at block 478558, 1 August 2017, for each bitcoin (BTC), an
owner got 1 Bitcoin Cash (BCH)
o Bitcoin Satoshi Vision: Forked at block 556766, 15 November 2018, for each Bitcoin
Cash (BCH), an owner got 1 Bitcoin SV (BSV).
o eCash: Forked at block 661648, 15 November 2020, for each Bitcoin Cash (BCH), an
owner got 1,000,000 eCash (XEC).
Bitcoin Gold: Forked at block 491407, 24 October 2017, for each bitcoin (BTC), an owner
got 1 Bitcoin Gold (BTG)
Intended soft forks splitting from a not-most-work block
The fork fixing the value overflow incident was controversial because it was announced
after the exploit was mined. It was assigned CVE-2010-5139.
Intended soft forks splitting from the most-work block
Segwit
Main article: Segwit
Taproot
Taproot is an agreed soft fork in the transaction format. The fork adds support for Schnorr
signatures, and improves functionality of smart contracts and the Lightning Network. The
fork was installed in November 2021.[11] The upgrade adds privacy features.[12][13]
Taproot includes Bitcoin Improvement Proposal numbers BIP340, BIP341, BIP342.[14]
Advantages:
What is a fork?
A cryptocurrency blockchain, forking into two different branches
Definition
Cryptocurrencies like Bitcoin and Ethereum are powered by decentralized, open-source
software called a blockchain. A fork happens whenever a community makes a change to
the blockchain’s protocol, or basic set of rules.
Cryptocurrencies like Bitcoin and Ethereum are powered by decentralized, open software
that anyone can contribute to called a blockchain. They’re called blockchains because
they’re literally made up of blocks of data – picture a really long train – that can be traced all
the way back to the first-ever transaction on the network. And because they are open
source, they rely on their communities to maintain and develop their underlying code.
A fork happens whenever a community makes a change to the blockchain’s protocol, or
basic set of rules. When this happens, the chain splits — producing a second blockchain
that shares all of its history with the original, but is headed off in a new direction.
Why is this important?
Most digital currencies have independent development teams responsible for changes and
improvements to the network, much in the same way that changes to internet protocols
allow web browsing to become better over time. So sometimes a fork happens to make a
cryptocurrency more secure or add other features.
But it’s also possible for the developers of a new cryptocurrency to use a fork to create
entire new coins and ecosystems.
Why do forks occur?
Just like all software needs upgrades, blockchains are updated for a variety of reasons:
• To add functionality
• To address security risks
• To resolve a disagreement within the community about the cryptocurrency’s
direction
How are forks continuing to change the crypto landscape?
• The Ethereum blockchain is designed to run “smart contracts,” which are chunks of
code that automatically execute a set of predetermined actions when certain
criteria are met. Smart contract applications include everything from games to
logistics tools to DeFi dapps.
• As the platform that runs all these applications, you can think of the Ethereum
blockchain as similar to a computer’s operating system. In that analogy, the various
Ethereum forks – Ethereum, Ethereum Classic, Ethereum 2.0 – are like newer
versions of an operating system that add features or efficiencies the prior versions
might have lacked.
• An older fork might continue as a stable, well-proven platform while a newer fork
might offer developers entirely novel ways of interacting with it. (Older and newer
versions can eventually merge or continue evolving further apart.)
• Think of a soft fork as a ‘software upgrade’ (like when your phone asks you to update
to the latest OS) and a hard fork as an entire new operating system (like Linux and
Mac OS are evolutions of the half-century old UNIX platform)
Hard Fork: What It Is in Blockchain, How It Works, and Why It Happen
What Is a Hard Fork?
A blockchain hard fork is a change in programming that is incompatible with the old
programming. This essentially creates a new blockchain and cryptocurrency. Hard forks
generally require all nodes or users who wish to stay on the new chain to upgrade to the
latest version of the software.
Key Takeaways
• A hard fork is an event in which a change to a blockchain results in two branches:
one that follows previous protocols and one that follows the new version.
• In a hard fork, holders of tokens in the original blockchain will also be granted
tokens in the new fork, but participants must choose which blockchain to continue
verifying.
• Hard forks are not specific to any single blockchain—it is an event that many have
gone through.
• Hard forks occur for several reasons, such as developer disagreements, required
updates to a blockchain, or someone attempting to make another blockchain and
cryptocurrency they control.
How Hard Forks Work
A hard fork is when a new blockchain version emerges that is incompatible with the original
version. It is not always an adverse event; in fact, many blockchains have undergone hard
forks to implement necessary changes.
Blockchains are basically programs that create and store files of information on a network
of computers and devices. There are usually layers of software completing different tasks,
some methods for the network to reach an agreement on the blockchain’s state, and many
network participants. Each layer’s underlying programming can be changed as needed, but
it has to be accepted by the network’s participants to be adopted.
Developers cannot force changes on a public blockchain that relies on participation. Public
blockchains rely on their participants, so changes must be implemented by them, not
forced upon them. Otherwise, they can refuse to accept the changes and keep their
preferred version.
Because blockchains are essentially programs and scripts, they can be affected by errors,
bugs, network communication problems, hardware failures, or other issues. Blockchains
also rely on a large number of network participants to host versions for security.
When developers publish a change to any of a blockchain’s functions, one of two things
happen: a hard fork or a soft fork. If the change is drastic enough to prevent a participant
running the old version from participating in the blockchain’s processes, the change is
considered to have created a hard fork in the blockchain. Conversely, a change that allows
old and new nodes to run is considered a soft fork.
In a hard fork event, participants are faced with a choice—they can update their software to
the new version or not upgrade their software and use the old (and now unmaintained)
blockchain.
Reasons for a Hard Fork
There are several reasons or even events that cause developers to implement a hard fork.
For instance, when the hack on the Decentralized Autonomous Organization (DAO)
occurred, the Ethereum blockchain was forked by a nearly unanimous vote.
The fork rolled back transactions that siphoned off tens of millions of dollars worth of
digital currency by an anonymous hacker. The hard fork also helped DAO token holders get
their ether (ETH) funds returned. However, some miners kept mining the old chain, which
was picked up by OTC desks and given a price discovery order book. Poloniex listed this
currency also, and some of the Ethereum community decided to keep this version and
created Ethereum Classic.
In situations with controversy, participants and users can either upload the updated
blockchain and begin processing it or reject it and use the old chain. This is how several
blockchains and cryptocurrencies, such as Bitcoin Cash and Ethereum Classic, started
Cryptocurrency
Definition
Cryptocurrencies are digital assets, most often based on blockchain technology.
What Is Cryptocurrency?
A cryptocurrency is a digital or virtual currency secured by cryptography, which makes it
nearly impossible to counterfeit or double-spend. Most cryptocurrencies exist on
decentralized networks using blockchain technology—a distributed ledger enforced by a
disparate network of computers.
A defining feature of cryptocurrencies is that they are generally not issued by any central
authority, rendering them theoretically immune to government interference or
manipulation.
Key Takeaways
• A cryptocurrency is a form of digital asset based on a network that is distributed
across a large number of computers. This decentralized structure allows them to
exist outside the control of governments and central authorities.
• Some experts believe blockchain and related technologies will disrupt many
industries, including finance and law.
• The advantages of cryptocurrencies include cheaper and faster money transfers
and decentralized systems that do not collapse at a single point of failure.
• The disadvantages of cryptocurrencies include their price volatility, high energy
consumption for mining activities, and use in criminal activities.
Understanding Cryptocurrency
Cryptocurrencies are digital or virtual currencies underpinned by cryptographic systems.
They enable secure online payments without the use of third-party intermediaries. “Crypto”
refers to the various encryption algorithms and cryptographic techniques that safeguard
these entries, such as elliptical curve encryption, public-private key pairs, and hashing
functions.
Central to the appeal and functionality of Bitcoin and other cryptocurrencies is blockchain
technology. As its name indicates, a blockchain is essentially a set of connected blocks of
information on an online ledger. Each block contains a set of transactions that have been
independently verified by each validator on a network.
Every new block generated must be verified before being confirmed, making it almost
impossible to forge transaction histories. The contents of the online ledger must be agreed
upon by a network of individual nodes, or computers that maintain the ledger.
Experts say that blockchain technology can serve multiple industries, supply chains, and
processes such as online voting and crowdfunding. Financial institutions such as JPMorgan
Chase & Co. (JPM) are using blockchain technology to lower transaction costs by
streamlining payment processing.
Types of Cryptocurrency
Many cryptocurrencies were created to facilitate work done on the blockchain they are
built on. For example, Ethereum’s ether was designed to be used as payment for validating
transactions and opening blocks. When the blockchain transitioned to proof-of-stake in
September 2022, ether (ETH) inherited an additional duty as the blockchain’s staking
mechanism.
The XRP Ledger Foundation’s XRP is designed for financial institutions to facilitate
transfers between different geographies.
Because there are so many cryptocurrencies on the market, it’s important to understand
the types. Knowing whether the coin you’re looking at has a purpose can help you decide
whether it is worth investing in—a cryptocurrency with a purpose is likely to be less risky
than one that doesn’t have a use.
Most of the time, when you hear about cryptocurrency types, you hear the coin’s name.
However, coin names differ from coin types. Here are some of the types you’ll find with
some of the names of tokens in that category:
• Utility: XRP and ETH are two examples of utility tokens. They serve specific
functions on their respective blockchains.
• Transactional: Tokens designed to be used as a payment method. Bitcoin is the
most well-known of these.
• Governance: These tokens represent voting or other rights on a blockchain, such as
Uniswap.
• Platform: These tokens support applications built to use a blockchain, such as
Solana.
• Security tokens: Tokens representing ownership of an asset, such as a stock that
has been tokenized (value transferred to the blockchain). MS Token is an example of
a securitized token. If you can find one of these for sale, you can gain partial
ownership of the Millennium Sapphire.
If you find a cryptocurrency that doesn’t fall into one of these categories, you’ve found a
new category or something that needs to be investigated to be sure it’s legitimate.
If you only want to buy cryptocurrency as an investment, you may be able to do so through
your brokerage. For example, Robinhood allows users to invest in bitcoin and other
cryptocurrencies, although you cannot withdraw them from the platform for purchases. In
addition, there are several crypto ETFs that provide exposure to the crypto asset class
without requiring the investors to maintain their own wallets. For instance, as of May 2024,
investors may choose to hold Bitcoin futures ETF shares. The SEC has also approved the
listing and trading of Ether spot shares.
Is Cryptocurrency Legal?
Fiat currencies derive their authority from the government or monetary authorities. For
example, the U.S. dollar is recognized and issued by the government as the official
currency of the United States and is “legal tender.”
But cryptocurrencies are not issued by any public or private entities. Therefore, it has been
difficult to make a case for their legal status in different financial jurisdictions throughout
the world. It doesn’t help matters that cryptocurrencies have primarily functioned outside
most existing financial infrastructure.
In the U.S.
The legal status of cryptocurrencies creates implications for their use in daily transactions
and trading. In June 2019, the Financial Action Task Force (FATF) recommended that wire
transfers of cryptocurrencies should be subject to the requirements of its Travel Rule,
which requires AML compliance.
Although cryptocurrencies are considered a form of money, the Internal Revenue Service
(IRS) treats them as financial assets or property for tax purposes. And, as with most other
investments, if you reap capital gains selling or trading cryptocurrencies, the government
wants a piece of the profits. How exactly the IRS taxes digital assets—either as capital
gains or ordinary income—depends on how long the taxpayer held the cryptocurrency and
how they used it.
In the United States in July 2023, courts ruled that cryptocurrencies are considered
securities when purchased by institutional buyers but not by retail investors purchased on
exchanges.
Enthusiasts called it a victory for crypto; however, crypto exchanges are regulated by the
SEC, as are coin offerings or sales to institutional investors. So, crypto is legal in the U.S.,
but regulatory agencies are slowly gaining ground in the industry.
As of June 2024, El Salvador is the only country to accept Bitcoin as legal tender for
monetary transactions.
In the rest of the world, cryptocurrency regulation varies by jurisdiction.
In Asia
Japan’s Payment Services Act defines Bitcoin as legal property. Cryptocurrency exchanges
operating in the country are required to collect information about the customer and details
relating to the wire transfer.
China has banned cryptocurrency exchanges, transactions, and mining within its borders,
but has a Central Bank Digital Currency (CBDC).
In Europe
Cryptocurrencies are legal in the European Union. Derivatives and other products that use
cryptocurrencies must qualify as “financial instruments.” In June 2023, the European
Commission’s Markets in Crypto-Assets (MiCA) regulation went into effect. This law sets
safeguards and establishes rules for companies or vendors providing financial services
using cryptocurrencies.
In addition to the market risks associated with speculative assets, cryptocurrency investors
should be aware of the following risks:
• User risk: Unlike traditional finance, there is no way to reverse or cancel a
cryptocurrency transaction after it has already been sent. By some estimates, about
one-fifth of all bitcoins are now inaccessible due to lost passwords or incorrect
sending addresses.
• Regulatory risks: The regulatory status of some cryptocurrencies is still unclear in
many areas, with some governments seeking to regulate them as securities,
currencies, or both. A sudden regulatory crackdown could make it challenging to
sell cryptocurrencies or cause a market-wide price drop.
• Counterparty risks: Many investors and merchants rely on exchanges or other
custodians to store their cryptocurrency. Theft or loss by one of these third parties
could result in losing one’s entire investment.
• Management risks: Due to the lack of coherent regulations, there are few
protections against deceptive or unethical management practices. Many investors
have lost large sums to management teams that failed to deliver a product.
• Programming risks: Many investment and lending platforms use automated smart
contracts to control the movement of user deposits. An investor using one of these
platforms assumes the risk that a bug or exploit in these programs could cause
them to lose their investment.
• Market Manipulation: Market manipulation remains a substantial problem in
cryptocurrency, with influential people, organizations, and exchanges acting
unethically.
• Despite these risks, cryptocurrencies have seen a significant price leap, with the
total market capitalization rising to about $2.4 trillion.
Despite the asset’s speculative nature, some have created substantial fortunes by taking
on the risk of investing in early-stage cryptocurrencies.
Advantages and Disadvantages of Cryptocurrency
Cryptocurrencies were introduced with the intent to revolutionize financial infrastructure.
As with every revolution, however, there are tradeoffs involved. At the current stage of
development for cryptocurrencies, there are many differences between the theoretical i
Advantages
• Removes single points of failure
• Easier to transfer funds between parties
• Removes third parties
• Can be used to generate returns
Disadvantages
• Transactions are pseudonymous
• Pseudonymity allows for criminal uses
• Have become highly centralized
• Expensive to participate in a network and earn
• Off-chain security issues
• Prices are very volatile
Advantages Explained
Cryptocurrencies represent a new, decentralized paradigm for money. In this system,
centralized intermediaries, such as banks and monetary institutions, are not necessary to
enforce trust and police transactions between two parties. Thus, a system with
cryptocurrencies eliminates the possibility of a single point of failure—such as a large
financial institution setting off a cascade of global crises, such as the one triggered in 2008
by the failure of large investment banks in the U.S.
Cryptocurrencies promise to make transferring funds directly between two parties easier
without needing a trusted third party like a bank or a credit card company. Such
decentralized transfers are secured by the use of public keys and private keys and different
forms of incentive systems, such as proof of work or proof of stake.
Because they do not use third-party intermediaries, cryptocurrency transfers between two
transacting parties can be faster than standard money transfers. Flash loans in
decentralized finance are an excellent example of such decentralized transfers. These
loans, which are processed without requiring collateral, can be executed within seconds
and are mostly used in trading.
The remittance economy is testing one of cryptocurrency's most prominent use cases.
Cryptocurrencies such as Bitcoin serve as intermediate currencies to streamline money
transfers across borders. Thus, a fiat currency is converted to Bitcoin (or another
cryptocurrency), transferred across borders, and subsequently converted to the
destination fiat currency without third-party involvement.
Disadvantages Explained
Cryptocurrencies have become a popular tool with criminals for nefarious activities such
as money laundering and illicit purchases. The case of Dread Pirate Roberts, who ran a
marketplace to sell drugs on the dark web, is already well known.
Cryptocurrencies have also become a favorite of hackers who use them for ransomware
activities.
One of the conceits of cryptocurrencies is that anyone can mine them using a computer
with an Internet connection. However, mining popular cryptocurrencies requires
considerable energy, sometimes as much energy as entire countries consume. The
expensive energy costs and the unpredictability of mining have concentrated mining
among large firms whose revenues run into billions of dollars.
Only 61 (1%) of the 4,568 Bitcoin blocks opened from May 15, 2024, to June 15, 2024, were
opened by unknown addresses. The other 99% were opened by mining pools.
Though cryptocurrency blockchains are highly secure, off-chain crypto-related key storage
repositories, such as exchanges and wallets, can be hacked. Many cryptocurrency
exchanges and wallets have been hacked over the years, sometimes resulting in the theft
of millions of dollars in coins.
Crypto can be a good investment for someone who enjoys speculating and can financially
tolerate losing everything invested. However, it is not a wise investment for someone
seeking to grow their retirement portfolio or for placing savings into it for growth.
Many, or all, of the products featured on this page are from our advertising partners who
compensate us when you take certain actions on our website or click to take an action on
their website. However, this does not influence our evaluations. Our opinions are our own.
Here is a list of our partners and here’s how we make money.
The investing information provided on this page is for educational purposes only.
NerdWallet, Inc. does not offer advisory or brokerage services, nor does it recommend or
advise investors to buy or sell particular stocks, securities or other investments.
Nerdy takeaways
• Cryptocurrencies are generally used to pay for services or as speculative
investments.
• Cryptocurrencies are powered by a technology known as blockchain.
• Crypto prices are extremely volatile, and the industry is filled with uncertainty.
• There are tax consequences to buying and selling cryptocurrencies.
Bitcoin was initially developed primarily to be a form of payment that isn’t controlled or
distributed by a central bank. While financial institutions have traditionally been necessary
to verify that a payment has been processed successfully, Bitcoin accomplishes this
securely, without that central authority.
Ethereum uses the same underlying technology as Bitcoin, but instead of strictly peer-to-
peer payments, the cryptocurrency is used to pay for transactions on the Ethereum
network. This network, built on the Ethereum blockchain, enables entire financial
ecosystems to operate without a central authority. To visualize this, think insurance without
the insurance company, or real estate titling without the title company.
Scores of altcoins (broadly defined as any cryptocurrency other than Bitcoin) arose to
capitalize on the various — and at times promising — use cases for blockchain technology.
The same principles apply to Ethereum. “Ether” is the cryptocurrency of the Ethereum
blockchain, where developers can build financial apps without the need for a third-party
financial institution. Developers must use Ether to build and run applications on Ethereum,
so theoretically, the more that is built on the Ethereum blockchain, the higher the demand
for Ether.
However, it’s important to note that to some, cryptocurrencies aren’t investments at all.
Bitcoin enthusiasts, for example, hail it as a much-improved monetary system over our
current one and would prefer we spend and accept it as everyday payment. One common
refrain — “one Bitcoin is one Bitcoin” — underscores the view that Bitcoin shouldn’t be
measured in USD, but rather by the value it brings as a new monetary system.
But it did, hitting a series of record highs in early 2024. Those surges in price could be
partially be attributed to approval by the SEC of spot Bitcoin ETFs in Jan. 2024. This gave
some of the largest asset managers in the world (think Fidelity and BlackRock) a way to
offer their clients exposure to Bitcoin, making it easier for those clients to hold Bitcoin in
accounts such as IRAs and taxable brokerage accounts. (In July 2024, a handful of
Ethereum ETFs were also approved.)
But Bitcoin’s 2024 price rise is also due to other factors. Every four years, something known
as “Bitcoin halving” occurs. The most recent halving occurred in April 2024, cutting the
mining reward from 6.25 to 3.125. The anticipation of fewer Bitcoins entering the market
drives up the price.
What’s more, the surge in interest rates in 2022 that pummeled growth stocks may have
had a similar influence on Bitcoin; investors tend to prefer security over volatility during
times of uncertainty. But as talk of interest rate cuts in 2024 circulates, some investors may
have more appetite for risky assets like Bitcoin, leading them to get back in now.
And lastly, there are still Bitcoin enthusiasts who preach that looking at Bitcoin through the
lens of fiat currencies like the U.S. dollar or Great British pound is missing the point entirely,
and that its true value lies in being a new monetary system.
But, if there’s anything about Bitcoin that appears to be predictable, it’s that it will continue
to be volatile. In the relative short-term, both camps are likely right: Bitcoin will rise and
Bitcoin will fall. But at the moment, it appears the Bitcoin bulls are winning out.
. And while some cryptocurrencies have total market valuations in the hundreds of billions
of dollars, others are obscure and essentially worthless.
If you’re thinking about getting into cryptocurrency, it can be helpful to start with one that is
commonly traded and relatively well-established in the market. These coins typically have
the largest market capitalizations.
For instance, in November of 2022 the market took a major hit as the cryptocurrency
exchange FTX struggled to deal with liquidity issues amid a spike in withdrawals. As the
fallout spread, cryptocurrencies both large and small saw their values plummet.
In communities that have been underserved by the traditional financial system, some
people see cryptocurrencies as a promising foothold. Pew Research Center data from 2021
found that Asian, Black and Hispanic people “are more likely than White adults to say they
have ever invested in, traded or used a cryptocurrency
Other advocates like the blockchain technology behind cryptocurrencies, because it’s a
decentralized processing and recording system and can be more secure than traditional
payment systems.
Some cryptocurrencies offer their owners the opportunity to earn passive income through
a process called staking. Crypto staking involves using your cryptocurrencies to help verify
transactions on a blockchain protocol. Though staking has its risks, it can allow you to grow
your crypto holdings without buying more.
Cryptocurrency cons
Many cryptocurrency projects are untested, and blockchain technology in general has yet
to gain wide adoption. If the underlying idea behind cryptocurrency does not reach its
potential, long-term investors may never see the returns they hoped for.
For shorter-term crypto investors, there are other risks. Its prices tend to change rapidly,
and while that means that many people have made money quickly by buying in at the right
time, many others have lost money by doing so just before a crypto crash.
Those wild shifts in value may also cut against the basic ideas behind the projects that
cryptocurrencies were created to support. For example, people may be less likely to use
Bitcoin as a payment system if they are not sure what it will be worth the next day.
The environmental impact of Bitcoin and other projects that use similar mining protocols is
significant. A comparison by the University of Cambridge, for instance, said worldwide
Bitcoin mining consumes more than twice as much power as all U.S. residential lighting
Governments around the world have not yet fully reckoned with how to handle
cryptocurrency, so regulatory changes and crackdowns have the potential to affect the
market in unpredictable ways.
The question of whether cryptocurrencies are legally allowed, however, is only one part of
the legal question. Other things to consider include how crypto is taxed and what you can
buy with cryptocurrency.
Legal tender: You might call them cryptocurrencies, but they differ from traditional
currencies in one important way: there’s no requirement in most places that they be
accepted as “legal tender.” The U.S. dollar, by contrast, must be accepted for “all debts,
public and private.” Countries around the world are taking various approaches to
cryptocurrency. For now, in the U.S., what you can buy with cryptocurrency depends on the
preferences of the seller.
Crypto taxes: Again, the term “currency” is a bit of a red herring when it comes to taxes in
the U.S. Cryptocurrencies are taxed as property, rather than currency. That means that
when you sell them, you’ll pay tax on the capital gains, or the difference between the price
of the purchase and sale. And if you’re given crypto as payment — or as a reward for an
activity such as mining — you’ll be taxed on the value at the time you received them.
There are other ways to manage risk within your crypto portfolio, such as by diversifying the
range of cryptocurrencies that you buy. Crypto assets may rise and fall at different rates,
and over different time periods, so by investing in several different products you can
insulate yourself — to some degree — from losses in one of your holdings.
Perhaps the most important thing when investing in anything is to do your homework. This
is particularly important when it comes to cryptocurrencies, which are often linked to a
specific technological product that is being developed or rolled out. When you buy a stock,
it is linked to a company that is subject to well-defined financial reporting requirements,
which can give you a sense of its prospects.
With cryptocurrencies, on the other hand, discerning which projects are viable can be
more challenging. If you have a financial advisor who is familiar with cryptocurrency, it may
be worth asking for input.
For beginning investors, it can also be worthwhile to examine how widely a cryptocurrency
is being used. Most reputable crypto projects have publicly available metrics showing data
such as how many transactions are being carried out on their platforms. If use of a
cryptocurrency is growing, that may be a sign that it is establishing itself in the market.
Cryptocurrencies also generally make “white papers” available to explain how they’ll work
and how they intend to distribute tokens.
What Is a Crypto Wallet? A Beginner’s Guide
Key Takeaways:
• Contrary to popular belief, crypto wallets do not physically hold cryptocurrencies
like the wallet in someone’s pocket.
• Crypto wallets store the public and private keys required to buy cryptocurrencies
and provide digital signatures that authorise each transaction.
• There are several types of crypto wallets, including physical devices, software, and
even paper.
• Determining which crypto wallet is best depends entirely on individual trading
needs.
What Is a Crypto Wallet?
Cryptocurrency wallets store users’ public and private keys while providing an easy-to-use
interface to manage crypto balances. They also support cryptocurrency transfers through
the blockchain. Some wallets even allow users to perform certain actions with their crypto
assets, such as buying and selling or interacting with decentralised applications (dapps).
paired with one corresponding private key. Together, they are used to encrypt and decrypt
data.
Hot Wallets
The main difference between hot and cold wallets is whether they are connected to the
internet. Hot wallets are connected to the internet, while cold wallets are kept offline.
This means that funds stored in hot wallets are more accessible and, therefore, easier for
hackers to gain access to.
Examples of hot wallets include:
• Web-based wallets
• Mobile wallets
• Desktop wallets
• Software wallets
In hot wallets, private keys are stored and encrypted on the app itself, which is kept online.
Using a hot wallet can be risky since computer networks have hidden vulnerabilities that
can be targeted by hackers or malware programmes to break into the system. Keeping large
amounts of cryptocurrency in a hot wallet is a fundamentally poor security practise, but the
risks can be mitigated by using a hot wallet with stronger encryption, or by using devices
that store private keys in a secure enclave.
There are different reasons why a market participant might want their cryptocurrency
holdings to be either connected to or disconnected from the internet. Because of this, it’s
not uncommon for cryptocurrency holders to have multiple cryptocurrency wallets,
including both hot and cold ones.
Cold Wallets
As introduced at the beginning of this section, a cold wallet is entirely offline. While not as
convenient as hot wallets, cold wallets are far more secure. An example of a physical
medium used for cold storage is a piece of paper or an engraved piece of metal.
Examples of cold wallets include:
• Paper wallets
• Hardware wallets
What Is a Paper Wallet?
A paper wallet is a physical location where the private and public keys are written down or
printed. In many ways, this is safer than keeping funds in a hot wallet, since remote hackers
have no way of accessing these keys, which are kept safe from phishing attacks. On the
other hand, it opens up the potential risk of the piece of paper getting destroyed or lost,
which may result in irrecoverable funds.
What Is a Hardware Wallet?
A hardware wallet is an external accessory (usually a USB or Bluetooth device) that stores a
user’s keys; a user can only sign a transaction by pushing a physical button on the device,
which malicious actors cannot control.
The best practise to store cryptocurrency assets that do not require instant access is
offline in a cold wallet. However, users should note this also means that securing their
assets is entirely their own responsibility — it is up to them to ensure they don’t lose the
hardware wallet, or have it stolen.
Tip: For increased security, separate the public and private keys, keep them offline, and
store the physical wallet in a safe deposit box.
Hot Wallets vs Cold Wallets: Which Are Better?
While both methods of storage have benefits and drawbacks, the option depends on a
user’s preference. For example:
• For day-to-day trading, accessibility is of paramount importance, meaning that a hot
wallet may be worth researching.
• However, for those considering storing a large amount of crypto assets and who
value security over convenience, then consider researching a cold wallet.
Custodial and Non-Custodial Crypto Wallets
In addition to those mentioned above, wallets can be further separated into custodial and
non-custodial types.
Custodial Wallets
Most web-based crypto wallets, also known as hosted wallets, tend to be custodial
wallets. Typically offered on cryptocurrency exchanges, these wallets are known for their
convenience and ease of usage, and are especially popular with newcomers, as well as
experienced day traders.
The main difference between custodial wallets and the types mentioned above is that
users are no longer in full control of their tokens, and the private keys required to sign for
transactions are held only by the exchange.
The implication here is that users must trust the service provider to securely store
their tokens and implement strong security measures to prevent unauthorised access.
These measures include two-factor authentication (2FA), email confirmation, and
biometric authentication, such as facial recognition or fingerprint verification. Many
exchanges will not allow a user to make transactions until these security measures are
properly set up.
Crypto exchanges and custodial wallet providers usually also take further steps to ensure
the safety of users’ tokens. For example, a portion of the funds is generally transferred to
the company’s cold wallet, safe from online attackers.
Crypto.com has taken many measures to ensure the protection of customer funds. After
rigorous security audits by a team of cybersecurity and compliance experts,
Crypto.com is the first crypto company in the world to have obtained ISO/IEC
27701:2019, ISO22301:2019, ISO27001:2013, and PCI:DSS 3.2.1, Level 1 compliance,
and independently assessed at Tier 4, the highest level for both NIST Cybersecurity
and Privacy Frameworks, as well as Service Organization Control (SOC) 2 compliance.
Additionally, the company has in place a total of US$150 million for insurance protection of
customer funds.
Non-Custodial Wallets
Non-custodial wallets, on the other hand, allow a user to retain full control of their funds,
since the private key is stored locally with the user.
When starting a non-custodial wallet, the user is asked to write down and safely store a list
of 12 randomly generated words, known as a ‘recovery’, ‘seed’, or ‘mnemonic’ phrase. From
this phrase, the user’s public and private keys can be generated. This acts as a backup or
recovery mechanism in case the user loses access to their device.
Anyone with the seed phrase is able to gain full control of the funds held in that wallet. In a
case scenario where the seed phrase is lost, the user also loses access to their funds. So it
is imperative to keep the mnemonic phrase in a secure location, and to not store a digital
copy of it anywhere. Do not print it out at a public printer or take a picture of it.
Note that hardware wallets are inherently non-custodial, since private keys are stored on
the device itself. There are also software-based non-custodial wallets, such as the
Crypto.com DeFi Wallet. The common theme is that the private keys and the funds are fully
in the user’s control. As the popular saying within the crypto community goes, ‘not your
keys, not your coins!’.
On the flip side, this means that users must be in charge of their own security with regard to
the storage of passwords and seed phrases. If any of these are lost, recovery can be
difficult or impossible because they are typically not stored on any third-party server.
Custodial vs Non-Custodial Wallets: Which Are Better?
• Custodial and non-custodial wallets have various pros and cons that make them
suitable for different types of users. Ultimately, it all comes down to personal
choice.
• For those prone to losing passwords and devices, then it makes sense to use a
custodial wallet, since an exchange or custodian is likely to have better security
practices and backup options. That’s why it’s a popular option for beginners who
have little to no experience trading crypto. Further, transaction fees with a custodial
wallet tend to be cheaper or even free.
For those who prefer to retain full control over their own funds, consider a non-custodial
wallet.
For more on the differences between custodial and non-custodial wallets, see our
University article Custodial vs Non-Custodial Wallets.
For Additional Security, Consider Multi-Signature Wallets
Multi-signature wallets — or multisig wallets — require two or more private key signatures
to authorise transactions. This solution is useful for a number of use cases:
• An individual using a multisig wallet can prevent losing access to the entire wallet in
a case scenario where one key is lost. For example, if a user loses one key, there will
still be two other keys able to sign transactions.
• Multisig wallets can prevent the misuse of funds and fraud, which makes them a
good option for hedge funds, exchanges, and corporations. Since each authorised
person has one key, and a sign-off requires the majority of keys, it becomes
impossible for any individual to unilaterally make unauthorised transactions.
Any of the wallet types described above — hot wallets, cold wallets, hardware wallets, etc.
— have multisig versions.
NFT Wallets
An NFT wallet is a secure place that stores non-fungible tokens (NFTs). For NFT wallets,
there are two main choices: hardware wallets or software-based wallets.
What to Look for in an NFT Wallet
The right NFT wallet depends on a variety of factors, including a user’s level of experience
and security needs, as well as the types of tokens they plan on storing. Below are things to
consider when choosing an NFT wallet:
Compatibility with NFT marketplaces — Users need a crypto wallet that can integrate
with the NFT marketplaces they want to buy from.
The dedicated wallet supports NFTs on Ethereum, Cronos, and Crypto.org Chain, and
enables users to easily view top collections using the NFT Spotlight feature. Users can also
use the wallet to potentially earn passive income by locking up cryptocurrencies like CRO,
USDC, and DOT. Crypto.com users can also manage their NFTs within the Crypto.com App.
Conclusion
When it comes to crypto wallets, there is no perfect solution. Each type of wallet has
different strengths, purposes, and trade-offs. It’s up to the user to weigh what works best
for them:
• For those with a high-risk tolerance who want to make regular, quick online
payments, the convenience of a hot wallet, like the Crypto.com App, could suit best.
• For those a little more risk-averse who intend to hold their coins long term, then a
secure offline device, like hardware wallets, might make the most sense.
• The final choice remains in the user’s hands, with the non-custodial Crypto.com
DeFi Wallet one of many secure options.
As storing large quantities of cryptocurrency in a single wallet is quite risky, a combination
of cold and hot wallets is usually ideal and can help strike the right balance between
convenience and security.
Past performance is not a guarantee or predictor of future performance. The value of crypto
assets can increase or decrease, and you could lose all or a substantial amount of your
purchase price. When assessing a crypto asset, it’s essential for you to do your research
and due diligence to make the best possible judgement, as any purchases shall be your
sole responsibility.
What Is a Cryptocurrency Wallet?
A crypto wallet is an application that functions as a wallet for your cryptocurrency. It is
called a wallet because it is used similarly to a wallet you put cash and cards in. Instead of
holding these physical items, it stores the passkeys you use to sign for your cryptocurrency
transactions and provides the interface that lets you access your crypto.
Cryptocurrencies are not “stored” anywhere—they are bits of data in a database, scattered
all over it; the wallet finds all of the bits associated with your public address and sums up
the amount for you in the app’s interface.
Sending and receiving cryptocurrency is very easy using these applications. You can send
or receive cryptocurrency from your wallet using various methods. Typically, you enter the
recipient’s wallet address, choose an amount to send, sign the transaction using your
private key, add an amount to pay the transaction fee, and send it.
• Many wallets have integrated QR codes and near-field scanner technology that
allows you to scan a code, select an amount, enter your key, select the transaction
fee, and click send.
Receiving is even easier—the sender enters your address and goes through the same
routine. You accept the payment, and the transaction is done.
Cryptocurrency Wallet Types
There are two main types of wallets: custodial and noncustodial. Custodial wallets (also
called online wallets) are hosted by a third party that stores your keys for you. This could be
a company that provides enterprise-level data security systems businesses use to preserve
and secure data. Some cryptocurrency exchanges offer custodial wallets for their
customers. Noncustodial wallets are wallets in which you take responsibility for securing
your keys. This is the type that most cryptocurrency wallets on devices are.
There are two subcategories of wallets: hot and cold. A hot wallet has a connection to the
internet or to a device that has a connection, and a cold wallet has no connection. Lastly,
there are three subcategories of wallets—software, hardware, and paper. Each of these
types is considered either a hot or cold wallet.
So, you can have a noncustodial software hot wallet, a noncustodial hardware cold or hot
wallet, or a custodial hardware cold wallet. These are the most common types, but you
may also encounter other combinations.
Some wallets may be best for storing and managing your cryptocurrency, such as one of
Investopedia’s best Bitcoin wallets. Research all crypto wallet options before deciding
which is best for you.
Software Wallets
Software wallets include applications for desktops and mobile devices. These wallets are
installed on a desktop or laptop computer and can access your cryptocurrency, make
transactions, display your balance, and much more. Some software wallets also include
additional functionality, such as exchange integration if you’re using a wallet designed by a
cryptocurrency exchange.
Many mobile wallets can facilitate quick payments in physical stores through near-field
communication (NFC) or by scanning a QR code. Mobile wallets tend to be compatible with
iOS or Android devices. Trezor, Electrum, and Mycelium are examples of wallets that you
can use. Software wallets are generally hot wallets.
Warning:You use private keys to access your cryptocurrency. It’s important to control
access to your private keys, because anyone who has them can access your coins.
Hardware Wallets
Hardware wallets are the most popular type of wallet because you can store your private
keys and remove them from your device. These devices might resemble a USB drive, and
modern hardware wallets have several features.
You can make a cryptocurrency transaction on your computer or device by plugging in the
hardware wallet. Most of them can sign cryptocurrency transactions automatically without
requiring you to enter the key, circumventing a hacker’s ability to log your keypresses or
record your screen.
These devices often cost between $100 to $200. Ledger and Trezor are both well-known
hardware wallets. Hardware wallets are generally considered cold wallets because they
don’t have an active connection until they are plugged in.
Some new hardware wallets come with the ability to connect to your device through
Bluetooth. Use these with caution because Bluetooth is a wireless signal that can be
accessed by unwanted parties when it is turned on.
Paper Wallets
Early crypto users would write or type their keys on paper, which they called paper wallets.
These evolved to include the keys and QR codes so wallets on mobile devices could scan
them. However, paper wallets are easily damaged or lost, so many crypto owners do not
use them anymore.
However, there is nothing wrong with using a paper wallet if you take measures to store it
properly in a safe or deposit box and check on it once in a while to ensure it hasn’t
deteriorated.
The best cryptocurrency key security measures involve removing your keys from your
wallet, placing them in a form of cold storage, and securing them in a vault, safe, or deposit
box. The more steps it takes for you to access your cryptocurrency keys, the harder it is for
a criminal to access them. This way, you ensure you don’t lose your keys. It also ensures
that someone you have entrusted with your keys doesn’t lose them or deny you access to
them.
The comments, opinions, and analyses expressed on Investopedia are for informational
purposes only. Read our warranty and liability disclaimer for more info.
Cryptography
Lorenz cipher machine, used in World War II to encrypt communications of the German
High Command.
Cryptography prior to the modern age was effectively synonymous with encryption,
converting readable information (plaintext) to unintelligible nonsense text (ciphertext),
which can only be read by reversing the process (decryption). The sender of an encrypted
(coded) message shares the decryption (decoding) technique only with the intended
recipients to preclude access from adversaries. The cryptography literature often uses the
names “Alice” (or “A”) for the sender, “Bob” (or “B”) for the intended recipient, and “Eve” (or
“E”) for the eavesdropping adversary.[6] Since the development of rotor cipher machines in
World War I and the advent of computers in World War II, cryptography methods have
become increasingly complex and their applications more varied.
The growth of cryptographic technology has raised a number of legal issues in the
Information Age. Cryptography’s potential for use as a tool for espionage and sedition has
led many governments to classify it as a weapon and to limit or even prohibit its use and
export.[7] In some jurisdictions where the use of cryptography is legal, laws permit
investigators to compel the disclosure of encryption keys for documents relevant to an
investigation.[8][9] Cryptography also plays a major role in digital rights management and
copyright infringement disputes with regard to digital media.[10]
Terminology
Alphabet shift ciphers are believed to have been used by Julius Caesar over 2,000 years
ago.[6] This is an example with k = 3. In other words, the letters in the alphabet are shifted
three in one direction to encrypt and three in the other direction to decrypt.
The first use of the term “cryptograph” (as opposed to “cryptogram”) dates back to the 19 th
century—originating from “The Gold-Bug”, a story by Edgar Allan Poe.[11][12]
Until modern times, cryptography referred almost exclusively to “encryption”, which is the
process of converting ordinary information (called plaintext) into an unintelligible form
(called ciphertext).[13] Decryption is the reverse, in other words, moving from the
unintelligible ciphertext back to plaintext. A cipher (or cypher) is a pair of algorithms that
carry out the encryption and the reversing decryption. The detailed operation of a cipher is
controlled both by the algorithm and, in each instance, by a “key”. The key is a secret
(ideally known only to the communicants), usually a string of characters (ideally short so it
can be remembered by the user), which is needed to decrypt the ciphertext. In formal
mathematical terms, a “cryptosystem” is the ordered list of elements of finite possible
plaintexts, finite possible cyphertexts, finite possible keys, and the encryption and
decryption algorithms that correspond to each key. Keys are important both formally and in
actual practice, as ciphers without variable keys can be trivially broken with only the
knowledge of the cipher used and are therefore useless (or even counter-productive) for
most purposes. Historically, ciphers were often used directly for encryption or decryption
without additional procedures such as authentication or integrity checks.
There are two main types of cryptosystems: symmetric and asymmetric. In symmetric
systems, the only ones known until the 1970s, the same secret key encrypts and decrypts a
message. Data manipulation in symmetric systems is significantly faster than in
asymmetric systems. Asymmetric systems use a “public key” to encrypt a message and a
related “private key” to decrypt it. The advantage of asymmetric systems is that the public
key can be freely published, allowing parties to establish secure communication without
having a shared secret key. In practice, asymmetric systems are used to first exchange a
secret key, and then secure communication proceeds via a more efficient symmetric
system using that key.[14] Examples of asymmetric systems include Diffie–Hellman key
exchange, RSA (Rivest–Shamir–Adleman), ECC (Elliptic Curve Cryptography), and Post-
quantum cryptography. Secure symmetric algorithms include the commonly used AES
(Advanced Encryption Standard) which replaced the older DES (Data Encryption
Standard).[15] Insecure symmetric algorithms include children’s language tangling
schemes such as Pig Latin or other cant, and all historical cryptographic schemes,
however seriously intended, prior to the invention of the one-time pad early in the 20th
century.
In colloquial use, the term “code” is often used to mean any method of encryption or
concealment of meaning. However, in cryptography, code has a more specific meaning:
the replacement of a unit of plaintext (i.e., a meaningful word or phrase) with a code word
(for example, “wallaby” replaces “attack at dawn”). A cypher, in contrast, is a scheme for
changing or substituting an element below such a level (a letter, a syllable, or a pair of
letters, etc.) to produce a cyphertext.
Cryptanalysis is the term used for the study of methods for obtaining the meaning of
encrypted information without access to the key normally required to do so; i.e., it is the
study of how to “crack” encryption algorithms or their implementations.
Some use the terms “cryptography” and “cryptology” interchangeably in English,[16] while
others (including US military practice generally) use “cryptography” to refer specifically to
the use and practice of cryptographic techniques and “cryptology” to refer to the combined
study of cryptography and cryptanalysis.[17][18] English is more flexible than several other
languages in which “cryptology” (done by cryptologists) is always used in the second sense
above. RFC 2828 advises that steganography is sometimes included in cryptology.[19]
History
• Main article: History of cryptography
Before the modern era, cryptography focused on message confidentiality (i.e.,
encryption)—conversion of messages from a comprehensible form into an
incomprehensible one and back again at the other end, rendering it unreadable by
interceptors or eavesdroppers without secret knowledge (namely the key needed for
decryption of that message). Encryption attempted to ensure secrecy in communications,
such as those of spies, military leaders, and diplomats. In recent decades, the field has
expanded beyond confidentiality concerns to include techniques for message integrity
checking, sender/receiver identity authentication, digital signatures, interactive proofs and
secure computation, among others.
Classic cryptography
Skytala stick with strip of paper wound around in spiral
The Greeks of Classical times are said to have known of ciphers (e.g., the scytale
transposition cipher claimed to have been used by the Spartan military).[23]
Steganography (i.e., hiding even the existence of a message so as to keep it confidential)
was also first developed in ancient times. An early example, from Herodotus, was a
message tattooed on a slave’s shaved head and concealed under the regrown hair.[13]
Other steganography methods involve ‘hiding in plain sight,’ such as using a music cipher to
disguise an encrypted message within a regular piece of sheet music. More modern
examples of steganography include the use of invisible ink, microdots, and digital
watermarks to conceal information.
In Sassanid Persia, there were two secret scripts, according to the Muslim author Ibn al-
Nadim: the šāh-dabīrīya (literally “King’s script”) which was used for official
correspondence, and the rāz-saharīya which was used to communicate secret messages
with other countries.[24]
David Kahn notes in The Codebreakers that modern cryptology originated among the
Arabs, the first people to systematically document cryptanalytic methods.[25] Al-Khalil
(717–786) wrote the Book of Cryptographic Messages, which contains the first use of
permutations and combinations to list all possible Arabic words with and without
vowels.[26]
Book sized metal machine with large dial left page and nineteen small dials right page
16th-century book-shaped French cipher machine, with arms of Henri II of France
Manuscript from Gabriel de Luetz d’Aramon in bound volume
Enciphered letter from Gabriel de Luetz d’Aramon, French Ambassador to the Ottoman
Empire, after 1546, with partial decipherment
Language letter frequencies may offer little help for some extended historical encryption
techniques such as homophonic cipher that tend to flatten the frequency distribution. For
those ciphers, language letter group (or n-gram) frequencies may provide an attack.
Essentially all ciphers remained vulnerable to cryptanalysis using the frequency analysis
technique until the development of the polyalphabetic cipher, most clearly by Leon
Battista Alberti around the year 1467, though there is some indication that it was already
known to Al-Kindi.[28] Alberti’s innovation was to use different ciphers (i.e., substitution
alphabets) for various parts of a message (perhaps for each successive plaintext letter at
the limit). He also invented what was probably the first automatic cipher device, a wheel
that implemented a partial realization of his invention. In the Vigenère cipher, a
polyalphabetic cipher, encryption uses a key word, which controls letter substitution
depending on which letter of the key word is used. In the mid-19th century Charles Babbage
showed that the Vigenère cipher was vulnerable to Kasiski examination, but this was first
published about ten years later by Friedrich Kasiski.[29]
Although frequency analysis can be a powerful and general technique against many
ciphers, encryption has still often been effective in practice, as many a would-be
cryptanalyst was unaware of the technique. Breaking a message without using frequency
analysis essentially required knowledge of the cipher used and perhaps of the key involved,
thus making espionage, bribery, burglary, defection, etc., more attractive approaches to the
cryptanalytically uninformed. It was finally explicitly recognized in the 19th century that
secrecy of a cipher’s algorithm is not a sensible nor practical safeguard of message
security; in fact, it was further realized that any adequate cryptographic scheme (including
ciphers) should remain secure even if the adversary fully understands the cipher algorithm
itself. Security of the key used should alone be sufficient for a good cipher to maintain
confidentiality under an attack. This fundamental principle was first explicitly stated in
1883 by Auguste Kerckhoffs and is generally called Kerckhoffs’s Principle; alternatively and
more bluntly, it was restated by Claude Shannon, the inventor of information theory and the
fundamentals of theoretical cryptography, as Shannon’s Maxim—‘the enemy knows the
system’.
Different physical devices and aids have been used to assist with ciphers. One of the
earliest may have been the scytale of ancient Greece, a rod supposedly used by the
Spartans as an aid for a transposition cipher. In medieval times, other aids were invented
such as the cipher grille, which was also used for a kind of steganography. With the
invention of polyalphabetic ciphers came more sophisticated aids such as Alberti’s own
cipher disk, Johannes Trithemius’ tabula recta scheme, and Thomas Jefferson’s wheel
cypher (not publicly known, and reinvented independently by Bazeries around 1900). Many
mechanical encryption/decryption devices were invented early in the 20 th century, and
several patented, among them rotor machines—famously including the Enigma machine
used by the German government and military from the late 1920s and during World War
II.[30] The ciphers implemented by better quality examples of these machine designs
brought about a substantial increase in cryptanalytic difficulty after WWI.[31]
Extensive open academic research into cryptography is relatively recent, beginning in the
mid-1970s. In the early 1970s IBM personnel designed the Data Encryption Standard (DES)
algorithm that became the first federal government cryptography standard in the United
States.[32] In 1976 Whitfield Diffie and Martin Hellman published the Diffie–Hellman key
exchange algorithm.[33] In 1977 the RSA algorithm was published in Martin Gardner’s
Scientific American column.[34] Since then, cryptography has become a widely used tool
in communications, computer networks, and computer security generally.
Some modern cryptographic techniques can only keep their keys secret if certain
mathematical problems are intractable, such as the integer factorization or the discrete
logarithm problems, so there are deep connections with abstract mathematics. There are
very few cryptosystems that are proven to be unconditionally secure. The one-time pad is
one, and was proven to be so by Claude Shannon. There are a few important algorithms
that have been proven secure under certain assumptions. For example, the infeasibility of
factoring extremely large integers is the basis for believing that RSA is secure, and some
other systems, but even so, proof of unbreakability is unavailable since the underlying
mathematical problem remains open. In practice, these are widely used, and are believed
unbreakable in practice by most competent observers. There are systems similar to RSA,
such as one by Michael O. Rabin that are provably secure provided factoring n = pq is
impossible; it is quite unusable in practice. The discrete logarithm problem is the basis for
believing some other cryptosystems are secure, and again, there are related, less practical
systems that are provably secure relative to the solvability or insolvability discrete log
problem.[35]
Modern cryptography
Prior to the early 20th century, cryptography was mainly concerned with linguistic and
lexicographic patterns. Since then cryptography has broadened in scope,
has thus supplanted linguistic cryptography, both for cipher design and cryptanalysis.
Many computer ciphers can be characterized by their operation on binary bit sequences
(sometimes in groups or blocks), unlike classical and mechanical schemes, which
generally manipulate traditional characters (i.e., letters and digits) directly. However,
computers have also assisted cryptanalysis, which has compensated to some extent for
increased cipher complexity. Nonetheless, good modern ciphers have stayed ahead of
cryptanalysis; it is typically the case that use of a quality cipher is very efficient (i.e., fast
and requiring few resources, such as memory or CPU capability), while breaking it requires
an effort many orders of magnitude larger, and vastly larger than that required for any
classical cipher, making cryptanalysis so inefficient and impractical as to be effectively
impossible.
Symmetric-key cryptography
Symmetric-key encryption: the same key is used for both encryption and decryption
Types
Symmetric-key encryption can use either stream ciphers or block ciphers.[8]
Stream ciphers encrypt the digits (typically bytes), or letters (in substitution ciphers) of a
message one at a time. An example is ChaCha20. Substitution ciphers are well-known
ciphers, but can be easily decrypted using a frequency table.[9]
Block ciphers take a number of bits and encrypt them in a single unit, padding the plaintext
to achieve a multiple of the block size. The Advanced Encryption Standard (AES) algorithm,
approved by NIST in December 2001, uses 128-bit blocks.
Implementations
Examples of popular symmetric-key algorithms include Twofish, Serpent, AES (Rijndael),
Camellia, Salsa20, ChaCha20, Blowfish, CAST5, Kuznyechik, RC4, DES, 3DES, Skipjack,
Safer, and IDEA.[10]
Encrypting a message does not guarantee that it will remain unchanged while encrypted.
Hence, often a message authentication code is added to a ciphertext to ensure that
changes to the ciphertext will be noted by the receiver. Message authentication codes can
be constructed from an AEAD cipher (e.g. AES-GCM).
However, symmetric ciphers cannot be used for non-repudiation purposes except by
involving additional parties.[11] See the ISO/IEC 13888-2 standard.
Another application is to build hash functions from block ciphers. See one-way
compression function for descriptions of several such methods.
Key management
Main article: Key Management Interoperability Protocol
Key establishment
Main article: key establishment
Symmetric-key algorithms require both the sender and the recipient of a message to have
the same secret key. All early cryptographic systems required either the sender or the
recipient to somehow receive a copy of that secret key over a physically secure channel.
Nearly all modern cryptographic systems still use symmetric-key algorithms internally to
encrypt the bulk of the messages, but they eliminate the need for a physically secure
Key generation
• Main article: key generation
When used with asymmetric ciphers for key transfer, pseudorandom key generators are
nearly always used to generate the symmetric cipher session keys. However, lack of
randomness in those generators or in their initialization vectors is disastrous and has led to
cryptanalytic breaks in the past. Therefore, it is essential that an implementation use a
source of high entropy for its initialization.[18][19][20]
Reciprocal cipher
This section needs additional citations for verification. (December 2015)
A reciprocal cipher is a cipher where, just as one enters the plaintext into the cryptography
system to get the ciphertext, one could enter the ciphertext into the same place in the
system to get the plaintext. A reciprocal cipher is also sometimes referred as self-
reciprocal cipher.[21][22]
The Data Encryption Standard (DES) and the Advanced Encryption Standard (AES) are
block cipher designs that have been designated cryptography standards by the US
government (though DES’s designation was finally withdrawn after the AES was
adopted).[38] Despite its deprecation as an official standard, DES (especially its still-
approved and much more secure triple-DES variant) remains quite popular; it is used
across a wide range of applications, from ATM encryption[39] to e-mail privacy[40] and
secure remote access.[41] Many other block ciphers have been designed and released,
with considerable variation in quality. Many, even some designed by capable practitioners,
have been thoroughly broken, such as FEAL.[5][42]
Stream ciphers, in contrast to the ‘block’ type, create an arbitrarily long stream of key
material, which is combined with the plaintext bit-by-bit or character-by-character,
somewhat like the one-time pad. In a stream cipher, the output stream is created based on
a hidden internal state that changes as the cipher operates. That internal state is initially
set up using the secret key material. RC4 is a widely used stream cipher.[5] Block ciphers
can be used as stream ciphers by generating blocks of a keystream (in place of a
Pseudorandom number generator) and applying an XOR operation to each bit of the
plaintext with each bit of the keystream.[43]
Message authentication codes (MACs) are much like cryptographic hash functions,
except that a secret key can be used to authenticate the hash value upon receipt;[5][44]
this additional complication blocks an attack scheme against bare digest algorithms, and
so has been thought worth the effort. Cryptographic hash functions are a third type of
cryptographic algorithm. They take a message of any length as input, and output a short,
fixed-length hash, which can be used in (for example) a digital signature. For good hash
functions, an attacker cannot find two messages that produce the same hash. MD4 is a
long-used hash function that is now broken; MD5, a strengthened variant of MD4, is also
widely used but broken in practice. The US National Security Agency developed the Secure
Hash Algorithm series of MD5-like hash functions: SHA-0 was a flawed algorithm that the
agency withdrew; SHA-1 is widely deployed and more secure than MD5, but
Cryptanalysts have identified attacks against it; the SHA-2 family improves on SHA-1, but is
vulnerable to clashes as of 2011; and the US standards authority thought it “prudent” from
a security perspective to develop a new standard to “significantly improve the robustness
of NIST’s overall hash algorithm toolkit.”[45] Thus, a hash function design competition was
meant to select a new U.S. national standard, to be called SHA-3, by 2012. The competition
ended on October 2, 2012, when the NIST announced that Keccak would be the new SHA-3
hash algorithm.[46] Unlike block and stream ciphers that are invertible, cryptographic hash
functions produce a hashed output that cannot be used to retrieve the original input data.
Cryptographic hash functions are used to verify the authenticity of data retrieved from an
untrusted source or to add a layer of security
Public-key cryptography
In a groundbreaking 1976 paper, Whitfield Diffie and Martin Hellman proposed the notion of
public-key (also, more generally, called asymmetric key) cryptography in which two
different but mathematically related keys are used—a public key and a private key.[47] A
public key system is so constructed that calculation of one key (the ‘private key’) is
computationally infeasible from the other (the ‘public key’), even though they are
necessarily related. Instead, both keys are generated secretly, as an interrelated pair.[48]
The historian ”avid Kahn described public-key cryptography as “the most revolutionary new
concept in the field since polyalphabetic substitution emerged in the Renaissance”.[49]
In public-key cryptosystems, the public key may be freely distributed, while its paired
private key must remain secret. In a public-key encryption system, the public key is used
for encryption, while the private or secret key is used for decryption. While Diffie and
Hellman could not find such a system, they showed that public-key cryptography was
indeed possible by presenting the Diffie–Hellman key exchange protocol, a solution that is
now widely used in secure communications to allow two parties to secretly agree on a
shared encryption key.[33] The X.509 standard defines the most commonly used format for
public key certificates.[50]
Diffie and Hellman’s publication sparked widespread academic efforts in finding a
practical public-key encryption system. This race was finally won in 1978 by Ronald Rivest,
Adi Shamir, and Len Adleman, whose solution has since become known as the RSA
algorithm.[51]
The Diffie–Hellman and RSA algorithms, in addition to being the first publicly known
examples of high-quality public-key algorithms, have been among the most widely used.
Other asymmetric-key algorithms include the Cramer–Shoup cryptosystem, ElGamal
encryption, and various elliptic curve techniques.
Document published in 1997 by the Government Communications Headquarters (GCHQ),
a British intelligence organization, revealed that cryptographers at GCHQ had anticipated
several academic developments.[52] Reportedly, around 1970, James H. Ellis had
conceived the principles of asymmetric key cryptography. In 1973, Clifford Cocks invented
a solution that was very similar in design rationale to RSA.[52][53] In 1974, Malcolm J.
Williamson is claimed to have developed the Diffie–Hellman key exchange.[54]
In this example the message is only signed and not encrypted. 1) Alice signs a message
with her private key. 2) Bob can verify that Alice sent the message and that the message has
not been modified.
Public-key cryptography is also used for implementing digital signature schemes. A digital
signature is reminiscent of an ordinary signature; they both have the characteristic of being
easy for a user to produce, but difficult for anyone else to forge. Digital signatures can also
be permanently tied to the content of the message being signed; they cannot then be
‘moved’ from one document to another, for any attempt will be detectable. In digital
signature schemes, there are two algorithms: one for signing, in which a secret key is used
to process the message (or a hash of the message, or both), and one for verification, in
which the matching public key is used with the message to check the validity of the
signature. RSA and DSA are two of the most popular digital signature schemes. Digital
signatures are central to the operation of public key infrastructures and many network
security schemes (e.g., SSL/TLS, many VPNs, etc.).[42]
Public-key algorithms are most often based on the computational complexity of “hard”
problems, often from number theory. For example, the hardness of RSA is related to the
integer factorization problem, while Diffie–Hellman and DSA are related to the discrete
logarithm problem. The security of elliptic curve cryptography is based on number
theoretic problems involving elliptic curves. Because of the difficulty of the underlying
problems, most public-key algorithms involve operations such as modular multiplication
and exponentiation, which are much more computationally expensive than the techniques
used in most block ciphers, especially with typical key sizes. As a result, public-key
cryptosystems are commonly hybrid cryptosystems, in which a fast high-quality
symmetric-key encryption algorithm is used for the message itself, while the relevant
symmetric key is sent with the message, but encrypted using a public-key algorithm.
Similarly, hybrid signature schemes are often used, in which a cryptographic hash function
is computed, and only the resulting hash Is digitally signed.[5]
Security Agency developed the Secure Hash Algorithm series of MD5-like hash functions:
SHA-0 was a flawed algorithm that the agency withdrew; SHA-1 is widely deployed and
more secure than MD5, but cryptanalysts have identified attacks against it; the SHA-2
family improves on SHA-1, but is vulnerable to clashes as of 2011; and the US standards
authority thought it “prudent” from a security perspective to develop a new standard to
“significantly improve the robustness of NIST’s overall hash algorithm toolkit.”[45] Thus, a
hash function design competition was meant to select a new U.S. national standard, to be
called SHA-3, by 2012. The competition ended on October 2, 2012, when the NIST
announced that Keccak would be the new SHA-3 hash algorithm.[46] Unlike block and
stream ciphers that are invertible, cryptographic hash functions produce a hashed output
that cannot be used to retrieve the original input data. Cryptographic hash functions are
used to verify the authenticity of data retrieved from an untrusted source or to add a layer
of security.
Cryptanalysis
• Main article: Cryptanalysis
Enigma machine typewriter keypad over many rotors in a wood box
Variants of the Enigma machine, used by Germany’s military and civil authorities from the
late 1920s through World War II, implemented a complex electro-mechanical
polyalphabetic cipher. Breaking and reading of the Enigma cipher at Poland’s Cipher
Bureau, for 7 years before the war, and subsequent decryption at Bletchley Park, was
important to Allied victory.[13]
The goal of cryptanalysis is to find some weakness or insecurity in a cryptographic scheme,
thus permitting its subversion or evasion.
There are a wide variety of cryptanalytic attacks, and they can be classified in any of several
ways. A common distinction turns on what Eve (an attacker) knows and what capabilities
are available. In a ciphertext-only attack, Eve has access only to the ciphertext (good
modern cryptosystems are usually effectively immune to ciphertext-only attacks). In a
known-plaintext attack, Eve has access to a ciphertext and its corresponding plaintext (or
to many such pairs). In a chosen-plaintext attack, Eve may choose a plaintext and learn its
corresponding ciphertext (perhaps many times); an example is gardening, used by the
British during WWII. In a chosen-ciphertext attack, Eve may be able to choose ciphertexts
and learn their corresponding plaintexts.[5] Finally in a man-in-the-middle attack Eve gets
in between Alice (the sender) and Bob (the recipient), accesses and modifies the traffic and
then forward it to the recipient.[56] Also important, often overwhelmingly so, are mistakes
(generally in the design or use of one of the protocols involved).
Cryptanalysis of symmetric-key ciphers typically involves looking for attacks against the
block ciphers or stream ciphers that are more efficient than any attack that could be
against a perfect cipher. For example, a simple brute force attack against DES requires one
known plaintext and 255 decryptions, trying approximately half of the possible keys, to
reach a point at which chances are better than even that the key sought will have been
found. But this may not be enough assurance; a linear cryptanalysis attack against DES
requires 243 known plaintexts (with their corresponding ciphertexts) and approximately
243 DES operations.[57] This is a considerable improvement over brute force attacks.
Public-key algorithms are based on the computational difficulty of various problems. The
most famous of these are the difficulty of integer factorization of semiprimes and the
difficulty of calculating discrete logarithms, both of which are not yet proven to be solvable
in polynomial time (P) using only a classical Turing-complete computer. Much public-key
cryptanalysis concerns designing algorithms in P that can solve these problems, or using
other technologies, such as quantum computers. For instance, the best-known algorithms
for solving the elliptic curve-based version of discrete logarithm are much more time-
consuming than the best-known algorithms for factoring, at least for problems of more or
less equivalent size. Thus, to achieve an equivalent strength of encryption, techniques that
depend upon the difficulty of factoring large composite numbers, such as the RSA
cryptosystem, require larger keys than elliptic curve techniques. For this reason, public-key
cryptosystems based on elliptic curves have become popular since their invention in the
mid-1990s.
While pure cryptanalysis uses weaknesses in the algorithms themselves, other attacks on
cryptosystems are based on actual use of the algorithms in real devices, and are called
side-channel attacks. If a cryptanalyst has access to, for example, the amount of time the
device took to encrypt a number of plaintexts or report an error in a password or PIN
character, they may be able to use a timing attack to break a cipher that is otherwise
resistant to analysis. An attacker might also study the pattern and length of messages to
derive valuable information; this is known as traffic analysis[58] and can be quite useful to
an alert adversary. Poor administration of a cryptosystem, such as permitting too short
keys, will make any system vulnerable, regardless of other virtues. Social engineering and
other attacks against humans (e.g., bribery, extortion, blackmail, espionage, rubber-hose
cryptanalysis or torture) are usually employed due to being more cost-effective and
feasible to perform in a reasonable amount of time compared to pure cryptanalysis by a
high margin.
Cryptographic primitives
Much of the theoretical work in cryptography concerns cryptographic primitives—
algorithms with basic cryptographic properties—and their relationship to other
cryptographic problems. More complicated cryptographic tools are then built from these
basic primitives. These primitives provide fundamental properties, which are used to
develop more complex tools called cryptosystems or cryptographic protocols, which
guarantee one or more high-level security properties. Note, however, that the distinction
between cryptographic primitives and cryptosystems, is quite arbitrary; for example, the
RSA algorithm is sometimes considered a cryptosystem, and sometimes a primitive.
Typical examples of cryptographic primitives include pseudorandom functions, one-way
functions, etc.
Cryptosystems
• Main article: List of cryptosystems
One or more cryptographic primitives are often used to develop a more complex algorithm,
called a cryptographic system, or cryptosystem. Cryptosystems (e.g., El-Gamal encryption)
are designed to provide particular functionality (e.g., public key encryption) while
guaranteeing certain security properties (e.g., chosen-plaintext attack (CPA) security in the
random oracle model). Cryptosystems use the properties of the underlying cryptographic
primitives to support the system’s security properties. As the distinction between
primitives and cryptosystems is somewhat arbitrary, a sophisticated cryptosystem can be
derived from a combination of several more primitive cryptosystems. In many cases, the
cryptosystem’s structure involves back and forth communication among two or more
parties in space (e.g., between the sender of a secure message and its receiver) or across
time (e.g., cryptographically protected backup data). Such cryptosystems are sometimes
called cryptographic protocols.
Some widely known cryptosystems include RSA, Schnorr signature, ElGamal encryption,
and Pretty Good Privacy (PGP). More complex cryptosystems include electronic cash[59]
systems, signcryption systems, etc. Some more ‘theoretical’[clarification needed]
cryptosystems include interactive proof systems,[60] (like zero-knowledge proofs)[61] and
systems for secret sharing.[62][63
Lightweight cryptography
Lightweight cryptography (LWC) concerns cryptographic algorithms developed for a strictly
constrained environment. The growth of Internet of Things (IoT) has spiked research into the
development of lightweight algorithms that are better suited for the environment. An IoT
environment requires strict constraints on power consumption, processing power, and
security.[64] Algorithms such as PRESENT, AES, and SPECK are examples of the many LWC
algorithms that have been developed to achieve the standard set by the National Institute
of Standards and Technology.[
Applications
This section needs expansion. You can help by adding to it. (December 2021)
Main category: Applications of cryptography
Cryptography is widely used on the internet to help protect user-data and prevent
eavesdropping. To ensure secrecy during transmission, many systems use private key
cryptography to protect transmitted information. With public-key systems, one can
maintain secrecy without a master key or a large number of keys.[66] But, some algorithms
like BitLocker and VeraCrypt are generally not private-public key cryptography. For
example, Veracrypt uses a password hash to generate the single private key. However, it
can be configured to run in public-private key systems. The C++ opensource encryption
library OpenSSL provides free and opensource encryption software and tools. The most
commonly used encryption cipher suit is AES,[67] as it has hardware acceleration for all
x86 based processors that has AES-NI. A close contender is ChaCha20-Poly1305, which is
a stream cipher, however it is commonly used for mobile devices as they are ARM based
which does not feature AES-NI instruction set extension.
Cybersecurity
Cryptography can be used to secure communications by encrypting them. Websites use
encryption via HTTPS.[68] “End-to-end” encryption, where only sender and receiver can
read messages, is implemented for email in Pretty Good Privacy and for secure messaging
in general in WhatsApp, Signal and Telegram.[68]
Operating systems use encryption to keep passwords secret, conceal parts of the system,
and ensure that software updates are truly from the system maker.[68] Instead of storing
plaintext passwords, computer systems store hashes thereof; then, when a user logs in,
the system passes the given password through a cryptographic hash function and
compares it to the hashed value on file. In this manner, neither the system nor an attacker
has at any point access to the password in plaintext.[68]
Encryption is sometimes used to encrypt one’s entire drive. For example, University College
London has implemented BitLocker (a program by Microsoft) to render drive data opaque
without users logging in.[68]
Cryptocurrencies and cryptoeconomics
Cryptographic techniques enable cryptocurrency technologies, such as distributed ledger
technologies (e.g., blockchains), which finance cryptoeconomics applications such as
decentralized finance (DeFi). Key cryptographic techniques that enable cryptocurrencies
and cryptoeconomics include, but are not limited to: cryptographic keys, cryptographic
hash function, asymmetric (public key) encryption, Multi-Factor Authentication (MFA), End-
to-End Encryption (E2EE), and Zero Knowledge Proofs (ZKP).
Legal issues
• See also: Cryptography laws in different nations
Prohibitions
Cryptography has long been of interest to intelligence gathering and law enforcement
agencies.[9] Secret communications may be criminal or even treasonous.[citation needed]
Because of its facilitation of privacy, and the diminution of privacy attendant on its
prohibition, cryptography is also of considerable interest to civil rights supporters.
Accordingly, there has been a history of controversial legal issues surrounding
cryptography, especially since the advent of inexpensive computers has made widespread
access to high-quality cryptography possible.
In some countries, even the domestic use of cryptography is, or has been, restricted. Until
1999, France significantly restricted the use of cryptography domestically, though it has
since relaxed many of these rules. In China and Iran, a license is still required to use
cryptography.[7] Many countries have tight restrictions on the use of cryptography. Among
the more restrictive are laws in Belarus, Kazakhstan, Mongolia, Pakistan, Singapore,
Tunisia, and Vietnam.[69]
In the United States, cryptography is legal for domestic use, but there has been much
conflict over legal issues related to cryptography.[9] One particularly important issue has
been the export of cryptography and cryptographic software and hardware. Probably
because of the importance of cryptanalysis in World War II and an expectation that
cryptography would continue to be important for national security, many Western
governments have, at some point, strictly regulated export of cryptography. After World War
II, it was illegal in the US to sell or distribute encryption technology overseas; in fact,
encryption was designated as auxiliary military equipment and put on the United States
Munitions List.[70] Until the development of the personal computer, asymmetric key
algorithms (i.e., public key techniques), and the Internet, this was not especially
problematic. However, as the Internet grew and computers became more widely available,
high-quality encryption techniques became well known around the globe.
Export controls
Main article: Export of cryptography
In the 1990s, there were several challenges to US export regulation of cryptography. After
the source code for Philip Zimmermann’s Pretty Good Privacy (PGP) encryption program
found its way onto the Internet in June 1991, a complaint by RSA Security (then called RSA
Data Security, Inc.) resulted in a lengthy criminal investigation of Zimmermann by the US
Customs Service and the FBI, though no charges were ever filed.[71][72] Daniel J.
Bernstein, then a graduate student at UC Berkeley, brought a lawsuit against the US
government challenging some aspects of the restrictions based on free speech grounds.
The 1995 case Bernstein v. United States ultimately resulted in a 1999 decision that printed
source code for cryptographic algorithms and systems was protected as free speech by the
United States Constitution.[73]
In 1996, thirty-nine countries signed the Wassenaar Arrangement, an arms control treaty
that deals with the export of arms and “dual-use” technologies such as cryptography. The
treaty stipulated that the use of cryptography with short key-lengths (56-bit for symmetric
encryption, 512-bit for RSA) would no longer be export-controlled.[74] Cryptography
exports from the US became less strictly regulated as a consequence of a major relaxation
in 2000;[75] there are no longer very many restrictions on key sizes in US-exported mass-
market software. Since this relaxation in US export restrictions, and because most
personal computers connected to the Internet include US-sourced web browsers such as
Firefox or Internet Explorer, almost every Internet user worldwide has potential access to
quality cryptography via their browsers (e.g., via Transport Layer Security). The Mozilla
Thunderbird and Microsoft Outlook E-mail client programs similarly can transmit and
receive emails via TLS, and can send and receive email encrypted with S/MIME. Many
Internet users do not realize that their basic application software contains such extensive
cryptosystems. These browsers and email programs are so ubiquitous that even
governments whose intent is to regulate civilian use of cryptography generally do not find it
practical to do much to control distribution or use of cryptography of this quality, so even
when such laws are in force, actual enforcement is often effectively impossible.[citation
needed]
NSA involvement
Another instance of the NSA’s involvement was the 1993 Clipper chip affair, an encryption
microchip intended to be part of the Capstone cryptography-control initiative. Clipper was
widely criticized by cryptographers for two reasons. The cipher algorithm (called Skipjack)
was then classified (declassified in 1998, long after the Clipper initiative lapsed). The
classified cipher caused concerns that the NSA had deliberately made the cipher weak to
assist its intelligence efforts. The whole initiative was also criticized based on its violation
of Kerckhoffs’s Principle, as the scheme included a special escrow key held by the
government for use by law enforcement (i.e. wiretapping).[72]
Digital rights management
Main article: Digital rights management
Cryptography is central to digital rights management (DRM), a group of techniques for
technologically controlling use of copyrighted material, being widely implemented and
deployed at the behest of some copyright holders. In 1998, U.S. President Bill Clinton
signed the Digital Millennium Copyright Act (DMCA), which criminalized all production,
dissemination, and use of certain cryptanalytic techniques and technology (now known or
later discovered); specifically, those that could be used to circumvent DRM technological
schemes.[79] This had a noticeable impact on the cryptography research community since
an argument can be made that any cryptanalytic research violated the DMCA. Similar
statutes have since been enacted in several countries and regions, including the
implementation in the EU Copyright Directive. Similar restrictions are called for by treaties
signed by World Intellectual Property Organization member-states.
The United States Department of Ju”tice’and FBI have not enforced the DMCA as rigorously
as had been feared by some, but the law, nonetheless, remains a controversial one. Niels
Ferguson, a well-respected cryptography researcher, has publicly stated that he will not
release some of his research into an Intel security design for fear of prosecution under the
DMCA.[80] Cryptologist Bruce Schneier has argued that the DMCA encourages vendor
lock-in, while inhibiting actual measures toward cyber-security.[81] Both Alan Cox
(longtime Linux kernel developer) and Edward Felten (and some of his students at
Princeton) have encountered problems related to the Act. Dmitry Sklyarov was arrested
during a visit to the US from Russia, and jailed for five months pending trial for alleged
violations of the DMCA arising from work he had done in Russia, where the work was legal.
In 2007, the cryptographic keys responsible for Blu-ray and HD DVD content scrambling
were discovered and released onto the Internet. In both cases, the Motion Picture
Association of America sent out numerous DMCA takedown notices, and there was a
massive Internet backlash[10] triggered by the perceived impact of such notices on fair use
and free speech.
Forced disclosure of encryption keys
• Main article: Key disclosure law
In the United Kingdom, the Regulation of Investigatory Powers Act gives UK police the
powers to force suspects to decrypt files or hand over passwords that protect encryption
keys. Failure to comply is an offense in its own right, punishable on conviction by a two-
year jail sentence or up to five years in cases involving national security.[8] Successful
prosecutions have occurred under the Act; the first, in 2009,[82] resulted in a term of 13
months’ imprisonment.[83] Similar forced disclosure laws in Australia, Finland, France,
and India compel individual suspects under investigation to hand over encryption keys or
passwords during a criminal investigation.
In the United States, the federal criminal case of United States v. Fricosu addressed
whether a search warrant can compel a person to reveal an encryption passphrase or
password.[84] The Electronic Frontier Foundation (EFF) argued that this is a violation of the
protection from self-incrimination given by the Fifth Amendment.[85] In 2012, the court
ruled that under the All Writs Act, the defendant was required to produce an unencrypted
hard drive for the court.[86]
The 2016 FBI–Apple encryption dispute concerns the ability of courts in the United States
to compel manufacturers’ assistance in unlocking cell phones whose contents are
cryptographically protected.
What is cryptography?
Table of Contents
• What is the difference between symmetric and asymmetric cryptography?
• What problems does cryptography solve?
• What are the principles?
• What to read next
Definition
Cryptography provides for secure communication in the presence of malicious third-
parties—known as adversaries. Encryption uses an algorithm and a key to transform an
input (i.e., plaintext) into an encrypted output (i.e., ciphertext). A given algorithm will always
transform the same plaintext into the same ciphertext if the same key is used. Algorithms
are considered secure if an attacker cannot determine any properties of the plaintext or
key, given the ciphertext. An attacker should not be able to determine anything about a key
given a large number of plaintext/ciphertext combinations which used the key.
With asymmetric crypto, two different keys are used for encryption and decryption. Every
user in an asymmetric cryptosystem has both a public key and a private key. The private key
is kept secret at all times, but the public key may be freely distributed.
Data encrypted with a public key may only be decrypted with the corresponding private key.
So, sending a message to John requires encrypting that message with John’s public key.
Only John can decrypt the message, as only John has his private key. Any data encrypted
with a private key can only be decrypted with the corresponding public key. Similarly, Jane
could digitally sign a message with her private key, and anyone with Jane’s public key could
decrypt the signed message and verify that it was in fact Jane who sent it.
Symmetric is generally very fast and ideal for encrypting large amounts of data (e.g., an
entire disk partition or database). Asymmetric is much slower and can only encrypt pieces
of data that are smaller than the key size (typically 2048 bits or smaller). Thus, asymmetric
crypto is generally used to encrypt symmetric encryption keys which are then used to
encrypt much larger blocks of data. For digital signatures, asymmetric crypto is generally
used to encrypt the hashes of messages rather than entire messages.
Understand the internal and external security risks your AppSec program needs to address.
Software systems often have multiple endpoints, typically multiple clients, and one or
more back-end servers. These client/server communications take place over networks that
cannot be trusted. Communication occurs over open, public networks such as the
Internet, or private networks which may be compromised by external attackers or
malicious insiders.
It can protect communications that traverse untrusted networks. There are two main types
of attacks that an adversary may attempt to carry out on a network. Passive attacks involve
an attacker simply listening on a network segment and attempting to read sensitive
information as it travels. Passive attacks may be online (in which an attacker reads traffic in
real-time) or offline (in which an attacker simply captures traffic in real-time and views it
later—perhaps after spending some time decrypting it). Active attacks involve an attacker
impersonating a client or server, intercepting communications in transit, and viewing
and/or modifying the contents before passing them on to their intended destination (or
dropping them entirely).
It can also be used to protect data at rest. ”ata on a removable disk or in a database can be
encrypted to prevent disclosure of sensitive data should the physical media be lost or
stolen. In addition, it can also provide integrity protection of data at rest to detect malicious
tampering.
them. In order for a cryptosystem to be deemed “secure,” it must face intense scrutiny from
the security community. Never rely on security through obscurity, or the fact that attackers
may not have knowledge of your system. Remember that malicious insiders and
determined attackers will attempt to attack your system.
The only things that should be “secret” when it comes to a secure cryptosystem are the
keys themselves. Be sure to take appropriate steps to protect any keys that your systems
use. Never store encryption keys in clear text along with the data that they protect. This is
akin to locking your front door and placing the key under the doormat. It is the first place an
attacker will look. Here are three common methods for protecting keys (from least secure
to most secure):
1. Store keys in a filesystem and protect them with strong access control lists (ACLs).
Remember to adhere to the principal of least privilege.
2. Encrypt your data encryption keys (DEKs) with a second key encrypting key (KEK).
The KEK should be generated using password-based encryption (PBE). A password
known to a minimal number of administrators can be used to generate a key using
an algorithm such as bcrypt, scrypt, or PBKDF2 and used to bootstrap the
cryptosystem. This removes the need to ever store the key unencrypted anywhere.
3. A hardware security module (HSM) Is a tamper-resistant hardware appliance that
can be used to store keys securely. Code can make API calls to an HSM to provide
keys when needed or to perform decryption of data on the HSM itself.
Make sure that you only use algorithms, key strengths, and modes of operation that
conform to industry best practices. Advanced encryption standard (AES) (with 128, 192, or
256-bit keys) is the standard for symmetric encryption. RSA and elliptical curve
cryptography (ECC) with at least 2048-bit keys are the standard for asymmetric encryption.
Be sure to avoid insecure modes of operation such as AES in Electronic Codebook (ECB)
mode or RSA with no padding.
• Blockchain interoperability
The concept of “blockchain interoperability” refers to the ability of different blockchain
networks to exchange and leverage data between one another and to move unique types of
digital assets between the networks’ respective blockchains.
Summary
The concept of “blockchain interoperability” refers to the ability of different blockchain networks to
exchange and leverage data between one another and to move unique types of digital assets between the
networks’ respective blockchains. In an interoperable system, once disparate blockchain networks and
assets can easily plug into and be combined with one another. This network interoperability may allow for
the creation of powerful new products and services that leverage the benefits of multiple blockchain
networks simultaneously.
Customizable Web3 services: The ability of blockchain protocols and applications to mix
and match different “lego pieces” is key to creating entirely new Web3 instruments and
platforms that aren’t possible with legacy industries and business models of the Web2
era. Many experts argue that interoperable smart contracts could supercharge industries
like healthcare, law, or real estate, for instance by allowing important business information
to be sent back and forth between private networks and public networks in a customizable
and controllable manner. Blockchain interoperability may also eventually enable multi-
token transactions and multi-token wallet systems, which would greatly streamline the
crypto user experience.
Sidechains: A type of Layer-2 platform, sidechains are separate blockchain networks that
are compatible with a single mainchain. Each sidechain has its own consensus
mechanism, security parameters, and tokens. These sidechains generally have their own
specific use cases that are distributed accordingly in order to improve the overall
ecosystem’s processing efficiency and self-sovereignty. Several major crypto projects
such as Polkadot and Cosmos were designed from the ground up to be comprehensive
cross-chain infrastructure solutions, with the ultimate goal being to establish an
interoperable “network of networks.”
Oracles: Within the context of blockchain technology, oracles bridge the information gap
between on-chain and off-chain environments. Decentralized oracle services like
Chainlink and API3 play a crucial role in feeding off-chain data to blockchain-enabled
smart contracts and contribute to blockchain interoperability by ensuring that different
ecosystems are referring to a common source of truth.
Bridges and swaps: Cross-chain bridges enable a digital asset owned by a party to be
locked on one chain while an identical asset is “minted” on another chain and sent to an
address owned by the original owner. In contrast, atomic swaps enable users to exchange
tokens from different blockchain networks in a decentralized manner. Both are
automatically enabled through the use of smart contracts and play a central role in
facilitating seamless cross-chain value transfers.
Amidst the proliferation of blockchain projects, one thing stands out. All
blockchains as well as ledgers and DAGs perform a different set of
transactions and handle different amounts of data processing. It is also
becoming increasingly clear that there are different networks and
blockchains designed for specific labor unions, religions, community
organizations as well as government departments.
The rapid development of blockchain Is set to give rise to many different kinds
of chains. One such technology that is becoming increasingly evident is
Cross Chain Technology.
The fact that the chains operate in isolation has mostly made it impossible for
people to enjoy the full benefits the ledger technology. The inability of
different blockchains to communicate with one another has made it
impossible for people to enjoy the full benefits of blockchain technology.
Cross chain, technology seeks to solve all these issues, by enabling
interoperability between blockchains thus making it easy for them to
communicate with one another and share information.
Interoperability is essentially the ability to see and access information across various
blockchain systems. For example, should a person send data to another blockchain,
the recipient should be able to read it, comprehend and react with little effort?
However, that is not possible, at the moment, as it is impossible to share information
between says Bitcoin and Ethereum blockchains.
Cross Chain, technology seeks to solve all this by enhancing interoperability between
blockchains. Emerging projects are slowly buying the idea as they attempt to come
up with platforms that can communicate with one another without the need of a
third party.
• Polkadot blockchain
Polkadot blockchain is a high-profile multi-chain technology taking
blockchain interoperability to another level. A brainchild of Gavid Wood, one
of the founders of Ethereum, Polkadot seeks to enhance the transfer of smart
contract data through various blockchains.
• Blocknet
Developers behind Blocknet are currently working on creating a decentralized
exchange all in the effort of enhancing interchange communication.
• Aion Online
Aion online is another high profile Blockchain interoperability project that
seeks to address unresolved questions around scalability and interoperability
in blockchain networks. Developers are planning to position Aion as the
standard protocol used by various blockchains. The end game is to enhance
the creation of efficient and decentralized systems.
▪ Cosmos Blockchain
Cosmos blockchain is the most underrated blockchain interoperability project. The
blockchain project is in the race to become the hub of many projects. The developers
have since released a software development kit that they say will address scalability
and interoperability issues in blockchain projects.
Cosmos blockchain architecture consists of several independent blockchains called
Zones, attached to a central blockchain dubbed as the Hub. Tendermint Core that
enables high-performance as well as consistent and secure PBFT-like consensus
engine, powers each Zone in this case.
The cosmos Hub connects blockchain projects to enhance interoperability via the
Inter-Blockchain communication protocol.
Because of the interconnection, people can send tokens from one zone to another
in real time and securely, without engaging the services of a third party. Cosmos
blockchain can connect different zones from public to private project thanks to the
IBC connection.
Interoperability is a big issue in the healthcare sector as studies show that 86% of
providers in the industry are not able to share critical health care information with
ease. While most vendors have implemented interoperability solutions, most of
them work exclusively within a given ecosystem. It is often expensive to come up with
a solution that would ensure the smooth transfer of healthcare data within the entire
sector.
Amidst the challenges that healthcare continues to face in the race to achieve
ubiquitous interoperability, blockchain is slowly emerging as the technology that
could help alleviate the pain points.
• Ownership of Data
Data control has always been a big issue in the healthcare sector. However, with
blockchain interoperability, healthcare players could soon be able to maintain
control over their data. The digital ledger technology boasts of one of the highest
levels of security that would reduce cases of unintended data sharing as well as fears
of incorrect modifications. Blockchain allows the implementation of immutable keys
with read/write access logs
Currently, only 35% to 40% of healthcare data is encrypted. However, with the use of
blockchain interoperability solutions, all data could come encrypted by default. A
standard of encryption by default is the ultimate solution that will help mitigate risks
stemming from data breaches.
Blockchain interoperability in the health care sector also has the potential to reduce
overhead and enhance efficiency. The use of smart contracts should go a long way
in eliminating the need for intermediaries. The result should be automatic processes
that act on relevant information across different players.
Vendors such as PakitDok as well as Change Healthcare and Gem have made
impressive strides in building out Blockchain interoperability solutions for the sector.
With Multi Chain Frameworks, blockchains can plug and become part of a
standardized ecosystem to be able to share information. It is for this reason
that most of the time they are called the Internet of blockchains as they offer
Cross chain, technology on its own has the potential to address scalability
issues that have crippled blockchain ecosystem for years. So, it’s a massive
boost for blockchain if it can finally pull of interoperability.
Top 10 Blockchain platforms include IBM Blockchain, Tron, Stellar, NEO,
Corda, Ethereum, MultiChain, EOS, Hyperledger Fabric, OpenChain,
Quorum, and NEM.
It is also essential as it improves chain efficiency, reduces segmentation, and allows the
users to communicate across multiple blockchains more freely. Therefore, cross-chain
technology holds immense potential in enabling blockchain interoperability that can solve
many issues and remove multiple constraints on blockchain and other networks.
How does cross-chain technology work?
Since no defined approach can be equally applied for all networks, it differs from network
to network. Every network uses a different system on blockchain interoperability to
enable transactions without applying third-party integrations. Here are some of the most
common and widely known approaches to isolated transactions across various chains –
Atomic Swaps
These are exchange facilitators that enable two different parties to trade their tokens on
multiple blockchains. This type of mechanism does not involve the requirement for a
centralized third party to facilitate the trades. Instead, it allows the user to directly trade
their tokens on a peer-to-peer basis. This mechanism either finalizes the entire processor
or does not initiate it in the first place. For instance, two parties can decide to keep a 1-hour
restriction for the atomic swap. In this case, the original owners will receive their deposited
tokens once the duration of 1 hour gets over even though not all the conditions are met.
Although it may not be easy for a new user, a professional blockchain developer would
find it easy to go with.
Relays
Relays enable blockchain networks to keep a check on the transactions and events taking
place on other chains. They work on a chain-to-chain basis without the involvement of
distributed nodes facilitating a single contract to act as a central client of other nodes on
multiple chains. In this way, it can verify the entire history of transactions and specific
central headers on demand. However, the relay approach requires a lot of expenditure to
operate and take care of the security of operation.
Apart from these two methods, there are various other approaches that cross-chain
technology follows to function. Merged consensus is one of the approaches that enable two-
way blockchain interoperability between several networks. On the other hand, a specific
group of verified parties also come together to check the events of the chains.
Cross-chain technology can help in such scenarios as it builds an ecosystem where the
transaction processes will concentrate on all networks equally. The focus will not be only
on a few major blockchain networks but on other networks as well. Hence, cross-chain
technology can create a fair scenario by facilitating a balanced approach to state how
crypto players participate in the marketplace.
How does cross-chain technology help achieve
blockchain interoperability?
Although cross-chain technology is immensely helpful in combating the existing challenges
on blockchain networks, how does it exactly help in achieving blockchain interoperability
as a whole?
As we know, the success of blockchain technology largely depends on the networks that
can be integrated into it. Interaction is also another indispensable factor that decides the
usability of blockchain networks. Due to this reason, it is essential to put a system in place
that can enable communication between different blockchains and facilitate the smooth
sharing of data. This is where the role of cross-chain technologies comes into place.
It attempts to solve the challenges involved by enhancing communication and
interoperability between blockchain networks. There are several emerging cross-chain
projects working on the same idea and acting as a platform enabling communication
between different blocks in networks without involving an intermediary or third party.
Various other platforms provide blockchain certification that any user can access upon
completing the assigned course.
As a concept that brings solutions to all these constraints and restrictions currently existing
on the blockchain, interoperability has a long way to go in getting rid of intermediaries and
third parties that are similar to centralized systems. As of now, there is no single wallet
system in place that can enable a user to store and transfer the tokens and share data
across various blockchains. Such a constraint becomes a huge issue in the long run as it
hinders the user from initiating the transfer of data and trading tokens with proper
security.
Because it enables the user to get the benefits of a decentralized network and communicate
with one another without any constant, cross-chain technology plays a key role in bringing
In addition to this, several classes of industries may doubt the benefits that cross-chain
technology offers concerning congestion and online attacks. It may lead to replication of
benefits that blockchain currently offers that include low cost, resistance to censorship, and
high security. Concerning these challenges, cross-chain technology will need to take these
use cases under consideration and facilitate a more efficient system for resource sharing
and data transfer. Also, if you are a business owner interested in learning about these
technologies, make sure to refer to the best blockchain training for your training.
Final Takeaway
Blockchain interoperability and crossing technologies are two indispensable aspects
of blockchain technology as a whole. Upon integrating the two concepts, we can discover
the widening scope of cryptocurrency and its world but also promote the concept of
blockchain adoption. The main reason why the importance of cross-chain technology is
stressed so much is that it has great potential to deal with the current challenges. From the
scalability issues to the dire need for transparency on blockchain networks, cross-chain
technology can bring in several solutions to address the underlying challenges in the
blockchain ecosystem. Hence, it would not be wrong to say that cross-chain technology is a
budding future revolution!
BLOCKCHAINS
Blockchain systems vary considerably in their design, particularly with regard
to the consensus mechanisms used to perform the essential task of verifying
network data.
Types of Blockchains: PoW, PoS, and Private
Not all blockchains are created equal; their diverse consensus mechanisms
have unique implications for accessibility, security, and sustainability.
Blockchain systems vary considerably in their design, particularly with regard
to the consensus mechanisms used to perform the essential task of verifying
network data. The most common consensus mechanisms are Proof of Work
(PoW), Proof of Stake (PoS), and methods used by private and consortium
blockchains. Each design has different implications for the underlying
blockchain’s security, accessibility, and sustainability.
Blockchain Types
While blockchain might appear to many as a monolithic technology, there is a great deal of variation
Blockchain Types
While blockchain might appear to many as a monolithic technology, there is a great deal of variation
between how different blockchain networks function. One foundational differentiator is the type of
consensus mechanism that each blockchain uses. A consensus mechanism is the process through which
a distributed network reaches an agreement about information on the network — for example, whether
transactions are valid and in what order they occur. The consensus mechanism also plays a key role in
securing the blockchain network from malicious actors like hackers.
Most public blockchain networks today use processes referred to as Proof of Work (PoW) or Proof of
Stake (PoS) to provide consensus, while private — or “permissioned” — blockchains and Distributed
Ledger Technologies (DLTs) can be structured in various ways to prioritize speed, security, and
scalability. Here, we take a look at the most common blockchain consensus mechanisms to get a better
overall understanding of the different implementations:
Proof-of-Work Blockchains
The PoW consensus mechanism is among the most widely utilized methods
in blockchain, and was popularized first by Bitcoin. The defining components
of PoW systems are miners and the electricity they expend to make the
calculations that verify bitcoin (BTC) transactions. Miners operate computer
hardware to run network nodes that employ computational power to
algorithmically solve mathematical puzzles called proofs of work. The miner
who solves the puzzle first confirms the most recent block of transactions on
the blockchain. The successful miner then broadcasts the new block to all
other nodes, which in turn confirm its accuracy and add that block to their
copy of the blockchain, building a verifiable record of data for the whole
network. This verification process represents consensus. Only once this data
is confirmed can a new block be added to the network. Miners receive newly
minted cryptocurrency, the block reward, (in the case of Bitcoin, they receive
BTC) for being the first to validate a new block of data and add it to the PoW
blockchain.
However, the same features that make PoW blockchains secure also make
the barriers to participating in the network as a node high. Operating a mining
rig and paying for the associated hardware and electricity costs is too
expensive for the average user, and mining on many major networks has been
monopolized by large-scale mining operators that have amassed influence in
network governance.
Another drawback of PoW networks is that they are energy intensive and thus
environmentally damaging. The computational power needed to solve proofs
of work requires an immense amount of electricity. For example, in 2021 the
Bitcoin network had the same annual carbon footprint as the nation of New
Zealand and used as much electricity as Chile. Tech development in the
blockchain industry has focused significantly on remediating the
environmental drawbacks of crypto mining, and a number of alternative
solutions have emerged.
Proof-of-Stake Blockchains
Proof of Stake is the second most popular consensus mechanism and solves
many of the disadvantages found on Proof-of-Work blockchains like lack of
speed, poor scalability, inefficient energy consumption, and high barrier to
entry. Examples of current industry-leading PoS blockchains include
Polkadot, Avalanche, and Cardano. Ethereum, which was originally designed
Delegated Proof of Stake (or DPoS) is a popular evolution of the Proof of Stake
concept, whereby users of the network elect delegates to validate the next
block. Delegates can also be called witnesses or block producers. Using
DPoS, you vote for delegates by pooling your tokens into a staking pool and
linking those to a particular delegate. Proponents say DPoS is a more
decentralized and egalitarian process for achieving consensus than Proof of
Stake alone.
Private and Consortium Blockchains
Blockchain types that use PoW and PoS consensus mechanisms are typically
public and decentralized. However two other categories of blockchain exist
— consortium blockchains and private blockchains. A private blockchain is a
blockchain controlled by a centralized entity which determines who can
interact with the blockchain, verify transactions, and who can view the
information recorded on the blockchain. A consortium blockchain is a
distributed ledger controlled by several entities, each of which operates a
network node, participates in consensus, and has permissions to view
certain types of data. Given the lack of decentralization in these networks,
this type of blockchain technology is often referred to as Distributed Ledger
Technology or DLT.
Not all blockchains are made equal, and the various consensus mechanisms
have different implications for accessibility, security, and sustainability.
Likewise, not all blockchain types are equally well suited for every use case.
Though public blockchains are secure and censorship-resistant, for example,
they are not well-suited for enterprises due to their transparency. While PoW
has been the standard consensus mechanism since the launch of Bitcoin in
2009, PoS, DPoS, and DLT are rapidly gaining traction in the world of
blockchain.
A validator receives all entries from the leader and submits votes confirming
those entries are valid. After voting, the validator is expected to store those
entries. Once the validator observes a sufficient number of copies exist, it
deletes its copy.
Joining a Cluster
Validators enter the cluster via registration messages sent to its control
plane. The control plane is implemented using a gossip protocol, meaning
that a node may register with any existing node, and expect its registration to
propagate to all nodes in the cluster. The time it takes for all nodes to
synchronize is proportional to the square of the number of nodes
participating in the cluster. Algorithmically, that’s considered very slow, but in
exchange for that time, a node is assured that it eventually has all the same
information as every other node, and that information cannot be censored by
any one node.
Confirming Transactions
Solana defines confirmation as the duration of time from when the leader
timestamps a new entry to the moment when it recognizes a supermajority of
ledger votes.
Scalable confirmation can be achieved using the following combination of
techniques:
Timestamp transactions with a VDF sample and sign the timestamps.
Split the transactions into batches, send each to separate nodes and have
each node share its batch with its peers.
Repeat the previous step recursively until all nodes have all batches.
Solana rotates leaders at fixed intervals, called slots. Each leader may only
produce entries during its allotted slot. The leader therefore timestamps
transactions so that validators may lookup the public key of the designated
leader. The leader then signs the timestamp so that a validator may verify the
signature, proving the signer is owner of the designated leader’s public key.
Next, transactions are broken into batches so that a node can send
transactions to multiple parties without making multiple copies. If, for
example, the leader needed to send 60 transactions to 6 nodes, it would
break that collection of 60 into batches of 10 transactions and send one to
each node. This allows the leader to put 60 transactions on the wire, not 60
transactions for each node. Each node then shares its batch with its peers.
Once the node has collected all 6 batches, it reconstructs the original set of
60 transactions.
Solana blockchain was rolled out during the 2017 initial coin offering (ICO)
boom. The project’s internal testnet was released in 2018, followed by
multiple testnet phases leading to the eventual official launch of the main
network in 2020.
It is widely believed that blockchains are built in such a way that forces
developers to sacrifice one of the aspects in favor of the other two, as they
can only provide two of the three benefits at any given time.
In a nutshell, Solana’s design solves this problem by having one leader node
chosen based on the PoS mechanism that sequences messages between
nodes. Thus, the Solana network benefits, reducing workload that results in
increased throughput even without a centralized and exact time source.
PoH relies on PoS using the Tower Byzantine fault tolerance (BFT) algorithm, an
optimized version of the practical Byzantine fault tolerance (pBFT) protocol. Solana
uses it to reach a consensus. The Tower BFT keeps the network secure and running
and acts as an additional tool to validate transactions.
Solana validators can use this sequence of hashes to record a specific piece of data
that was created prior to the generation of a specific hash index. The timestamp for
transactions is created after this particular piece of data is inserted. To achieve
claimed huge numbers of TPS and block creation time, all nodes on the network
must have cryptographic clocks to keep track of events rather than waiting for
other validators to verify transactions
through staking. SOL was launched in March 2020 and has strived to become
one of the top 10 cryptocurrencies entering the space by means of total
market capitalization.
If you would like to know where to buy Solana, SOL tokens can be purchased
on most exchanges. The top cryptocurrency exchanges for trading in Solana
are Binance, Coinbase, KuCoin, Huobi, FTX and others.
First and foremost, although the Solana blockchain can compete with high-
end blockchain projects, it is still vulnerable to centralization, as there are not
many blockchain validators. Anyone on the network can become a Solana
validator but doing so is still difficult because it requires a lot of computing
resources.
Along with this, the protocol still labels itself as a beta version of the mainnet,
which does not negate the possible presence of bugs and errorsDespite these
issues, Solana is still one of the biggest ecosystems in the crypto industry and
seems to be on the right growth path.
Solana is a high-performance blockchain platform designed for building
decentralized applications (dApps) and scalable blockchain solutions
with fast transaction processing and low fees. It utilizes a unique
consensus mechanism called Proof of History (PoH) and parallel
transaction processing for achieving high throughput and performance in
decentralized networks. Readers can explore Solana’s architecture,
features, and developer tools for building and deploying dApps, leveraging
its scalability and low-latency transaction processing for various
blockchain use cases, such as decentralized finance (DeFi), NFTs, and
gaming.
The Open Network
TON is a fully decentralized layer-1 blockchain designed by Telegram to
onboard billions of users. It boasts ultra-fast transactions, tiny fees, easy-to-
use apps, and is environmentally friendly.
The Open Network (TON) is a decentralized and open internet platform
comprising several components. These include TON Blockchain, TON DNS,
TON Storage, TON Sites, and TON Proxy. TON Blockchain is the core protocol
connecting TON’s underlying infrastructure to form the greater TON
Ecosystem.
To understand the true vision for the decentralized internet and how TON
contributes to this inevitability, consider taking a deep dive.
Blockchain basics with TON
This course introduces blockchain basics, focusing on practical skills in the
TON ecosystem. You will understand how blockchain functions and its diverse
applications. You will also acquire crucial TON-related skills, including wallet
setup, crypto asset management, and creation. The course will also equip you
with critical knowledge about cryptocurrency threats and fraud and give
practical tips on protecting your crypto assets.
TON Blockchain development
TON Blockchain Course is a comprehensive TON Blockchain guide. The
course is designed for developers who want to learn how to create smart
contracts and decentralized applications (dApps) on the TON Blockchain.
It consists of 9 modules and covers the basics of the TON Blockchain, the
FunC programming language, and the TON Virtual Machine (TVM).
New to blockchain
If you’re new to blockchain and don’t understand what makes the technology
so revolutionary — consider taking a deep dive into these important
resources:
• What is Blockchain? What is a Smart Contract? What is Gas?
• How a Blockchain Can Help You on a Deserted Island
• [YouTube] Crypto Networks and Why They Matter
Migration from Ethereum
For those familiar with Ethereum development, we suggest introductory
articles to help you understand what sets TON apart in this regard:
• The Difference of Blockchains
• Six unique aspects of TON Blockchain that will surprise Solidity
developers
• It’s time to try something new: Asynchronous smart contracts
https://docs.ton.org/v3/guidelines/get-started-with-ton
Although the proof-of-work giver smart contract framework, which defined the
initial mining process that laid the foundation for TON, was completed at
launch, the last TON was mined in June 2022 to conclude TON’s proof-of-work
(PoW) token distribution mechanism. That said, with our recent transition to
proof-of-stake (PoS), the era of staking on TON has just begun.
If we stay focused on the task at hand, we can create a miner in about half an
hour.
Getting started
To get started, all developers will make use of the following components:
Wallet: You need a non-custodial wallet to store an NFT in Testnet mode.
Repository: We’ll use a ready-made template designed specifically for you.
Developer Environment: Developers need to determine whether they want to
mine in a local or cloud environment.
Download and create a wallet
First, you need a non-custodial wallet to receive and store your TON. For this
guide, we are using Tonkeeper. You need to enable Testnet mode within the
wallet to receive Testnet TON coins. These tokens will be used later to send a
final minting transaction to the smart contract
Info
With a non-custodial wallet, the user owns the wallet and holds the private
key themselves.
To download and create a TON wallet, follow these simple steps:
• Install the Tonkeeper app on your smartphone. It can be downloaded
here.
• Next, you need to enable test mode within Tonkeeper.
Project setup
We use a boilerplate to simplify your life and skip routine low-level tasks.
After completing this step, GitHub will create a special cloud workspace that
allows you to access the VSCode Online IDE (Visual Studio Code Online
Integrated Development Environment).
Once access is granted (the codespace typically starts in about 30 seconds),
you have everything required to begin without installing Git, Node.js, or other
developer tools.
Local development environments
To set up a local development environment, you require access to these three
essential tools:
Git: Git is an essential tool for every developer working with repositories. It
can be downloaded here.
In the next section, we describe how users send their initial requests to TON
Blockchain using the TON Center API and @ton/ton to receive data from the
PoW smart contract.
mine();
friendly address form. If you are curious to learn more about the different
smart contract address types, feel free to check out this additional resource in
our documentation.
For the miner to work correctly, we need to add two different smart contract
address types. These include:
We add client and endpoint in the ./scripts/mine.ts script using TonClient and
Testnet TON Center endpoint https://testnet.toncenter.com/api/v2/jsonRPC:
CODE
./scripts/mine.ts
What to do in production?
Using an RPC node provider or running your own ton-http-api instance is
better for that. Read more at the TON Center API page.
Receiving mining data from TON Blockchain
Finally, the next step in the process is to retrieve specific mining data from
TON Blockchain.
By consulting the README file needed to complete the TON onboarding
challenge, the latest TON mining data is obtained by running the
get_mining_data method. Once initiated, the result will be as follows:
As a result, we should receive an array with these fields:
(
int pow_complexity,
int last_success,
int seed,
int target_delta,
int min_cpl,
int max_cpl
)
Running smart contract get methods on TON:Using @ton/ton is possible to
run the client.runMethod(SMART_CONTRACT_ADDRESS, METHOD) function.
Running this code will result in the following console output:
CODE
./scripts/mine.ts
console.log(miningData.stack);
TIP:To avoid unexpected issues, ensure you have finalized all previous steps,
including inputting contract addresses.
TupleReader {
Items: [
{
Type: ‘int’,
Value:
72370055773322622139731865630429942408293740416025352524660990
00494570602496n
},
{ type: ‘int’, value: 1730818693n },
{ type: ‘int’, value: 281644526620911853868912633959724884177n },
{ type: ‘int’, value: 30n },
{ type: ‘int’, value: 171n },
{ type: ‘int’, value: 252n }
]}
./scripts/mine.ts
{
complexity:
7237005577332262213973186563042994240829374041602535252466099000494570602496n
,
lastSuccess: 1730818693n,
seed: 281644526620911853868912633959724884177n,
targetDelta: 30n,
minCpl: 171n,
maxCpl: 252n
}
Let’s cover the Mining Data command that translates different data
parameters when programming mining data into TON Blockchain. These
include:
• Complexity is the most important number for miners. It’s a Proof-of-
Work complexity for the values. You’re successful if the final hash is less
than complexity.
• lastSuccess is a unix timestamp date and time representation that
keeps track of the last mining transaction on TON. Each time the
last_success metric changes, it’s necessary to rerun the miner because
the seed also changes during this process.
• Seed denotes a unique value a smart contract generates to calculate
the desired hash. To better understand this process and learn more
about how the seed changes and why, look at the project files folder
using the ctx_seed keyword (Ctrl+F with the keyword ctx_seed).
• targetDelta, minCpl and maxCpl won’t be used in our tutorial. But you
can always read more about how they are used in smart contracts to
calculate proof-of-work complexity in the source files of the collection
in your project.
Now that we understand the parameters discussed above, we have the
values(complexity, lastSuccess, seed) that we will use in our NFT Miner in the
next chapter.
Prepare an NFT miner
Hey, you’re doing a great job!
After connecting to TON and retrieving the necessary mining data from the
blockchain to create an NFT miner, let’s focus on the next steps in this
process to achieve our goal.
In this chapter, you will prepare a mining message and calculate a hash of the
message. After that, you will find a hash that’s less(<) than the complexity we
got from the smart contract.
That is what a miner is! Simple, isn’t it?
Probably you have a question: where are the op and data2 from the table?
• In the table, the numerical value of data1 must equal that of data2. To
omit the filling of the data2 value, the transaction builder performs a
low-level process (see Queries.mine() sources).
We convert the hash from the msg.hash() to bigint with the bufferToBigint()
function. This is done to use this hash in comparison with complexity
Though the miner will work properly after completing the above steps, it will
have a visually unappealing appearance (try npm run start:script). Therefore,
we must address this issue. Let’s jump in.
./scripts/mine.ts
console.log()
console.log('💎 Mission completed: msg_hash less than pow_complexity
found!');
console.log()
console.log('msg_hash: ', bufferToBigint(msg.hash()))
console.log('pow_complexity: ', complexity)
console.log('msg_hash < pow_complexity: ', bufferToBigint(msg.hash()) <
complexity);
return msg;
After executing these commands correctly, we’ll have a visually appealing NFT
miner. In the next section, we’ll focus on connecting a wallet to the miner to
create a payment channel that accepts and receives transactions from TON
Blockchain.
Prepare a transaction
Next, we’ll outline the steps to compile a message and send it to the
blockchain with your Tonkeeper wallet. The upcoming steps will guide you in
completing the process of mining an NFT on TON.
To achieve this goal, we’ll use the standard run() function to run to the
creation of the transaction and send it:
./scripts/mine.ts
await provider.sender().send({
to: collectionAddress,
value: toNano(0.05),
body: msg
});
}
npm start
Note that we use npm start instead of npm run start:script. This is because
we need to leverage the advantages of the blueprint (under the
hood, blueprint run is called).
Scan the QR code shown in the terminal with your Tonkeeper wallet to
establish a connection; no transaction has been sent yet. Once connected,
confirm the transaction in Tonkeeper.
Do you sense the experience in the air? That's you on your way to becoming a
TON developer.
Below are the steps needed to initiate your first Testnet transaction to mine
your NFT:
1. Open the Tonkeeper wallet on your phone (it should hold some newly
received TON Testnet tokens).
2. Select scan mode in the wallet to scan the QR code.
3. Run your miner to acquire the correct hash (this process takes between
30 and 60 seconds).
4. Follow the steps in the Blueprint dialogue.
5. Scan the generated QR code from the miner.
6. Confirm the transaction in your Tonkeeper wallet.
Hey! For those who wish to mine an NFT on TON Mainnet, these instructions
should be followed:
1. You have activated Mainnet mode in your Tonkeeper (it should hold at
least 0.1 TON).
2. Input our Mainnet wallet address from Tonkeeper into
the walletAddress variable in the ./scripts/mine.ts
3. Input address of the NFT collection from the
Mainnet into collectionAddress variable in the ./scripts/mine.ts
4. Replace endpoint to the Mainnet:
./scripts/mine.ts
// specify endpoint for Mainnet
const endpoint = "https://toncenter.com/api/v2/jsonRPC"
What’s next?
First, take a rest! You did a big task! You are a TON developer now. But it’s only
the beginning of the long way.
See also
After finishing the TON onboarding challenge, where we successfully mined
an NFT, consider taking a look at some of these materials that detail different
portions of TON’s Ecosystem:
• What is blockchain? What is a smart contract? What is gas?
• TON Hello World: Step-by-step guide for writing your first smart contract
• Develop Smart Contracts: Introduction
• [YouTube] Ton Dev Study – FunC & Blueprint
• How to work with wallet smart contracts
• FunC Journey: Part 1
• Bot for sales of dumplings
• Mint Your first Jetton
• Step by step NFT collection minting
• How to run TON Site
Getting started
Welcome to the TON Quick start guide! This guide will give you a starting point for further
research into TON concepts and basic practical experience in developing applications with TON
Ecosystem.
Prerequisites
• Basic programming knowledge.
• Around 30 minutes of your time.
Note: We will provide a short explanation of core concepts during the guide, but if
you prefer a more theoretical approach, you can check out the core concepts of TON
Blockchain first.
INFO
In contrast to some other blockchains, where you can call other contract codes synchronously, a
smart contract in TON is a standalone entity that communicates with other smart contracts on an
equal basis by sending asynchronous messages between them.
In contrast to internal and external messages, get methods are not considered a transaction.
They are special functions of the smart contract that cannot change the contract's internal state or
perform any other action except querying specific data from the contract's state.
INFO
Contrary to what might seem intuitive, invoking get methods from other contracts is not
possible.
The simplest way to create a wallet is to visit https://ton.org/wallets and choose one of the wallet
apps from the list. They are all pretty similar, so let's choose Tonkeeper. Go ahead, install it, and
run it.
In TON, there are two different networks called Mainnet and Testnet, each with distinct roles:
• Mainnet is the primary network where actual transactions take place, carrying real
economic value as they involve real cryptocurrency.
• Testnet is a testing version of TON Blockchain designed for development and testing
purposes. It's a risk-free zone for developers to test without financial implications.
It's mainly used for development, testing smart contracts, and trying new features.
Getting funds
Transactions in TON always require some amount of funds, as executing a smart contract code
requires a fee payment. TON basic transactions are very cheap—about 1 cent per transaction.
Getting the equivalent of $5 worth of Toncoin will be enough for hundreds of them. Here’s how
you can get them:
• For Mainnet, you can get Toncoins by simply pressing the buy button in the user
interface or asking someone to send them to your address. You can copy the address
from the wallet app, which is usually located near your balance.
INFO
Don't worry, sharing your address is totally safe, unless you don't want it to be associated with
you.
• For the Testnet version, you can request funds from the Testgiver Ton
Bot completely for free! After a short wait, you will receive 2 Toncoins that will
appear in your wallet app.
If you decide to use the Testnet version, you can do so by following the guide below.
Generating a mnemonic
To create your first Testnet wallet in Tonkeeper, you should obtain a mnemonic using the button
below. Do not forget to save this phrase!
Your mnemonic:
property grant mechanic blade involve column midnight distance achieve fat duty grunt
merge early price math taxi shield taxi choose found involve boss announce
Regenerate mnemonic
Creating wallet
To create Testnet wallet, click Wallet -> Add Wallet -> TestnetAccount. Then, import the seed
phrase generated in the previous step.
Congratulations! We’ve created our first wallet and received some funds in it. Now, let's take a
look at how our actions are reflected in the blockchain. We can do this by using
various explorers.
An explorer is a tool that allows you to query data from the chain, investigate TON smart
contracts, and view transactions. For our examples, we are going to use Tonviewer.
TIP
Note that when using the Testnet, you should manually change the explorer mode to
the Testnet version. Don't forget that these are different networks that do not share any
transactions or smart contracts. Therefore, your Testnet wallet will not be visible
in Mainnet mode and vice versa.
Let's take a look at our newly created wallet using the explorer: copy your wallet address from
the app and insert it into the search bar of the explorer like this:
Address state
First, let's examine the common address state of our smart contract:
• Nonexisting: If you haven't received funds to your address yet, you will see the
default state for any address that has not been used before and, therefore, has no
data.
• Uninit: Stands for an address that has some metadata, such as funds, but hasn't
been initialized by deployed smart contract code or data.
INFO
This might seem unintuitive: why is your wallet in the uninit state when you’ve already created
it? There is a small difference between the wallet app and the wallet smart contract:
• The wallet app is your off-chain client for the wallet smart contract.
• The wallet smart contract is the contract itself. Since its deployment requires some
fees, most wallet apps don’t actually deploy the wallet smart contract until you
receive funds on your address and try to make your first transaction.
• Active: This is the state of a deployed smart contract with a positive balance. To
deploy our wallet, let's send the first transaction to someone special—ourselves—
and see how it looks on the blockchain. Enter the send menu in your wallet app and
transfer some funds to your own address that you’ve copied before. In the explorer,
our contract should start looking something like this:
INFO
There is also a fourth state called frozen, which stands for a smart contract with a storage
charge that exceeds its balance. In this state, the smart contract cannot perform any operations.
And here we are — our wallet contract is deployed and ready to use. Let's examine the provided
user interface:
Metadata section
Navigation tabs
Next steps
• Now that you’ve tried the wallet app, take a moment to explore further: create
another wallet account, try sending some TON between them, and observe how the
transactions appear in the explorer.