rtc2017 ethereum workshop

15
Kevin Sullivan Rakuten Blockchain Lab

Upload: rakuten-inc

Post on 23-Jan-2018

96 views

Category:

Technology


0 download

TRANSCRIPT

Kevin Sullivan

Rakuten Blockchain Lab

2

• Introduction to Ethereum (10 mins)

• Hands on – create a token (30 mins)

• Join private Ethereum network (10 mins)

• Deploy and interact with token on Testnet (10 mins)

3

• Second biggest blockchain, after Bitcoin

• Contains a virtual machine that allows powerful Smart Contracts

• Ambitious goal: to become the ‘World Computer’

4

• Distributed Applications

• Token creation and ICOs

• Crowd funding

• Smart property rentals (cars, houses)

• Business contracts

• Insurance

• Electronic voting

• Auctions

• Prediction markets

5

An Initial Coin Offering (ICO) is a new way of fund raising.

It is similar to an IPO, but investors buy digital coins or tokens instead of stocks in a

company.

Ethereum itself raised $17 m through an ICO in 2014.

In Q2 2017 $1.4 billion was raised through ICOs

• Tezos - $232 m

• Bancor - $153 m

• Status - $95 m

• TenX - $83 m

ICOs have been criticized for having no regulation, although in the US the SEC have said

that they will treat certain ICO tokens as securities.

6

• Bitcoin has a limited scripting language.

• Ethereum has Turing-complete programming language.

• Smart Contracts are written in Solidity.

• Smart Contracts are analogous to classes.

• Calling a Smart Contract costs money.

7

Split funds between 2 parties

8

Bugs in Smart Contracts can have serious financial repercussions!

June 2016, a bug in the DAO contract caused a loss of $70 million

July 2017, a bug in the Parity wallet allowed an attacker to steal $32 million

9

The Parity wallet exploit - $32 million stolen

10

The Parity wallet exploit – fixed.

11

1. git clone https://github.com/rakevsul/rtc2017

2. cd rtc2017

3. npm i

4. Run testrpc in another console: ./node_modules/.bin/testrpc

12

Create your own digital currency

13

Truffle is a development framework for Ethereum.

Testrpc is an Ethereum simulator for testing and development.

1. Run testrpc in another console: ./node_modules/.bin/testrpc

2. ./node_modules/.bin/truffle deploy

3. ./node_modules/.bin/truffle test

14

Web3 is a javascript library that communicates with a local Ethereum node.

1. ./node_modules/.bin/webpack

2. Start a webserver e.g. php -S localhost:8000 -t build/app

3. Open http://localhost:8000/ in a browser

15

Geth is an Ethereum client, included in Mist.

To join a private network, you need the genesis file and the network ID.

1. cd rtcnet

2. ./rtcnet_console.sh

3. personal.newAccount()

4. (optional) ./rtcnet_miner.sh