KEMBAR78
Blockchain Basics Explained | PDF | Cryptocurrency | Distributed Computing
0% found this document useful (0 votes)
12 views20 pages

Blockchain Basics Explained

blc basic

Uploaded by

WHITE DEVIL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views20 pages

Blockchain Basics Explained

blc basic

Uploaded by

WHITE DEVIL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

A simple analogy for blockchains

Imagine a primitive village, where they don’t have money in our


traditional sense. Instead, they engrave the details of each
transaction onto a stone block, then cement it in place in the center of
the village.

David swaps fifteen chickens for one of Sarah’s pigs. They engrave this
information onto a block, then cement it in the town square. Now,
anyone can see that David is the new owner of Sarah’s pigs, while
Sarah is now the owner of the fifteen chickens. Since the information is
public, there can be no disputes over who legally controls what.

The next day, Jessica trades Mark 100 kilograms of corn for a canoe.
This is also engraved on a block, which is then cemented on top of the
old block. Since everyone in the town will now be able to publicly verify
that Jessica no longer owns the 100 kilograms of corn, she can’t try to
sell it again if Mark goes away for a couple of days.

In the coming days, more and more transactions take place, and more
blocks of stone with the transaction details engraved on them get
cemented in place. Over time, the transaction stones start to form a
tower.

All of the details are publicly available to everyone, and the people
cannot change or take back the earlier transactions, because a
bunch of blocks are cemented on top of them.

This village’s financial system may not be the easiest to use, but it gives
everyone in the village a way to keep track of their transactions. It is a
public ledger that keeps permanent records, which can’t be altered. One
of the most important aspects is that it is decentralized. There is no
central bank or government that is responsible for the transactions. It’s
all done by the community.

There are a number of differences between blockchains and the above


analogy, but it’s still a good starting point to get your head around what
blockchains are and why they are useful.
One of the key contrasts is that blockchains aren’t on display in public,
instead, anyone who wants to can store a copy of a blockchain on their
computer. Blockchains use cryptography, computers and electricity
to build the blocks, rather than stone and cement.

The most important aspects of blockchains are that they cannot be


changed, aren’t controlled by any single entity, and everyone can
view the transactions. These properties are why people believe that
the technology has the potential to be used in a vast range of
applications.

The history of blockchains


In the late 1990s and early 2000s, there were a series of developments
toward digital currencies based on various cryptographic concepts. One
of the earliest blockchain-like initiatives was Nick Szabo’s 1998
mechanism called bit gold. Although it was never actualized, it involved
a series of cryptographic puzzles, where each solution would be added
to the next puzzle, forming a chain.

It wasn’t until 2008 that the idea of blockchains was fully developed,
when someone going under the pseudonym of Satoshi Nakamoto
published the paper, Bitcoin: A Peer-to-Peer Electronic Cash System.

This person built on previous work in the field, including Hal


Finney’s reusable proof-of-work system, to form the bitcoin digital
currency, as well as the underlying concept of blockchains. These
blockchains have since gone on to be applied in a number of different
ways, both as digital currencies and as solutions to other problems.

The bitcoin network was launched in early 2009 and was originally only
used by a small group of cryptographers and hobbyists. It wasn’t until
bitcoin was adopted by darknet marketplaces such as Silk Road that
blockchains began to see their widespread, practical adoption.

As bitcoin gained popularity, a number of spin-off cryptocurrencies,


known as altcoins such as Litecoin and Peercoin were developed.
These further spread the adoption and use of blockchain technology.
Ethereum launched in 2015 as a distributed computing platform that
allowed its users to develop apps and enact smart contracts between
parties. Around this time, interest in blockchain technology from the
public, major companies and governments grew, in both financial and
other use cases. This saw a surge of new activity, with blockchains
being proposed as solutions to a range of different problems.

The uses of blockchains


It’s been more than 10 years since the first blockchain was launched,
with intensive hype and investment for the past five or so years. Despite
the flurry of activity, at this stage there have been relatively few
successful real-world implementations of blockchain technology.

The core cryptographic concepts behind blockchains


Whether or not blockchains currently see a lot of real-world usage, they
are still interesting applications of cryptography.

