0% found this document useful (0 votes)
17 views

Unit 4

Uploaded by

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

Unit 4

Uploaded by

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

IS 501

FUNDAMENTAL OF BLOCKCHAIN
Lecture on - Introduction to Etherum & Ethereum Virtual Machines

Prepared by:
Tanushree Dholpuria
Ass. professor
LNCT BHOPAL
Introduction to Ethereum
• Ethereum is a decentralized blockchain platform that establishes a
peer-to-peer network that securely executes and verifies application
code, called smart contracts.
• Smart contracts allow participants to transact with each other
without a trusted central authority.
• Transaction records are immutable, verifiable, and securely
distributed across the network, giving participants full ownership and
visibility into transaction data.
Features of Ethereum
1. Ether: This is Ethereum’s cryptocurrency.
2. Smart contracts: Ethereum allows the development and
deployment of these types of contracts.
3. Ethereum Virtual Machine: Ethereum provides the underlying
technology—the architecture and the software—that understands
smart contracts and allows you to interact with it.
4. Decentralized applications (Dapps): A decentralized application is
called a Dapp (also spelled DAPP, App, or DApp) for short. Ethereum
allows you to create consolidated applications, called decentralized
applications.
5. Decentralized autonomous organizations (DAOs): Ethereum allows
you to create these for democratic decision-making.
Applications of Ethereum
1. Voting Systems
2. Banking Systems
3. Shipping services
4. Signing agreements
Ethereum Virtual Machine
• It is use to operate as a runtime environment for compiling and
deploying Ethereum-based smart contracts. EVM is the engine that
understands the language of smart contracts, which are written in the
Solidity language for Ethereum.
• EVM is operated in a sandbox environment—basically, you can deploy
your stand-alone environment, which can act as a testing and
development environment.
• You can then test your smart contract (use it) “n” number of times,
verify it, and once you are satisfied with the performance and the
functionality of the smart contract, you can deploy it on the Ethereum
main network.
Thank you
IS 501
FUNDAMENTAL OF BLOCKCHAIN
Lecture on - Ethereum Wallets

Prepared by:
Tanushree Dholpuria
Ass. professor
LNCT BHOPAL
What is Ethereum Wallets?
• Just like an internet banking app, the Ethereum wallet is an
application that allows you to manage your Ethereum account.
Ethereum is the second most popular and valuable cryptocurrency
after Bitcoin and is now accepted as a form of payment by various
merchants around the world.

• The Ethereum account is like an email account with some balance and
is used to send funds to other accounts. The wallet allows you to
manage your Ethereum account and perform operations like view
account balance, do transactions, etc
Working of Ethereum wallets
• An Ethereum account is a pair of keys. One key is used to create the
address you can share freely, and the other key you need to keep
secret because it's used to sign things. Together, these keys let you
hold assets and make transactions.

• An Ethereum account has an address, like an inbox has an email


address. This is used to identify your digital assets.

• A wallet is a tool that lets you interact with your account, using your
keys. It allows you to view your account balance, send transactions,
and more.
Types of Wallets
1. Physical hardware wallets are devices that let you keep your crypto
offline – very secure
2. Mobile applications that make your funds accessible from
anywhere.
3. Browser wallets are web applications that let you interact with your
account directly in the browser.
4. Browser extension wallets are extensions you download that let
you interact with your account and applications through the
browser.
5. Desktop applications if you prefer to manage your funds via
macOS, Windows or Linux
Trending Ethereum Wallets
1. Trezor Model T - It’s all about security. The PIN never leaves the
wallet, and this extra layer of protection makes it more difficult for
hackers to access your funds. Trezor is a hardware wallet that stores
your funds on a USB flash drive. It supports over one thousand
cryptocurrencies, including Bitcoin, Litecoin, Ethereum, Dash, and
Ethereum Classic. But it doesn’t support Ripple, Monero, Cardano,
or Tezos. Trezor is compatible with Mac OS X, Windows, and Linux.

2. CryptoWallet - CryptoWallet was designed to address the problems


presented by other wallets. It includes banking services such as a
debit card and an IBAN. CryptoWallet is a free mobile wallet that’s
easy to use.
Trending Ethereum Wallets ..... contd
3. MetaMask - This wallet is is one of the best Ethereum wallets for
network newbies. This browser extension lets you access Ethereum's
blockchain via Google Chrome, Brave, Vivaldi, and Mozilla Firefox. This
is a free web wallet that lets you access your wallet via your browser.

4. Ledger Nano X- The Ledger Nano X is an advanced Ethereum wallet


that offers security usually only found in custodial cryptocurrency
wallets. The Nano X are devices you plug into your computer, like a USB
flash drive. After you install the software, you can use it to store
cryptocurrency.
Trending Ethereum Wallets ..... contd
5. Exodus - Exodus is a free desktop app that comes with a mobile
application as well. It’s compatible with Windows, macOS, and Linux.
The wallet supports many cryptocurrencies and offers customer
support and crypto exchange via the built-in Shapeshift exchange.
Exodus can also synch with your Trezor portfolio.
Thank you
IS 501
FUNDAMENTAL OF BLOCKCHAIN
LECTURE ON SMART CONTRACT AND ATTACKS ON SMART CONTRACT

