Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 30

SRM UNIVERSITY

FACULTY OF LAW
BLOCKCHAIN PRACTICAL
FILE

MADE BY:
NAME: GUNJAN
COURSE: B.A.LL.B (2021)
ROLL.NO: 46021210022
SUBJECT: BLOCKCHAIN
AND
IOT AND LAW
INDEX
1. Bitcoin Introduction , Wallet, Block chain , Merkel tree
2. Connectivity layer, Addressing , Networking, Sensor class, Sensor type
3. Mathematical Analysis of Bitcoin
4. Arduino Program, Example of Arduino Program
5. Rasberry Pi and IOT
6. IOT Networking
7. Smart Contract
8. How to use Image Tag
Topic: Bitcoin introduction, wallet, block of block chain, merkel
tree

1.1. Introduction to Bitcoin:

Bitcoin is a decentralized digital currency, often referred to as a cryptocurrency. It was


introduced in 2008 by an anonymous person or group of people using the pseudonym Satoshi
Nakamoto. Bitcoin operates on a peer-to-peer network called the block chain, which serves as
a public ledger for all Bitcoin transactions.

Bitcoin is not controlled by any central authority such as a government or financial institution.
Instead, it relies on cryptographic techniques to secure transactions and control the creation of
new units. Bitcoin has gained significant popularity and acceptance as a medium of exchange
and a store of value.

1.2. Bitcoin Wallet:

A Bitcoin wallet is a software application or a physical device that allows users to store, send,
and receive Bitcoin securely. Wallets contain private keys, which are used to sign transactions
and provide ownership of Bitcoin balances.

There are several types of Bitcoin wallets, including:

a) Software Wallets: These wallets are installed on a computer or mobile device and provide
convenient access to Bitcoin. Examples include Electrum, Exodus, and Bitcoin Core.

b) Hardware Wallets: These are physical devices designed to securely store Bitcoin private keys
offline. Hardware wallets, such as Trezor and Ledger, provide an extra layer of security by
keeping the private keys isolated from internet-connected devices.
c) Paper Wallets: A paper wallet is a physical printout or handwritten record of a Bitcoin
address and its corresponding private key. Paper wallets are usually generated offline for
enhanced security.

d) Online Wallets: Also known as web wallets, these wallets are hosted on a third-party
website or platform. While they offer convenience, online wallets are considered less secure as
the private keys are held by the service provider.

Bitcoins are electronic cash, additionally called computerized money. Bitcoins are a sort of
cutting edge open money that is made via cautious logical figurines and policed by an immense
number of customers called excavators. Bitcoins are, essentially, control changed over into long
strings of code that have money esteem. There are different reasons why computerized types of
cash are so naturally noticeable. They are secured, secretive and totally decentralized.

When one cases bitcoins, they act like physical gold coins. They have regard and trade as if they
are lumps of gold in one's pocket. One can use one's bitcoins to purchase items and ventures on
the web, or one can conceal them and expect their regard augments consistently. Bitcoins are
traded starting with one individual wallet then onto the next. A wallet is a little individual
database that one story on one's drive, on wireless or anyplace else.
Bitcoins are traded by methods for a common framework between individuals, with no agent
bank to take a cut. Bitcoin wallets can't be seized or set or looked into by banks and law
prerequisite. Bitcoin wallets can't have spending and withdrawal limits constrained on them. For
all designs: nobody, however, the proprietor of the bitcoin wallet picks how their wealth will be
supervised.

1.3. Block of Block chain:

The block chain is a distributed ledger that contains a record of all Bitcoin transactions.
Transactions are grouped into blocks, and each block is linked to the previous one, forming a
chain of blocks (hence the name block chain).

A block in the Bitcoin block chain consists of the following components:

a) Block Header: It contains metadata about the block, including the block's version,
timestamp, and a reference to the previous block's hash.

b) Transactions: A block can contain multiple Bitcoin transactions. Each transaction contains
information such as the sender's address, the recipient's address, and the amount of Bitcoin
being transferred.

c) Nonce: A random value that miners modify to find a hash that meets certain criteria. The
nonce is adjusted until a valid hash is found, which satisfies the network's difficulty target.

d) Hash: The block header, along with the nonce and transaction data, is hashed using a
cryptographic hash function (usually SHA-256). The resulting hash uniquely identifies the block
and is crucial for maintaining the integrity of the block chain.

A block chain is a distributed database or ledger shared among a computer network's nodes.
They are best known for their crucial role in cryptocurrency systems for maintaining a secure
and decentralized record of transactions, but they are not limited to cryptocurrency uses.
Block chains can be used to make data in any industry immutable—the term used to describe
the inability to be altered.

Because there is no way to change a block, the only trust needed is at the point where a user
or program enters data. This aspect reduces the need for trusted third parties, which are
usually auditors or other humans that add costs and make mistakes.

Since Bitcoin's introduction in 2009, block chain uses have exploded via the creation of
various cryptocurrencies, decentralized finance (DeFi) applications, non-fungible tokens
(NFTs), and smart contracts .

You might be familiar with spreadsheets or databases. A blockchain is somewhat similar


because it is a database where information is entered and stored. But the key difference
between a traditional database or spreadsheet and a blockchain is how the data is structured
and accessed.

A blockchain consists of programs called scripts that conduct the tasks you usually would in a
database: Entering and accessing information and saving and storing it somewhere . A
blockchain is distributed, which means multiple copies are saved on many machines, and they
must all match for it to be valid.
The blockchain collects transaction information and enters it into a block, like a cell in a
spreadsheet containing information. Once it is full, the information is run through an
encryption algorithm, which creates a hexadecimal number called the hash.

The hash is then entered into the following block header and encrypted with the other
information in the block. This creates a series of blocks that are chained together .

Transactions follow a specific process, depending on the blockchain they are taking place on.
For example, on Bitcoin's blockchain, if you initiate a transaction using your cryptocurrency
wallet—the application that provides an interface for the blockchain—it starts a sequence of
events.

In Bitcoin, your transaction is sent to a memory pool, where it is stored and queued until a
miner or validator picks it up. Once it is entered into a block and the block fills up with
transactions, it is closed and encrypted using an encryption algorithm. Then, the mining
begins.

1.4. Merkel Tree:

The Merkel tree, also known as a hash tree, is a data structure used in the Bitcoin block chain
to efficiently verify the integrity of transactions within a block. It is constructed by recursively
hashing pairs of transactions until a single root hash, known as the Merkel root, is obtained.

Here's how a Merkel tree is constructed:

a) Start with a list of transactions in a block.

b) Hash each transaction individually.

c) Combine pairs of hashes and hash them together to create a new set of hashes.

d) Repeat the process until a single hash, the Merkle root, is obtained.

The Merkle root is included in the block header and serves as a compact representation of all
transactions within the block. It allows efficient verification of transaction data.
Merkle tree also known as hash tree is a data structure used for data verification and
synchronization. It is a tree data structure where each non-leaf node is a hash of its child
nodes. All the leaf nodes are at the same depth and are as far left as possible.
It maintains data integrity and uses hash functions for this purpose.
Hash Functions:
So before understanding how Merkle trees work, we need to understand how hash
functions work.
A hash function maps an input to a fixed output and this output is called hash. The output is
unique for every input and this enables fingerprinting of data. So, huge amounts of data can
be easily identified through their hash .
Topic: Connectivity layer, Addressing, Networking, Sensor class,
Sensor type

2.1.Connectivity Layers in IoT:

IoT devices rely on various connectivity layers to establish communication and data transfer.
These layers include:

a) Physical Layer: It deals with the physical transmission of data through wired or wireless
mediums, such as Ethernet, Wi-Fi, Bluetooth, or Zigbee.

b) Data Link Layer: This layer ensures reliable and error-free data transfer over the physical
medium. It includes protocols like Ethernet, Wi-Fi (802.11), and Zigbee (802.15.4).

