Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

Theory questions

Slide 3

Slide 3 text

What is blockchain Bob Alice Carol David Elizabeth 3

Slide 4

Slide 4 text

Blockchain is append-only ledger chain of transaction blocks 4 https://medium.com/coinmonks/the-blockchain-473aac352e5

Slide 5

Slide 5 text

Blockchain is append-only ledger chain of transaction blocks 5 https://medium.com/coinmonks/the-blockchain-473aac352e5 + smart contracts

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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)

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

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.

Slide 15

Slide 15 text

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.

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

Theory test

Slide 20

Slide 20 text

Theory test https://forms.gle/t3MHfPFf7N4JNCaK8 20

Slide 21

Slide 21 text

Solidity demo

Slide 22

Slide 22 text

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; } }

Slide 23

Slide 23 text

Blockchain is append-only ledger chain of transaction blocks 23 https://medium.com/coinmonks/the-blockchain-473aac352e5 + smart contracts

Slide 24

Slide 24 text

Thank you! 24