ETHEREUM
Overview
Introduction
Smart contracts
Ethereum Virtual Machine
Architecture
Consensus algorithm
Solidity
Remix
Metamask
Truffle
Dapps
The DAO Attack
Conclusion
Introduction
to Ethereum
• Ethereum is proposed by Vitalik Buterin
• Ethereum is a public Blockchain.
• Distributed computing platform and decentralized
network.
• Operating system featuring “smart contracts”.
• Ether – crypto token used in Ethereum.
• Ethereum provides decentralized virtual machine.
• "Gas", an internal transaction pricing mechanism, is
used to allocate resources on the network.
• Smart contracts are written in solidity programming
language.
• Testnets like Ropsten, Rinkeby, Kovan networks are
used to test smart contracts.
• Remix solidity browser, Ethereum Mist are used as
IDE to develop smart contracts.
• Testing the smart contracts using audit or unit
testing.
• Dapps development using web3.js library.
Smart Contracts
• A smart contract is a
computer protocol
intended to digitally
facilitate, verify, or
enforce the negotiation
or performance of
a contract.
• Smart contracts allow
the performance of
credible transactions
without third parties.
• These transactions are
trackable and
irreversible.
Ethereum Virtual Machine
Virtual machines are
essentially creating a level of
abstraction between the
executing code and the
executing machine.
This layer is needed to
improve the portability of
software, as well as to make
sure applications are
separated from each other,
and separated from their
host.
Creating Smart contracts
using Solidity, Javascript, C++
etc.,
Opcodes, Bytecode, register
stack, contract memory,
contract storage.
Cost of interacting with
smart contracts – GAS
Deploying smart contract Swarm hash and metadata
file
Application Binary Interface
(ABI)
Application
Binary
Interface
(ABI)
• Application Binary Interface is a piece of data documenting
all functions and events, including their needed input and
output.
• When calling a function on a contract, the function
signature is determined by hashing the name of the function
including its inputs.
Architecture of
Ethereum
• Some of the important components of Ethereum:
• Ethereum Virtual Machine
• Miner and Mining nodes
• Blocks and Transactions
• Consensus Mechanism
• Smart contracts
• Accounts, Ether and Gas
Transactions and
Blocks
• Ethereum stores transactions
within Blocks.
• Each block has a upper Gas
limit and each transaction
needs certain amount of Gas
to be consumed as part of its
execution.
• The cumulative gas from all
transactions that are not yet
written in ledger cannot
surpass the Block Gas limit.
• This ensures that all
transactions do not get
stored within a single Block.
• As soon as the Gas limit is
reached, other transaction is
removed from block and
mining begins thereafter.
Consensus
Algorithm
Proof of Work
• A miner collect all the pending transactions from the
transaction pool initiated by EVM nodes where smart
contracts are executed or the transactions happened
by sending ether from one account to other.
• Also they calculate the state and adds the transaction
root hash to the block header.
• After including the transaction in a block, this block is
advertised to all nodes.
• Each miner undergo with mathematical puzzle to
advertise their mined block. Who ever finishes that
mathematical puzzle first, they can advertise their
mined block into the network.
• The miner has to identify the correct nonce in order
to solve the mathematical puzzle.
• Miner gets rewards from two ways. They are:
• Block reward(~5Ether)
• Cumulative gas fees from the transactions in
the block.
• Other miners would verify the block and if found
correct would further verify every transaction while
accept the block and append the same to their ledger
instance
Block header and it’s content
Accounts
• Accounts are main building block for Ethereum
ecosystem.
• It is the interaction between accounts that Ethereum
wants to store as transaction in its ledger.
• Ethereum supports two types of accounts. Each account
has a balance property that returns the current value
stored in it.
• Externally owned accounts
• Ethereum accounts
• Public and Private Key
• Public Key is of 256 bits however 160 bits are used
to transfer ethers.
• They can also execute transactions by invoking
functions within contracts.
• Contract accounts
• Contracts accounts are very similar to externally
owned accounts.
• They are identified using their public address. They
do not have any private key.
• They can hold ether similar to externally owned
accounts however they contain code — code for
smart contracts consisting of functions are state
variables.
Transactions
• An externally owned account sending ether to another
externally owned account in a transaction.
• An externally owned account sending ether to a
contract account in a transaction.
• A contract account sending ether to another contract
account in a transaction.
• A contract account sending ether to an externally
owned account in a transaction.
• Deployment of Smart contract — An externally owned
account can deploy a contract using a transaction in
Ethereum virtual machine.
• Using or invoking a function within a contract —
 Executing a function in a contract that changes state