These days, countless blockchains each have their own unique


variations. Since it isn’t possible to cover each of their individual aspects,
we will focus on the core concepts and how they relate to cryptography.
We will mainly be focusing on bitcoin, not because it is the best
blockchain, but because it is the first one, which all of the others are
based upon.

What is cryptography?
Before we dive in too deep, it’s important to cover the
basics. Cryptography is the study and practice of keeping secret
information away from adversaries. In the early days, it was done
simply, using techniques such as changing each letter in a word to the
letter that follows it in the alphabet. Under this type of scheme:

Hello

Becomes:

Ifmmp
If your recipient knows how to convert the coded message back to its
original form and your recipient doesn’t, then you can assume that it is a
safe way to communicate.

Over time, people have gotten much better at cracking codes.


Technological advances also improved our code-breaking abilities
significantly. In order to keep our information secure in the present day,
we now have to use codes that are much more complex.

These codes include incredibly complicated algorithms such


as AES or RSA, each of which involve a lot of math. They use
computers to conduct both the encryption and decryption processes.
Most blockchain projects use one of the three currently most common consensus algorithms:
Proof of Work (PoW), Proof of Stake (PoS) or Delegated Proof of Stake (DPoS). All
these mechanisms aim at ensuring that all participants dispose of identical copies of the
distributed database files
2. Proof of Work (PoW)
In contrast to other consensus mechanisms, the proof-of-work mechanism requires a lot of
energy and computer power to reach a consensus and is thereby a very expensive option.
The underlying idea is that so-called "miners" in a network must prove that they have made
a certain effort. Miners provide the computing power needed to maintain the blockchain and
to verify transactions. At the same time, miners ensure the network's immunity against
hackers. They compete against each other in order to chain together a group of
transactions, so-called "blocks" ("blockchain"). The blockchain contains all verified
transactions which are accessible to all network participants. Miners use so-called hash
functions, i.e. mathematical functions. In simple terms, hashing means taking an input string
of any length and giving out an output of a fixed length. The actual challenge lies in the fact
that by solving mathematical puzzles a result with certain characteristics must be obtained,
which are derived from the hash function. By solving the mathematical puzzles, it can be
proven that the transactions (i.e. the calculation path) have been executed without errors. If
the block is then mined correctly, it gets attached to the blockchain and the first miner to
solve the mathematical puzzle gets rewarded. The best known crypto currency using the
proof-of-work mechanism is Bitcoin.
3. Proof-of-Stake (PoS)
The idea of Proof of Stake (PoS) is to divide the voting power of a miner from its computing
power, i.e. PoS gives mining power based on the percentage of tokens held by a miner. The
larger his or her share of the total amount of tokens, the more likely this miner is to be
selected to mine the next block. Nevertheless, the proof-of-stake-mechanism uses a
random algorithm for consensus building. Though the amount of tokens held (“stake”) is
relevant (as the proportion of tokens held affects the probability that a miner will be allowed
or selected to mine the next block), several other factors play a part in selecting the next
miner. The main objective of the PoS is to ensure that the miners support the blockchain
project in the long term. Projects that use the PoS-mechanism include Dash and Neo.
4. Delegated Proof-of-Stake (DPoS)
The DPoS-mechanism can be considered a more democratic development of the PoS-
mechanism. In DPoS, not those with the highest amount of tokens are authorized to confirm
or validate transactions.. All token owners select a group of delegates to perform this task.
The mechanism remains decentralized as all users in the network are authorized to select
the group of miners that confirm transactions. On the other hand, the advantage of the
centralized aspect of DPoS over the PoS-mechanism consists in the higher speed of
verification and transactions, which results in high scalability. The EOS project as well as
Lisk use the DPoS-mechanism.
5. Consensus as a Service (CaaS)
The daura platform is based on the Hyperledger Fabric Blockchain protocol, a private
blockchain infrastructure. One of the differences to so-called "public blockchain protocols",
such as Bitcoin or Ethereum, is that the operation of a private blockchain requires much
less energy and can only be used by "whitelisted", i.e. known or registered, users. For
further information on private and public legers, please read our article here.
daura relies on the Swiss "Consensus as a Service"-mechanism, which was established by
Swisscom. The two trusted partners PostFinance and Swisscom maintain the nodes of the
blockchain daura is built on. They are authorized to validate transactions that are initiated
on the daura platform. Such validation consists in an automated, algorithmic and technical
check of all information entered on the platform. Among others, this includes verifying
whether sufficient tokens for the respective transaction are registered on the Blockchain-
address of the transferrer. Moreover, it is checked whether the information to be transferred
is valid or has already expired (i.e. has been used before). The contents, however, are not
reviewed.
Essentially, the mechanism works like a digital account book: all transactions are equally
visible and verifiable for all operators of the nodes. Trust is achieved through the mutual
verification of the node operators and the unalterable storage of all the data generated. The
data is stored on highly secure, trustworthy so-called R4 computing centres in Switzerland.
The CaaS aims to connect to an "open" ecosystem. Therefore, in addition to daura, any
number of other blockchain- based applications may purchase the CaaS service. In addition
to the existing node operators, additional operators may join and operate another node
independently. All operators must meet all relevant requirements and security features. New
operators of nodes are selected by the existing ones.
6. daura
The daura platform enables Swiss companies limited by shares to keep their share register
automatically and digitally, as well as to issue new digital shares and participation
certificates by means of capital increases. The processing of capital increases hence gets
digitized, and non-listed companies get access to a wide range of investors via the daura
platform. In addition, the keeping of the share register is simplified through digitally
supported share transfers, i.e. by using assignment declarations that are automatically
generated via the platform. However, no trading and settlement of blockchain-based share
tokens is conducted via the platform.

