Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ethereum with little caffeine

Ethereum with little caffeine

Ronak Kogta

August 05, 2017
Tweet

More Decks by Ronak Kogta

Other Decks in Technology

Transcript

  1. Ethereum with a little

    caffeine!
    *Slides referred from Loi Luu and Vitalik Buterin
    Ronak Kogta


    View full-size slide

  2. Speaker that was promised!

    View full-size slide

  3. Speaker that was promised!
    Aye! That is all

    what blockchain does

    View full-size slide

  4. Speaker that was promised!
    Aye! That is all

    what blockchain does
    ??

    View full-size slide

  5. Agenda
    • Blockchain as World Computer
    • What is Ethereum ?
    • Smart contracts and applications
    • Writing your first contract
    • Research Problems

    View full-size slide

  6. Blockchains and its crudest definition
    It's a platform that allows a software package that contains business
    logic and user data to sit in the cloud. A copy of this cloud is
    replicated by millions of computers around the world to keep code/
    data integrity. The user interface is an open source project that
    communicates with the software package in the cloud. To incentivize
    people to replicate this software package to be maintained you pay
    them with a digital currency.
    Rick Tuinenburg

    View full-size slide

  7. Blockchains and its crudest definition
    The value of digital currency is determined by the popularity of the
    entire platform. Early adopters gain the most if the platform becomes
    a success. What makes this platform unique is that the business logic /
    data cannot be taken down or changed unless multiple anonymous
    developers around the world agree to do so. This makes it so
    authorities cannot take down software or data they don't like. Some
    use cases are: legal public records (deeds, court cases records,
    fictitious business names, etc)
    Rick Tuinenburg

    View full-size slide

  8. Proof of Work
    Coin
    Blockchain Dapp
    ASIC
    Transaction
    Contract
    Miner
    Ledger
    Pools
    Crypto Sign
    Hash
    Commitment
    Consensus
    Exchange
    Technically we should know…

    View full-size slide

  9. Blockchain as world computer
    Consensus Computer

    View full-size slide

  10. Blockchain as world computer
    f(x)=?
    Consensus Computer

    View full-size slide

  11. Blockchain as world computer
    f(x)=?
    f(x)=y
    Consensus Computer

    View full-size slide

  12. Blockchain as world computer
    f(x)=?
    f(x)=y
    f(x) = y ?
    f(x) = y ?
    Consensus Computer

    View full-size slide

  13. Blockchain as world computer
    f(x)=?
    f(x)=y
    f(x) = y ?
    f(x) = y ?
    f(x)=y
    Consensus Computer

    View full-size slide

  14. Lot of blockchains out there…

    View full-size slide

  15. Decentralised Computer
    Ethereum

    View full-size slide

  16. Decentralised Computer
    Ethereum
    Slow

    (5-1000x)

    View full-size slide

  17. Decentralised Computer
    Ethereum
    Expansive
    to use
    Slow

    (5-1000x)

    View full-size slide

  18. Decentralised Computer
    Ethereum
    Not
    always

    decisive
    Expansive
    to use
    Slow

    (5-1000x)

    View full-size slide

  19. Decentralised Computer
    Ethereum
    Truly
    a 1950s
    computer
    Not
    always

    decisive
    Expansive
    to use
    Slow

    (5-1000x)

    View full-size slide

  20. Decentralised Computer
    Ethereum
    Truly
    a 1950s
    computer
    Not
    always

    decisive
    Expansive
    to use
    Slow

    (5-1000x)
    Truly
    a global
    singleton

    View full-size slide

  21. Decentralised Computer
    Ethereum
    Truly
    a 1950s
    computer
    Not
    always

    decisive
    Expansive
    to use
    Slow

    (5-1000x)
    Truly
    a global
    singleton
    Cannot
    fail, be
    stopped or
    censored

    View full-size slide

  22. Decentralised Computer
    Ethereum
    Truly
    a 1950s
    computer
    Not
    always

    decisive
    Expansive
    to use
    Slow

    (5-1000x)
    Truly
    a global
    singleton
    Cannot
    fail, be
    stopped or
    censored
    Ubiquitous

    View full-size slide

  23. Decentralised Computer
    Ethereum
    Truly
    a 1950s
    computer
    Not
    always

    decisive
    Expansive
    to use
    Slow

    (5-1000x)
    Truly
    a global
    singleton
    Cannot
    fail, be
    stopped or
    censored
    Ubiquitous
    Verifiable
    and
    Auditable

    View full-size slide

  24. Decentralised Computer
    Ethereum
    Truly
    a 1950s
    computer
    Not
    always

    decisive
    Expansive
    to use
    Slow

    (5-1000x)
    Truly
    a global
    singleton
    Cannot
    fail, be
    stopped or
    censored
    Ubiquitous
    Verifiable
    and
    Auditable
    Guarantees

    View full-size slide

  25. Decentralised Computer
    Ethereum
    Truly
    a 1950s
    computer
    Not
    always

    decisive
    Expansive
    to use
    Slow

    (5-1000x)
    Truly
    a global
    singleton
    Cannot
    fail, be
    stopped or
    censored
    Ubiquitous
    Verifiable
    and
    Auditable
    Atomicity
    Guarantees

    View full-size slide

  26. Decentralised Computer
    Ethereum
    Truly
    a 1950s
    computer
    Not
    always

    decisive
    Expansive
    to use
    Slow

    (5-1000x)
    Truly
    a global
    singleton
    Cannot
    fail, be
    stopped or
    censored
    Ubiquitous
    Verifiable
    and
    Auditable
    Atomicity
    Immortality
    Guarantees

    View full-size slide

  27. Decentralised Computer
    Ethereum
    Truly
    a 1950s
    computer
    Not
    always

    decisive
    Expansive
    to use
    Slow

    (5-1000x)
    Truly
    a global
    singleton
    Cannot
    fail, be
    stopped or
    censored
    Ubiquitous
    Verifiable
    and
    Auditable
    Atomicity
    Immortality
    Immutable
    Code
    Guarantees

    View full-size slide

  28. Decentralised Computer
    Ethereum
    Truly
    a 1950s
    computer
    Not
    always

    decisive
    Expansive
    to use
    Slow

    (5-1000x)
    Truly
    a global
    singleton
    Cannot
    fail, be
    stopped or
    censored
    Ubiquitous
    Verifiable
    and
    Auditable
    Atomicity
    Immortality
    Immutable
    Code
    Synchrony
    Guarantees

    View full-size slide

  29. Decentralised Computer
    Ethereum
    Truly
    a 1950s
    computer
    Not
    always

    decisive
    Expansive
    to use
    Slow

    (5-1000x)
    Truly
    a global
    singleton
    Cannot
    fail, be
    stopped or
    censored
    Ubiquitous
    Verifiable
    and
    Auditable
    Atomicity
    Immortality
    Immutable
    Code
    Synchrony
    Provenance
    Guarantees

    View full-size slide

  30. Decentralised Computer
    Ethereum
    Truly
    a 1950s
    computer
    Not
    always

    decisive
    Expansive
    to use
    Slow

    (5-1000x)
    Truly
    a global
    singleton
    Cannot
    fail, be
    stopped or
    censored
    Ubiquitous
    Verifiable
    and
    Auditable
    Atomicity
    Immortality
    Immutable
    Code
    Synchrony
    Provenance
    Permanence
    Guarantees

    View full-size slide

  31. Ethereum (Just another blockchain)

    View full-size slide

  32. Ethereum (Just another blockchain)
    • Blockchain is a decentralised ledger of trust.

    View full-size slide

  33. Ethereum (Just another blockchain)
    • Blockchain is a decentralised ledger of trust.
    – Rather than currency, you can use the ledger
    for kind of applications which require trust

    View full-size slide

  34. Ethereum (Just another blockchain)
    • Blockchain is a decentralised ledger of trust.
    – Rather than currency, you can use the ledger
    for kind of applications which require trust
    – For e.g. Notary, writing a will, or decentralised

    View full-size slide

  35. Ethereum (Just another blockchain)
    • Blockchain is a decentralised ledger of trust.
    – Rather than currency, you can use the ledger
    for kind of applications which require trust
    – For e.g. Notary, writing a will, or decentralised
    I. Craiglist , Uber, Zomato …

    View full-size slide

  36. Ethereum (Just another blockchain)
    • Blockchain is a decentralised ledger of trust.
    – Rather than currency, you can use the ledger
    for kind of applications which require trust
    – For e.g. Notary, writing a will, or decentralised
    I. Craiglist , Uber, Zomato …
    II. Ebay, Amazon, Uber …

    View full-size slide

  37. Ethereum (Just another blockchain)
    • Blockchain is a decentralised ledger of trust.
    – Rather than currency, you can use the ledger
    for kind of applications which require trust
    – For e.g. Notary, writing a will, or decentralised
    I. Craiglist , Uber, Zomato …
    II. Ebay, Amazon, Uber …
    • The way to do it is to write programs which are
    called “Smart Contracts”

    View full-size slide

  38. Ethereum (Just another blockchain)
    • Blockchain is a decentralised ledger of trust.
    – Rather than currency, you can use the ledger
    for kind of applications which require trust
    – For e.g. Notary, writing a will, or decentralised
    I. Craiglist , Uber, Zomato …
    II. Ebay, Amazon, Uber …
    • The way to do it is to write programs which are
    called “Smart Contracts”
    • Ethereum can also be used to do normal ether
    transactions.

    View full-size slide

  39. Ethereum (Just another blockchain)
    • Blockchain is a decentralised ledger of trust.
    – Rather than currency, you can use the ledger
    for kind of applications which require trust
    – For e.g. Notary, writing a will, or decentralised
    I. Craiglist , Uber, Zomato …
    II. Ebay, Amazon, Uber …
    • The way to do it is to write programs which are
    called “Smart Contracts”
    • Ethereum can also be used to do normal ether
    transactions.
    Matchmakers

    View full-size slide

  40. Ethereum Programming Model

    View full-size slide

  41. Ethereum Programming Model
    Bob does not believe in Spiderman, but Alice does

    View full-size slide

  42. Ethereum Programming Model
    Bob does not believe in Spiderman, but Alice does
    Alice bets that if she is in danger, Spiderman will protect her.

    View full-size slide

  43. Ethereum Programming Model
    Bob does not believe in Spiderman, but Alice does
    Alice bets that if she is in danger, Spiderman will protect her.
    Spiderman morally wants to help everybody, if he can.

    Because with great power comes great responsibility.

    View full-size slide

  44. Ethereum Programming Model
    Bob does not believe in Spiderman, but Alice does
    Alice bets that if she is in danger, Spiderman will protect her.
    Spiderman morally wants to help everybody, if he can.

    Because with great power comes great responsibility.
    Alice does not trust Bob, and needs to ensure that they both hold 

    their end of bargains after the bet is done.

    View full-size slide

  45. Ethereum Programming Model
    Bob does not believe in Spiderman, but Alice does
    Alice bets that if she is in danger, Spiderman will protect her.
    Spiderman morally wants to help everybody, if he can.

    Because with great power comes great responsibility.
    Alice does not trust Bob, and needs to ensure that they both hold 

    their end of bargains after the bet is done.
    Spiderman is unaware of this bet, and just webbing his way around.

    View full-size slide

  46. Ethereum Programming Model

    View full-size slide

  47. Ethereum Programming Model
    Contract
    Persistent Msg
    Store $$$
    Program Logic

    View full-size slide

  48. Ethereum Programming Model
    Contract
    Persistent Msg
    Store $$$
    Program Logic
    ??
    $$$
    Msg

    View full-size slide

  49. Ethereum Programming Model
    Contract
    Persistent Msg
    Store $$$
    Program Logic
    ??
    $$$
    Msg
    • Contract = Code + State

    View full-size slide

  50. Ethereum Programming Model
    Contract
    Persistent Msg
    Store $$$
    Program Logic
    ??
    $$$
    Msg
    • Contract = Code + State
    • Turing Complete

    View full-size slide

  51. Ethereum Programming Model
    Contract
    Persistent Msg
    Store $$$
    Program Logic
    ??
    $$$
    Msg
    • Contract = Code + State
    • Turing Complete
    • Self-Executing and
    enforcing

    View full-size slide

  52. Ethereum Programming Model
    Contract
    Persistent Msg
    Store $$$
    Program Logic
    ??
    $$$
    Msg
    • Contract = Code + State
    • Turing Complete
    • Self-Executing and
    enforcing

    View full-size slide

  53. Ethereum Programming Model
    Contract
    Persistent Msg
    Store $$$
    Program Logic
    ??
    $$$
    Msg
    • Contract = Code + State
    • Turing Complete
    • Self-Executing and
    enforcing
    are submitted
    as transactions in 

    blockchain.

    View full-size slide

  54. Ethereum Programming Model
    Contract
    Persistent Msg
    Store $$$
    Program Logic
    ??
    $$$
    Msg
    • Contract = Code + State
    • Turing Complete
    • Self-Executing and
    enforcing
    are submitted
    as transactions in 

    blockchain.
    - Can send eth to other
    accounts

    View full-size slide

  55. Ethereum Programming Model
    Contract
    Persistent Msg
    Store $$$
    Program Logic
    ??
    $$$
    Msg
    • Contract = Code + State
    • Turing Complete
    • Self-Executing and
    enforcing
    are submitted
    as transactions in 

    blockchain.
    - Can send eth to other
    accounts
    - Read/write from storage

    View full-size slide

  56. Ethereum Programming Model
    Contract
    Persistent Msg
    Store $$$
    Program Logic
    ??
    $$$
    Msg
    • Contract = Code + State
    • Turing Complete
    • Self-Executing and
    enforcing
    are submitted
    as transactions in 

    blockchain.
    - Can send eth to other
    accounts
    - Read/write from storage
    - Invoke function calls to
    other contracts

    View full-size slide

  57. Ethereum Programming Model
    Contract
    Persistent Msg
    Store $$$
    Program Logic
    ??
    $$$
    Msg
    • Contract = Code + State
    • Turing Complete
    • Self-Executing and
    enforcing
    are submitted
    as transactions in 

    blockchain.
    - Can send eth to other
    accounts
    - Read/write from storage
    - Invoke function calls to
    other contracts
    - Create other contracts

    View full-size slide

  58. DNS, a commitment, a contract, of sorts

    View full-size slide

  59. DNS, a commitment, a contract, of sorts
    Invoked by
    other accounts

    View full-size slide

  60. Contract Workflow

    View full-size slide

  61. Contract Workflow
    Your Contract

    View full-size slide

  62. Contract Workflow
    Your Contract
    60606040526040516102503
    80380610250833981016040
    528........
    What others see

    in blockchain

    View full-size slide

  63. Contract Workflow
    Your Contract
    60606040526040516102503
    80380610250833981016040
    528........
    What others see

    in blockchain
    PUSH 60
    PUSH 40
    MSTORE
    PUSH 0
    CALLDATALOAD
    .....
    Disassembler output

    View full-size slide

  64. Transactions
    • nonce (anti-replay-attack or transaction counter)
    • to (destination address)
    • value (amount of ETH to send)
    • data (readable by contract code)
    • gasprice (amount of ether per unit gas)
    • startgas (maximum gas consumable)
    • v, r, s (ECDSA signature values)

    View full-size slide

  65. How to Create a Contract?
    • Submit a transaction to the blockchain
    – nonce: previous nonce + 1
    – to: empty
    – value: value sent to the new contract
    – data: contains the code of the contract
    – gasprice (amount of ether per unit gas)
    – startgas (maximum gas consumable)
    – v, r, s (ECDSA signature values)
    • If tx is successful
    – Returns the address of the new contract

    View full-size slide

  66. How to Interact With a Contract?
    • Submit a transaction to the blockchain
    – nonce: previous nonce + 1
    – to: contract address
    – value: value sent to the new contract
    – data: data supposed to be read by the contract
    – gasprice (amount of ether per unit gas)
    – startgas (maximum gas consumable)
    – v, r, s (ECDSA signature values)
    • If tx is successful
    – Returns outputs from the contract (if applicable)

    View full-size slide

  67. Ethereum Frameworks
    Serpent Solidity
    Lower Level Language
    Ethereum VM Bytecode
    Stack Language
    (Like python) (Like javascript)
    (Function and macros

    like scheme)
    (Defined in Ethereum

    yellow paper)
    *Slide from Andrew Miller

    View full-size slide

  68. Blockchain State

    View full-size slide

  69. Blockchain State
    Address Balance (BTC)
    0x123456… 10
    0x1a2b3f… 1
    0xab123d… 1.1
    Bitcoin's state consists of key value
    mapping of addresses to account
    balance

    View full-size slide

  70. Blockchain State
    Address Balance (BTC)
    0x123456… 10
    0x1a2b3f… 1
    0xab123d… 1.1
    Ethereum’s state consists of key value
    mapping addresses to account
    objects
    Address Object
    0x123456… X
    0x1a2b3f… Y
    0xab123d… Z
    Bitcoin's state consists of key value
    mapping of addresses to account
    balance

    View full-size slide

  71. Blockchain State
    Address Balance (BTC)
    0x123456… 10
    0x1a2b3f… 1
    0xab123d… 1.1
    Ethereum’s state consists of key value
    mapping addresses to account
    objects
    Address Object
    0x123456… X
    0x1a2b3f… Y
    0xab123d… Z
    Bitcoin's state consists of key value
    mapping of addresses to account
    balance
    Blockchain != Blockchain State

    View full-size slide

  72. EVM
    Ethereum State Transition

    View full-size slide

  73. EVM
    Program Counter
    Ethereum State Transition

    View full-size slide

  74. EVM
    Program Counter
    Computes preamble

    computation for
    transaction
    Ethereum State Transition

    View full-size slide

  75. EVM
    Program Counter
    Computes preamble

    computation for
    transaction
    Rolls back the

    transaction, if it fails
    Ethereum State Transition

    View full-size slide

  76. EVM
    Program Counter
    Computes preamble

    computation for
    transaction
    Commits the

    transaction

    if success
    Rolls back the

    transaction, if it fails
    Ethereum State Transition

    View full-size slide

  77. EVM
    Program Counter
    Computes preamble

    computation for
    transaction
    Commits the

    transaction

    if success
    Rolls back the

    transaction, if it fails
    Ethereum State Transition
    1 Syntax checking
    transaction.

    View full-size slide

  78. EVM
    Program Counter
    Computes preamble

    computation for
    transaction
    Commits the

    transaction

    if success
    Rolls back the

    transaction, if it fails
    Ethereum State Transition
    1 Syntax checking
    transaction.
    2 Computing preamble
    transaction fee.

    View full-size slide

  79. EVM
    Program Counter
    Computes preamble

    computation for
    transaction
    Commits the

    transaction

    if success
    Rolls back the

    transaction, if it fails
    Ethereum State Transition
    1 Syntax checking
    transaction.
    2 Computing preamble
    transaction fee.
    3 Initialise the gas payment.

    View full-size slide

  80. EVM
    Program Counter
    Computes preamble

    computation for
    transaction
    Commits the

    transaction

    if success
    Rolls back the

    transaction, if it fails
    Ethereum State Transition
    1 Syntax checking
    transaction.
    2 Computing preamble
    transaction fee.
    3 Initialise the gas payment.
    4 Transfer the amount from
    sender to receiver.

    View full-size slide

  81. EVM
    Program Counter
    Computes preamble

    computation for
    transaction
    Commits the

    transaction

    if success
    Rolls back the

    transaction, if it fails
    Ethereum State Transition
    1 Syntax checking
    transaction.
    2 Computing preamble
    transaction fee.
    3 Initialise the gas payment.
    4 Transfer the amount from
    sender to receiver.
    5 Throw error, when sender
    account does not have
    sufficient ether, and roll
    back transaction.

    View full-size slide

  82. EVM
    Program Counter
    Computes preamble

    computation for
    transaction
    Commits the

    transaction

    if success
    Rolls back the

    transaction, if it fails
    Ethereum State Transition
    1 Syntax checking
    transaction.
    2 Computing preamble
    transaction fee.
    3 Initialise the gas payment.
    4 Transfer the amount from
    sender to receiver.
    5 Throw error, when sender
    account does not have
    sufficient ether, and roll
    back transaction.
    6 For any other error, send
    the gas fee to sender

    View full-size slide

  83. Account Object
    • Every account object
    contains 4 pieces of data:
    – Nonce
    – Balance
    – Code hash (code = empty
    string for normal accounts)
    – Storage trie root

    View full-size slide

  84. Account Object
    • Every account object
    contains 4 pieces of data:
    – Nonce
    – Balance
    – Code hash (code = empty
    string for normal accounts)
    – Storage trie root

    View full-size slide

  85. Tx-n
    Tx-1
    Block Mining
    Tx-2

    View full-size slide

  86. Tx-n
    Tx-1
    Block Mining
    Miners
    Tx-2

    View full-size slide

  87. Tx-n
    Tx-1
    Block Mining
    Miners
    Tx-2
    Block
    A set of TXs
    Previous block
    New State Root
    Receipt Root
    Nonce

    View full-size slide

  88. Tx-n
    Tx-1
    Block Mining
    Miners
    Tx-2
    Block
    A set of TXs
    Previous block
    New State Root
    Receipt Root
    Nonce

    View full-size slide

  89. Tx-n
    Tx-1
    Block Mining
    Miners
    Tx-2
    Block
    A set of TXs
    Previous block
    New State Root
    Receipt Root
    Nonce
    Verify transactions &
    execute all code to
    update the state

    View full-size slide

  90. Tx-n
    Tx-1
    Block Mining
    Miners
    Tx-2
    Block
    A set of TXs
    Previous block
    New State Root
    Receipt Root
    Nonce
    SHA3(Block) < D
    Verify transactions &
    execute all code to
    update the state

    View full-size slide

  91. Tx-n
    Tx-1
    Block Mining
    Miners
    Tx-2
    Block
    A set of TXs
    Previous block
    New State Root
    Receipt Root
    Nonce
    SHA3(Block) < D Broadcast
    Block
    Verify transactions &
    execute all code to
    update the state

    View full-size slide

  92. Code execution
    • Every (full) node on the blockchain processes
    every transaction and stores the entire state
    P6
    P5
    P4
    P3
    P2
    P1

    View full-size slide

  93. Code execution
    • Every (full) node on the blockchain processes
    every transaction and stores the entire state
    P6
    P5
    P4
    P3
    P2
    P1
    This is a new
    block!
    I’m a leader

    View full-size slide

  94. Code execution
    • Every (full) node on the blockchain processes
    every transaction and stores the entire state
    P6
    P5
    P4
    P3
    P2
    P1
    This is a new
    block!
    I’m a leader
    This is a new
    block!
    This is a new
    block!
    This is a new
    block!
    This is a new
    block!
    This is a new
    block!

    View full-size slide

  95. Dos Attack Vector
    • Halting problem
    – Cannot tell whether or not a program will run
    infinitely
    – A malicious miner can DoS attack full nodes by
    including lots of computation in their txs
    • Full nodes attacked when verifying the block
    uint i = 1;
    while (i++ > 0) {
    donothing();
    }

    View full-size slide

  96. Solution: Gas
    • Charge fee per computational
    step (“gas”)
    – Special gas fees for operations that
    take up storage

    View full-size slide

  97. Solution: Gas
    • Charge fee per computational
    step (“gas”)
    – Special gas fees for operations that
    take up storage

    View full-size slide

  98. Solution: Gas
    • Charge fee per computational
    step (“gas”)
    – Special gas fees for operations that
    take up storage

    View full-size slide

  99. Sender has to pay for the gas
    • gasprice: amount of ether per unit gas
    • startgas: maximum gas consumable
    – If startgas is less than needed
    • Out of gas exception, revert the state as if the TX has never
    happened
    • Sender still pays all the gas
    • TX fee = gasprice * consumedgas
    • Gas limit: similar to block size limit in Bitcoin
    – Total gas spent by all transactions in a block < Gas Limit

    View full-size slide

  100. What are Smart Contracts ?

    View full-size slide

  101. What are Smart Contracts ?
    A smart contract is a computer
    program executed in a secure
    environment that directly
    controls digital assets

    View full-size slide

  102. Properties of Smart Contracts

    View full-size slide

  103. Properties of Smart Contracts
    Security Property

    View full-size slide

  104. Properties of Smart Contracts
    • Correctness of execution
    – The execution is done correctly, is
    not tampered
    • Integrity of code and data
    • Optional properties
    – Confidentiality of code and data
    – Verifiability of execution
    – Availability for the programs running
    inside
    Security Property

    View full-size slide

  105. Properties of Smart Contracts
    • Correctness of execution
    – The execution is done correctly, is
    not tampered
    • Integrity of code and data
    • Optional properties
    – Confidentiality of code and data
    – Verifiability of execution
    – Availability for the programs running
    inside
    Security Property
    Servers secured

    by trusted 

    hardware.

    (Intel SGX)

    View full-size slide

  106. Properties of Smart Contracts
    Digital Assets

    View full-size slide

  107. Properties of Smart Contracts
    • A broad category
    – Domain name
    – Website
    – Money
    – Anything tokenisable (e.g. gold,
    silver, stock share etc)
    – Game items
    – Network bandwidth, computation
    cycles
    Digital Assets

    View full-size slide

  108. Properties of Smart Contracts

    View full-size slide

  109. Properties of Smart Contracts
    Technical aspects of smart contract

    View full-size slide

  110. Properties of Smart Contracts
    • Requires parties to pay collateral before
    participating.
    • Use oracles (external trusted third parties)
    • Use network (miners are ready to do your
    work for a good incentive)
    • Cryptography
    1. Commitments
    2. Digital signatures
    3. Merkle trees and authenticated data
    structures
    Technical aspects of smart contract

    View full-size slide

  111. Example: escrow service for exchange

    View full-size slide

  112. Example: escrow service for exchange
    A B
    E
    X

    View full-size slide

  113. Example: escrow service for exchange
    A B
    E
    X

    View full-size slide

  114. Example: escrow service for exchange
    A B
    E
    X
    A B
    E
    A B
    E
    I won’t give
    you Y
    Y

    View full-size slide

  115. Example: escrow service for exchange
    A B
    E
    X
    A B
    E
    A B
    E
    I won’t give
    you Y
    Y

    View full-size slide

  116. Example: escrow service for exchange
    A B
    E
    X
    A B
    E
    A B
    E
    I won’t give
    you Y
    Y
    A B
    E A B
    E
    X X

    View full-size slide

  117. Example: multisig
    • Require M of N “owners” to agree in order for
    a particular digital asset to be transferred
    – Individual use cases
    • eg. two-factor authentication
    – Intra-organizational use cases

    View full-size slide

  118. ICOs
    Whitepaper
    Dapp
    Smart Contract
    Life cycle of a Dapp

    View full-size slide

  119. Research Problems

    View full-size slide

  120. Research Problems
    • How to write secure and correct contracts ? Need tools like Oyente

    View full-size slide

  121. Research Problems
    • How to write secure and correct contracts ? Need tools like Oyente
    • Can define your secure ethereum client based on yellow paper

    View full-size slide

  122. Research Problems
    • How to write secure and correct contracts ? Need tools like Oyente
    • Can define your secure ethereum client based on yellow paper
    • Can define programming languages like rust for smart contracts.

    View full-size slide

  123. Research Problems
    • How to write secure and correct contracts ? Need tools like Oyente
    • Can define your secure ethereum client based on yellow paper
    • Can define programming languages like rust for smart contracts.
    • Scaling Issues ?

    View full-size slide

  124. Research Problems
    • How to write secure and correct contracts ? Need tools like Oyente
    • Can define your secure ethereum client based on yellow paper
    • Can define programming languages like rust for smart contracts.
    • Scaling Issues ?
    • Sharding

    View full-size slide

  125. Research Problems
    • How to write secure and correct contracts ? Need tools like Oyente
    • Can define your secure ethereum client based on yellow paper
    • Can define programming languages like rust for smart contracts.
    • Scaling Issues ?
    • Sharding
    • State channels

    View full-size slide

  126. Research Problems
    • How to write secure and correct contracts ? Need tools like Oyente
    • Can define your secure ethereum client based on yellow paper
    • Can define programming languages like rust for smart contracts.
    • Scaling Issues ?
    • Sharding
    • State channels
    • Privacy Issues (Ring signatures, ZK-SNARKS and Hawk)

    View full-size slide

  127. Research Problems
    • How to write secure and correct contracts ? Need tools like Oyente
    • Can define your secure ethereum client based on yellow paper
    • Can define programming languages like rust for smart contracts.
    • Scaling Issues ?
    • Sharding
    • State channels
    • Privacy Issues (Ring signatures, ZK-SNARKS and Hawk)
    • Ethereum Virtual machine and improvement in language models

    View full-size slide

  128. Research Problems
    • How to write secure and correct contracts ? Need tools like Oyente
    • Can define your secure ethereum client based on yellow paper
    • Can define programming languages like rust for smart contracts.
    • Scaling Issues ?
    • Sharding
    • State channels
    • Privacy Issues (Ring signatures, ZK-SNARKS and Hawk)
    • Ethereum Virtual machine and improvement in language models
    • Proof of work/stake model for x86_64 which is gpu and asic resistant

    View full-size slide

  129. Research Problems
    • How to write secure and correct contracts ? Need tools like Oyente
    • Can define your secure ethereum client based on yellow paper
    • Can define programming languages like rust for smart contracts.
    • Scaling Issues ?
    • Sharding
    • State channels
    • Privacy Issues (Ring signatures, ZK-SNARKS and Hawk)
    • Ethereum Virtual machine and improvement in language models
    • Proof of work/stake model for x86_64 which is gpu and asic resistant
    • Defining decentralised pools and exchanges and relays (eg. Smart pool and
    BTC relay)

    View full-size slide

  130. Research Problems

    View full-size slide

  131. Research Problems
    • Role of algorithmic incentives(game theory) in cryptocurrency

    View full-size slide

  132. Research Problems
    • Role of algorithmic incentives(game theory) in cryptocurrency
    • Transaction in blockchain = mining reward + mining fee + private cost
    function

    View full-size slide

  133. Research Problems
    • Role of algorithmic incentives(game theory) in cryptocurrency
    • Transaction in blockchain = mining reward + mining fee + private cost
    function
    • Multi-Agents are involved like miners, type of transactions etc.

    View full-size slide

  134. Research Problems
    • Role of algorithmic incentives(game theory) in cryptocurrency
    • Transaction in blockchain = mining reward + mining fee + private cost
    function
    • Multi-Agents are involved like miners, type of transactions etc.
    • Can we define a model to calculate the costs for a particular contract or
    at least provide some guarantee.

    View full-size slide

  135. Research Problems
    • Role of algorithmic incentives(game theory) in cryptocurrency
    • Transaction in blockchain = mining reward + mining fee + private cost
    function
    • Multi-Agents are involved like miners, type of transactions etc.
    • Can we define a model to calculate the costs for a particular contract or
    at least provide some guarantee.
    • Can do various studies of economics in crypto-regime

    View full-size slide

  136. Research Problems
    • Role of algorithmic incentives(game theory) in cryptocurrency
    • Transaction in blockchain = mining reward + mining fee + private cost
    function
    • Multi-Agents are involved like miners, type of transactions etc.
    • Can we define a model to calculate the costs for a particular contract or
    at least provide some guarantee.
    • Can do various studies of economics in crypto-regime
    • Behavioural economic models

    View full-size slide

  137. Research Problems
    • Role of algorithmic incentives(game theory) in cryptocurrency
    • Transaction in blockchain = mining reward + mining fee + private cost
    function
    • Multi-Agents are involved like miners, type of transactions etc.
    • Can we define a model to calculate the costs for a particular contract or
    at least provide some guarantee.
    • Can do various studies of economics in crypto-regime
    • Behavioural economic models
    • Selfish Agents

    View full-size slide

  138. Research Problems
    • Role of algorithmic incentives(game theory) in cryptocurrency
    • Transaction in blockchain = mining reward + mining fee + private cost
    function
    • Multi-Agents are involved like miners, type of transactions etc.
    • Can we define a model to calculate the costs for a particular contract or
    at least provide some guarantee.
    • Can do various studies of economics in crypto-regime
    • Behavioural economic models
    • Selfish Agents
    • Coordinated choices

    View full-size slide

  139. Research Problems
    • Role of algorithmic incentives(game theory) in cryptocurrency
    • Transaction in blockchain = mining reward + mining fee + private cost
    function
    • Multi-Agents are involved like miners, type of transactions etc.
    • Can we define a model to calculate the costs for a particular contract or
    at least provide some guarantee.
    • Can do various studies of economics in crypto-regime
    • Behavioural economic models
    • Selfish Agents
    • Coordinated choices
    • How a blackmail would happen, what would be protocols for heist, Can there
    be a morality check on contracts

    View full-size slide

  140. Research Problems
    • Role of algorithmic incentives(game theory) in cryptocurrency
    • Transaction in blockchain = mining reward + mining fee + private cost
    function
    • Multi-Agents are involved like miners, type of transactions etc.
    • Can we define a model to calculate the costs for a particular contract or
    at least provide some guarantee.
    • Can do various studies of economics in crypto-regime
    • Behavioural economic models
    • Selfish Agents
    • Coordinated choices
    • How a blackmail would happen, what would be protocols for heist, Can there
    be a morality check on contracts
    https://github.com/ethereum/research/wiki/Problems

    View full-size slide

  141. प्रश्न एवं उत्तर

    View full-size slide