are considered as transactions in Ethereum.
• If executing a function does not change state, it does
not require a transaction.
• Transaction has some important properties. They are:
• From and To
• Value and Input
• Block hash and Block Number
• Gas and Gas price
• Transaction hash
A Typical Block Data
Solidity
• Solidity is a contract and object oriented programming
language used to write smart contracts on Ethereum.
• Remix or Ethereum Mist is used to deploy and compile
the smart contracts written in Solidity.
• The concepts in Solidity:
• Structure of the contract
• Types
• Units and globally available variables
• Error Handling
Structure of the contract
STATE VARIABLES
pragma solidity >=0.4.0 <0.7.0;
contract SimpleStorage {
uint storedData; // State variable // ...
}
pragma solidity >=0.4.0 <0.7.0;
contract SimpleAuction {
function bid() public payable {
// Function // ...
}
}
pragma solidity >=0.4.22 <0.7.0;
contract Purchase {
address public seller;
modifier onlySeller() {
// Modifier
require( msg.sender== seller, "Only seller can call this." );
_;
}
function abort() public view onlySeller {
// Modifier usage // ...
}
}
FUNCTIONS
FUNCTION MODIFIERS
Structure of the contract
EVENTS
Structure of the contract
STRUCT TYPES
Structure of the contract
ENUM TYPES
Value Types
• Booleans
• Integers
• Bit operations
• Shifts,
• Addition,
• Subtraction,
• Multiplication,
• Division,
• Modulo and
• Exponentiation
• Fixed Size byte arrays
• Dynamically sized byte array
• Rational and Integer Literals
• String literals
• Reference Types
• Memory, storage & call data
• Address
• address – size of an
ethereum address
• address payable with
transfer and send members
• members of address types:
• balance
• transfer
• Send
• call
• delegatecall
• staticcall
• Function types
• internal | external
• pure | view | payable
• Data location
• memory
• storage
• call data
• Arrays
• Bytes
• Strings
• Array Literals
• Array members
• length
• push
• pop
• Structs
Mapping TypesReference Types
Ether Units
Time Units
• 1 = 1 seconds
• 1 minutes = 60 seconds
• 1 hours = 60 minutes
• 1 days = 24 hours
• 1 weeks = 7 days
• 1 wei = 1
• 1 szabo = 1e12
• 1 finney = 1e15
• 1 ether = 1e18
Block and
Transaction
properties
Global Functions Description
blockhash(uint blockNumber) hash of the given block - only works for 256 most recent,
excluding current, blocks
block.coinbase(address payable) current block miner’s address
block.difficulty(uint) current block difficulty
block.gaslimit(uint) current block gaslimit
block.number(uint) current block number
block.timestamp(uint) current block timestamp as seconds since unix epoch
gasleft() remaining gas
msg.data(bytes calldata) complete calldata
msg.sender(address payable) sender of the message (current call)
msg.sig(bytes4) first four bytes of the calldata (i.e. function identifier)
msg.value(uint) number of wei sent with the message
now(uint) current block timestamp (alias for block.timestamp)
tx.gasprice(uint) gas price of the transaction
tx.origin(address payable) sender of the transaction (full call chain)
Error
Handling
assert(bool condition) –
•causes an invalid opcode and thus state change reversion if the
condition is not met - to be used for internal errors.
Assert
require(bool condition) –
•reverts if the condition is not met - to be used for errors in inputs or
external components.
Require
require(bool condition message) –
•reverts if the condition is not met - to be used for errors in inputs or
external components. Also provides an error message.
Require
revert() –
•abort execution and revert state changes.Revert
revert(string memory reason) –
•abort execution and revert state changes, providing an explanatory
string.
Revert
Remix Ethereum Browser : New
Version
IDE
GUI
TERMINAL
Remix Ethereum Browser : Old Version
IDE
GUI
TERMINAL Interactive
Interface
Introduction
to Remix
• to create smart contracts,
• to deploy smart contracts,
• to track smart contracts, and
• to test smart contracts.
Remix Ethereum Browser is used as multi-
purpose environment
• Javascript VM
• It provides five accounts each with 100 ethers to work with
smart contracts.
• Injected Web3
• It injects network from extensions like Metamask. Any
number of accounts present in Metamask included network
are provided to work with smart contracts.
• Web3 Provider
• It injects network which is running in local system. Probably
it injects local networks provided by Truffle, Ganache-cli
etc., and whatever accounts present in local network are
provided to work with smart contracts.
Remix provides three kinds of environments.
GUI – Provides to import/create files
• These are files which
are stored in local
system
• We can create files by
clicking ‘+’ symbol in
top left corner.
• These are files which are
from GitHub
• We can update files by
clicking ‘GitHub Logo’ in
top row.
GUI – Provides to import/create files
Create new file in the browser storage explorer
Add local file to the browser storage explorer
Publish explorer files to the GitHub and Update them
Copy all files to another instance of Remix IDE
Connect to Local Host
IDE – Provides to create/edit smart contracts
Terminal – To view the transaction details
Compile Tab – To compile/configure the version
Run Tab – To deploy and interact with contract
Choose the env.
Choose account
Configure gas
limit
Select Value
Run Tab – To deploy and interact with contract
Select contract
Give constructor
parameter values Transact
Deployed
contracts
Run Tab – To deploy and interact with contract
User Interface to
interact with
deployed contract
Testing – Unit testing is done successfully
Testing scripts
emitted
successfully
Debugging – Debugging the contract by txn hash
Debug to know
what is happening
to the contract
Remix
• Remix also provides to
configure settings.
• Remix also provide to
connect with some
services helpful in
ethereum like Oracle,
Vyper, Pipeline etc.,
• Remix also provides
facility to chat with
community.
Metamask
Metamask
We are connected
Ropsten Test
Network and
deployed contract
Metamask asks to
confirm the
deployment of
contract
Metamask
We can check our
transaction status
It’s showing -
pending
Metamask
We can track our
transaction status
in Etherscan.
Metamask
The transaction
happened
successfully
Metamask
The transaction
status is showing
success in
Etherscan
Metamask
The contract
deployed
successfully shown
in Metamask
• Truffle is a development environment,
testing framework, aiming to make
Ethereum developer easier.
• Built-in smart contract compilation,
linking, deployment and binary
management.
• Automated contract testing with
Mocha and Chai.
• Scriptable deployment & migrations
framework.
• Network management for deploying to
many public & private networks.
• Interactive console for direct contract
communication.
• External script runner that executes
scripts within a Truffle environment.
• Ganache CLI, part of the Truffle suite of
Ethereum development tools, is the
command line version of Ganache,
your personal blockchain for Ethereum
development.Ganache-cli
Decentralized apps(Dapps)
• Dapps are decentralized applications.
• Nothing but any website or app where the backend, the server is
decentralized.
• Ethereum is well known for Dapps.
• Below are sequence of steps to built Dapps:
• Write solidity smart contracts.
• Test the smart contracts using Unit Testing or Audit Testing.
• With the help of tools like Truffle, Ganache-cli and Web3.js and some
other frontend technologies build a Dapp of our own wish.
• We can even create Dapp using Testnets to check before deploying in
to the main net.
DAO
Attack
• A DAO is a Decentralized
Autonomous Organization. Its goal
is to codify the rules and decision
making apparatus of an
organization, eliminating the need
for documents and people in
governing, creating a structure
with decentralized control.
• The hacker exploited a bug in the
code of the DAO and stole more or
less $50 million worth of ether.
Cons of
Ethereum
• Scalability is the biggest issue. Till date
only 15 transactions per second are
executed.
• Because of Proof Of Work consensus
mechanism there is a loss of resources
to mine a block as mining requires
huge computational powers.
• DAO attack.
• ‘Gas’, the transaction fee is needed to
pay for every transaction is very high.
Conclusion
• With the help of Solidity, Remix,
Metamask, Truffle and other tools, we can
build good smart contracts and Dapps.
• Smart contracts can achieve trust between
peers or organizations without the help of
third party.
• Ethereum can make wonderful Dapps
which can solve real life issues.
• By this, we can make use of
decentralization, distributed and
immutable ledgers which are necessary
and important in today’s world.
• Finally, we can achieve beyond
cryptocurrencies by using Ethereum
Blockchain.
References
❑ https://en.wikipedia.org/wiki/Ethereum
❑ https://steemit.com/cryptocurrency/@quantalysus/choosing-between-centralized-
decentralized-and-distributed-networks
❑ https://hackernoon.com/blockchain-architecture-analysis-private-vs-public-vs-consortium-
65eb061b907b
❑ https://en.wikipedia.org/wiki/Distributed_computing
❑ https://en.wikipedia.org/wiki/Smart_contract
❑ https://crypviz.io/knowledge-database/smart-contracts/
❑ https://medium.com/mycrypto/the-ethereum-virtual-machine-how-does-it-work-
9abac2b7c9e
❑ https://medium.com/coinmonks/https-medium-com-ritesh-modi-solidity-chapter1-
63dfaff08a11
❑ https://en.wikipedia.org/wiki/Solidity
❑ https://solidity.readthedocs.io/en/v0.5.8/
❑ https://remix.ethereum.org/#optimize=true&evmVersion=null&version=soljson-
v0.5.1+commit.c8a2cb62.js&appVersion=0.7.7
❑ https://ropsten.etherscan.io/tx/0x00518a03048e324d748ed9bc3be11debe99fa629f106297
ab26b8bf8fd9e9335
❑ https://github.com/trufflesuite/truffle
❑ https://github.com/trufflesuite/ganache-cli
THANK YOU