Smart Contract Concept


Although smart contract hype has grown with the hype around blockchain

technology, the term smart contract actually appeared over twenty years ago.

Nick Szabo, a computer scientist and cryptographer, wrote an article about smart

contracts all the way back in 1995.

The concept that Szabo offered precisely corresponds to what smart contracts

offer today, including the idea of implementing and storing smart contracts within

a distributed ledger.
So what exactly is a smart contract?

What’s a Smart Contract?


A smart contract is similar to a contract in the physical world, but it’s digital and is

represented by a tiny computer program stored inside a blockchain.

More specifically, a smart contract is a piece of software that stores rules for

negotiating the terms of an agreement, automatically verifies fulfillment, and then

executes the agreed terms.

What’s the main idea of a smart contract? Since a smart contract removes

reliance on a third party when establishing business relations, the parties making

an agreement can transact directly with each other.

Consider the example of a crowdfunding platform where product teams share

their projects and collect money from supporters until a goal is reached.

If such a platform is centralized – like Kickstarter, for instance – then it acts as a

third party between product teams and supporters who donate their money. This

means both sides need to trust Kickstarter and, in fact, pay an additional fee to

Kickstarter to serve as an intermediary.


A smart contract, alternatively, can perform the same crowdfunding actions –

sharing projects, setting goals, and collecting donations – but without a third

party. Simply put, we can program a smart contract to execute all of these

actions.

More precisely, we can program a smart contract to receive funds until a goal is

reached. If the project gets fully funded before the deadline, the money raised

automatically goes to the product team. If the project fails, the money

automatically goes back to supporters.


Since a smart contract is stored inside a blockchain where all data is stored in a

distributed manner, no one is in control of the money. In a decentralized business

model, smart contracts replace any other trusted third party. This leads to a

pretty valid question:

Why Trust a Smart Contract?


Smart contracts are designed and implemented within blockchains, and therefore

they inherit some of the blockchain’s properties:

 They’re immutable, which means a smart contract can never be changed

and no one can tamper with or break a contract.

 They’re distributed, which means that the outcome of the contract is

validated by everyone in the network, just like any transaction on a

blockchain. Distribution makes it impossible for an attacker to force control

to release funds, as all other participants would detect such an attempt and

mark it as invalid.

How a Smart Contract Works


A smart contract is a program, or more simply put, code. The code behind a

smart contract contains specific terms that are executed when triggered by

specific agreed events.


Let's consider an example of how a smart contract might work if Alice is renting

an apartment in Los Angeles and Bob from New York is looking to rent an

apartment for his journey there.

