You are on page 1of 11

Smart contracts

Smart contracts are simply programs stored on a blockchain that run when predetermined conditions
are met. They typically are used to automate the execution of an agreement so that all participants
can be immediately certain of the outcome, without any intermediary’s involvement or time loss.
They can also automate a workflow, triggering the next action when conditions are met.

History of Smart Contracts

The principle of smart contracts was described by American cryptographer and programmer Nick
Szabo back in 1996, long before the appearance of blockchain technology. According to Szabo’s
conception, smart contracts are digital protocols for information transfer that use mathematical
algorithms to automatically execute a transaction once the established conditions are met and that
fully control the process. This definition, which was ahead of its time by over ten years, remains
accurate to this day. However, in 1996 this conception could not be realized: at the time, the
necessary technologies did not exist, particularly the distributed ledger.

In 2008, Bitcoin, the first cryptocurrency appeared, created on the basis of the revolutionary
technology of blockchain, which previously lacked a decentralized ledger. The Bitcoin blockchain
does not allow for conditions for concluding a transaction to be prescribed in a new block, as it only
contains information on the transaction itself. Nonetheless, the technology’s appearance served as the
impetus for developing smart contracts. Five years later, the blockchain platform Ethereum made it
possible to use smart contracts in practice. Today the market offers many platforms that allow for the
use of smart contracts, but Ethereum remains one of the most widespread.

How Do Smart Contracts Work?

Smart contracts are computer protocols or, to put it simpler, computer code. The code is used to enter
all the terms of the contract concluded between the parties to the transaction into the blockchain. The
participants’ obligations are given in the smart contract in ―if-then‖ form (for example: ―if Party A
transfers money, then Party B hands over the rights to the apartment‖). There can be two or more
participants, and they can be individuals or organizations. Once the given conditions have been met,
the smart contract independently executes the transaction and ensures that the agreement is adhered
to.

Smart contracts allow for the exchange of money, goods, real estate, securities, and other assets. The
contract is stored and replicated in a decentralized ledger in which information cannot be falsified or
deleted. At the same time, data encryption ensures the anonymity of the parties to the agreement. An
important feature of smart contracts is that they can operate only on the assets that are within their
digital ecosystem. How to connect the virtual and real worlds is currently one of the primary
difficulties of working with smart contracts. This is the reason for the existence of ―oracles,‖ special
programs that help the computer protocols retrieve the information they need from the real world.

Advantages of Smart Contracts

· Speed – Processing documents by hand takes a lot of time and delays the completion of objectives.
Smart contracts assume an automated process and in most cases do not require personal involvement,
which saves valuable time.

· Independence – Smart contracts rule out the possibility for third-party interference The guarantee
for the transaction is the program itself, which unlike middlemen will not give reason to doubt its
integrity.

· Reliability – Data entered in the blockchain cannot be altered or destroyed. If one party to the
transaction does not complete its obligations, the other will be protected by the conditions of the
smart contract.

· No errors – The automated system for executing transactions and the removal of the human factor
ensure high accuracy when executing contracts.

· Savings – Smart contracts can provide significant savings due to the elimination of expenses for
middlemen and reduction of operational costs, as well as the opportunity for the parties to work
together on more advantageous terms.

Disadvantages of Smart Contracts

Despite their promising potential, smart contracts also have their disadvantages:

· Lack of regulation – The international legal field lacks the concepts of ―blockchain,‖ ―smart
contract,‖ and ―cryptocurrency.‖

· Difficulty of implementation – Integrating smart contracts with elements of the real world often
takes a lot of time, money, and effort.

· Impossibility of changing a smart contract – Paradoxically, one of the main pros of smart
contracts can also be seen as a con. If the parties reach a more advantageous agreement or new
factors arise, they will not be able to change the contract. For this reason, options for supplementary
agreements need to be implemented as new blockchain platforms are developed.
Regulation Framework

A ―technology first‖ regulatory framework for smart contracts has taken shape in Malta. The recently
passed legislation made Malta the first country in the world to require jurisdictional certification of
the quality of the Ethereum or Hyperledger software used by a company to issue smart contracts
domestically.

Where Can Smart Contracts Be Used?

Smart contracts could change many fields. We can highlight a few industries in which smart
contracts would be the most effective:

· Finance

· Insurance

· E-commerce