Ethereum

  • 1.
  • 2.
    Overview Introduction Smart contracts Ethereum VirtualMachine Architecture Consensus algorithm Solidity Remix Metamask Truffle Dapps The DAO Attack Conclusion
  • 3.
    Introduction to Ethereum • Ethereumis proposed by Vitalik Buterin • Ethereum is a public Blockchain. • Distributed computing platform and decentralized network. • Operating system featuring “smart contracts”. • Ether – crypto token used in Ethereum. • Ethereum provides decentralized virtual machine. • "Gas", an internal transaction pricing mechanism, is used to allocate resources on the network. • Smart contracts are written in solidity programming language. • Testnets like Ropsten, Rinkeby, Kovan networks are used to test smart contracts. • Remix solidity browser, Ethereum Mist are used as IDE to develop smart contracts. • Testing the smart contracts using audit or unit testing. • Dapps development using web3.js library.
  • 4.
    Smart Contracts • Asmart contract is a computer protocol intended to digitally facilitate, verify, or enforce the negotiation or performance of a contract. • Smart contracts allow the performance of credible transactions without third parties. • These transactions are trackable and irreversible.
  • 5.
    Ethereum Virtual Machine Virtualmachines are essentially creating a level of abstraction between the executing code and the executing machine. This layer is needed to improve the portability of software, as well as to make sure applications are separated from each other, and separated from their host. Creating Smart contracts using Solidity, Javascript, C++ etc., Opcodes, Bytecode, register stack, contract memory, contract storage. Cost of interacting with smart contracts – GAS Deploying smart contract Swarm hash and metadata file Application Binary Interface (ABI)
  • 6.
    Application Binary Interface (ABI) • Application BinaryInterface is a piece of data documenting all functions and events, including their needed input and output. • When calling a function on a contract, the function signature is determined by hashing the name of the function including its inputs.
  • 7.
    Architecture of Ethereum • Someof the important components of Ethereum: • Ethereum Virtual Machine • Miner and Mining nodes • Blocks and Transactions • Consensus Mechanism • Smart contracts • Accounts, Ether and Gas
  • 8.
    Transactions and Blocks • Ethereumstores transactions within Blocks. • Each block has a upper Gas limit and each transaction needs certain amount of Gas to be consumed as part of its execution. • The cumulative gas from all transactions that are not yet written in ledger cannot surpass the Block Gas limit. • This ensures that all transactions do not get stored within a single Block. • As soon as the Gas limit is reached, other transaction is removed from block and mining begins thereafter.
  • 9.
    Consensus Algorithm Proof of Work •A miner collect all the pending transactions from the transaction pool initiated by EVM nodes where smart contracts are executed or the transactions happened by sending ether from one account to other. • Also they calculate the state and adds the transaction root hash to the block header. • After including the transaction in a block, this block is advertised to all nodes. • Each miner undergo with mathematical puzzle to advertise their mined block. Who ever finishes that mathematical puzzle first, they can advertise their mined block into the network. • The miner has to identify the correct nonce in order to solve the mathematical puzzle. • Miner gets rewards from two ways. They are: • Block reward(~5Ether) • Cumulative gas fees from the transactions in the block. • Other miners would verify the block and if found correct would further verify every transaction while accept the block and append the same to their ledger instance
  • 10.
    Block header andit’s content
  • 11.
    Accounts • Accounts aremain building block for Ethereum ecosystem. • It is the interaction between accounts that Ethereum wants to store as transaction in its ledger. • Ethereum supports two types of accounts. Each account has a balance property that returns the current value stored in it. • Externally owned accounts • Ethereum accounts • Public and Private Key • Public Key is of 256 bits however 160 bits are used to transfer ethers. • They can also execute transactions by invoking functions within contracts. • Contract accounts • Contracts accounts are very similar to externally owned accounts. • They are identified using their public address. They do not have any private key. • They can hold ether similar to externally owned accounts however they contain code — code for smart contracts consisting of functions are state variables.
  • 12.
    Transactions • An externallyowned account sending ether to another externally owned account in a transaction. • An externally owned account sending ether to a contract account in a transaction. • A contract account sending ether to another contract account in a transaction. • A contract account sending ether to an externally owned account in a transaction. • Deployment of Smart contract — An externally owned account can deploy a contract using a transaction in Ethereum virtual machine. • Using or invoking a function within a contract —  Executing a function in a contract that changes state are considered as transactions in Ethereum. • If executing a function does not change state, it does not require a transaction. • Transaction has some important properties. They are: • From and To • Value and Input • Block hash and Block Number • Gas and Gas price • Transaction hash
  • 13.
  • 14.
    Solidity • Solidity isa contract and object oriented programming language used to write smart contracts on Ethereum. • Remix or Ethereum Mist is used to deploy and compile the smart contracts written in Solidity. • The concepts in Solidity: • Structure of the contract • Types • Units and globally available variables • Error Handling
  • 15.
    Structure of thecontract STATE VARIABLES pragma solidity >=0.4.0 <0.7.0; contract SimpleStorage { uint storedData; // State variable // ... } pragma solidity >=0.4.0 <0.7.0; contract SimpleAuction { function bid() public payable { // Function // ... } } pragma solidity >=0.4.22 <0.7.0; contract Purchase { address public seller; modifier onlySeller() { // Modifier require( msg.sender== seller, "Only seller can call this." ); _; } function abort() public view onlySeller { // Modifier usage // ... } } FUNCTIONS FUNCTION MODIFIERS
  • 16.
    Structure of thecontract EVENTS
  • 17.
    Structure of thecontract STRUCT TYPES
  • 18.
    Structure of thecontract ENUM TYPES
  • 19.
    Value Types • Booleans •Integers • Bit operations • Shifts, • Addition, • Subtraction, • Multiplication, • Division, • Modulo and • Exponentiation • Fixed Size byte arrays • Dynamically sized byte array • Rational and Integer Literals • String literals • Reference Types • Memory, storage & call data • Address • address – size of an ethereum address • address payable with transfer and send members • members of address types: • balance • transfer • Send • call • delegatecall • staticcall • Function types • internal | external • pure | view | payable
  • 20.
    • Data location •memory • storage • call data • Arrays • Bytes • Strings • Array Literals • Array members • length • push • pop • Structs Mapping TypesReference Types
  • 21.
    Ether Units Time Units •1 = 1 seconds • 1 minutes = 60 seconds • 1 hours = 60 minutes • 1 days = 24 hours • 1 weeks = 7 days • 1 wei = 1 • 1 szabo = 1e12 • 1 finney = 1e15 • 1 ether = 1e18
  • 22.
    Block and Transaction properties Global FunctionsDescription blockhash(uint blockNumber) hash of the given block - only works for 256 most recent, excluding current, blocks block.coinbase(address payable) current block miner’s address block.difficulty(uint) current block difficulty block.gaslimit(uint) current block gaslimit block.number(uint) current block number block.timestamp(uint) current block timestamp as seconds since unix epoch gasleft() remaining gas msg.data(bytes calldata) complete calldata msg.sender(address payable) sender of the message (current call) msg.sig(bytes4) first four bytes of the calldata (i.e. function identifier) msg.value(uint) number of wei sent with the message now(uint) current block timestamp (alias for block.timestamp) tx.gasprice(uint) gas price of the transaction tx.origin(address payable) sender of the transaction (full call chain)
  • 23.
    Error Handling assert(bool condition) – •causesan invalid opcode and thus state change reversion if the condition is not met - to be used for internal errors. Assert require(bool condition) – •reverts if the condition is not met - to be used for errors in inputs or external components. Require require(bool condition message) – •reverts if the condition is not met - to be used for errors in inputs or external components. Also provides an error message. Require revert() – •abort execution and revert state changes.Revert revert(string memory reason) – •abort execution and revert state changes, providing an explanatory string. Revert
  • 24.
    Remix Ethereum Browser: New Version IDE GUI TERMINAL
  • 25.
    Remix Ethereum Browser: Old Version IDE GUI TERMINAL Interactive Interface
  • 26.
    Introduction to Remix • tocreate smart contracts, • to deploy smart contracts, • to track smart contracts, and • to test smart contracts. Remix Ethereum Browser is used as multi- purpose environment • Javascript VM • It provides five accounts each with 100 ethers to work with smart contracts. • Injected Web3 • It injects network from extensions like Metamask. Any number of accounts present in Metamask included network are provided to work with smart contracts. • Web3 Provider • It injects network which is running in local system. Probably it injects local networks provided by Truffle, Ganache-cli etc., and whatever accounts present in local network are provided to work with smart contracts. Remix provides three kinds of environments.
  • 27.
    GUI – Providesto import/create files • These are files which are stored in local system • We can create files by clicking ‘+’ symbol in top left corner. • These are files which are from GitHub • We can update files by clicking ‘GitHub Logo’ in top row.
  • 28.
    GUI – Providesto import/create files Create new file in the browser storage explorer Add local file to the browser storage explorer Publish explorer files to the GitHub and Update them Copy all files to another instance of Remix IDE Connect to Local Host
  • 29.
    IDE – Providesto create/edit smart contracts
  • 30.
    Terminal – Toview the transaction details
  • 31.
    Compile Tab –To compile/configure the version
  • 32.
    Run Tab –To deploy and interact with contract Choose the env. Choose account Configure gas limit Select Value
  • 33.
    Run Tab –To deploy and interact with contract Select contract Give constructor parameter values Transact Deployed contracts
  • 34.
    Run Tab –To deploy and interact with contract User Interface to interact with deployed contract
  • 35.
    Testing – Unittesting is done successfully Testing scripts emitted successfully
  • 36.
    Debugging – Debuggingthe contract by txn hash Debug to know what is happening to the contract
  • 37.
    Remix • Remix alsoprovides to configure settings. • Remix also provide to connect with some services helpful in ethereum like Oracle, Vyper, Pipeline etc., • Remix also provides facility to chat with community.
  • 38.
  • 39.
    Metamask We are connected RopstenTest Network and deployed contract Metamask asks to confirm the deployment of contract
  • 40.
    Metamask We can checkour transaction status It’s showing - pending
  • 41.
    Metamask We can trackour transaction status in Etherscan.
  • 42.
  • 43.
    Metamask The transaction status isshowing success in Etherscan
  • 44.
  • 45.
    • Truffle isa development environment, testing framework, aiming to make Ethereum developer easier. • Built-in smart contract compilation, linking, deployment and binary management. • Automated contract testing with Mocha and Chai. • Scriptable deployment & migrations framework. • Network management for deploying to many public & private networks. • Interactive console for direct contract communication. • External script runner that executes scripts within a Truffle environment. • Ganache CLI, part of the Truffle suite of Ethereum development tools, is the command line version of Ganache, your personal blockchain for Ethereum development.Ganache-cli
  • 46.
    Decentralized apps(Dapps) • Dappsare decentralized applications. • Nothing but any website or app where the backend, the server is decentralized. • Ethereum is well known for Dapps. • Below are sequence of steps to built Dapps: • Write solidity smart contracts. • Test the smart contracts using Unit Testing or Audit Testing. • With the help of tools like Truffle, Ganache-cli and Web3.js and some other frontend technologies build a Dapp of our own wish. • We can even create Dapp using Testnets to check before deploying in to the main net.
  • 47.
    DAO Attack • A DAOis a Decentralized Autonomous Organization. Its goal is to codify the rules and decision making apparatus of an organization, eliminating the need for documents and people in governing, creating a structure with decentralized control. • The hacker exploited a bug in the code of the DAO and stole more or less $50 million worth of ether.
  • 48.
    Cons of Ethereum • Scalabilityis the biggest issue. Till date only 15 transactions per second are executed. • Because of Proof Of Work consensus mechanism there is a loss of resources to mine a block as mining requires huge computational powers. • DAO attack. • ‘Gas’, the transaction fee is needed to pay for every transaction is very high.
  • 49.
    Conclusion • With thehelp of Solidity, Remix, Metamask, Truffle and other tools, we can build good smart contracts and Dapps. • Smart contracts can achieve trust between peers or organizations without the help of third party. • Ethereum can make wonderful Dapps which can solve real life issues. • By this, we can make use of decentralization, distributed and immutable ledgers which are necessary and important in today’s world. • Finally, we can achieve beyond cryptocurrencies by using Ethereum Blockchain.
  • 50.
    References ❑ https://en.wikipedia.org/wiki/Ethereum ❑ https://steemit.com/cryptocurrency/@quantalysus/choosing-between-centralized- decentralized-and-distributed-networks ❑https://hackernoon.com/blockchain-architecture-analysis-private-vs-public-vs-consortium- 65eb061b907b ❑ https://en.wikipedia.org/wiki/Distributed_computing ❑ https://en.wikipedia.org/wiki/Smart_contract ❑ https://crypviz.io/knowledge-database/smart-contracts/ ❑ https://medium.com/mycrypto/the-ethereum-virtual-machine-how-does-it-work- 9abac2b7c9e ❑ https://medium.com/coinmonks/https-medium-com-ritesh-modi-solidity-chapter1- 63dfaff08a11 ❑ https://en.wikipedia.org/wiki/Solidity ❑ https://solidity.readthedocs.io/en/v0.5.8/ ❑ https://remix.ethereum.org/#optimize=true&evmVersion=null&version=soljson- v0.5.1+commit.c8a2cb62.js&appVersion=0.7.7 ❑ https://ropsten.etherscan.io/tx/0x00518a03048e324d748ed9bc3be11debe99fa629f106297 ab26b8bf8fd9e9335 ❑ https://github.com/trufflesuite/truffle ❑ https://github.com/trufflesuite/ganache-cli
  • 51.