c) Network Layer: It enables the routing and addressing of data packets across different
networks. Common protocols used in this layer include IPv4, IPv6, and Routing protocols like
RIP, OSPF, or BGP.

d) Transport Layer: This layer provides end-to-end communication between devices. Protocols
like TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are used for
reliable and connectionless data transfer.

2.2. Addressing in IoT:

Addressing in IoT involves assigning unique identifiers to devices for identification and
communication purposes. There are two types of addressing commonly used:

a) MAC Address: Media Access Control (MAC) address is a unique identifier assigned to
network interface controllers (NICs). It is a physical address and works at the Data Link Layer.

b) IP Address: Internet Protocol (IP) address is a unique numerical label assigned to each
device connected to a network. It enables devices to communicate across different networks
using the Network Layer. IPv4 and IPv6 are the most commonly used IP versions.

2.3. Networking in IoT:

Networking in IoT refers to the establishment of communication among various devices and
systems. Key networking concepts in IoT include:

a) Local Area Network (LAN): It refers to a network that connects devices within a limited area,
such as a home, office, or campus. LANs typically use Ethernet or Wi-Fi as the underlying
technology.

b) Wide Area Network (WAN): A WAN connects devices across a large geographical area. It
involves the use of routers and public or private networks like the internet.
c) Protocol Selection: IoT devices utilize different protocols for communication, such as MQTT
(Message Queuing Telemetry Transport), CoAP (Constrained Application Protocol), HTTP
(Hypertext Transfer Protocol), or WebSockets.

2.4. Sensor Class in IoT:

Sensors in IoT devices are classified based on their functionality and capabilities. The sensor
class can be categorized as:

a) Physical Sensors: These sensors detect physical properties like temperature, humidity,
pressure, light, motion, or proximity. They provide real-time data about the physical
environment.

b) Chemical Sensors: Chemical sensors are designed to detect and measure the presence of
specific chemicals or gases. They find applications in air quality monitoring, industrial safety,
and environmental monitoring.

c) Biological Sensors: These sensors are used to detect and measure biological parameters
such as heart rate, blood pressure, glucose levels, or DNA analysis. They are commonly used in
healthcare and medical applications.
3. Topic: Mathematical analysis of Bitcoin

3.1. Introduction:

Bitcoin, as a decentralized digital currency, has gained significant attention from both financial
and technological perspectives. In this practical file, we will explore the mathematical analysis
of Bitcoin, focusing on transactions and data analysis, statistical analysis of Bitcoin price,
network analysis of Bitcoin transactions, and mathematical models used in Bitcoin mining.

3.2. Bitcoin Transactions and Data Analysis:

a) Transaction Graph Analysis: Bitcoin transactions can be represented as a directed graph,


where nodes represent addresses and edges represent transactions. Analyzing this graph can
reveal patterns, clustering, and flow of funds within the Bitcoin network.

b) Transaction Volume Analysis: By analyzing the transaction volume over time, we can
understand the growth and adoption of Bitcoin, as well as identify any anomalies or trends in
transaction activity.

c) Address Analysis: Analyzing the distribution and characteristics of Bitcoin addresses can
provide insights into the concentration of wealth and the behaviour of participants within the
network.

3.3. Statistical Analysis of Bitcoin Price:

a) Price Distribution Analysis: Analyzing the distribution of Bitcoin prices can help identify
trends, volatility, and potential outliers in the market.

b) Time-Series Analysis: Applying statistical techniques like moving averages, exponential


smoothing, or autoregressive integrated moving average (ARIMA) models can help predict
future price movements based on historical data.

c) Correlation Analysis: Studying the correlation between Bitcoin price and other financial
assets, such as stocks or commodities, can provide insights into the interdependencies and
potential hedging opportunities.

3.4. Network Analysis of Bitcoin Transactions:


a) Transaction Flow Analysis: Analyzing the flow of Bitcoin transactions between addresses can
help identify major entities, patterns of fund movement, and potentially detect illicit activities
such as money laundering or darknet market transactions.

b) Centrality Analysis: Using network centrality measures, such as degree centrality or


betweenness centrality, can identify influential addresses or nodes within the Bitcoin network.

c) Community Detection: Employing clustering algorithms to identify communities or groups of


addresses can reveal relationships between entities and their interactions within the Bitcoin
ecosystem.

3.5. Mathematical Models in Bitcoin Mining:


a) Hashing Algorithms: Analyzing the mathematical properties of hashing algorithms, such as
SHA-256 used in Bitcoin mining, can provide insights into their efficiency, collision resistance,
and security.

b) Mining Difficulty Adjustment: Understanding the mathematical model used to adjust mining
difficulty can shed light on the relationship between computing power, block production rate,
and the overall security of the Bitcoin network.

c) Mining Rewards and Halving: Analyzing the mathematical model behind Bitcoin's block
rewards and the halving mechanism can provide insights into the inflation rate, scarcity, and
long-term sustainability of Bitcoin as a digital asset.
4. Topic: Arduino program, example of Arduino program
4.1 Arduino Program
Arduino is an open-source platform used for building electronics projects. Arduino consists of
both a physical programmable circuit board (often referred to as a microcontroller) and a piece
of software, or IDE (Integrated Development Environment) that runs on your computer, used
to write and upload computer code to the physical board.
The Arduino platform has become quite popular with people just starting out with electronics,
and for good reason. Unlike most previous programmable circuit boards, the Arduino does not
need a separate piece of hardware (called a programmer) in order to load new code onto the
board -- you can simply use a USB cable. Additionally, the Arduino IDE uses a simplified version
of C++, making it easier to learn to program. Finally, Arduino provides a standard form factor
that breaks out the functions of the micro-controller into a more accessible package.
The Arduino hardware and software was designed for artists, designers, hobbyists, hackers,
newbies, and anyone interested in creating interactive objects or environments. Arduino can
interact with buttons, LEDs, motors, speakers, GPS units, cameras, the internet, and even your
smart-phone or your TV! This flexibility combined with the fact that the Arduino software is
free, the hardware boards are pretty cheap, and both the software and hardware are easy to
learn has led to a large community of users who have contributed code and released
instructions for a huge variety of Arduino-based projects.
For everything from robots and a heating pad hand warming blanket to honest fortune-telling
machines, and even a Dungeons and Dragons dice-throwing gauntlet, the Arduino can be used
as the brains behind almost any electronics project.
Arduino makes several different boards, each with different capabilities. In addition, part of
being open source hardware means that others can modify and produce derivatives of Arduino
boards that provide even more form factors and functionality. If you’re not sure which one is
right for your project, check this guide for some helpful hints. Here are a few options that are
well-suited to someone new to the world of Arduino:

Arduino Uno (R3)


The Uno is a great choice for your first Arduino. It's got everything you need to get started, and
nothing you don't. It has 14 digital input/output pins (of which 6 can be used as PWM
outputs), 6 analog inputs, a USB connection, a power jack, a reset button and more. It contains
everything needed to support the microcontroller; simply connect it to a computer with a USB
cable or power it with a AC-to-DC adapter or battery to get started.

LilyPad Arduino
This is LilyPad Arduino main board! LilyPad is a wearable e-textile technology developed
by Leah Benchley and cooperatively designed by Leah and Spark Fun. Each LilyPad was
creatively designed with large connecting pads and a flat back to allow them to be sewn into
clothing with conductive thread. The LilyPad also has its own family of input, output, power,
and sensor boards that are also built specifically for e-textiles. They're even washable!

Red Board
At Spark Fun we use many Arduinos and we're always looking for the simplest, most stable
one. Each board is a bit different and no one board has everything we want -- so we decided to
make our own version that combines all our favorite features.
The Red Board can be programmed over a USB Mini-B cable using the Arduino IDE. It'll work
on Windows 8 without having to change your security settings (we used signed drivers, unlike
the UNO). It's more stable due to the USB/FTDI chip we used, plus it's completely flat on the
back, making it easier to embed in your projects. Just plug in the board, select "Arduino UNO"
from the board menu and you're ready to upload code. You can power the Red Board over
USB or through the barrel jack. The on-board power regulator can handle anything from 7 to
15VDC.

