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

Decentralized finance on Ethereum. Q&A session

Decentralized finance on Ethereum. Q&A session

Exactpro

April 12, 2022
Tweet

More Decks by Exactpro

Other Decks in Technology

Transcript

  1. Rostislav Yavorskiy Head of research at Exactpro VERIFICATION OF SMART

    CONTRACTS ON THE ETHEREUM BLOCKCHAIN Q&A session #2 Decentralized finance on Ethereum 12 April 2022
  2. Why mining? Bitcoin "mining" serves the function • to validate

    and confirm new transactions to the blockchain (miners are getting paid for their work) • to prevent double-spending by bad actors (it is extremely expensive to"hack" the network) It is also the way that new bitcoins are introduced into the system. https://supchina.com/ 6
  3. Why mining? Bitcoin "mining" serves the function • to validate

    and confirm new transactions to the blockchain (miners are getting paid for their work) • to prevent double-spending by bad actors (it is extremely expensive to"hack" the network) It is also the way that new bitcoins are introduced into the system. https://supchina.com/ 7 Decentralized consensus in no trust environment is a difficult issue
  4. Different consensus algorithms Proof of work (PoW) needs high energy

    consumption and a longer processing time. Proof of stake (PoS) is involves the allocation of responsibility to a participant node in proportion to the number of virtual currency tokens held by it. Proof of Capacity (PoC) - the more hard disk space a node has, the more rights it is granted for maintaining the public ledger. https://supchina.com/ 8 Decentralized consensus in no trust environment is a difficult issue
  5. All you need to do is a smart contract that

    can: • Issue a specific amount of tokens at start • Store all the token balances of all the users Initial Coin Offering (ICO) Contract 9
  6. All you need to do is a smart contract that

    can: • Issue a specific amount of tokens at start • Store all the token balances of all the users Initial Coin Offering (ICO) Contract 10 To create new cryptocurrency (tokens) you don’t have to care about mining and the infrastructure. Use Ethereum (or other platforms)
  7. DAO is a member-owned community with no centralized leadership The

    backbone of a DAO is its smart contract The contract defines the rules of the organization and holds the group's treasury Decisions are governed by proposals and voting Votes counted, and outcome implemented automatically without trusted intermediary DAO implementation https://riskgroupllc.com/ 11
  8. DAO is a member-owned community with no centralized leadership The

    backbone of a DAO is its smart contract The contract defines the rules of the organization and holds the group's treasury Decisions are governed by proposals and voting Votes counted, and outcome implemented automatically without trusted intermediary DAO implementation https://riskgroupllc.com/ 12 Issues of community-driven DAO - Security - Reduced speed of decision making - Trivial matters are discussed while leaving important matters unattended
  9. Solidity is an object-oriented, high-level language for implementing smart contracts

    to govern the behaviour of accounts within the Ethereum state Solidity is a curly-bracket language influenced by C++, Python and JavaScript Solidity is statically typed, supports inheritance, libraries and complex user-defined types among other features 13
  10. Blockchain programming languages • C++ rapid and powerful, a multi-paradigm

    language, but complexity increases with the length of coding • Java platform-independent and developer friendly language, but it is slower in performance as compared to C++ and is more memory consuming • Python easy to use open-source language with extensive library, but memory consuming and weak in cell phone devices • Javascript is very good at handling asynchronous actions, yet it is not as efficient as C++ in terms of maximizing computer’s processing power • And also Ruby, GoLang, C#, Simplicity, Rholang, PHP, Vyper, etc.
  11. Blockchain programming languages • C++ rapid and powerful, a multi-paradigm

    language, but complexity increases with the length of coding • Java platform-independent and developer friendly language, but it is slower in performance as compared to C++ and is more memory consuming • Python easy to use open-source language with extensive library, but memory consuming and weak in cell phone devices • Javascript is very good at handling asynchronous actions, yet it is not as efficient as C++ in terms of maximizing computer’s processing power • And also Ruby, GoLang, C#, Simplicity, Rholang, etc.
  12. EVM is the runtime environment for smart contracts in Ethereum.

    EVM is completely isolated, which means that code running inside the EVM has no access to network, filesystem or other processes. Smart contracts have limited access to other smart contracts. The Ethereum Virtual Machine (EVM) 16
  13. EVM is the runtime environment for smart contracts in Ethereum.

    EVM is completely isolated, which means that code running inside the EVM has no access to network, filesystem or other processes. Smart contracts have limited access to other smart contracts. The Ethereum Virtual Machine (EVM) 17 Every Ethereum node runs on the EVM to maintain consensus across the blockchain
  14. EVM is the runtime environment for smart contracts in Ethereum.

    EVM is completely isolated, which means that code running inside the EVM has no access to network, filesystem or other processes. Smart contracts have limited access to other smart contracts. The Ethereum Virtual Machine (EVM) 18 Every Ethereum node runs on the EVM to maintain consensus across the blockchain EVM defines the rules for computing a new valid state from block to block
  15. Solidity demo https://remix.ethereum.org/#optimize=false&runs=200&evmVersion=null& version=soljson-v0.8.7+commit.e28d00a7.js 22 // SPDX-License-Identifier: GPL-3.0 pragma solidity

    ^0.8.7; contract Lecture2Example{ uint8 storedData; function Multiply ( uint x , uint y ) public pure returns ( uint8 ) { return x * y ; } function set( uint x, uint y) public { storedData = Multiply (x, y); } function get() public view returns (uint){ return storedData; } }