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
680
BlockchainTokyo23.pdf
biga816
1
420
BuidlMeetupVol2.pdf
biga816
0
41
Service Worker Cache Problems
biga816
1
1.8k
Consider how distributed IPFS is
biga816
2
5.3k
Usage of ethereum libraries for dapps
biga816
0
4.6k
Other Decks in Technology
See All in Technology
ポストモーテム! DDoSからサイトは守れた。 でもビジネスは守れなかった。
bengo4com
0
1.3k
攻撃者がいなくてもAIエージェントはインシデントを起こす
nomizone
0
200
Docker Desktop不要の時代が来る? WSL標準の「wslc」で Linuxコンテナを動かしてみた.
ueponx
0
780
CIで使うClaude
iwatatomoya
0
150
End-to-Endで考える信頼性 —LINEアプリにおけるクライアント開発×SRE連携の実践
maruloop
3
2.5k
ループエンジニアリングでE2Eテストを実践
noriyukitakei
0
300
AIに「使われる」時代のSaaS戦略 〜既存WebAPIのMCPサーバー化における開発ノウハウ〜
ekispert_api
0
300
美しいコードを書くためにF#を学んでみた話
yud0uhu
1
280
クラウド上のデータ復旧で見落としがちな制約: 医療系 SaaS の BCP 設計から得た教訓
kakehashi
PRO
0
1.9k
インフラ寄りSREでも 開発に踏み出せる〜境界を越えてユーザー体験に向き合いたい〜
sansantech
PRO
0
2k
実装だけじゃない! CCA-F取得エンジニアが教えるClaude Code開発プロセス活用術
diggymo
2
400
なぜ人は自分のプロジェクトを 「なんちゃってアジャイル」と 自嘲するのか
kozotaira
0
260
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
490
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
280
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Color Theory Basics | Prateek | Gurzu
gurzu
0
380
Why Our Code Smells
bkeepers
PRO
340
58k
Into the Great Unknown - MozCon
thekraken
41
2.6k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
450
Ruling the World: When Life Gets Gamed
codingconduct
0
270
Being A Developer After 40
akosma
91
590k
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