· Auditing and taxation

· Elections

Benefits of smart contracts

Speed, efficiency and accuracy

Once a condition is met, the contract is executed immediately. Because smart contracts are digital
and automated, there’s no paperwork to process and no time spent reconciling errors that often result
from manually filling in documents.

Trust and transparency

Because there’s no third party involved, and because encrypted records of transactions are shared
across participants, there’s no need to question whether information has been altered for personal
benefit.

Security
Blockchain transaction records are encrypted, which makes them very hard to hack. Moreover,
because each record is connected to the previous and subsequent records on a distributed ledger,
hackers would have to alter the entire chain to change a single record.

Savings

Smart contracts remove the need for intermediaries to handle transactions and, by extension, their
associated time delays and fees.

Applications of smart contracts

Safeguarding the efficacy of medications

Sonoco and IBM are working to reduce issues in the transport of lifesaving medications by
increasing supply chain transparency. Powered by IBM Blockchain Transparent Supply, Pharma
Portal is a blockchain-based platform that tracks temperature-controlled pharmaceuticals through the
supply chain to provide trusted, reliable and accurate data across multiple parties.

Increasing trust in retailer-supplier relationships

The Home Depot uses smart contracts on blockchain to quickly resolve disputes with vendors.
Through real-time communication and increased visibility into the supply chain, they are building
stronger relationships with suppliers, resulting in more time for critical work and innovation.

SMART CONTRACTS: THE USE OF BLOCKCHAIN AND DISTRIBUTED LEDGER


TECHNOLOGY ON BUSINESS AGREEMENTS

For many, Blockchain is still an unknown word or simply a concept that seems too complicated to be
understood. However, it is in simple words a new way of storing data records in a decentralized way.
You won’t need to give any of your personal details to central databases from companies such as
Google or Visa, to say a few, in order to make transactions or business agreements, and blockchain´s
scope goes even further. But first, it is necessary to define what is Blockchain and what are its
application before stepping ahead into the main concept of this article: Smart Contracts.

First, Blockchain is not Bitcoin. This is a common mistake people do when they hear about
blockchain. Bitcoin is the first and most famous blockchain application created by the anonymous
inventor, Satoshi Nakamoto, in 2009 with the aim of using a new money system independent of third
parties such as governments or banks (Nakamoto, 2009). On the other hand, blockchain is a
decentralized digital ledger that facilitates peer-to-peer value transfers of all sorts, from digital
currency to physical commodities and land titles, without the need for an intermediary such as banks,
accountants, or even lawyers.

As seen, blockchain has application beyond the financial markets. Each transaction in the blockchain
is verified by a consensus of the participants in the system, allowing for traceability and, in turn,
security without the need of a central authority. Also, since every block is connected to the previous
one, as the number of participants and blocks grows, it is difficult to modify information without
having a network consensus.

The technology that is behind the Blockchain System is called Distributed Ledger Technology
(DLTs), which combines multiple, already established, technologies in novel ways, which gives this
ledger the potential to be highly transparent, secure, immutable and decentralized (Angelis & Silva,
2018):

Blockchain: A secure record of historical transactions, collected into blocks, chained in


chronological order, and distributed in several different servers.

Digital Signatures: Unique digital keys used to authorize and check transactions.

Consensus Mechanism: Rules and techniques to ensure participant recording and processing
transaction to be valid.

Digital Currency: A cryptographic token that represents actual value.

Now that it is explained what is behind blockchain and what are its benefits, there must be an
emphasis on its application. There are two major needs to be covered when planning to implement a
blockchain project: 1) Record Keeping, and 2) Transactions, which need to be addressed by the
following 6 categories of blockchain use cases respectively .

1) Record Keeping

a. Static Registry: Distributed databases for storing reference data. For example: land titles, food
safety and origin, and patents

b. Identity: Distributed databases with identity-related information. For example: identity fraud, civil
registry, voting.

c. Smart Contracts: Set of conditions recorded on a blockchain, triggering automated self-executing


action when these predefine conditions are meet. For example: Insurance claim pay-out, cash-equity
trading, new music release, e-commerce.

2) Transactions

d. Dynamic Registry: Dynamic distributed database that updates as assets are exchanged on the
digital platform. For example: fractional investing, drug supply chain.
e. Payment Infrastructures: Dynamic distributed databases that updates as cash or cryptocurrency
payments are made among participants. For example: Cross border peer-to-peer payment, insurance
claim.