Arduino Mega (R3)


The Arduino Mega is like the UNO's big brother. It has lots (54!) of digital input/output pins (14
can be used as PWM outputs), 16 analog inputs, a USB connection, a power jack, and a reset
button. It contains everything needed to support the microcontroller; simply connect it to a
computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. The
large number of pins make this board very handy for projects that require a bunch of digital
inputs or outputs (like lots of LEDs or buttons).

Arduino Leonardo
The Leonardo is Arduino's first development board to use one microcontroller with built-in
USB. This means that it can be cheaper and simpler. Also, because the board is handling USB
directly, code libraries are available which allow the board to emulate a computer keyboard,
mouse, and more.

The Extended Family

While your Arduino board sure is pretty, it can't do a whole lot on its own -- you've got to hook
it up to something. There are lots of tutorials here on learn as well as the links back in the
'What does it do' section, but rarely do we talk about the general kinds of things you can easily
hook into. In this section we'll introduce basic sensors as well as Arduino shields, two of the
most handy tools to use in bringing your projects to life.

Sensors
With some simple code, the Arduino can control and interact with a wide variety of sensors -
things that can measure light, temperature, degree of
flex, pressure, proximity, acceleration, carbon monoxide, radioactivity, humidity, barometric
pressure, you name it, you can sense it!

Shields
Additionally, there are these things called shields -- basically they are pre-built circuit boards
that fit on top of your Arduino and provide additional capabilities -- controlling
motors, connecting to the internet, providing cellular or other wireless
communication, controlling an LCD screen, and much more.

4.2 Example of Arduino Program


Here is a simple example of an Arduino program that blinks an LED on and off:

// Pin number for the LED

const int ledPin = 13;


// Setup function runs once at the beginning

