BLOCKCHAIN TECHNOLOGYunit1'
BLOCKCHAIN TECHNOLOGYunit1'
A20CAT612
Course Objective
To define the fundamental ideas behind Block Chain..
To know about Bitcoin Fundamentals.
To understand about the Developing knowledge in Bitcoin.
To understand the Ripple Block chain.
To Understand Digi Byte Techniques.
Course Outcome
After completion of the course, the students should be able to
CO1 - To get the knowledge in principles of Block Chain.
CO2 - To get the knowledge in Bitcoin Fundamentals.
CO3 - To get the knowledge in in Bitcoin.
CO4 – To get the knowledge in
Ripple Block chain. CO5 - To get
the knowledge in Digi byte.
Text books
1. Tiana Laurence, “Blockchain Dummies”, A Wiley Brand.
2. Arvind Narayanan, Joseph Bonneau, Edward Felten, Andrew Miller and Steven
Goldfeder, “Bitcoin and Cryptocurrency Technologies: A Comprehensive Introduction”,
Princeton University Press, Kindle Edition, 2016.
3. Imran Bashir, “Mastering Blockchain: Deeper insights into decentralization, cryptography”,
Packet Publishing Ltd, Kindle Edition, 2017.
4. Douglas Robert Stinson and Maura Paterson,“Cryptography: Theory and Practice”, CRC press,
2018.
UNIT I INTRODUCTION
BLOCKCHAIN
The term "blockchain" refers to a digital transaction ledger maintained by a network of computers in a way
that makes it difficult to tamper with or modify the data. By eliminating the middleman or other third party,
the technology provides a safe way for people to transact with one another.
Blockchains are well recognized for playing a key role in cryptocurrency systems like Bitcoin in keeping a
secured and decentralized history of transactions. In contrast to databases, which typically organize
information/data into tables, a blockchain, as the name suggests, organizes data into chunks/blocks that are
linked together.
A new transaction has been requested for the blockchain network, where all data that requires to be
transferred is double encrypted by the use of public and private keys.
After that, the transaction is sent through the global network of peer-to-peer computers, where all of the
network's nodes will verify the transaction's legitimacy, including if there is enough balance available to
complete the transaction.
The blockchain network has multiple nodes, and numerous transactions are confirmed simultaneously. A
block is made up of several mempools, each of which contains all the validated transactions at a specific node,
and the transaction will be included in the mempool after it has been reviewed and confirmed as valid.
The nodes that create a block will attempt to add it to the network in order to make it permanent; however, if
every node is permitted to add blocks in this way, the blockchain network's functionality will be disrupted. In
order to address this issue, the nodes employ a consensus method to make sure that each new block added to
the chain represents the single version of the information validated by all the nodes and that only a legitimate
block is safely linked to the chain; a hash code for that block is generated by the consensus method and is
necessary for adding the block to the chain.
The newly formed block is now set to be added to the chain after receiving its hash value and being validated;
a blockchain is made up of blocks that are cryptographically connected to one another by the hash value of the
preceding block, which is included in each block and the open end of the blockchain receives a new block.
The transaction is finished as soon as the block is added to the chain, and the data is then recorded there
permanently; the transaction's information can be accessed and verified by anybody.
ATTRIBUTES OF BLOCKCHAIN
Though blockchains are typically used to keep the history of cryptocurrency transactions, they also have the
potential to store other data, such as digital assets or product inventories.
o It has intrinsic value since it offers a reliable, safe, and quick means of transferring value with
minimal to no cost.
o It has no physical form since it only exists on the immutable blockchain.
o The majority of the participants in a cryptocurrency's decentralized network, rather than a single
centralized authority, make the decision based on a cryptocurrency's attributes, like its total supply.
FEATURES OF BLOCKCHAIN
Below mentioned are some of the primary features of the Blockchain:
Immutable
o Blockchain technology works by utilizing a network of nodes; every network node has a copy of the
digital ledger, and it assesses a transaction prior to adding it to the network.
o If the majority of the nodes accept that it is authentic, the transaction is added. It implies that no
transaction blocks can be added to the ledger without obtaining the approval of the majority of
nodes.
o Any records/data that have been verified can't be changed or reversed; this indicates that they cannot
be edited, changed, or deleted by any user on the network.
Decentralized
The blockchain network is decentralized, indicating that not only one entity will be in charge of making all
of the choices. Instead, a group of nodes creates and maintains the network, and each node has an identical
copy of the ledger. The blockchain network's decentralization feature offers several benefits:
o A blockchain network is completely structured and fault-tolerant because it doesn't rely on human
computations.
o It makes it less vulnerable to failure due to its decentralized nature.
o There is no involvement/interference of a third party or middlemen; therefore, there is no additional
risk associated.
o It makes it simpler to create a transparent profile for every network user; as a result, each change is
traceable and more concrete.
o Users can have control over their properties and do not need to depend on third-party to maintain and
administer them.
Secure
Each record on the blockchain is individually encrypted, further enhancing the security of the network's
process. As there is no centralized authority, it isn't possible to simply add, modify, or remove data from the
network.
All the information on the chain is hashed using cryptography, providing each one a unique identity on the
network. Any attempt to modify the information would necessitate modifying every hash ID, which is
simply not possible. Each block contains its own special hash and the previous block's hash. The blocks are
"cryptographically" connected together due to this feature.
Consensus
Consensus is a method of making decisions that allow a group of network nodes to reach an agreement
swiftly and effectively, ensuring the system's smooth functioning. Every blockchain has a consensus system
that enables the network to make decisions quickly and unbiasedly. Even though nodes may not have much
trust in one another, they might have trust in the network's central algorithm. A consensus algorithm is
required for any blockchain, or it will lose value. There are numerous available consensus algorithms, each
having advantages and disadvantages.
Before records are approved into the network, all the participants must concur that they are legitimate. A
node should receive the consent of the majority in order to add a block to the network, or else, the block
can't be added. It is not possible for a node to simply insert, alter, or erase data from the network. Every
record is updated at once, spreading quickly across the network. Thus, no modifications can be performed
until a majority of the network's nodes consent to them.
Benefits of Blockchain
o One of the primary benefits of blockchains is that it is open to all; this implies that anybody can
contribute to this technology, and joining the distributed network doesn't need permission from
anyone.
o Blockchain can be used to record data in a decentralized way so that anyone may check the accuracy
of the data by employing zero-knowledge proof, wherein one party verifies the accuracy of
information to another party while not revealing anything regarding the information.
o Since blockchain is a decentralized system with a large number of trusted nodes, data/information
recorded using it is permanent. This implies that one doesn't need to be concerned about losing their
data since duplicate copies are maintained at every local node.
o Because it is not controlled by a single party, blockchain is regarded as censorship-free. Furthermore,
it uses the concept of trusted nodes for verification and consensus algorithms that validate
transactions using smart contracts.
o Since every transaction is stored on a block linked to the others using hashing methods, blockchain
provides a higher level of security.
o Due to the decentralized nature of blockchain, it is difficult to alter data; if any alterations are done, it
is immediately reflected throughout all nodes, making theft impossible. Therefore, it can be said that
transactions are impervious to tampering.
o It makes transaction records visible everywhere since every node in the network has a copy of every
transaction, and if there are any modifications made to the transaction, the other nodes can see it.
o Blockchain eliminates any third-party interference in transactions and eliminates errors, making the
system more effective and quick. Also, settlement is facilitated and made easy this way.
o Blockchain lowers costs for businesses and builds trust with other partners because it doesn't require
a third party.
APPLICATIONS OF BLOCKCHAIN
Blockchain technology has a wide range of uses in various categories/ fields, some of which are mentioned
below:
Healthcare
With smart contracts, blockchain can have a significant effect on the healthcare industry. A contract between
two parties can be established through smart contracts without the necessity of a middleman, and the
contract's terms are known to all parties, and when its criteria are satisfied, it is immediately put into effect.
This could be highly helpful in the healthcare industry since it allows for the encryption of personal health
records using Blockchain technology, making them only accessible to primary healthcare practitioners with
a key.
Internet of Things
IoT is a system of interconnected devices that can communicate with one another and gather information
that may be utilized to obtain valuable insights. The Smart Home, in which all home appliances like lights,
air conditioners, speakers, etc., may be linked together on a single platform, could be one of the examples of
IoT. Blockchain technology can be utilized to secure this enormously dispersed system; the security of an
IoT system can only be as strong as finding the weakest link. In this case, blockchain can be used to make
sure that the information collected by IoT devices is secure and accessible to only the right/trusted people.
Companies may trace their food items/products using blockchain technology from the time they are
harvested or manufactured until the point at which they are received by consumers. Blockchain technology
could aid in the creation of a digital certificate for every food product, indicating where it originated from
and where it has been. As a result, if any contamination is found and the manufacturer decides to return a
batch of product due to particular quality concerns, they may track the problem back to its source. A
mechanism like this might be used in other sectors too. It could be used to track pharmaceuticals and other
common products, as well as to combat counterfeit products by allowing anybody to check to see if the item
is from a genuine and authentic manufacturer.
There are numerous advantages to employing blockchain technology to track products as they move through
a logistics or supply chain network.
Firstly, it enables easier communication among parties since information is available on a secure public
ledger. It also offers increased security and data integrity due to the immutability of the information on the
blockchain. As a result, participants in the logistics and supply chain can collaborate more readily and with
more assurance that the information being sent to them is relevant and updated.
Non-Fungible Tokens
NFTs are generally regarded as a means of acquiring ownership of digital art. Due to the blockchain's
precluding against information existing in two places, posting an NFT on it assures that there is only a single
copy of digital artwork. While NFTs have many applications, at their base, they are a method of transferring
ownership over anything that may be represented by data.
Blockchain Architecture
Blockchain is a technology where multiple parties involved in communication can perform different
transactions without third-party intervention. Verification and validation of these transactions are carried
out by special kinds of nodes.
Benefits of Blockchain:
It is safer than any other technology.
To avoid possible legal issues, a trusted third party has to supervise the transactions and validate the
transactions.
There’s no one central point of attack.
Data cannot be changed or manipulated, it’s immutable.
1. Header: It is used to identify the particular block in the entire blockchain. It handles all blocks in the
blockchain. A block header is hashed periodically by miners by changing the nonce value as part of
normal mining activity, also Three sets of block metadata are contained in the block header.
2. Previous Block Address/ Hash: It is used to connect the i+1 th block to the i th block using the hash. In
short, it is a reference to the hash of the previous (parent) block in the chain.
3. Timestamp: It is a system verify the data into the block and assigns a time or date of creation for
digital documents. The timestamp is a string of characters that uniquely identifies the document or
event and indicates when it was created.
4. Nonce: A nonce number which uses only once. It is a central part of the proof of work in the block. It
is compared to the live target if it is smaller or equal to the current target. People who mine, test, and
eliminate many Nonce per second until they find that Valuable Nonce is valid.
5. Merkel Root: It is a type of data structure frame of different blocks of data. A Merkle Tree stores all
the transactions in a block by producing a digital fingerprint of the entire transaction. It allows the
users to verify whether a transaction can be included in a block or not.
Persistency: Transactions can be validated quickly and invalid transactions would not be admitted by
persons or miners who mining the crypto. It is not possible to delete or roll back transactions once they
are included in the blockchain network. Invalid transactions do not carry forward further.
Anonymity: Each user can interact with the blockchain with a generated address, which does not
disclose the real identity
of the miner
Auditability: Blockchain stores data of users based on the Unspent Transaction Output (UTXO)
model.
Transparency: The transparency of blockchain is like cryptocurrency, in bitcoin for tracking every
transaction is done by the address. And for security, it hides the person’s identity between and after the
transaction. All the transactions are made by the owner of the block associated with the address, this
process is transparent and there is no loss for anyone who is involved in this transaction.
Cryptography: The blockchain concept is fully based on security and for that, all the blocks on the
blockchain network want to be secure. And for security, it implements cryptography and secures the
data using the cipher text and ciphers.
1. Public Blockchain:
A public blockchain is a concept where anyone is free to join and take part in the core activities of the
blockchain network. Anyone can read, write, and audit the ongoing activities on a public blockchain
network, which helps to achieve the self-determining, decentralized nature often authorized when
blockchain is discussed. Data on a public blockchain is secure as it is not possible to modify once they are
validated.
The public blockchain is fully decentralized, it has access and control over the ledger, and its data is not
restricted to persons, is always available and the central authority manages all the blocks in the chain.
There is publicly running all operations. Due to no one handling it singly then there is no need to get
permission to access the public blockchain.
Advantages:
1. A public network operates on an actuate scheme that encourages new persons to join and keep the
network better.
2. There is no agreement in the public blockchain.
3. This means that a public blockchain network is immutable.
4. It has Rapid transactions.
Disadvantages:
1. Public blockchain can be costly in some manner.
2. The person need not give identity, that’s why there is a possibility of corruption of the block if it is in
under attack.
3. Processing speed is sometimes slow.
4. It has Integration issues.
2. Private Blockchain
Miners need permission to access a private blockchain. It works based on permissions and controls, which
give limit participation in the network. Only the entities participating in a transaction will have knowledge
about it and the other stakeholders not able to access it.
By it works on the basis of permissions due to this it is also called a permission-based blockchain. Private
blockchains are not like public blockchains it is managed by the entity that owns the network.
Advantages:
1. In a private blockchain, users join the network using the invitations and all are verified.
2. Only permitted users/ persons can join the network.
3. Private Blockchain is partially immutable.
Disadvantages:
1. A private blockchain has trust issues, due to exclusive information being difficult to access it.
2. As the number of participants increases, there is a possibility of an attack on the registered users.
3. Consortium Blockchain
A consortium blockchain is a concept where it is permissioned by the government and a group of
organizations, not by one person like a private blockchain. Consortium blockchains are more decentralized
than private blockchains, due to being more decentralized it increases the privacy and security of the
blocks. Those like private blockchains connected with government organizations’ blocks network.
Consortium blockchains is lies between public and private blockchains. They are designed by
organizations and no one person outside of the organizations can gain access. In Consortium blockchains
all companies in between organizations collaborate equally. They do not give access from outside of the
organizations/ consortium network.
Advantages:
1. Consortium blockchain providers will always try to give the fastest output as compared to public
blockchains.
2. It is scalable.
3. A consortium blockchain is low transaction costs.
Disadvantages:
1. A consortium blockchain is unstable in relationships.
2. Consortium blockchain lacks an economic model.
3. It has flexibility issues.
1. Node: Nodes are network participants and their devices permit them to keep track of the distributed
ledger and serve as communication hubs in various network tasks. A block broadcasts all the network
nodes when a miner looks to add a new block in transactions to the blockchain.
2. Transactions: A transaction refers to a contract or agreement and transfers of assets between parties.
The asset is typically cash or property. The network of computers in blockchain stores the
transactional data as copy with the storage typically referred to as a digital ledger.
3. Block: A block in a blockchain network is similar to a link in a chain. In the field of cryptocurrency,
blocks are like records that store transactions like a record book, and those are encrypted into a hash
tree. There are a huge number of transactions occurring every day in the world. It is important for the
users to keep track of those transactions, and they do it with the help of a block structure. The block
structure of the blockchain is mentioned in the very first diagram in this article.
4. Chain: Chain is the concept where all the blocks are connected with the help of a chain in the whole
blockchain structure in the world. And those blocks are connected with the help of the previous block
hash and it indicates a chaining structure.
5. Miners: Blockchain mining is a process that validates every step in the transactions while operating
all cryptocurrencies. People involved in this mining they called miners. Blockchain mining is a
process to validate each step in the transactions while operating cryptocurrencies.
There are different kinds of consensus mechanism algorithms, each of which works on different
principles:
Proof of Work (PoW): Proof of Work required a stakeholder node to prove that the work is done and
submitted by them certifying them to receive the right to add new transactions in the blockchain.
Proof of Stake (PoS): The proof of Stake is also a common consensus algorithm that evolved as a
low-cost low-energy-consuming, low-energy-consuming alternative for the PoW algorithm. For
providing the responsibilities the public ledger provides by the virtual currency token like Bitcoin and
Ethereum.
Proof of Capacity (PoC): Proof of Capacity (PoC) allow sharing of memory space of the nodes in
the blockchain network.
Proof of Elapsed Time (PoET): It encrypts the passage of time cryptographically to reach an
agreement without expending many resources.
Anyone with the right proof of work can write on the In the database reading and writing
Rights blockchain. can do so.
It is faster as compared to
It is slow in speed.
Speed blockchain.
Blockchain technology is mostly about the transactions that we make digitally for ourselves. Eventually,
these transactions make their way to the various blocks that become part of the Blockchain later on. So, it is
important to understand the transaction life cycle in Blockchain technology.
This lifecycle follows the journey of a single transaction as it makes its way through each stage in the
process of joining the blockchain. Transaction in simple words is the process of sending money by the
sender and the receiver receiving it. The Blockchain transaction is also quite similar, but it is made digitally.
Let us understand the various stages in a blockchain transaction life cycle with the help of an example.
Sourav and Suraj are two Bitcoin users. Sourav wants to send 1 bitcoin to Suraj.
1. First, Sourav gets Suraj’s wallet address (a wallet in the blockchain is a digital wallet that allows users to
manage their transactions). Using this information, he creates a new transaction for 1 bitcoins from his
wallet and includes a transaction fee of 0.003 bitcoin.
2. Next, he verifies the information and sends the transaction. Each transaction that is initiated is signed by
a digital signature of the sender that is basically the private key of the sender. This is done in order to
make the transaction more secure and to prevent any fraud.
3. Sourav’s wallet then starts the transaction signing algorithm which signs his transaction using his private
key.
4. The transaction is now broadcasted to the memory pool within the network
5. This transaction is eventually accepted by the miners. These miners, group this transaction into a block,
find the Proof of Work, and assign this block a hash value to be mapped into the blockchain.
The below diagram is a pictorial representation of the various stages in a transaction life cycle as discussed
above.
Chapter
UNIT II PICKING A BLOCK CHAIN
2
Picking a Blockchain
Here, you see how to assess the three different types of blockchain
platforms, what’s being built on each type, and why. I give you a few
tools that help you out- line your project, predict obstacles, and
overcome challenges.
Blockchains add substance by providing a secure and transparent way of storing and sharing data and
transactions. Unlike traditional databases, blockchains are decentralized and distributed, meaning
that all participants have equal ownership rights and are able to access the same information in real-
time.
Due to their decentralized nature, blockchains also eliminate the need for a trusted third party
intermediary, such as a bank or a notary, to verify and authorize transactions. This makes the process
more efficient and cost-effective, while also reducing the risk of fraud and corruption.
Furthermore, blockchains use cryptography to secure and authenticate transactions, making them
tamper-proof and resistant to hacking and cyber attacks. This is particularly important in industries
such as finance, healthcare and supply chain management, where sensitive data and assets must be
protected.
Overall, blockchains add substance by providing a reliable and transparent platform for trust and
communication, which can improve efficiency, reduce costs and enhance security in a wide range of
applications.
Blockchains come in a lot of flavors. You’ll find one that matches your
needs — the trick is finding it! Mapping your needs to the best
blockchain can be over- whelming. Whenever I have lots of options and
often conflicting needs, I like to utilize a weighted decision matrix.
1. Brainstorm the key criteria or goals that your team needs to meet.
If you aren’t sure of the criteria you need to consider when evaluating your
blockchain project, here are a few things to keep in mind:
• Scale and volume
• Speed and latency
• Security and immutability
• Storage capacity and structural needs
Your team will have its own list of objects and priorities. These are just a few to
consider while evaluating the correct platform to use to meet your needs.
Congratulations! You now have a ranked list of criteria you need to meet to
be suc- cessful with your blockchain project.
Build back to a small project that is a minimal viable use case for the
technology that clearly articulates added value or savings for your
company. Along the same lines as the earlier example, a smaller goal
would be to build a private network that can exchange value between
trusted parties.
Then build on that value. The next win might be building an instrument
that is tradable on your new platform. Each step should demonstrate a
small win and value created.
Choosing a Solution
There are three core types of blockchains: public networks like Bitcoin,
permis- sioned networks such as Ripple, and private ones like Hijro.
Blockchains do a few straightforward things:
» They move value and trade value quickly and at a very low cost.
» They create nearly permanent data histories.
Blockchain technology also allows for a few less-straightforward
solutions such as the ability to prove that you have a “thing” without
revealing it to the other party. It is also possible to “prove the negative,”
or prove what is missing within a dataset or system. This feature is
particularly useful for auditing and proving compliance.
Table 2-1 lists common uses cases that are suited for each type of
blockchain.
» Public networks are large and decentralized, anyone can participate within
them at any level — this includes things like running a full node, mining
cryptocurrency, trading tokens, or publishing entries. They tend to be more
secure and immutable then private or permissioned networks. They’re often
slower and more expensive to use. They’re are secured with a cryptocurrency
and have limited storage capacity.
» Permissioned networks are viewable to the public, but participation is
controlled. Many of them utilize a cryptocurrency, but they can have a
lower cost for applications that are built on top of them. This feature makes
it easier to scale project and increase transaction volume. Permissioned
networks can be very fast with low latency and have higher storage capacity
over public networks.
» Private networks are shared between trusted parties and may not be
viewable to the public. They’re very fast and may have no latency. They also
have a low cost to run and can be built in an industrious weekend. Most
private networks do not utilize a cryptocurrency and do not have the same
immutability and security of decentralized networks. Storage capacity may be
unlimited.
There are also hybrids between these three core types of blockchains that
seek to find the right balance of security, auditability, scalability, and
data storage for applications built on top of them.
Choosing a Solution
When choosing a blockchain solution for a specific use case, it is important to consider the following
factors:
1. Scalability: A blockchain solution must be able to scale to accommodate a high volume of transactions,
especially when it’s being used for mainstream applications.
2. Security: The blockchain solution must be secure and provide robust protection against attacks and
malicious activities.
3. Interoperability: The solution must be able to integrate with various systems and easily communicate with
other blockchain networks.
4. Consensus Mechanism: The consensus mechanism implemented by the blockchain should be efficient and
provide a high degree of trust in the network’s transaction verification process.
5. Smart Contract support: The blockchain solution should have smart contract support to enable the creation
and execution of automated agreements between parties.
6. Development Community: The blockchain technology should have an active and growing development
community to ensure its longevity and continued development.
7. Costs: The blockchain solution should be cost-effective in terms of implementation, maintenance, and
transaction fees.
By considering these factors, one can select the right blockchain solution that fits their specific
requirements. It is also important to do thorough research, test the technology, and seek expert advice before
making a final decision.
The Bitcoins blockchain uses a consensus mechanism called proof-of-work, which requires miners
to solve complex mathematical problems to add new transactions to the blockchain. The first miner
to solve the problem is rewarded with new bitcoins, which is the incentive for miners to participate in
the network.
Each block in the Bitcoin blockchain contains a list of transactions, a timestamp, and a unique code
called a hash. Once a block is added to the blockchain, it cannot be altered or deleted without
modifying all subsequent blocks, making it secure and resistant to tampering.
The Bitcoin blockchain is open-source, meaning anyone can access, contribute to, and modify the
code. This has resulted in the creation of various forks of the Bitcoin blockchain, such as Bitcoin
Cash and Bitcoin SV, which have different features and consensus mechanisms.
Overall, the Bitcoin blockchain is a groundbreaking technology that has enabled the creation of a
decentralized, trustless, and transparent digital currency. It continues to evolve and is currently being
used in various ways beyond just cryptocurrency transactions.
As a concluding note, let’s have a look at the major differences between bitcoin and blockchain technology.
To begin with, bitcoin is a digital currency. On the other hand, blockchain is a distributed database that
is powering bitcoin transactions and mining.
Although bitcoin’s core substance is blockchain, it has way more useful applications for the world of
business.
While bitcoin can only be traded as a cryptocurrency, blockchain can house way beyond and secure
properties and assets.
Bitcoin has a fixed model of functioning. However, blockchain is open to changes and is being backed
by many business organizations already.
Even when bitcoin is transparent, it is not easy to visualize all the numbers in it. But comparatively,
blockchain is very see-through and shows the content without any complex breaking methods.
Bitcoin came into existence as a single cryptocurrency that has now given birth to over 4,000 altcoins.
Smart contracts are contracts that are coded and stored on the blockchain. They automate agreements
between the creator and recipient, making them immutable and irreversible.
Their primary purpose is to automate the execution of an agreement without intermediaries, ensuring
that all parties can confirm the conclusion instantly.
Additionally, they can be programmed to initiate a workflow based on specific circumstances.
An executed contract in terms of a smart contract refers to the successful completion of the
agreement programmed into the smart contract.
Once all the conditions specified in the code of the smart contract are met and the required actions
are performed, the contract is considered executed.
Popularized by the Ethereum blockchain, smart contracts have led to the network’s array
of decentralized applications (DApps) and other use cases.
One key benefit of blockchain networks is the automation of tasks that traditionally require a third-
party intermediary.
For example, instead of needing a bank to approve a fund transfer from a client to a freelancer, the
process can happen automatically thanks to a smart contract. This reduces the time and cost involved
in traditional contract execution.
Another example could be decentralized arbitration via smart contracts, which is a process by which
disputes between parties are resolved without the need for a traditional legal system or centralized
arbitration authority.
The smart contract would then be deployed on a blockchain network. In the event of a disagreement, the
smart contract would receive evidence and arguments from both parties. The arbitration would then be
carried out automatically via the smart contract, either using a predetermined list of arbitrators specified by
both parties or a decentralized network of arbitrators.
Once a decision is reached, the smart contract would automatically execute the decision, such as transferring
funds to the winning party or releasing the product or service to the appropriate party.
This article will explain the history of smart contracts, how smart contracts work, and why smart contracts
are important.
How do smart contracts work?
Think smart contracts as digital “if-then” statements between two (or more) parties. If one group’s needs are
met, then the agreement can be honored, and the contract is considered complete.
Smart contracts can be programmed to work for the masses, replacing governmental mandates in retail
dealings, among other benefits. Moreover, smart contracts would potentially remove the need for bringing
certain disagreements into court, saving parties both time and money.
This security is largely due to the underlying smart contract code. On Ethereum, for instance, contracts are
written in its Solidity programming language, which is Turing-complete. This means that the rules and
limitations of smart contracts are built into the network’s code, and no bad actor can manipulate such rules.
Ideally, these limitations would mitigate scams or hidden contract alterations.
Ethereum is what’s considered a distributed state machine, containing what’s known as the Ethereum
Virtual Machine (EVM). This machine state, of which all Ethereum nodes agree to keep a copy, stores smart
contract code and the rules by which these contracts must abide. Since every node has the rules baked in via
code, all Ethereum smart contracts have the same limitations.
In more technical terms, the idea of a smart contract can be broken down into a few steps, as discussed
below:
Identifying the parties involved and coming to an agreement on the contract’s terms and conditions is the
first stage in creating a smart contract. The terms of the contract, the obligations of each party and the
standards for contract execution are all described in this agreement.
The third step is to write the code for the smart contract. The code will specify the exact steps that need to be
taken to execute the contract when the specified conditions are met.
Deploying the smart contract on a blockchain platform is the fourth stage. This entails validating the
contract’s validity by uploading the code to the blockchain network.
The smart contract’s execution is the fifth phase. When the predetermined circumstances are satisfied, the
contract is automatically executed, and the blockchain network activates it.
The contract’s information is entered onto the blockchain network when it gets executed. This covers the
terms of the contract, the prerequisites for execution, and the execution date and time. The contract’s
specifics are immutable once they are entered into the blockchain ledger, meaning they cannot be changed
or removed.
It is also important to note that smart contracts are different from written contracts in many ways, as
discussed in the table below:
Historical background of smart contracts
Believe it or not, smart contracts long predate blockchain technology. While Ethereum, introduced in 2014,
is the most popular implementation of the protocol, cryptographer Nick Szabo established the idea in the
1990s.
Back then, Szabo conceptualized a digital currency called Bit Gold. While the asset was never actually
launched, this Bitcoin (BTC) predecessor highlighted the smart contract use case — trustless transactions on
the internet.
However, smart contracts didn’t start to get much attention until the advent of blockchain technology in the
late 2000s. Blockchain technology made it possible to build decentralized, trustworthy networks that don’t
require a centralized authority to carry out smart contracts. Ethereum was the first blockchain platform to
allow smart contracts.
Many, including the Ethereum website, compare smart contracts to a vending machine. Vending machines
serve the purpose of a vendor providing the user with a product, without the need for an actual person to
take the money and hand over the item. Smart contracts serve that same purpose — but are much more
versatile.
Smart contracts have advanced quite a bit over time. They started as simple if-then statements that a
programmer can create and implement. Now, they have been used for a variety of applications, including
supply chain management, real estate transactions and even voting systems. The potential for smart contracts
to revolutionize the way business is conducted and people interact with each other is vast, and their
development is an exciting area of innovation in the blockchain space.
Smart contract blockchains provide various benefits, including speed, efficiency, accuracy, trust,
transparency, security and savings, as discussed in the sections below.
Smart contracts leverage computer protocols to automate actions, streamlining various commercial
processes and saving valuable time. By eliminating the need for intermediaries such as brokers to validate
signed legal contracts, the risk of third-party manipulation is significantly reduced.
The absence of intermediaries in smart contracts not only mitigates risk but also translates into cost savings.
With complete visibility and access to the terms and conditions of the contract, all relevant parties are held
accountable once the agreement is signed. This ensures that the transaction is transparent and non-
negotiable, promoting trust and accountability among all involved parties.
Moreover, all documents kept on the blockchain are duplicated many times, allowing for the restoration of
originals in the event of data loss. Smart contracts are encrypted, and cryptography protects all documents
from being tampered with. Finally, smart contracts also eliminate errors that occur due to the manual filling
out of several forms.
Although smart contracts are a promising innovation, they are not without their flaws. It’s essential to
remember that these contracts and the underlying blockchain technology are developed by humans, making
them susceptible to human error. In some cases, errors in the code can result in security breaches, as was
seen in the infamous attack on Ethereum’s decentralized autonomous organization (DAO) in 2016. The
attackers exploited a vulnerability in the fundraising smart contract and diverted funds from the project.
Moreover, the lack of regulatory clarity surrounding smart contracts presents another challenge. While the
idea of a secure, efficient transfer of funds is appealing, issues such as taxation and government oversight
must be addressed. While users may desire complete control over their data, it’s crucial to consider how
government agencies can access the information they require.
The inability of smart contracts to retrieve data from sources outside of the blockchain network is one of
their drawbacks. This presents a problem because numerous real-world applications need external data to
initiate or carry out contract clauses. For instance, external weather data might be required by a smart
contract that bases insurance payouts on weather conditions.
This is where oracles come in. Oracles are third-party services that let smart contracts communicate with
off-chain data sources, such as APIs and web pages. They provide a bridge between the smart contract and
the external data source, supplying the details required to carry out the requirements of the contract.
As blockchain technology and smart contract usage grow, concerns about scalability and network congestion
persist. This can affect the performance and reliability of the system, especially during periods of high
usage. Moreover, smart contracts are self-executing and non-negotiable, which may be a drawback if the
terms of the contract need to be changed because of unanticipated events.
Aside from the payments example mentioned above, there are various, potential implementations of smart
contracts that can automate the world and make it an easier place to live. Here are some prominent examples
of smart contract use cases.
Digital identity
On the internet, information is currency. Companies profit off of knowing everyone’s interests, and people
are not always in control of how that data is acquired, nor do they profit from it. With smart contracts,
people are in control.
In a blockchain-based future, identities will be tokenized. Ideally, this would mean each person’s identity
exists on a blockchain, safe and secure from any bad actors. Now, if a user wants to participate on social
media or submit documents to a bank for loan purposes, they can profit from the former and control the
transaction process in the latter.
For social media, no intermediary controls a network. Instead, users choose what information to make public
and what to keep private. Should they want to participate in information exchange, like an endorsement,
they can create a smart contract and choose what data is transacted, rather than simply gleaning everything
about a user. A third party isn’t there to take some of the funds or secretly store and sell that data — only the
user profits.
The same applies when it comes to dealing with banks and other financial institutions. Communication only
involves sending required documents and vital information over. There’s no risk of a loan group storing
your email address and selling it to other credit companies. That info is entirely under the user’s control.
Real estate
In the traditional world, real estate brokers are a necessary evil. Considering the act of selling a house is
nothing short of long and convoluted, owners will hire a broker to manage the confusing parts for them, such
as the paperwork and finding a buyer. While that sounds ideal for the seller, remember that brokers take a
significant fee from the house’s sale price.
A smart contract can take the place of a broker, streamlining the house transfer process while ensuring it’s
just as secure as with an intermediary. This is where the “trustless” moniker comes into play.
Imagine the deed to your house is tokenized on the Ethereum blockchain. If you’re ready to sell it, you’d
create a smart contract with the buyer. That contract would hold the deed in escrow until the buyer’s funds
are properly submitted. That said, everyone wins. The seller saves money, as they don’t have to pay an
intermediary, and the buyer gets the house much sooner than they would have otherwise.
Insurance
Insurance policies could easily benefit from smart contracts. Essentially, signing up for a policy would enter
the user into a smart contract with a provider. All policy requirements would be written into the smart
contract, which the user would read and sign if they agree.
That contract would sit open until the liable party needs it. Then, they’d simply upload the required forms
that prove their need for insurance payment and the funds would be released. This type of contract removes
the need for communicating with insurance groups and individuals. While the user would still need
paperwork to prove their requirements, the subsequent submission and funding process will be close to
instant.
In the identity aspect of things, it’s worth keeping in mind that all drivers will have a record of their accident
reports and other important insurance information as well. This accessibility could factor into lower rates for
good drivers with no dings on their driving history.
Supply chain
Arguably, one of the most popular implementations of blockchain technology and smart contracts, in
particular, is within a supply chain.
Grocery stores, office warehouses, farmers and more all have their specific place in a supply chain. But with
how complex these networks are becoming, companies are finding it increasingly harder to track product
custody and follow payments, among other things. Smart contracts can automate and incentivize all parts of
the supply chain to increase their accountability.
Suppose a company in Europe wants to purchase a shipment of goods from a supplier in Asia.
It could automate every step of the transaction, from ordering to delivery, using a smart contract. All
pertinent information, such as the product specifications, shipping information, terms of payment and
deadlines for the fulfillment, would be included in the smart contract.
In order to guarantee that the items are in accordance with the buyer’s expectations, the smart contract
would also include conditions for the product’s quality and quantity. The use of intermediaries, like banks or
brokers, and the fees associated with them would be unnecessary because the contract is self-executing and
non-negotiable.
The money would be kept in escrow once the contract is signed until the supplier certifies that the products
have been delivered. The blockchain would track and save the delivery schedules and shipment information,
giving both parties complete visibility and transparency.
When the goods are delivered and the buyer certifies that they meet the agreed-upon parameters, the smart
contract will instantly release the payments to the provider. Due to the lack of intermediaries and decreased
risk of fraud, this method would be effective, efficient and secure.
The Taproot upgrade is a significant achievement for Bitcoin’s smart contract capabilities. It solves the
scalability issue by enabling the network to handle multiple signatories and their complex transactions
without the risk of clogging. With Taproot, Bitcoin’s base chain can host smart contracts, empowering the
network to execute more sophisticated transactions.
In addition, Bitcoin can support smart contracts on protocols, such as the Lightning Network, which relies
on multisignature transactions called hashed time-locked contracts (HTLCs). HTLCs facilitate low-cost and
instant Bitcoin micropayments and ensure that parties involved in routing payments receive a small fee
without compromising the security of the funds.
. These platforms provide drag-and-drop user interfaces and visual editors that enable users to quickly and
simply develop smart contracts without the need for programming expertise.
For instance, Ethereum Studio, a web-based integrated development environment (IDE), provides templates
for creating smart contracts using Solidity, Ethereum’s programming language. It offers a drag-and-drop
interface, making it easy for users to create smart contracts without coding. An IDE is a software application
that provides a comprehensive set of tools and features for developers to write, test and debug code
efficiently.
BlockApps Strato, a blockchain platform that offers a visual editor for creating smart contracts, is another
example of a no-code smart contract platform. It supports a number of computer languages, such as Solidity
and JavaScript, and offers users a variety of template options.
The future of smart contracts
Smart requirements-powered contracts are undoubtedly the way forward for relatively basic contracts that
can be written and executed automatically whenever pre-conditions are met, such as residential
conveyancing, where completion monies can be given as soon as contracts are signed.
Various smart contract platforms will save businesses worldwide time and money while also revolutionizing
how they interact in the supply chain and with their customers. As a result, minimal human involvement will
free individuals and important decision-makers from dealing with mundane administration and red tape,
allowing them to focus on their day jobs. It is because the smart contract picks up the slack.