Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Centralized Dapps to read from Dapps game
Search
biga816
July 19, 2018
Technology
2.5k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Centralized Dapps to read from Dapps game
biga816
July 19, 2018
More Decks by biga816
See All by biga816
Euler Finance Hacking Incident
biga816
0
710
BlockchainTokyo23.pdf
biga816
1
420
BuidlMeetupVol2.pdf
biga816
0
45
Service Worker Cache Problems
biga816
1
1.8k
Consider how distributed IPFS is
biga816
2
5.4k
Usage of ethereum libraries for dapps
biga816
0
4.6k
Other Decks in Technology
See All in Technology
トークンマネジメントでAIにとって働きやすい環境を実現する
hikaruegashira
0
140
도구에서 동료까지: 10년차 AI 스타트업의 AI 적응기
inureyes
PRO
1
330
[potatotips #96] Give Your AI Agent the Flutter Playbook
korodroid
0
140
社内の7割が使うデータ基盤を、 データチーム2人で回すためにやったこと
koh_yoshi
4
1.5k
:syncing_time:
sksat
2
420
AI時代のアウトプット――変わったこと、変わらないこと / Devsumi 2026 Kansai #devsumi
jnchito
0
510
あなたの知らないバージョン命名規則
sat
PRO
2
170
生成 AI の基礎 〜 サンプル実装で学ぶ基本原理
enakai00
7
4.6k
RelayerというPHPのフレームワークを作った
polidog
PRO
0
120
猫付きpingコマンドを自作
uyuki234
0
290
ホームラボ紹介
y_sera15
0
230
Kiro Crew で始める マルチエージェント開発
miu_crescent
PRO
0
160
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Building AI with AI
inesmontani
PRO
1
1.2k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Done Done
chrislema
186
16k
So, you think you're a good person
axbom
PRO
2
2.1k
Are puppies a ranking factor?
jonoalderson
2
3.8k
A Tale of Four Properties
chriscoyier
163
24k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
480
The World Runs on Bad Software
bkeepers
PRO
72
12k
Transcript
Dappsゲームから読み解く CentralizedなDapps Akihiro Tanaka(@biga816)
⾃⼰紹介 • 元AccentureのWeb&Mobileエンジニア • Trident Artsチーフエンジニア • DApps絶賛開発中
DAppsゲームは 本当にDecentralizedなのか?
DAppsとは • ⾮中央集権型アプリケーション(Decentralized Applications) • 以下の3つの定義を満たす(byビットコイン研究所ブログ) 1. アプリケーションは、オープンソースであること。オペレーションは⾃動であり、中央のコ ントロール主体を持たないこと。トークン、データ、レコード、などにつき、暗号化されて 分散化されたブロックチェーンを利⽤していること。
2. アプリケーションは、オープンに流通可能な、暗号トークンを持っていること。アプリケー ションの利⽤に際してトークンを利⽤すること。参加者には、そのトークンによってリワー ド(報酬)が⽀払われること。 3. アプリケーションはマーケットやユーザーからの改善要求によりプロトコルを改善していく こと。この改善は、ユーザーのコンセンサスによること。 <参考>http://doublehash.me/what-is-dapps/
CryptokittiesとEtheremonのシステム構成 からDappsの姿を読み解いてみる
Cryptokittiesのシステム構成 Webサーバ (express, react) APIサーバ My Kitties Marketplace App Kitty
Detail (Breed, Sell, Gift) ファイルサーバ GCP Client ERC721 Node (Metamask) DB バッチ 処理?? ERC721 Node (Own node? Infura?) web3.js
Cryptokittiesのコントラクト contract KittyAccessControl { event ContractUpgrade(address newContract); address public ceoAddress;
address public cfoAddress; address public cooAddress; bool public paused = false; modifier onlyCEO() { require(msg.sender == ceoAddress); _; } modifier onlyCFO() { require(msg.sender == cfoAddress); _; } modifier onlyCOO() { require(msg.sender == cooAddress); _; } modifier onlyCLevel() { require( msg.sender == cooAddress || msg.sender == ceoAddress || msg.sender == cfoAddress ); _; } : : modifier whenNotPaused() { require(!paused); _; } modifier whenPaused { require(paused); _; } function pause() external onlyCLevel whenNotPaused { paused = true; } function unpause() public onlyCEO whenPaused { paused = false; } }
Etheremonのシステム構成 My Monstar Market App Battle ファイルサーバ Client ERC721 Node
(Metamask) DB バッチ 処理?? ERC721 Node (Own node? Infura?) web3.js Webサーバ (react) APIサーバ
Etheremonのコントラクト contract BasicAccessControl { address public owner; uint16 public totalModerators
= 0; mapping (address => bool) public moderators; bool public isMaintaining = true; function BasicAccessControl() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } modifier onlyModerators() { require(moderators[msg.sender] == true); _; } modifier isActive { require(!isMaintaining); _; } function ChangeOwner(address _newOwner) onlyOwner public { if (_newOwner != address(0)) { owner = _newOwner; } } : : function AddModerator(address _newModerator) onlyOwner public { if (moderators[_newModerator] == false) { moderators[_newModerator] = true; totalModerators += 1; } } function RemoveModerator(address _oldModerator) onlyOwner public { if (moderators[_oldModerator] == true) { moderators[_oldModerator] = false; totalModerators -= 1; } } function UpdateMaintaining(bool _isMaintaining) onlyOwner public { isMaintaining = _isMaintaining; } }
%ecentralized "QQlications →$entralized "QQlications
DApps(CApps)とは • ⾮中央集権型アプリケーション(Decentralized Applications) • ブロックチェーンを活⽤したアプリケーション 1. ⾮中央集権型に設計することが可能である。(ただし、多くのDAppsゲームは中央集権型の設 計) 2.
⾮改ざん性や透明性といったブロックチェーンの特性を⽣かしている。
⾯⽩い(クソみたいな) DApps作ろうぜ!
Thank you Twitter: @biga816 Qiita: biga816