Prepared by:
Tanushree Dholpuria
Ass Professor
LNCT BHOPAL
Introduction to Smart Contracts
• Smart Contracts play a very essential role, it helps to make the
transactions taking place more safe and secure and function in an
organized manner.
• A smart contract is a self-executing program that automates the
actions required in an agreement or contract. Once completed, the
transactions are trackable and irreversible.
• Smart contracts permit trusted transactions and agreements to be
carried out among disparate, anonymous parties without the need for
a central authority, legal system, or external enforcement mechanism.
History of Smart Contract
• Smart contracts were first proposed in 1994 by Nick Szabo, an American
computer scientist who invented a virtual currency called "Bit Gold" in 1998,
10 years before Bitcoin was introduced. In fact, Szabo is often rumored to be
the real Satoshi Nakamoto, the anonymous Bitcoin inventor, which he has
denied.
• Szabo defined smart contracts as computerized transaction protocols that
execute the terms of a contract.
• Szabo also proposed the execution of a contract for synthetic assets, such as
derivatives and bonds. Szabo wrote, "These new securities are formed by
combining securities (such as bonds) and derivatives (options and futures) in a
wide variety of ways. Very complex term structures for payments...can now be
built into standardized contracts and traded with low transaction costs, due to
computerized analysis of these complex term structures.
Types of Smart Contracts
• Smart Legal Contracts
These contracts are legally enforceable and require the parties to satisfy their contractual obligations.
Parties may face strict legal actions if they fail to comply.

• Decentralized Autonomous Organizations (DAO)


For a DAO, the backbone is its smart contract. The contract is bound to specific rules that are coded
into blockchain contracts blended with governance mechanisms.

It has diverse use cases that range from simple to complex, which depends on the number of
stakeholders.

DAOs are open-source and also feature transparency, and, in theory, are incorruptible. Plus, any
action taken by the community members gets replaced by a self-enforcing code.
Role of Smart Contract in Blockchain
• Security and high reliability: The transactions can be performed with high reliability. Plus, as the distributed ledger
is highly encrypted, it is impenetrable and offers high security.
• Disintermediation: Smart contracts eliminate the reliance on third-party intermediaries to perform transactions.
So, it enables parties to enter into agreements without any dependence on intermediaries.
• Transparency: It creates a cohesive environment because both the logic and information in the contract are visible
to all those participating in the blockchain network. Plus, parties involved can check out any edits made by a party
to the contract’s content as it is visible to everyone involved in the cycle, improving transparency.
• Lesser errors: As the contracts use software code to automate tasks, they are less prone to manual errors.
Moreover, they offer real-time updates with speed and precision.
• Lesser human intervention: The transactions don’t need much human management, which reduces the risks
involved in the contract execution cycle.
• Speed and efficiency: Since smart contracts execute immediately when a pre-defined condition is met, they offer
speed and efficiency. Furthermore, smart contracts are digital and automated, and there’s no paperwork to process
and no time spent reconciling errors that often result from manually filling in documents.
• Savings: We’ve already talked of smart contracts removing the need for intermediaries to handle transactions,
reducing their associated time delays and fees.
Applications of Smart Contract
1. Supply Chain
2. Trade finance
3. Dispute Resolutions
4. NFT
5. Property Ownership
6. Medical research
7. Smart Agriculture
Attacks on Smart Contract
Before moving further on smart contract attacks lets understand attacks classification. This is of two
types:
1. Malicious Attacks : This type of blockchain attack comprises spreading malware and viruses to
people’s wallets and accounts. Sometimes, it starts with compromising identities. Examples of such
attacks are crypto-jacking, slack, and forum attack. How it happens is that a set of hacks will write
programs that could penetrate your wallet to change some properties. Such properties are
passwords, usernames, emails, etc. By doing so, it could compromise your account and, as such,
may lead to loss of values.

2. Weak Protocols : Weak consensus can lead to multiple attacks that relate to the blockchain
network. Some of those attacks are 51% attacks, Sybill attacks, 34% attack, and denial of service.
Smart Contract Attack
1. Reentrancy: This is one of the most catastrophic attacks on smart contract security
protocols. The attack can completely render the smart contract useless or steal valuable
information. This type of attack occurs when a function calls for another contract through
an outer call. Such vulnerability enables an attacker to execute a recursive call back of the
main function. The action creates an unintended loop that recurs many times.

2. Smart Contract Underflow and Overflow: It attacks transactions that accept


unauthorized input data or value. A smart contract overflow happens when more value is
provided than the maximum value.
Smart contracts are often written in solidity, which can handle up to 256-bit numbers.
Therefore, an increment by one would amount to an overflow. On the other hand, smart
contract underflow is the total opposite of the overflow.
3. Short Address Attack: The attack occurs when the Ethereum Virtual
Machine (EVM) is weak. EVM can allow imprecise padded arguments,
allowing hackers to send specially crafted addresses that lead to
exploitation. This attack has the same strategy as the SQL injection bug.

