1. Trang chủ
  2. » Giáo Dục - Đào Tạo

intro to smart contract on blockchainen

34 82 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 34
Dung lượng 0,94 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

• How to perform : self-enforcing , self executing• Smart Contract in real-life: service?. smart contract on blockchain... • its totally up to you • reach an agreement with untrustful pa

Trang 1

SMART CONTRACT

林修平

Trang 2

• buying, selling, renting, leasing, insurance, investment, etc

• actively or inactively perform

Trang 3

“SMART” CONTRACT

Trang 4

• How to perform : self-enforcing , self executing

• Smart Contract in real-life:

service?

“SMART” CONTRACT

Trang 5

smart contract on blockchain

Trang 6

• What differences does it make?

or program and mathematics?

• its totally up to you

• reach an agreement with untrustful party

smart contract on blockchain

Trang 7

• https://www.thenewslens.com/article/11796

• a washing machine that can buy detergent itself if needed

• without blockchain

• cash flow :

• online payment -> companies that sells detergent -> transportation companies

• what’s the cost?

• time, efforts on checking status and verify

• what if something went wrong?

• how long does it take to find out the problem?

• who will find out the problem?

• how long do I have to wait?

smart contract on blockchain

Trang 8

• https://www.thenewslens.com/article/11796

• a washing machine that can buy detergent itself if needed

• with blockchain

• cash flow :

• online payment -> companies that sells detergent -> transportation companies

• what’s the cost?

• transaction fee

• what if something went wrong?

• how long does it take to find out the problem?

• who will find out the problem?

• how long do I have to wait?

smart contract on blockchain

Trang 9

BLOCKCHAIN + IOT

Trang 10

• how to make sure what it says is true?

• share same information

• distributed?

• can an IOT device provide such capability in its storage unit?

• decentralized?

BLOCKCHAIN + IOT?

Trang 11

• main problems in IOT

BLOCKCHAIN + IOT?

Trang 12

CHALLENGE

Trang 13

• External Information

• Liquidity

• has no control beyond ledgers

• say you start a bet on tomorrow’s game score…

• how do you provide the score to smart contract?

• fetch the source from outside?

• which source to trust?

• can everyone fetch from the same source?

• will it expire? disappear? change from time to time?

• for now, smart contracts on blockchain can not fetch external information itself

• provided by third party

Trang 14

company, is the money you pay monthly going to stay in there indefinitely?

out of the money which means the money will only be

Trang 15

• Liquidity

Trang 16

Ethereum smart contract

Trang 18

Ethereum smart contract

Trang 19

Ethereum smart contract

• each operation has a price(gas)

• pay for gas where user decides how much to pay per unit gas

• pay with ether

Trang 20

Ethereum smart contract

• 1 write your contract

Trang 21

Ethereum smart contract

• 1 write your contract

• 2 compile it to byte code

Trang 22

Ethereum smart contract

• 1 write your contract

• 2 compile it to byte

code

mined

Trang 23

Ethereum smart contract

• 1 write your contract

Trang 24

Ethereum smart contract

Trang 25

Ethereum smart contract

• 1 write your contract

• 2 compile it to byte code

https://ethereum.github.io/browser-solidity/

ethereum/wiki/Building-Ethereum

https://github.com/ethereum/go-https://github.com/ethereum/mist/releases

Trang 26

living example : DAO

Trang 27

• Decentralized Autonomous Organization

• by slock.it

Trang 28

living example : DAO

• Recursive calling vulnerability

• propose a split -> execute the split -> withdraw

• propose a split -> execute the split -> propose a split ->

Trang 29

living example : DAO

problem1

problem2

Trang 30

living example : DAO

problem1

Trang 31

living example : DAO

problem1

• address.call.value(amount)

• supply with enough gas

• if address refers to a contract, it triggers fallback function

• do what whatever you want as long as enough gas remaining

Trang 32

living example : DAO

problem2

Trang 33

living example : DAO

Trang 34

living example : DAO

• votes for hard fork

Ngày đăng: 04/07/2018, 13:48

TỪ KHÓA LIÊN QUAN

w