f. Others: Use case composed of several of the other categories. For example: Initial Coin Offerings
(ICOs), Blockchain Network as a service.

One of the most interesting categories for commercial purposes are the Smart Contracts. These are
―computer protocols that facilitate, verify, execute, and enforce the terms of a commercial
agreement‖ (Swan, 2015). Smart contracts are automated, peer-to-peer agreements of all kinds,
which may facilitate import/export transactions, registration of legal documents, property transfers,
or voting processes (Cuccuru, 2017). They may be facilitated by various blockchains, although
Ethereum has been the most popular in its association with smart contracts.

By using blockchain-based smart contracts, parties can enter a binding commercial relationship,
either entirely or partially memorialized using code, and use software to manage contractual
performance. To execute a smart contract parties must first negotiate the terms of their agreement
until they reach a ―meeting of the minds.‖ Once agreed upon, parties memorialize all or part of their
understanding in smart contract code, which is triggered by digitally signed blockchain-based
transactions. In the case of a dispute, parties can either renegotiate the underlying arrangement or
seek redress from a court or arbitration panel to reverse the effects of the smart contract (De Filippi,
Wright, 2020).

Where traditional legal agreements and smart contracts begin to differ is in the ability of smart
contracts to enforce obligations by using autonomous code. These obligations are memorialized in
the code of a smart contract using a strict and formal programming language (like Ethereum’s
Solidity). Smart contract code is executed in a distributed manner by all the nodes supporting the
underlying blockchain-based network, without necessarily relying on any intermediary operator or
trusted middleman (De Filippi & Wright, 2020).

Since the launch of Ethereum, there was an emergence of an increasing range of smart contracts to
manage commercial arrangements. Smart contracts are being designed to govern the transfer of
digital currencies or tokens representing tangible or intangible assets, as well as to control access to
data or other informational resources referenced on a blockchain- base network. As opposed to a
traditional agreement, the smart contract facilitates microtransactions at little to no fee, and payment
is divided nearly instantaneously — per the strict logic of the smart contract code — and Smart
contracts are also helping people transact with one another on a peer-to-peer basis in decentralized e-
commerce marketplaces that do not rely on a centralized intermediary — such as eBay or Mercado
Libre — to support and coordinate the sale of goods (De Filippi & Wright, 2020).

For instance, in these decentralized marketplaces sellers can offer a product for sale by recording
information to a blockchain like a description of the good and its price. Interested buyers can send
money to a virtual deposit account implemented via a smart contract, which autonomously controls
and manages any posted funds. If everything goes as planned and the buyer receives the good in
question, the buyer sends a digitally signed blockchain-based message to the deposit account, which
then releases the amount of the purchase price to the seller. Conversely, if a dispute arises over the
quality of the good or if the product simply never gets delivered, a human-based intermediary steps
in to analyze the facts of the case and determine who should receive the funds (De Filippi & Wright,
2020).

As it has been mentioned, Smart Contracts are still in a developing stage, but they represent an
immensely powerful asset for the automatization of business processes. These contracts are based on
autonomous code, meaning that there is no reliance on any middle man, which turns in the reduction
of transactional costs, the confidence of immutability over the conditions pre-stated in the contract,
and the celerity of processes and dispute avoidance. At the end, Smart Contracts provide a new way
of doing business transactions, in a direct way with the interested party with less fees and with
parties’ information only accessible through their mutual consensus. This technology can be
revolutionary if applied in scale, and it is probable to happen in the upcoming years with the
development of the 4.0 industry worldwide.

What Is Bitcoin Mining?

How Does Bitcoin Mining Work?

Bitcoin mining is the process by which new bitcoins are entered into circulation; it is also the way
that new transactions are confirmed by the network and a critical component of the maintenance and
development of the blockchain ledger. "Mining" is performed using sophisticated hardware that
solves an extremely complex computational math problem. The first computer to find the solution to
the problem is awarded the next block of bitcoins and the process begins again.

Cryptocurrency mining is painstaking, costly, and only sporadically rewarding. Nonetheless, mining
has a magnetic appeal for many investors interested in cryptocurrency because of the fact that miners
are rewarded for their work with crypto tokens. This may be because entrepreneurial types see
mining as pennies from heaven, like California gold prospectors in 1849. And if you are
technologically inclined, why not do it?