void setup() {

// Initialize the LED pin as an output

pinMode(ledPin, OUTPUT);

// Loop function runs repeatedly after setup

void loop() {

// Turn on the LED

digitalWrite(ledPin, HIGH);

// Delay for 1 second

delay(1000);

// Turn off the LED

digitalWrite(ledPin, LOW);

// Delay for 1 second

delay(1000);

Connect an LED to pin 13 of your Arduino board. The longer leg of the LED (positive terminal)
should connect to pin 13, and the shorter leg (negative terminal) should connect to GND.

Launch the Arduino IDE (Integrated Development Environment) on your computer.

Create a new sketch and copy the above code into the IDE.

Select the correct Arduino board and port from the "Tools" menu.

Click the "Upload" button to compile and upload the code to the Arduino board.

The LED connected to pin 13 should start blinking with a 1-second interval. The setup()
function is called once at the beginning to set up the LED pin as an output. The loop() function
is called repeatedly, toggling the LED on and off with a 1-second delay using the
digitalWrite() and delay() functions.

This program uses the `setup()` function to initialize the built-in LED pin as an output, and the
`loop()` function to turn the LED on and off with a one-second delay between each state
change.

Once you have written your program, you can upload it to the Arduino board using the Arduino
software. This will compile the program and transfer it to the microcontroller, where it will be
executed.

In conclusion, Arduino programs are sets of instructions written in the Arduino programming
language that are used to control an Arduino microcontroller. By interfacing with various
hardware components, these programs can be used to build a wide range of electronic devices.
Topic 5: Rasberry pie and IOT
The Raspberry Pi is a series of low-cost, programmable computers that include a set of GPIO,
or 'General Purpose Input Output', pins that can be used to connect and control external
electronic devices, and to create Internet of Things (IoT) solutions.

The exact number and role of the pins changes between individual models but is generally
divided into power, ground, and general-purpose pins. The power and ground pins are not
programmable. The power pin supplies a constant 3.3V/5V power to the circuit while the
ground pin is used to connect to the cathode of the circuit.

The general-purpose pins are fully programmable and can be used in either an output or input
mode. When set to output mode, the pins provide a constant 3.3V power that can be turned
on or off. When set to input mode, the pin reads the current supplied by the circuit and
returns a Boolean value indicating if it receives 3.3V power or not.
Of course, these capabilities aren't new and have been widely available to developers through
microcontrollers such as Arduino or NodeMCU. However, these devices generally came with
limited memory and computing power and required the use of particular programming
languages.

The Raspberry Pi, on the other hand, supports a more robust CPU that is capable of running
Linux and supports NodeJS, allowing JavaScript developers to use their existing skillset and
build sophisticated devices with relative ease.
To interact with the GPIO pins, we use a NodeJS module called onoff that provides simple
access to the individual pins.

The equivalent of a 'hello world' demo in the world of microcontrollers is a blinking led. Most
of the code in the example below should already be familiar to JavaScript developers.
const Gpio = require('../onoff').Gpio;
const led = new Gpio(17, 'out');

After requiring the module, we define the roles of the pins we wish to interact with. The
number identifies the pin on the board, followed by determining if the pin is used to read ('in')
or write ('out').

In this example, we defined a pin called led, assigned it to physical pin 17 and set it to write
mode ('out')
const blinkInterval = setInterval(blinkLED, 500);

function blinkLED() {
if (led.readSync() === 0) {
led.writeSync(1);
} else {
led.writeSync(0);
}
}

Now all that's left is to make our led blink by creating a 500ms interval and turning the led
on/off based on its current state.
setTimeout(() => {
clearInterval(blinkInterval);
led.writeSync(0);
led.unexport();
}, 5000);

Assuming we do not wish to continue blinking the LED indefinitely, we would also need to
clean up at the end. In this example, we will wait 5 seconds before clearing our interval,
turning off the led, and releasing its resource.

Why Raspberry Pi and AWS IoT are such a good match


 Purpose and requirements. Relatively high computing power, rich componentry and
customization opportunities make Pi a great choice for an edge layer device like a gateway or
local server. The latest Pi 4 model B has a 1.5 GHz ARM Cortex-A72 processor and up to 4GB
SDRAM enough to handle intensive data flows and perform computing at the edge. In turn,
AWS IoT platform offers the services designed specifically to quickly and securely roll out edge
intelligence and enable diverse functions such as computing, device communication, data
management or even running machine learning models locally. Designed for this purpose,
AWS IoT Greengrass service can run on general-purpose computers that have at least 1 GHz of
computing power and 128MB of RAM. These requirements match the specifications of many
Raspberry Pi models and make this small computer ideal to work with this and other AWS IoT
services.
 Cost-efficiency. You can buy Raspberry Pi online at an average price of $35 (this is the price for
the most popular Raspberry Pi 3 Model B+). Amazon IoT platform also stands out for its
favorable and flexible pricing policy. According to the official AWS website, “you pay only for
what you use.” When it comes to AWS IoT Greengrass services, you even get a free first year of
use with AWS Free Tier when connecting up to 3 devices. This is good news for those who
create a prototype device to test an IoT business idea.
 Tools and support. Amazon recognizes Raspberry Pi as a popular tool for prototyping
and development of Internet of Things applications and offers support for Raspberry Pi and
Raspbian OS. There are ready-to-use developer tools, libraries, AWS IoT SDKs and official
tutorials and guides on how to use them on Raspberry Pi.
 Simplicity. This could be one of the biggest benefits for those who are just starting an IoT
project. You can connect Raspberry Pi and AWS IoT platform in several consecutive steps. It’s a
pretty straightforward process, and there’s no shortage of examples and guides on how to do
it, including the one provided by AWS. Here’s this process described in more detail.
How to connect Raspberry Pi to AWS IoT

As we have mentioned earlier, the process of setting up Raspberry Pi to work with AWS IoT is

straightforward and doesn’t require a lot of tools and coding. Apart from Raspberry Pi 2 B or

any later model, you will need a keyboard, mouse, monitor, access to the Internet (Wi-Fi or

Ethernet) and an active AWS account.


Here’s a short description of this process. You can find the detailed step-by-step instruction in

the official AWS guide or this example.

Step 1. Set up

First of all, you need to set up both Raspberry Pi and AWS IoT. For the board, you will need an

SD card with Raspbian or other general-purpose OS, USB power supply, monitor, keyboard,

mouse and Internet connectivity. To set up AWS IoT, you will need to create an AWS account

(check the Free Tier offers) and access your AWS IoT console.

Step 2. Configure AWS IoT

You need to prepare your AWS account. Using your account’s dashboard, you can create a

‘thing’ that will represent your device, give it a name, create the policy to determine which

AWS IoT sources the device can access and register it assigning the necessary certificates.

Step 3. Configure Raspberry Pi

On the hardware side, your Raspberry Pi should have a certificate, private key and root CA

certificate installed to authenticate with AWS IoT (read here to learn more) and be able to

send messages to AWS IoT. To configure your device to be able , you can use AWS IoT device

SDKs, for example, AWS IoT Python SDK or AWS IoT Device SDK for Embedded C depending on

your case.

Step 4. Create rules

In order to make AWS IoT act on the data received from Raspberry Pi, you will need to create a

rule to specify what AWS IoT should do with the messages coming from the device.

In the AWS IoT developer guide, you can find an example of connecting Raspberry Pi to AWS

IoT services to read and act on the data sent by a moisture sensor.

Missing eMMC Internal Storage

Since the raspberry pi doesn't have any internal storage it requires a micro SD card to work as an
internal storage. We all know that SD cards are not that fast. Even if we compare an class 10 High
Speed micro SD card with an eMMC internal storage. It lacks performance, so this increases boot
time of the board and read/write speed of the raspberry pi.

Graphics Processor Missing

Well graphics process is a very crucial thing, if you're into photo editing, video editing and
gaming. Without it your Computer is just a potato. Many of us need a graphics processor so we
can do certain tasks. While the raspberry pi doesn't come with a GPU unit. The processor does all
the task for it, which is inefficient.

Impractical as a Desktop Computer

When we look at the bigger picture of the board here, and think of it as a desktop computer. It
misses a lot of stuff. Even if you buy the latest raspberry pi with the 4GB ram. It lacks some
performance. It is said to render 4K video at 60 FPS but in actual its a bit less and you will see
some stutters in 4K 60 FPS video.

If you open too much tabs, the board will start to slow down a bit. You can't watch online videos
on netflix or amazon, you will need to install extra codecs. even after that you will barely be able
to stream 2K properly. It needs some improvement and optimization in the software and
hardware end both.

Overheating
As the board doesn't come with any heat-sinks pre-applied or any cooling fan. As the raspberry pi
4 comes with a powerful processor and multiple features, it starts to heat up after sometime due
to the same board size, the heat dissipation is not proper as expected. If you use it for continuous
6-7 hours without air-conditioning or heat-sink. It will heat up very much above 70 ° C if you are
in south Asian region.

Overheating
As the board doesn't come with any heat-sinks pre-applied or any cooling fan. As the raspberry pi
4 comes with a powerful processor and multiple features, it starts to heat up after sometime due
to the same board size, the heat dissipation is not proper as expected. If you use it for continuous
6-7 hours without air-conditioning or heat-sink. It will heat up very much above 70 ° C if you are
in south Asian region.

Not able to run Windows Operating system

Many people will argue about this , that it is able to run windows OS on it. But the fact is , that it
is just a community made windows 10 port. Which is not an official release. It will crash a lot and
there will be many bugs. Windows operating system is the most user friendly as we know, for
gaming its the primary OS. You basically can't play games on Linux systems practically. Many
apps are available for windows OS because of the ".exe" format support. We have alternative
apps available on Linux , but many popular software developers use the .exe formats.

Can be Used as a Portable Computer

This is the best part of raspberry pi. Suppose if you attach a display to it, and now it will become a
pocket computer. You can do all sorts of task a computer can do. You can check sites, connect to
WiFi, do computational tasks.

Fast Processor
Talking about the core. When we compare it with Arduino and other boards, you get a faster
processor. Arduino comes with a controller, while here Raspberry Pi comes with a 1.6 GHz
Processor in the 4B variant of Raspberry Pi.

Faster processor means good performance. The price to performance of raspberry pi board is
really great. I bet you won't get that much performance on any board at that price.

Supports all type of Codes


Its one of the best part of this board, if we compare it with arduino you will know that arduino
only supports C, C++. While this board works as a single board computer. You get a linux desktop
environment in which you can code in almost any language, be it C,C+
+,C#,Ruby,Java,Python,etc...

This Support for all types of code makes this board famous, one of the main goal of the raspberry
pi foundation was to provide cheap computing to people, so that they can learn programming.
They have really reached their goal in providing cheap computing to people, so they can learn
programming easily.

Moving towards the future, everything is turning digital, so we need more and more
programmers. Raspberry Pi is really helping people who cannot spend much for desktop
computers

Multiple Sensors

As discussed in the above section that it comes with a lot of GPIO Pins, so it is obvious for it to
support multiple sensors at once. You can connect various displays, modules, sensors, etc...to it.
Unless its not analog.

Vast Peripheral Support

Raspberry Pi comes with 26 GPIO Pins which are very useful indeed for embedded projects and
interfacing hardware. These pins are really useful in learning about component interfacing. You
can combine multiple digital sensors all together due to the good number of GPIO pins being
given. It supports almost all the peripherals supported by Arduino.

It has a lot of accessories available for it in the market. You will find many Raspberry Pi cases with
different designs, Raspberry pi HATs, Fans, Heat Sinks, etc... You will find a whole big community
and support as well. It is said to be the most popular single-board computer of this era.

Topic 6: IOT Networking


Technology is playing a major role in our lives. The advent of different types of technologies
has changed the way of our living and working. The discovery of computers and the internet
has brought a revolutionary change in the world. People at present mostly depend upon the
internet and computer to perform their maximum tasks. Not only it has changed our lifestyle
but also made it comfortable. Internet of things is also an aspect of the internet. We will
discuss this technology, its history, application, and future scope in the essay provided below.
What is meant by the Internet of Things (IoT)?

IoT refers to the collection of different types of daily life appliances and gadgets used in
different sectors that are broadening the aspect of the internet. The connectivity with the
internet enables these devices to share and receive data with different objects. Internet of
things simply means the network of devices that are able to share and receive data and
information with other devices via using the internet.

The things or objects in the Internet of Things above are well equipped with sensors, software,
and machine learning techniques. The use of such objects reduces human interference in
doing any of the work. The advent of IoT has totally changed the life of human beings by
reducing their workload and time. The advancing technology day by day is giving rise to
different smart objects thereby improving the standard of living of human beings.

n Account on Concept of IoT

How interesting it is that the devices are able to communicate with each other or human
beings? This is all possible because of advancements in internet technology and the
development of smart devices.

 The emergence of the concept of the integration of smart devices stated as ‘Internet of Things’
came into existence in the year 1982.
 A Coca-Cola vending machine at Carnegie Mellon University in Pennsylvania was the first smart
appliance that was termed as ARPANET device.
 The word ‘Internet of Things’ for first time was used by Peter T. Lewis in his speech in the
Congressional Black Caucus Foundation held in Washington D.C. in the year 1985.
 The Phrase ‘Internet of Things' was first time used by Kevin Ashton in the year 1999 and thus
he is regarded as the father of IoT.
 It was emphasized by Kevin Ashton that every device needs short-range mobile transceivers
embedded in it so that it can establish communication with human beings and other devices.
 Several other important works and improvements in this field have taken place in successive
years and the percentage of people using this concept has also increased as the years passed
by.

IoT Architecture

The objects in Internet of Things have a definite constitution of technologies that enables them
to work efficiently by using internet connection. These devices are architecture that is a
combination of several technologies. The technologies that are embedded in IoT are enlisted
below:

 Different Types of Sensors- IoT devices have sensors embedded in them so that these devices
can sense whatever is happening in the environment. It is working in the same way as the
human sense organs are working. The connection of sensors with the internet helps it to
collect information from the surroundings.
 Internet Connection- An internet connection is a must to enable the sensors in the devices to
connect it with other devices so that the sending and receiving of data becomes convenient.
 Several Computing Devices- These devices help in making the process of data collection,
analyzing, and sending more easily.
 Machine Learning and Analytics Devices- The use of machine learning and advanced analytics
by the Internet of things make this process more efficient. It helps the devices to collect
maximum data in very less time.
 Artificial Intelligence- Artificial intelligence and machine learning help the devices to develop
connectivity with other devices in the IoT network in a smarter way. In another way, we can
state that it smoothen the process and helps in reducing human interferences in performing
any kind of task. Example: Alexa, Siri, etc.
Need of IoT

The developments of a range of technologies have enhanced the lifestyle of human beings.
Isn’t it true? Digitalization is taking place in India and the world at a very fast pace. Thus in
order to be in the pace with the digital world, the network of smart devices is very essential. It
is a technology that helps in establishing a good interaction between the different devices
among themselves and also with human beings.

Moreover, the emergence of devices embedded with sensors and advanced technologies
reduces the workload of human beings. It helps in finishing different tasks in less time along
with developing coordination with the activities taking place in the surroundings. The
development of the network of these smart devices is not only useful in household works but
also aid in commercial sector tasks. Thus, IoT in the 21st century has become an essential
requirement in different sectors all around the world.

Advantages and Disadvantages of IoT

IoT which stands for Internet of Things helps in enabling the smart devices to interact with
each other by sharing the data. There are several benefits with the emergence of this
technology but there are also some drawbacks associated with it. Several advantages and
disadvantages of IoT have been enlisted below.

Advantages

 The IoT devices help in establishing interaction between the devices connected with each
other through the internet.
 The sensor embedded in the smart devices makes it capable of collecting and accessing
different information at any time.
 The collected data can be analyzed and further brought into action or shared with other
devices in very less time. This reduces the effort and time taken in doing the same work by
people manually.

Disadvantages

 There are many devices connected with each other in IoT and thus sharing of different
information takes place. The probability of hacking some important information increases in
such processes.
 The enterprises concerned with different businesses can acquire information from several
devices connected to the IoT networks. It is difficult for them to collect and manage data from
a large number of IoT devices.
 Every smart device does not have compatibility for connecting with other devices as there is
no international standard of IoT.

IoT Doing Wonders

The invention of devices embedded with sensors and smart software has widened their
application in different sectors. These devices not only form an integral part of household
works but also play a major in different sectors like industrial, manufacturing, healthcare,
agriculture, etc.

 IoT in Manufacturing Sector- The manufacturing and industrial sector has benefitted a lot as
the IoT devices help in monitoring the working of all the machines. The machines are
connected with each other so that they can develop good communication and can be
controlled easily. The quality of the products can also be checked at regular intervals by using
these smart devices. Therefore, it can be stated that the development of such smart
technologies is helping in increasing the performance of machines, fostering production, and
boosting up the customer experience.
 IoT in Healthcare- IoT devices is of great importance in the healthcare sector. It gives rise to
connected devices like wearable’s that help the doctors to monitor different activities of the
patients. These devices can also be used by people to monitor their health regularly. Thus, it
can be stated that the use of these advanced technologies has improved the diagnosis and
treatment procedure by making it more precise.
 IoT in Transportation- The introduction of GPS and sensors in the devices has reduced the
difficulty of locating the exact locations. This reduces the effort and time wastage of
transportation companies in searching the locations. They can deliver the products more
efficiently with any kind of delay. Thus, IoT devices help in cutting down the cost as the
monitoring, tracking of the vehicles and locations can be managed easily by using smart
devices. Moreover, it also enhances the customer experience.
 IoT in Household works- The use of smart appliances in the home enables us to carry our
household work with great ease. The working of these devices can also be controlled remotely
by using computers and smart phones.
 IoT in Agriculture- The use of IoT in agriculture is very benefitting for the growth and
production of different crops. The smart devices help in collecting the data from the
surroundings and further after analyzing the same the action can be taken. The soil parameters
can be easily detected by using devices having inbuilt sensors. These devices can easily access
the condition and suggest the type of crop that can be grown easily with good yield in the
future.

There are several sectors that are benefitted with the advent of the network of smart devices.
We can notice these devices everywhere around us. They now have become an integral part of
our life. The presence of these devices has made our lives more comfortable.

Future of IoT

There are different types of new innovations taking place in different regions of the world
every now and then. Internet of Things (IoT) is also one such invention. It has gained surplus
attention of the world and is now being used in different sectors.

The need of the internet is very essential nowadays. Internet, sensors, and advanced
technologies have made normal devices turn into smart devices. The integration of these
smart devices is referred to as the Internet of Things. There are more than 4 billion smart
devices installed in the world at present. The numbers will increase to double in the coming
years. It is because the use of the internet in the coming years will more profuse. The large
network of smart devices will help in getting vast data in a spark of seconds. This in turn will
foster the businesses; increase the product variety, efficiency in the delivery of products, etc.
The Internet of things has a good potential in the future but a few challenges need to be
addressed to make it a successful technology in the future.

Conclusion

The Internet of things has widened the aspect of internet. This has become the most discussed
topic at present. These smart devices influence our life in our travel, shopping, lifestyle, health,
daily works, etc. The Internet if things are not only restricted to the household objects but they
have their wide applications in different sectors. In this way Internet of Things is having a
positive impact on the society.

Yet there are some challenges but efficient working in this direction will reduce the drawbacks
in the coming future and make it a technology with great potential. This long essay contains
the elaborated details about the Internet of Things.
Topic 7: Smart contract
Blockchain technology is much broader than just bitcoin or other digital currencies. Sustained
levels of robust security have been achieved by public cryptocurrencies. This demonstrated to
the world that a new wave of blockchain technologies can provide efficiencies and intangible
technological benefits very similar to what the Internet has done. The blockchain phenomenon
is no longer just about bitcoin and cryptocurrency: it’s about “removing friction from any
transaction-related process, including the process of reaching contractual agreements”. For
this reason it is inevitable to talk about smart contracts. People assume that smart contracts
are already becoming a cornerstone for enterprise blockchain applications and will likely
become one of the pillars of blockchain technology. But are smart contracts always “smart”?
Below I will explore smart contracts, both their legal and practical problems and whether they
can be a comprehensive solution for future use cases.

Smart Contracts

The term smart contract does not have a clear or settled definition. Basically, smart contracts
are computer programs that act as agreements where the terms of the agreement can be
preprogrammed with the ability to self-execute or self-enforce itself. It operates mechanically
and automatically and no human interference is needed. The main goal of a smart contract is
to enable two or more anonymous parties to trade and do business with each other, usually
over the Internet, without the need for a middleman. For this reason they are also called self-
executing or digital contracts. The smart contract technology makes contracts much simpler to
build and deploy.
Computer scientist Nick Szabo first coined the phrase “smart contracts” in his 1997 paper
“Formalizing and Securing Relationships and Public Networks”. His goal was to bring what he
called the “highly evolved” practices of contract law and related business practices to the
design of electronic commerce protocols between strangers on the Internet. His work has
been foundational to what smart contracts are becoming in the blockchain era. In his paper
Szabo defined smart contracts as “a set of promises, specified in digital form, including
protocols within which the parties perform on the other promises”. For him was “the basic
idea behind smart contracts that many kinds of contractual clauses (such as collateral,
bonding, delineation of property rights, etc.) can be embedded in the hardware and software
we deal with, in such a way as to make breach of contract expensive…”.
Smart contracts would improve execution of the four basic contract objectives, which Szabo
described as observability, verifiability, privity and enforceability. Among other use cases,
smart contracts – according to Szabo – would enable both parties to observe the other’s
performance of the contract. It would verify if and when a contract has been performed,
guarantee that only the details necessary for completion of the contract are revealed to both
parties and be self-enforcing to eliminate the time spent policing the contract. Furthermore,
smart contracts reduce mental and computational transaction costs.
Traditional physical contracts, such as those created by legal professionals today, contain legal
language on vast amounts of printed documents and heavily rely on third parties for
enforcement. This type of enforcement is not only very time consuming, but also very
ambiguous. Smart contracts have the potential to solve these problems. First, they can reduce
costs. Second, they can cut legal paperwork and, consequently, time associated with each
transaction. Thus, securing a transaction can take seconds instead of hours through smart
contracts (Exhibit 1).
2. Blockchain
With blockchain there has been a renewed interest in smart contracts over the last couple of
years. The first use of blockchain technology was the digital currency bitcoin. Systems today
operate in a centralized model, which means that parties who wish to transact with each other
do so via a central system. This leads to the problem that all parties have to trust this central
system. Thus, people are dependent on third parties. Blockchain coupled with smart contract
technologies removes the reliance on central systems between transacting parties. Instead of
relying on a centralized authority to validate a contract between two counterparties,
blockchain relies on digital code to confirm transactions. Therefore, the modern conception of
a smart contract typically depends on blockchain technologies in a decentralized system.
Therefore the shared ledger of the blockchain itself is certainly significant, but what it enables
matters most: it provides a way to validate transactions through little or no human
intervention. Instead of involving lots of humans in the transaction pipeline and paper
processes that take days, weeks or months to complete, huge volumes of transactions could
be validated automatically.
III. Ethereum
Probably the most famous smart contract application is Ethereum. In late 2013, programmer
and co-founder of Bitcoin Magazine, Vitalik Buterin, published a white paper detailing an
innovative digital currency-powered technology platform known as Ethereum. It is an open-
source, public, blockchain-based distributed computing platform featuring smart contract
functionality. Ethereum was built on the same fundamental principles as Bitcoin: a blockchain
protocol should be decentralized and its transaction ledger immutable. Additionally, it is a
programming language (Turing complete), which runs on a blockchain and helps developers to
build and publish distributed applications. In the Ethereum blockchain, instead of mining for
bitcoin, miners work to earn ether, a type of crypto token that fuels the network. Ether can be
transferred between participants and is used to compensate participant nodes for
computations performed.
Ethereum’s live blockchain was launched in July 2015. Since then the price for Ethereum has
been jumping from one all-time high in March 25, 2017 (Exhibit 2) to next one on May 1, 2017
(Exhibit 3). Even more impressive is Ethereum’s market cap. In less than two years, it has gone
from zero to a market cap of around $7 billion in May 2017. Furthermore, Ethereum seed
investment USD return is presently 148x and when placed in the context of “Time to Unicorn
Valuation” it is ranked number 3 (Exhibit 4).
Bloomberg compares Ethereum to GoogleDocs and describes it as shared software that can be
used by all but is tamperproof. The article goes as far as saying that there could be blockchain
versions of Uber or Airbnb that are peer-to-peer. It means that no company would need to sit
in the middle of the transaction to gather data about spending habits or collect a fee. Others
fear that Ethereum may “face more security problems than bitcoin because of the greater
complexity of the software”. The DAO has shown that Ethereum is all but perfect but it has
also shown that these problems can be solved. Every new technology has bugs. Important is to
learn from it and to seize the opportunity to improve day by day.
IV. Problems
According to the first paragraphs of the paper, it sounds like smart contracts are going to be
the perfect solution to all future transactional and contractual questions. Smart contracts in
combination with distributed ledger technologies have the potential to automate an extensive
array of transactions and services within the financial services sector. However, the title
“Smart Enough Contracts” indicates that smart contracts can bring new problems as well, and
some use cases are simply impossible. As a result, the reality of smart contracts is more
mundane. When getting past the theory and examining the practical with a legal eye, it is
actually difficult to consider a smart contract as either smart or a contract. As a matter of fact,
smart contracts are far from perfect. To this point, they are just automated computer code.
Therefore, the term “smart contract” is somewhat misleading and it might be better to drop it.
A more fitting name would likely be smart agent or smart program, as contract agreements are
one, but not all of the expressions that can be archived.
1. Legal Problems
Advancements in blockchain technology have led some to believe that smart contracts could
soon offer alternatives to traditional commercial and financial agreements. While this
enthusiasm may be premature, the legal profession nonetheless remains mostly unaware of
this important emerging technology and the long-term implications for their profession.
Therefore, it is questionable whether code can replace the law. Technology solutions alone
cannot realize the promise of smart contracts. In some ways a smart contract is similar to a
traditional contract, as the parties that agree to this on both sides have to agree to the
conditions that the contract will execute under. When it becomes ambiguous as to whether
the conditions have been met, solutions could be trusted oracles, an option for arbitration or
an acceptance of “the code is the law”. But there are also decisions that code cannot make.
Such as, definitions and agreements that would have to be made by people, quite possibly
specialists in legal advice. As a result, a full replacement is highly unlikely.
a. Enforceability
Smart contracts must be designed to ensure legal enforceability globally, with the strength of
contractual law. A contract is a legal document between two parties. In order to be
enforceable, the contract must contain several elements. If even one is missing, a contract
may be voided and the parties will be excused from any obligations. In a smart contract, it is
not guaranteed that all these elements exist. For instance, when the law limits or bars a person
from engaging in specific activities, any agreements or contracts to do so are either voidable or
void for incapacity. However, the parties do not have to reveal their identities in a smart
contract. For example, in highly regulated industries, such as the financial services industry, it
is a mandatory requirement to know your customer to prevent money laundering. With their
decentralized processing, smart contracts obviate the need for customer credentials. This
could prove to be problematic in the future.
b. Interpreting the law
The contract can only be executed without complication if both parties agree unequivocally
that the conditions for the contract have been met. If either party disagrees, the contract can
be challenged. Lawyers or even courts will have to interpret the clauses of the contract to
decide, which parts of the contract have been fulfilled and in who’s favor. As a result, a
contract often leaves ample room for interpretations, especially when a term is implied.
Implied terms are not stated but nevertheless form a provision of a contract. Furthermore,
smart contracts may often deal with commercial scenarios so complex and unpredictable that
the code will fail to embed all possible answers to all possible questions. A smart contract,
which is basically automated code, cannot interpret the law the same way a human being can
and it can hardly read implied terms, which are not stated and therefore not part of the code.
Otherwise every smart contract or code would be of an enormous size in order to guarantee
every single possibility of interpretation. This would be very costly and time-consuming and
therefore contradict the concepts of smart contracts. Code works on linear decision-making
and probability, but more often than not, finding the right answer to settle a particular
contractual nuance is a much more lateral process and requires a level of creativity and
flexibility that can come only from real-life experience. To inject that depth of practical
experience into code is probably an impossible task.
Additionally, since all processes are standardized and automated, users have to trust that the
code and the network will function as expected. But what computer would be trusted to
“execute” those terms in a way that both parties could rely upon? Parties must not only agree
on the code of their contract, but also the computer, which interprets and executes that code.
A shared standard, at the minimum, would have to exist, and be used in a way that was
verifiable by each party.
c. Dispute Resolution
It would also be difficult to resolve disputes for smart contracts. Since algorithms are
responsible for the contract, it becomes difficult to prove its validity and accountability in a
court of law. What if incorrect code creates an argument between the contracted parties?
Who is there to sort things out? As long as the parties have clearly accepted the terms, there is
scope to litigate. As there is currently no international Internet law, the original contract would
have to set out the jurisdictions of the parties and which country’s law the contract is reliant
upon. How should governments regulate such contracts?
This shows that the legality of financial smart contracts is yet to be established. First steps
have been taken in the US, by the State of Vermont, to recognize distributed ledgers in the
state courts. Similarly, the US State of Delaware was the first state that recently launched a
program to provide an enabling regulatory and legal environment for the development of
blockchain technology. The Delaware Blockchain Initiative’s roadmap includes the issuance of
legally-enforceable smart UCC filings, followed by the possible enactment of enabling and
conforming legislation authorizing distributed-ledger shares and the offering of new registry
services not presently offered by Delaware. Another key aspect to consider is an accurate
translation of legal terms and conditions into software logic. Startups such as CommonAccord
are working on a system that auto-translates legal documents into smart contracts, simplifying
their interpretation by both lawyers and developers.
Legislators, regulators and governments have begun to realize the potential for distributed
ledgers in increasing transparency and ease of compliance and reporting.
d. Conclusion
Until now, smart contracts will never fully replace natural-language law. Many types of
agreements can never be fully expressed in code or executed by a computer; especially those
that involve human performance rather than the exchange of dematerialized assets. Even fully
self-executing contracts will ultimately need to make reference to legal terms and concepts
that will define each party’s rights if their relationship leads to litigation. Many roles inside the
business eco-system will need to be transformed. Lawyers must learn how to write
computable code, and judges must learn how to interpret it, or rely on expert witnesses to
testify valid interpretations. In the end, the evolution of smart contracts will lead to a re-
evaluation of common practice. Both practitioners and clients will have to discover which
types of agreements and terms are best suited to code, which should be left to natural
language and how to provide a combined solution for both alternatives.
2. Practical Problems
Once initiated, the outcomes for which a smart contract is encoded to perform cannot usually
be stopped. This can create many practical problems.
a. Safety
Smart contracts may be difficult to develop and implement where situations call for
reversibility of transactions. They need to be error-free, error-tolerant or, in at least some way
correctable because they are generally irrevocable or impossible to stop. Relying on “form”
contracts is no guarantee of safety – especially not for smart contracts. A software consumer
for example has an error correction process built into the software license. When something
goes wrong, there will probably be someone to solve the problem. But smart contracts are not
ordinary software. A smart contract is supposed to automatically implement a real-life
contract: an actual agreement between two (or more) parties. After the negotiation, parties
agree to the terms of a deal. Then, those terms are converted into a smart contract. But the
parties don’t know whether the terms agreed upon were correctly programmed. If bugs get in
the code, it could be problematic that the smart contract is stored on an immutable
blockchain. Any errors or vulnerabilities are set in one ‘block of the chain’. The program code
implementing the smart contract cannot immediately be debugged after being stored on an
immutable blockchain.
b. The DAO
One good example of bugs that got in the code is The DAO. The DAO was a decentralized
autonomous organization and a form of investor-directed venture capital fund. The project
wanted to provide a new decentralized business model for organizing both non-profit and
business model enterprises. It lived in the ether, which means that it ran as a DAO application
on top of the Ethereum blockchain. Furthermore, it had no conventional management
structure or board of directors and the code was open-source. Most importantly, The DAO was
stateless, and not tied to any particular nation state. This, again, is a legal problem: many
questions of how government regulators would deal with stateless funds were yet to be dealt
with. Originally, the Ethereum creators had the vision that computer code should be treated as
law in their community and serve as a replacement for legal agreements and regulation.
Participants were supposed to look exclusively to the application’s code as dispositive on all
matters.
Investors were able to send digital ethers to the fund, which allowed them to take part in
votes on whether to put money in a given project. The token sale in May 2016 set the record
for the largest crowd funding campaign in history and poured more than $150 million in form
of ether into the project. Candidates for investment put themselves forward, providing not
only a business plan, but also smart contracts that define the relationship between them and
The DAO. Its creators hoped to prove that they could build a more democratic financial
institution, one without centralized control or human fallibility. But the voting structure
required a 20% quorum, which led to the outcome that none of these proposals were
approved. In the end not only the voting structure failed, but the whole system: on June 17,
2016 The DAO was subject to a hack that deployed a combination of vulnerabilities and
weaknesses. The hacker gained control of 3.6 million ether (valued at $50 million at the time
of the hack).
Ethereum had to react after the theft and created a “hard fork”, a permanent split of the
Ethereum blockchain, in order to reimburse investors. The hard fork restored virtually all funds
to the original contract. The original unforked blockchain was maintained as Ethereum Classic,
thus breaking Ethereum into two separate active cryptocurrencies.
The problem is that this event is not outside the law and law still has to apply in the real
world. This raises many questions around liability and accountability of the implementation of
the system and who could be sued to recover the lost value. Much of this is currently untested
in court, however that is not to say that there are not applicable precedents in existing law.
Other people suggested, that there needs to be a new kind of due diligence for this new kind
of contract. “Smart contracts blend law and computer science. The due diligence on smart
contracts should do the same”.
c. Outside Events
Smart contracts will increase automation, which can be a good thing. But automation can also
cause problems or be impossible, especially when a smart contract changes its behavior in
response to some external event. For example, this could be an agricultural insurance policy
that pays out conditionally based on the quantity of rainfall in a given month. In these cases,
complete automation will not be possible.
In the example, the smart contract waits until the predetermined time, retrieves the weather
report from an external service and behaves appropriately based on the data received. Every
node on a chain executes smart contracts independently. If it now retrieves some information
from an external source, each node performs this retrieval repeatedly and separately. But a
blockchain only works if every node reaches an identical state after processing every
transaction and block. Therefore, everything that takes place on the blockchain must be
completely predetermined. No deviations are supposed to occur. Because this source is
outside of the blockchain, there is no guarantee that every node will receive the same answer.
The moment that two nodes disagree about the chain’s state, the entire system fails. This
could cause several problems. The source can change its response in the time between
requests from different nodes or it could become temporarily unavailable. Either way,
consensus is broken and the entire blockchain dies.
Therefore, smart contracts autonomously perform certain actions under certain pre-defined
conditions, called oracles. Instead of a smart contract initiating the retrieval of external data,
one or more trusted parties (“oracles”) create a transaction, which embeds data in the chain.
Because every node runs every calculation, it’s not practical (and presently impossible) to
make arbitrary network requests from a smart contract. Oracles fill this void by watching the
blockchain for events and responding to them by publishing the results of a query back to the
contract. In other words, an oracle pushes the data onto the blockchain rather than a smart
contract pulling it in. In this way, contracts can interact with the off-chain world.
Oracles require a trusted entity to manage the interactions between the blockchain and the
outside world though. This introduces obvious trust problems. A decentralized contract that
requires trusting a single outside data source is a bit of a contradiction.
d. Future Events
A similar problem to the lack of legal interpretation is that a lot of the contracts are coded
with the assumption that everything is going to happen as planned. However, there is a
possibility that smart contracts perform in a specific way that may cause irreparable economic
damage. Or they perform in specific situations when it makes no sense. For example, leasing
companies could use smart contracts for their leasing agreements. On the one hand cars are
unlocked via smart contracts and payments are automatically calculated and paid based on
predefined terms of a contract. On the other hand, as soon as one customer is late with its
payment, the product stops functioning automatically. At first glance, this seems to be a
useful, practical solution. An automated process makes sure that the company can react
immediately to missing payments. Furthermore, the leasing company does not have to worry
that the customer uses the car or any other leasing product without paying for it. However, at
a closer look an immediate reaction can cause a lot of trouble. Imagine, a person who entered
a leasing agreement for a car and does not realize – for whatever reasons – that he or she is
late with payments. This person will continue using his or her car regularly. In this situation, a
late payment could occur while the person is driving the car on a highway. To avoid a negative
outcome in these situations, a smart contract has to be flexible. Flexibility offers the ability to
avoid the full anticipation of all possible outcomes. To date, smart contracts are not able to
implement flexibility, as they only react on predefined code. A code must anticipate all
possible solutions for all possible situations. As a result, it would be enormous in size.
Furthermore, it is hardly conceivable that any agreement can provide for all contingencies.
The same problem arises when a smart contract may operate in states of the future that are
unanticipated by either party.
V. Use Cases
But there are also potential use cases of smart contracts that extend far beyond the
movement of digital cash. In general, smart contracts give the customer the insurance
everything will happen as expected with the guarantee of a specific performance.
a. Examples
Indeed, smart contracts can be used to effectuate business activities involving purchases and
exchanges of virtually any tangible or intangible goods, services and rights (e.g., sales of
securities, commodities, personal property, real estate, digital rights, etc.). So, smart contracts
could be used to create peer-to-peer versions of banks, securities exchanges, services such as
eBay, Uber and Airbnb, and virtually every other business model involving intermediaries that
handle processing and payments for a fee.
Furthermore, they can be used for secured corporate debt. In this case financial distress can
be resolved ex ante by contract. Collateral can be conveyed automatically upon default and
restrictive covenants are no longer necessary. Smart contracts can be a solution for derivative
securities as well. Warrants, options, convertibles will exercise themselves automatically at the
optimal time. Thus, state-contingent payoffs will be made automatically.
b. Automotive industry
Besides these examples, I have analyzed the auto industry. Chances are high that smart
contracts could disrupt both car insurance and car sharing market.
(1) Insurance
Smart contract blockchain technologies could have a disruptive impact on the insurance
market. The benefits of smart contracts in insurance are clear: in theory they should reduce
insurer costs and lower premiums for policyholders and, importantly, improve customer
experience of insurance products.
In the auto insurance industry, smart contracts can bring insurers, customers and third parties
to a single platform. This can eventually lead to process efficiencies, and reduced claim
processing time and costs. Automated claims payment processes will mean policy-holders will
get paid more quickly in comparison to today’s manual processes, where even non-contested
claim payments can take weeks or months to be paid. Also, third-parties such as garages,
transport providers and hospitals – once they are part of the distributed ledger – will be able
to provide quicker support against claims to customers and can expect faster settlement of
claims. With data fed into such technologies, policy adjustments could be made automatically
in response to certain pre-determined events or information received. Smart contracts’
inflexibility can also have a positive side effect. They tend to avoid the textual ambiguity of
traditional contracts, preventing legal disputes. Because the rules of the smart contract are
pre-programmed, the contract would only execute as specified. The programmable character
also allows for less insurance fraud. A car insurance payout could only be used for repairs at
certified parties. Whether someone actually follows the rules is no longer verified in the
bureaucratic process afterwards. The payout can even be programmed in such a way that it
will automatically return to the insurer if the receiver doesn’t use it within a certain amount of
time.
(2) Car-Sharing
Smart contracts can also be applied in the car-sharing industry. Cars are often one of the most
expensive assets that individuals own; yet they are usually parked (and not used) 95% of the
time. Less and less people desire to own a car, which makes car ownership the next industry to
be disrupted by technology. In the future, a peer-to-peer smart contract system to rent
driverless cars could be created to effectively compete with both engaging a car service for
short trips and renting a car for longer journeys. It could anticipate requirements and
preferences based on data stored on the user’s digital devices, online databases and other
information sources. Hence, a user would only have to input any modifications to the system’s
proposals on the user interface. The next steps would be automated processes: the system
searches and verifies the features of participating cars, perform matching functions based on
availability and current location, send the driverless car to the user, disburse payments, and
repeat the process when the vehicle reaches its destination. Besides that, a party that
breaches its obligations will be penalized immediately. The smart contract could automatically
initiate a protocol to financially penalize the defaulting party and provide the aggrieved party
with a monetary remedy.
Hence, this system could have a huge disruptive effect on (i) car manufacturers, (use
optimization would presumably reduce sales) (ii) insurance companies (fewer car policies will
be sold) (iii) financial institutions (fewer car loans); and (iv) taxi companies, parking facilities
and other businesses. This process would displace them all.
VI. Conclusion
In conclusion, smart contracts are a great promise, but even greater challenges lie ahead.
Blockchain-based transaction validation won’t be sufficient in all circumstances. Complex
transactions will still require human interaction. While other products have run through
decades of development, deployment, testing, debugging and code optimization, blockchain is
a technology at an early stage of development. The idea for smart contracts was born, but
developers with blockchain (and legal) expertise are hard to find to bring this idea to an
advanced level. But there is hope that smart contracts will become more sophisticated over
time. It is likely that once a model is demonstrated to work in a live environment that it will be
adopted elsewhere.
The success of bitcoin’s blockchain technology has been pivotal: an automation-friendly
transaction environment in a wide-open setting could be protected and could function reliably.
Due to efforts of Szabo, the Ethereum project, and others computable contract technology
itself is not the obstacle. The true obstacle is a human-centric legal process that in some cases
has been in place since ancient Rome. The next stage should go a step or two beyond what has
already been developed. Thus, it is an evolution, not a revolution.
Topic 8: How to use Image Tag
Definition and Usage

The <img> tag is used to embed an image in an HTML page.

Images are not technically inserted into a web page; images are linked to web pages.
The <img> tag creates a holding space for the referenced image.

The <img> tag has two required attributes:

 src - Specifies the path to the image


 alt - Specifies an alternate text for the image, if the image for some reason cannot be displayed

Note: Also, always specify the width and height of an image. If width and height are not
specified, the page might flicker while the image loads.

Tip: To link an image to another document, simply nest the <img> tag inside an <a> tag

Global Attributes

The <img> tag also supports the Global Attributes in HTML.

Event Attributes

The <img> tag also supports the Event Attributes in HTML.

Add left and right margins to image (with CSS):

<img src="smiley.gif" alt="Smiley face" width="42" height="42" style="vertical-


align:middle;margin:0px 50px">

Add image border (with CSS)

<img src="smiley.gif" alt="Smiley face" width="42" height="42" style="border:5px solid black">

How to insert images from another folder or from another web site:

<img src="/images/stickman.gif" alt="Stickman" width="24" height="39">


<img src="https://www.w3schools.com/images/lamp.jpg" alt="Lamp" width="32" height="32

How to add a hyperlink to an image:


<a href="https://www.w3schools.com">
<img src="w3html.gif" alt="W3Schools.com" width="100" height="132">
</a>

HTML Images Syntax

The HTML <img> tag is used to embed an image in a web page.

Images are not technically inserted into a web page; images are linked to web pages.
The <img> tag creates a holding space for the referenced image.

The <img> tag is empty, it contains attributes only, and does not have a closing tag.

The <img> tag has two required attributes:

 src - Specifies the path to the image


 alt - Specifies an alternate text for the image

Syntax
<img src="url" alt="alternatetext">

The src Attribute

The required src attribute specifies the path (URL) to the image.

Note: When a web page loads, it is the browser, at that moment, that gets the image from a
web server and inserts it into the page. Therefore, make sure that the image actually stays in
the same spot in relation to the web page, otherwise your visitors will get a broken link icon.
The broken link icon and the alt text are shown if the browser cannot find the image.

Example
<img src="img_chania.jpg" alt="Flowers in Chania">

The alt Attribute

The required alt attribute provides an alternate text for an image, if the user for some reason
cannot view it (because of slow connection, an error in the src attribute, or if the user uses a
screen reader).

The value of the alt attribute should describe the image:

Example
<img src="img_chania.jpg" alt="Flowers in Chania"

Image Size - Width and Height

You can use the style attribute to specify the width and height of an image.

Example
<img src="img_girl.jpg" alt="Girl in a jacket" style="width:500px;height:600px;">

You might also like