My Presentation Slide
I gave a presentation about bancor at RubyKaigi2018. I translated transcript into English and released it!
My presentation slide is here ↓ speakerdeck.com
My name is Yuta Kurotaki. I'm a software engineer at GMO Peperbo, Inc. This picture is me, I am eating rice.
This is the 9th group photo of Rails Girls Tokyo held at Speee. I am a coach.
We sponsored T-shirts at Rails Girls Tokyo 9th. The company offers a service called SUZURI.
I am a developer of the personal support platform "SUZURI People".
About SUZURI People
About SUZURI People
It is okay if you talk to me after the presentation!
About the technical community on FinTech & Crypt Currency in the Company.
For example, OKIMOCHI developed by Mr. Joe Miyamoto, introduced a mechanism to throw bit coins on Slack.
At Pepabo Laboratories, we are conducting R&D for sharing private data. https://speakerdeck.com/monochromegane/wsa-1-kaleidoscope
I have been developing services using the Bancor protocol.
Bitcoin design paper was proposed in 2008, and as a distributed ledger technology dealing with bit coin transaction history, "Block chain" has been abstracted.
The blockchain is a ledger of decentralized authority of Peer to peer, and it is distributed among users and managed by users. Bitcoin blockchains are traded in 10 minutes and the transactions are summarized in data called blocks.
Also, bitcoin requires work called mining, In order to simulate in real time the time of 10 minutes in the real world, it is supported by this mechanism called Proof of Work.
As a good point of the blockchain, It is decentralized and it is impossible to improve the data.
However, due to the problem of scalability, the response is slow, I feel the problem of UX. Also, in the development of blockchain applications, there are few practical workers and few developers.
There are many applications of blockchains that make use of these characteristics. There are application to health care, personal ID management, contract, etc.
For example, if it is a contract, you can move assets under certain conditions many years later, guaranteeing the promise of the future.
In Estonia, the e-government began in 2000, not only administrative activities, but also all services such as transportation, medical services, banking transactions, etc. are electronized.
About Smart Contracts
Before I explain about Smart Contract, I will talk about BlockChain Platform called Ethereum.
It is said that it was devised when Vitalik was 19 at the age of 19. Today, various services are brought out around the world on this basis.
This sentence is quoted from the blog of Vitalik, the developer of Etharium.
Smart contracts are a simple form of distributed automation. And it is a mechanism that involves digital assets and multiple parties.
Explanation of automatic execution of contract.
About Token Economy
Currently, ICO (Initial Coin Offering) which raise funds using token implemented on Ethereum all over the world is gaining excitement. This image is the result of ICO of Thai FinTech startup called OmiseGO.
They have raised 25 million dollars.
In Japan there is a social media platform using block chain technology called ALIS. ALIS has done ICO, and as a result, it raises 430 million yen.
Token economy is to exchange items such as local currency and coins / tickets that can be used in a specific community, for example by exchange for cash etc.
Tokens are valuable vouchers, which create unique economic zones for each token by circulation.
It is good that anyone can raise funds using tokens such as currencies and tickets realized on the block chain, but minor tokens can not be sold when you want to sell, when you want to buy You will not be able to buy it.
This is called liquidity risk.
Also, if some people do not participate in the market, agreement on the price of the seller and the buyer will not be made and a "Coincidence of Wants Problem " will occur and no agreement will be made.
I want to sell for $ 15! I want to buy with $ 10! If it says that the transaction is not established.
To solve these problems, the Bancor protocol was considered.
At first, I learned by looking at the entry "Bancor Protocol will be a big invention to support the token economy?"
This article was written by amachino.
The Bancor protocol introduces intermediaries such as "reserve funds" and brings "token liquidity" and "automation of transaction price discovery".
Regarding the new method of price finding, the price (Price) of a token at a certain moment is calculated by dividing the balance (Balance) stored by the token issuer at that point by the token total issue amount (Supply) and the fixed reserve ratio (CRR ) Is the definition formula that is divided by.
In the classical exchange model, the price was determined by the real-time matching order between the two parties, but the price of the smart token is calculated automatically.
Here is the pricing equation derived from the condition that the relationship between price, issue volume and reserve value always holds regardless of trading quantity.
I implemented this in Ruby.
I made a gem named bancor.
Although it may not have been so long since Bancor Protocol was released, I introduced it to my own project to verify that it is actually effective.
At the beginning, there are some difficulties.
- Learning costs such as acquiring a language called Solidity to move a Smart Contract on Ethereum
- Prepare blockchain infrastructure
- Web application development for human beings to buy and sell tokens
- Join web application and block chain, manage transaction
- Cost to move Smart Contract
I implemented it in Ruby so that I can verify Bancor Protocol without learning cost or operating cost.
Now you can easily introduce web applications with Ruby on Rails etc.
Since it is open to GitHub, those who are interested after listening to the presentation please try using it for testing!
This is an example of the calculations that were written in the Bancor protocol white paper.
For details, I would like you to see the white paper, but from the top in order of Activity, based on the funds collected by ICO, ETH is converted into a smart token called ABC.
You can actually simulate this with bancor gem.
I put a bancor gem in Rails and made a web service prototype to purchase creators' tickets with yen.
Let's see how the price fluctuates when buying a ticket. As you buy, you can see that the price of one ticket rises little by little.
Also, this time it is a demo of selling.
Every time you sell a ticket, you can see that the price of one ticket gradually declines.
I explained the token economy from the overview of the blockchain, and the bancor protocol. Also, I wrote a simulator about Ruby implementation.
As a protocol, Bancor protocol can be implemented in languages such as Ruby as well as blockchains.
Therefore, you can try without using Smart Contract on Ethereum.
Today 's presentation introduced one example of making protocols like Bancor Protocol available to Ruby's applications.
From now on, bancor gem does it without thinking too much about arithmetic of decimal point,Though it may be better if you aim for simulation through trading, Actually released as a Web service, when running in a production environment, There are things I have to do.
- Implement ideas raised in the world of Ethereum in ruby world
- Implement ideas raised in Ruby's world in the world of Ethereum
If we do something like these, I think whether Ruby and Ethereum can get along better.
This is the end of the presentation.
Let's talk about this presentation after party or when you pass each other! Let's enjoy RubyKaigi for three days from today! Thank you very much!