Cashapon - Submission from Group 15

Inspiration

Gachapon is a variety of vending machine-dispensed capsule toys popular in Japan. They are, by nature, a "blind purchase", but the mystery adds to the element of amusement. We can extend this amusement to the blockchain, where a user can acquire multiple random tokens using his ETH. We are using Kyber Network's on-chain liquidity protocol to power the Cashapon's random token reward.

和訳 ガチャポンはいろいろなアイテムの入ったカプセル自販機として日本で人気があります。ガチャポンは自然な"blind purchase"であり、何が出てくるか分からないという要素が、利用者のワクワクを生み出す要因です。我々はこの面白い仕組みをブロックチェーンに拡張しました。つまり、このプラットフォームではユーザーがETHを送金することで、ランダムにトークンを受け取ることができます。技術的には、オンチェーンの流動性プロトコルであるKyber Networkを使用することでCashaponのランダム性を実現しています。

What it does

A user inputs how much ETH he wants to use and clicks "Play". He will receive a random token equivalent to the ETH he put in. e.g. A user puts in 1 ETH, and he gets 130 OMG, which was chosen at random. Cashapon chooses randomly from 70+ tokens. He can also choose to receive multiple tokens from his 1 ETH.

和訳 ユーザーは好きな量のETHを入力し、"Play"をクリックします。そしてランダムに選ばれたトークンを、ETHの量に応じて受け取ります。例えば、ユーザーが1ETHを送金し、ランダムに選ばれたトークンである130 OMGを受け取ることができます。

Challenges we ran into

We needed a random number generator within the smart contract. Because of the complexity of blockchains where multiple nodes are executing the transaction, we needed a function that will generate the same number on multiple nodes, running multiple times. Complete randomness is difficult to do in smart contracts. Instead, we generate a pseudo random number once, and use that on different nodes. The random() function uses the block.timestamp and block.difficulty. These two variables are completely out of control of the players, thus they can be used as a source of randomness. They are generated only once by the miner, and all other nodes will have the same value.

和訳 開発にあたって、我々はスマートコントラクト内におけるランダムな数値生成を行う必要がありました。ブロックチェーン上でその処理を行うというということは、複数のノードがそれぞれ異なる時間において計算処理をおこなっていながらもランダムな数値生成において同一の計算結果を導き出さなければならない、という難しさが存在します。ランダム関数はblock.timestampとblock.difficultyを使用しており、これら2つの値はノードや計算実行時間によらず一定であり、ユーザーがコントロール不可能な数値であり、結果として完全にランダムな変数を利用して数値を生成することができています。

Accomplishments that we're proud of

Hacking until the very end and working with different team members. Also, making new friends!

和訳 色々な特徴を持ったチームメンバーが協力し、最後まで成果にコミットしたこと。そして新しい友達ができたこと!

What we learned

  • How complex operations such as decentralized token swaps can be simplified by protocols such as Kyber.
  • How good UX can make the entire experience pleasurable and fun
  • How to build and develop DApps quickly by finding a good protocol to fit our use case.

和訳

  • 分散型のトークンスワップといった複雑なオペレーションが、Kyberのプロトコルを利用することで簡素化することができること。
  • どのようなUXが楽しく面白い体験を作り上げることができるか。
  • ユースケースに合わせて、優れたプロトコルを探すことで早急にDAppsを作成できること。

What's next for Cashapon

  • Building for adoption in mind
  • Fully implementing ERC-681
  • Integrating with different NFT platforms (e.g. the user puts in ETH, and gets a random NFT from Decentraland)
  • Integrating with other blockchain games where Cashapon is one of the fun functionalities
  • Audit the smart contracts, build a revenue model, and launch on Mainnet.

和訳

  • 一般への普及
  • ERC-681の実装
  • 様々なNFTプラットフォームとの統合(ETHを送金し、DecentralandのNFTをランダムに受け取るなど)
  • Cashaponが他のブロックチェーンゲームの機能の一部として統合されること
  • スマートコントラクトの監査を通すこと、収益モデルを構築すること、メインネットでローンチすること

Built With

Share this project:

Updates