Slide 1

Slide 1 text

Yuta Kurotaki / GMO Pepabo, Inc. 2018.05.31 RubyKaigi 2018 bancor: Token economy made with Ruby

Slide 2

Slide 2 text

Senior Software Engineer Yuta Kurotaki @kurotaky

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

SUZURI People https://people.suzuri.jp/

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

Crypto currency “SUKISUKI” corps • Introduced OKIMOCHI to Pepabo’s Slack • OKIMOCHI: Send bit coins with reaction on Slack • Research and development of Kaleidscope • KVS on IPFS • Web service development using Bancor Protocol • and More ! https://speakerdeck.com/kentaro/wips-for-cryptocurrency-at-pepabo

Slide 11

Slide 11 text

Outline • Blockchain • Smart Contract • Token Economy • Bancor Protocol & Ruby • Conclusion & Future plans

Slide 12

Slide 12 text

Blockchain

Slide 13

Slide 13 text

What is Blockchain? • Decentralized ledger • P2P Network • Proof of Work

Slide 14

Slide 14 text

Pros • Decentralized ledger • Tamper resistant ledger Cons • Scalability problem

Slide 15

Slide 15 text

Blockchain Applications • Financial services • Healthcare • Personal Identification • Contracts

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

Smart Contracts

Slide 18

Slide 18 text

Ethereum • A Next-Generation Smart Contract and Decentralized Application Platform https://github.com/ethereum/wiki/wiki/White-Paper

Slide 19

Slide 19 text

What is Smart Contracts? •A smart contract is the simplest form of decentralized automation, and is most easily and accurately defined as follows: a smart contract is a mechanism involving digital assets and two or more parties, where some or all of the parties put assets in and assets are automatically redistributed among those parties according to a formula based on certain data that is not known at the time the contract is initiated. https://blog.ethereum.org/2014/05/06/daos-dacs-das-and-more-an-incomplete-terminology-guide/

Slide 20

Slide 20 text

Example •A wants to pay $500 to B to build a website. The contract would work as follows: A puts $500 into the contract, and the funds are locked up. •When B finishes the website, B can send a message to the contract asking to unlock the funds. If A agrees, the funds are released. •If B decides not to finish the website, B can quit by sending a message to relinquish the funds. •If B claims that he finished the website, but A does not agree, then after a 7-day waiting period it’s up to judge J to provide a verdict in A or B’s favor. https://blog.ethereum.org/2014/05/06/daos-dacs-das-and-more-an-incomplete-terminology-guide/

Slide 21

Slide 21 text

Token Economy

Slide 22

Slide 22 text

ICO(Initial Coin Offering)

Slide 23

Slide 23 text

ICO(Initial Coin Offering) • ALIS ICO Results • 430 million yen ! • Openness https://alisproject.github.io/whitepaper/whitepaper_v1.01.pdf

Slide 24

Slide 24 text

Token Economy • Token economy means economy by token (electronic vouchers / substitute money) • Make something of value realized by tokenizing and make it possible to trade

Slide 25

Slide 25 text

Problems in Minor Token Economy • Coincidence of Wants Problem • Agreement on price is required between selling side and buying side • Minor currencies are hard to distribute. I can not sell(buy) it when I want to sell(buy) it ❌ *XBOUUPTFMM GPS *XBOUUPCVZJU GPS Coincidence of Wants Problem

Slide 26

Slide 26 text

#BODPS1SPUPDPM

Slide 27

Slide 27 text

Bancor Protocol ͸τʔΫϯΤίϊϛʔΛࢧ͑Δେൃ໌ͱͳΔ͔ʁʢલฤʣ

Slide 28

Slide 28 text

Bancor Protocol • Automatic determination of transaction price • Continuous liquidity

Slide 29

Slide 29 text

A New Method for Price Discovery • Balance: Reserve Token Balance • Supply: Smart Token Supply • CRR: Constant Reserve Ratio https://bravenewcoin.com/assets/Whitepapers/Bancor-Protocol-Whitepaper-en.pdf

Slide 30

Slide 30 text

Price Calculation Per Transaction • T = Smart tokens received in exchange for E (reserve tokens), given R, S and F • E = Reserve tokens received in exchange for T (smart tokens), given R, S and F R - Reserve Token Balance S - Smart Token Supply F - Constant Reserve Ratio (CRR)

Slide 31

Slide 31 text

#BODPSHFN

Slide 32

Slide 32 text

Motivation • It takes money (Gas) to do with a block chain • It takes time for transactions • It takes cost to understand the structure and language of the block chain

Slide 33

Slide 33 text

Motivation • Bancor Protocol implemented in Ruby

Slide 34

Slide 34 text

Bancor • https://rubygems.org/gems/bancor • https://github.com/kurotaky/bancor

Slide 35

Slide 35 text

Bancor Whitepaper Price Calculation Examples https://bravenewcoin.com/assets/Whitepapers/Bancor-Protocol-Whitepaper-en.pdf

Slide 36

Slide 36 text

Demo

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

$PODMVTJPO

Slide 40

Slide 40 text

Conclusion • Implementing the Bancor protocol in Ruby makes it easy to simulate web applications built with Rails without using smart contracts

Slide 41

Slide 41 text

Future plans • Decimal point operation • Ethereum World Idea implements in Ruby World • Ruby World Ideas implements in Ethereum World • Ruby Ethereum

Slide 42

Slide 42 text

Enjoy RubyKaigi 2018 !!