A Logically Behaved Algorithm


Typically, Alice and Bob would use some platform that unites hosts and guests to

agree on renting. This kind of platform would serve as a third party and would

certainly take responsibility for compliance with the agreed terms. However, both

Alice and Bob would be charged a fee by the platform. Besides, if either of them

failed to fulfill their commitment, dispute resolution may be time-consuming and

require a detailed review.

If Alice and Bob instead make an agreement using a smart contract, the smart

contract will behave logically based on its algorithm and will guarantee that all the

agreed terms and conditions are fulfilled. Immutability, which is in the DNA of a

smart contract, won’t let Alice or Bob cheat.

Thus, the following terms and events can be set out in a smart contract between

Alice and Bob:

1. Independent storage is created, where both Alice and Bob can put value
but can’t easily take out.

2. Bob puts money for rent in storage.


3. Alice puts the address and the code to her apartment in storage.

4. Alice gets payment confirmation and Bob receives the address and
apartment code.

5. If Bob comes to LA and the address and code provided by Alice are right,
Alice gets the payment.

6. If it appears that the address or code supplied by Alice are wrong, Bob
gets his money back.

7. If Bob doesn’t come to LA, Alice gets her liquidated damages payment and
Bob gets the rest of what he paid.

8. At the end of the agreement, the smart contract is considered fulfilled and
remains stored in the blockchain network.

This set of conditions and events represents the most basic one-time smart

contract. Setting up terms in the code of a smart contract ensures satisfactory

fulfillment.
Overall contract fulfillment is guaranteed by the blockchain technology itself, as a

complete copy of the blockchain is publicly stored by all network participants and

the smart contract remains immutable.

The Logic of the One-Size-Fits-All Smart Contract


Once Alice generates a smart contract that automatically and transparently works

for her when renting out her apartment to Bob, she might think about creating a

universal agreement for all further renters so she doesn’t need to create a new

smart contract for each new guest.

With this universal agreement, anyone on the blockchain network can rent Alice’s

apartment by following the algorithm above: the potential guest transfers rent

payment, gets the address and apartment code, and then Alice gets her payment

if everything works according to the contract terms for both sides.

Moreover, smart contracts can be even more universal. We could program a

smart contract to be used not only by Alice but by any person who wants to rent
out his or her flat. And certainly, smart contracts can contain more specific

conditions, such as automatically adjusted prices, discounts, partial payments,

and nearly any other imaginable option.

Blockchain Networks Using Smart


Contracts
Much has been said about smart contracts in relation to blockchain technology.

While there are plenty of examples of smart contracts implemented within

different blockchain networks and projects, the most notable remain Bitcoin and

Ethereum.

Bitcoin
Though Bitcoin is mostly known for transactions of the Bitcoin cryptocurrency, its

protocol can also be used to create smart contracts. Bitcoin provides a

programming language that allows for custom smart contracts like multisignature

accounts, payment channels, escrows, and time locks. In particular, there’s a

separate smart contract platform called RootStock built on Bitcoin’s blockchain.

Ethereum
Ethereum is the most prominent smart contract framework, created and designed

especially to support smart contracts. This framework, programmed in the

Solidity language, is a decentralized platform that runs smart contracts without


any possibility of downtime, censorship, fraud, or third-party interference. The

Ethereum blockchain database stores transactions between people, transactions

involving smart contracts, and their source code.

Smart Contract Benefits


Explicit programming algorithms in core and blockchain properties like

decentralization, transparency, fraud resistance, and others make smart

contracts a credible alternative for establishing business relations and performing

transactions.

As an alternative to traditional contracts with a central business model, here are

the benefits that smart contracts offer businesses:

 Direct dealings with customers. Smart contracts remove the need for

intermediaries and allow for transparent, direct relationships with

customers.

 Resistance to failure. Since businesses aren’t dependent on a third party,

no single person or entity is in control of data or money. Decentralization

means that even if any individual leaves the blockchain network, the

network will continue to function with no loss of data or integrity.


 More trust. Business agreements are automatically executed and

enforced. Plus, these agreements are immutable and therefore

unbreakable.

 Fraud reduction. Since smart contracts are stored in a distributed