However, before you invest the time and equipment, read this explainer to see whether mining is
really for you. We will focus primarily on Bitcoin (throughout, we'll use "Bitcoin" when referring to
the network or the cryptocurrency as a concept, and "bitcoin" when we're referring to a quantity of
individual tokens).

 By mining, you can earn cryptocurrency without having to put down money for it.
 Bitcoin miners receive Bitcoin as a reward for completing "blocks" of verified transactions,
which are added to the blockchain.
 Mining rewards are paid to the miner who discovers a solution to a complex hashing puzzle
first, and the probability that a participant will be the one to discover the solution is related
to the portion of the total mining power on the network.
 You need either a GPU (graphics processing unit) or an application-specific integrated
circuit (ASIC) in order to set up a mining rig.
Mining to Prevent Double Spend
Miners are getting paid for their work as auditors. They are doing the work of verifying the
legitimacy of Bitcoin transactions. This convention is meant to keep Bitcoin users honest and was
conceived by Bitcoin's founder, Satoshi Nakamoto.1 By verifying transactions, miners are helping
to prevent the "double-spending problem."

Double spending is a scenario in which a Bitcoin owner illicitly spends the same bitcoin twice. With
physical currency, this isn't an issue: once you hand someone a $20 bill to buy a bottle of vodka,
you no longer have it, so there's no danger you could use that same $20 bill to buy lotto tickets next
door. While there is the possibility of counterfeit cash being made, it is not exactly the same as
literally spending the same dollar twice. With digital currency, however, as the Investopedia
dictionary explains, "there is a risk that the holder could make a copy of the digital token and send it
to a merchant or another party while retaining the original."

Let's say you had one legitimate $20 bill and one counterfeit of that same $20. If you were to try to
spend both the real bill and the fake one, someone that took the trouble of looking at both of the
bills' serial numbers would see that they were the same number, and thus one of them had to be
false. What a Bitcoin miner does is analogous to that—they check transactions to make sure that
users have not illegitimately tried to spend the same bitcoin twice. This isn't a perfect analogy—
we'll explain in more detail below.

Only 1 megabyte of transaction data can fit into a single bitcoin block. The 1 MB limit was
set by Satoshi Nakamoto, and this has become a matter of controversy as some miners
believe the block size should be increased to accommodate more data, which would
effectively mean that the bitcoin network could process and verify transactions more
quickly.

"So after all that work spent mining, I might still not get any bitcoin for it?"
That is correct. To earn bitcoins, you need to be the first miner to arrive at the right answer, or
closest answer, to a numeric problem. This process is also known as proof of work (PoW).

"What do you mean, 'the right answer to a numeric problem'?"


The good news: No advanced math or computation is really involved. You may have heard that
miners are solving difficult mathematical problems—that's true but not because the math itself is
hard. What they're actually doing is trying to be the first miner to come up with a 64-digit
hexadecimal number (a "hash") that is less than or equal to the target hash. It's basically
guesswork.1

The bad news: It's a matter of guesswork or randomness, but with the total number of possible
guesses for each of these problems being on the order of trillions, it's incredibly arduous work. And
the number of possible solutions only increases the more miners that join the mining network
(known as the mining difficulty). In order to solve a problem first, miners need a lot of computing
power. To mine successfully, you need to have a high "hash rate," which is measured in terms
gigahashes per second (GH/s) and terahashes per second (TH/s).

If you want to estimate how much bitcoin you could mine with your mining rig's hash rate,
the site Cryptocompare offers a helpful calculator. Other web resources offer similar tools.

Mining and Bitcoin Circulation


In addition to lining the pockets of miners and supporting the Bitcoin ecosystem, mining serves
another vital purpose: It is the only way to release new cryptocurrency into circulation. In other
words, miners are basically "minting" currency. For example, as of September 2021, there were
around 18.82 million bitcoins in circulation, out of an ultimate total of 21 million. 2

Aside from the coins minted via the genesis block (the very first block, which was created by
founder Satoshi Nakamoto), every single one of those bitcoins came into being because of miners.
In the absence of miners, Bitcoin as a network would still exist and be usable, but there would never
be any additional bitcoin. However, because the rate of bitcoin "mined" is reduced over time, the
final bitcoin won't be circulated until around the year 2140. This does not mean that transactions
will cease to be verified. Miners will continue to verify transactions and will be paid in fees for
doing so in order to keep the integrity of Bitcoin's network.3