4. DELETECALL : DELEGATE opcode comprises a similar function to the


message CALL, the msg.sender and msg.value doesn’t get altered. Such
a feature allows developers to generate reusable code, improving the
chance of abrupt code-execution using DELETECALL. This DELETECALL
shows that it is possible to introduce flaws, leading to new smart
5. Transaction Ordering Dependence (TOD) : This vulnerability allows
corrupt miners to have a damaging effect on smart contracts. The
vulnerability relies on the order of transaction execution. For instance,
every newly generated block contains two transactions that enforce the
smart contract. This feature doesn’t provide enough information to
users to determine the agreement’s state or about the initiation of an
individual’s invocation.
6. Timestamp Dependence: It is a smart vulnerability that attackers can
exploit to compromise the integrity of smart contract projects. A
corrupt miner can alter the timestamp by a few seconds since the
platform gives miners about 30 seconds of block validation. Therefore,
the outcome of the random number generated can be manipulated to
gain benefits.
Smart Contract Security Techniques
Slither, MythX, Mythril, Manticore, Security, Smartcheck, Echidna,
Oyente, Vandal, and Zeus
Thank you
IS 501
FUNNNDAMENTAL OF
BLOCKCHAIN
Lecture on Hyperledger

Prepared By:
Tanushree Dholpuria
Ass Professor
LNCT BHOPAL
Introduction to Hyperledger
• Hyperledger is an open-source collaborative effort created to
advance cross-industry blockchain technologies. It is not a specific
blockchain or cryptocurrency, but rather a collection of blockchain
frameworks, tools, and libraries that are designed to provide
developers with a starting point for building robust, enterprise-grade
blockchain solutions.
• Hyperledger is an open-source project under the Linux Foundation
where people can come and work on the platform to develop
blockchain-related use cases.
Reasons of using hyperledger
1. To enhance the efficiency, performance, and transactions of various
business processes.
2. It provides the necessary infrastructure and standards for
developing various blockchain-based systems and applications for
industrial use.
3. It gets rid of the complex nature of contractual agreements, as the
legal issues are taken care of.
4. Hyperledger offers the physical separation of sensitive data.
5. It decreases the need for verification and enhances trust, thus
optimizing network performance and scalability.
Hyperledger layers
1) Consensus layer: It takes care of creating an agreement on the
order and confirming the correctness of the set of transactions that
constitute a block.
2) Smart layer: This layer is responsible for processing transaction
requests and authorizing valid transactions.
3) Communication layer: It takes care of peer-to-peer message
transport.
4) Identity management services: these are important for establishing
trust on the blockchain.
5) API: It enables external applications and clients to interface with
the blockchain.
Working of hyperledger
• The membership service involved in the network validates the
contract.
• The concerned two-peer has to produce a result and then sent it to
the consensus cloud.
• The generated result from both the peer has to be the same in order
to validate the contract.
• Once it is validated, then the transaction will happen between the
affiliated peers and their ledger will be updated.
• When a business requires confidentiality and a private network for its
transaction to happen without doing that in a single network, a
hyperledger paves the way.
Hyperledger Projects
1. Hyperledger Fabric: Hyperledger Fabric is intended as a foundation for developing applications
and solutions with modular architecture. It provides many benefits like permissioned
networks, confidential transactions, etc.
2. Hyperledger Sawtooth: It is an open-source project and used as an enterprise-level blockchain
system used for creating and operating distributed ledger applications. Hyperledger sawtooth
supports a variety of consensus algorithms like PBFT, and PoET.
3. Hyperledger Indy: It is a project that is made for decentralized identity. It offers lots of
libraries, tools, and reusable components for creating decentralized identities.
4. Hyperledger Iroha: It is a blockchain platform designed for infrastructure projects that need
distributed ledger technology. It is used to build identity management platforms like national
IDs. It can integrate with Linux, macOS, and Windows platforms.
5. Hyperledger Burrow: It is a framework for executing smart contracts in permissioned
blockchains. The goal of Hyperledger burrow is to facilitate cross-industry applications for
smart contracts. It is built around the BFT consensus algorithm.
Hyperledger Projects.... contd
6. Hyperledger Caliper: It is a blockchain benchmark tool that allows users to measure the
performance of a blockchain implementation with a set of predefined use cases. It will produce
reports containing a number of performance indicators to serve as a reference when using the
blockchain solutions like Hyperledger Burrow, Hyperledger Fabric, Hyperledger Iroha, and so on.
7. Hyperledger Cello: It serves as an operational dashboard for Blockchain that reduces the effort
required for creating, managing, and using blockchains. It provides an operational console for
managing blockchain efficiently.
8. Hyperledger Explorer: It is a user-friendly web application tool that is used to view, invoke,
deploy, or query blocks, associated data, and network information stored in the ledger. It is
regarded as an easy way that allows users to view the necessary network information of the
blockchain.
9. Hyperledger Besu: It is an Ethereum client designed to be enterprise-friendly for both public and
private blockchain network use cases. It offers many useful features like EVM, several proof-of-
authority protocols, a privacy transaction manager to ensure the privacy of transactions, etc.
Thank you

You might also like