blockchain network, their outcome is validated by everyone in that network.

Therefore, no one can force control to release other people’s funds or

data, as all other blockchain participants would spot this and mark such an

attempt as invalid.

 Cost efficiency. Eliminating intermediaries removes additional fees,

allowing businesses and their customers not only to interact and transact

directly but also to do so with low to no fees for transactions.

 Record keeping. All contract transactions are stored in chronological

order in the blockchain and can be accessed along with the complete audit

trail.

Smart Contract Use Cases


Smart contracts are gaining popularity and have already been implemented in

various blockchain projects. Here are just several promising examples of smart

contract implementations in different industries.

Banking
Banking might be the primary industry where smart contracts appear to be the

most significant alternative to the traditional model of transactions. Smart

contracts make payments as well as loans, and nearly all others financial

operations literally automated.

KYC-Chain implements smart contracts for individuals, businesses, and financial

institutions. In the core of KYC-Chain are mechanisms allowing clients to comply

with regulatory norms, such as automatic smart checks, as well as to share

pertinent documents and get them digitally attested by notaries and institutions.

Healthcare
Smart contracts can also improve healthcare. They can streamline processes for

insurance trials, increase access to cross-institutional data, and boost confidence

in patient privacy. Authentication, authorization, and identity confirmation remain

open issues for smart contracts executed on blockchain networks.


An example of smart contracts in the healthcare industry is Dentacoin. Dentacoin

aims to bring patients and dentists together in communities to improve dental

care and make it affordable worldwide.

Supply Chain
Another area where smart contracts can provide real-time visibility is supply

chains. Smart contracts ensure granular inventory tracking, benefitting supply

chain financing as well as reducing the risk of theft and fraud.

Smart contracts can effectively be used regardless of marketplace type or goods

sold. For example, Name Bazaar is implementing smart contract technology

within a peer-to-peer marketplace where users can exchange cryptographic

assets on the blockchain in the form of domains.

Legal Issues
The traditional model of resolving legal issues and certifying documents is also

giving way to smart contracts. Smart contracts eliminate the need for

notarization, offering not only an automated and unbiased but also a cost-

efficient solution.

Nottar.io illustrates the concept of notarizing documents using the Ethereum

blockchain.
Real Estate
You’ve already read about the easiest concept of how a smart contract can work

for real estate in the How Smart Contracts Work section. Of course, real-life

projects are way more complicated and comprehensive and need to cover a

broader range of issues and opportunities.

For instance, FOAM is a stock market for real estate that uses technology to let

users make property transactions, get financing and funding, and manage

leases.

Government
It might be most interesting to investigate the potential impact of decentralization

technologies on monopolistic spheres, especially government systems.

Australian company Horizon State is working to provide voting and other tools to

help the democratic process. Particularly, Horizon State intends to offer a

blockchain-based voting ecosystem that supports secure, cost-effective

campaign operations for a range of election types and voting parameters. The

primary goal of Horizon State is to enable transparent, unbiased voting in

countries around the world.


Internet of Things Networks
There are areas where smart contracts intersect with other technologies, and the

Internet of Things (IoT) is one of them. A combination of smart contracts and IoT

is powerful and can enable significant transformations across industries, paving

the way for new distributed applications.

Project Oaken is proving that. Oaken provides autonomous IoT hardware and

software coupled with blockchain technology. Altogether, these components

make it possible to use Oaknen with nearly any device to build an IoT network

and therefore apply it to various real-life needs.

Final thoughts
Unlike the traditional centralized business model, smart contracts foster a new

kind of business relationship built on trust.

By inheriting blockchain properties, smart contracts offer immutability and

distributed storage, which is what distinguishes them most from traditional

agreements. Immutability and distributed storage allow smart contracts to

become a credible means for making business agreements and performing

transactions.

Blockchain technology is already impacting businesses. Of course, it is hard – or

even impossible – to revolutionize the way industries operate with the snap of a
finger. Significant changes take time. However, successful and promising use

cases for the blockchain and smart contract technologies in particular are laying

the groundwork for the future of business.

Interested in more articles about technology? Subscribe for our email newsletter

below and be the first to get updates!

You might also like