Aside from the short-term Bitcoin payoff, being a coin miner can give you "voting" power when
changes are proposed in the Bitcoin network protocol. This is known as a BIP (Bitcoin
Improvement Protocol). In other words, miners have some degree of influence on the decision-
making process on such matters as forking.

How Much a Miner Earns


The rewards for Bitcoin mining are reduced by half roughly every four years. 1 When bitcoin was
first mined in 2009, mining one block would earn you 50 BTC. In 2012, this was halved to 25 BTC.
By 2016, this was halved again to 12.5 BTC. On May 11, 2020, the reward halved again to
6.25 BTC.

In September of 2021, the price of Bitcoin was about $45,000 per bitcoin, which means you'd have
earned $281,250 (6.25 x 45,000) for completing a block. 4 Not a bad incentive to solve that complex
hash problem detailed above, it might seem.

If you want to keep track of precisely when these halvings will occur, you can consult the Bitcoin
Clock, which updates this information in real-time. Interestingly, the market price of Bitcoin has,
throughout its history, tended to correspond closely to the reduction of new coins entered into
circulation. This lowering inflation rate increased scarcity and historically the price has risen with it.

If you are interested in seeing how many blocks have been mined thus far, there are several
sites, including Blockchain.info, that will give you that information in real-time.
What You Need to Mine Bitcoins
Although early on in Bitcoin's history individuals may have been able to compete for blocks with a
regular at-home personal computer, this is no longer the case. The reason for this is that the
difficulty of mining Bitcoin changes over time.

In order to ensure the smooth functioning of the blockchain and its ability to process and verify
transactions, the Bitcoin network aims to have one block produced every 10 minutes or so.
However, if there are one million mining rigs competing to solve the hash problem, they'll likely
reach a solution faster than a scenario in which 10 mining rigs are working on the same problem.
For that reason, Bitcoin is designed to evaluate and adjust the difficulty of mining every 2,016
blocks, or roughly every two weeks. 1

When there is more computing power collectively working to mine for bitcoins, the difficulty level
of mining increases in order to keep block production at a stable rate. Less computing power means
the difficulty level decreases. At today's network size, a personal computer mining for bitcoin will
almost certainly find nothing.

All of this is to say that, in order to mine competitively, miners must now invest in powerful
computer equipment like a GPU (graphics processing unit) or, more realistically, an application-
specific integrated circuit (ASIC). These can run from $500 to the tens of thousands. Some
miners—particularly Ethereum miners—buy individual graphics cards (GPUs) as a low-cost way to
cobble together mining operations.

An Analogy
Say I tell three friends that I'm thinking of a number between one and 100, and I write that number
on a piece of paper and seal it in an envelope. My friends don't have to guess the exact number; they
just have to be the first person to guess any number that is less than or equal to the number I am
thinking of. And there is no limit to how many guesses they get.

Let's say I'm thinking of the number 19. If Friend A guesses 21, they lose because 21>19. If Friend
B guesses 16 and Friend C guesses 12, then they've both theoretically arrived at viable answers,
because of 16 < 19 and 12 < 19. There is no "extra credit" for Friend B, even though B's answer was
closer to the target answer of 19. Now imagine that I pose the "guess what number I'm thinking of"
question, but I'm not asking just three friends, and I'm not thinking of a number between 1 and 100.
Rather, I'm asking millions of would-be miners and I'm thinking of a 64-digit hexadecimal number.
Now you see that it's going to be extremely hard to guess the right answer.

If B and C both answer simultaneously, then the analogy breaks down.

In Bitcoin terms, simultaneous answers occur frequently, but at the end of the day, there can only be
one winning answer. When multiple simultaneous answers are presented that are equal to or less
than the target number, the Bitcoin network will decide by a simple majority—51%—which miner
to honor.

Typically, it is the miner who has done the most work or, in other words, the one that verifies the
most transactions. The losing block then becomes an "orphan block." Orphan blocks are those that
are not added to the blockchain. Miners who successfully solve the hash problem but who haven't
verified the most transactions are not rewarded with bitcoin.

You might also like