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
続・スマートコントラクトと分散ファイナンス / Smart Contracts and Dec...
Search
Kenji Saito
PRO
July 05, 2025
Technology
0
75
続・スマートコントラクトと分散ファイナンス / Smart Contracts and Decentralized Finance, Continued
早稲田大学大学院経営管理研究科「フィンテック ─ 金融革新とインターネット」2025 夏の第9-10回で使用したスライドです。
Kenji Saito
PRO
July 05, 2025
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
ロボットを雰囲気(ヴァイブ)でプログラミングするこどもたち / Children Vibe-Programming Robots
ks91
PRO
0
7
アカデミーキャンプ 2025 SuuuuuuMMeR「燃えろ!!ロボコン」 / Academy Camp 2025 SuuuuuuMMeR "Burn the Spirit, Robocon!!" DAY 3
ks91
PRO
0
13
アカデミーキャンプ 2025 SuuuuuuMMeR「燃えろ!!ロボコン」 / Academy Camp 2025 SuuuuuuMMeR "Burn the Spirit, Robocon!!" DAY 2
ks91
PRO
0
22
アカデミーキャンプ 2025 SuuuuuuMMeR「燃えろ!!ロボコン」 / Academy Camp 2025 SuuuuuuMMeR "Burn the Spirit, Robocon!!" DAY 1
ks91
PRO
0
140
未来へのフォワードキャスト / Forward Cast to the Future
ks91
PRO
0
76
発表と総括 / Presentations and Summary
ks91
PRO
0
57
サイバーフィジカル社会、金融の未来とアイデアソン / Cyber Physical Society, Future of Finance, and Ideathon
ks91
PRO
0
75
マニフェスト: 人類の知のフロンティアに向けた拡張的足場へ / Manifesto: Toward Expansive Scaffolding for Humanity's Knowledge Frontier
ks91
PRO
0
36
スマートコントラクトと分散ファイナンス / Smart Contracts and Decentralized Finance
ks91
PRO
0
92
Other Decks in Technology
See All in Technology
生成AI時代におけるAI・機械学習技術を用いたプロダクト開発の深化と進化 #BetAIDay
layerx
PRO
1
1.2k
Amazon S3 Vectorsは大規模ベクトル検索を低コスト化するサーバーレスなベクトルデータベースだ #jawsugsaga / S3 Vectors As A Serverless Vector Database
quiver
1
290
Amazon Q と『音楽』-ゲーム音楽もAmazonQで作成してみた感想-
senseofunity129
0
140
Infrastructure as Prompt実装記 〜Bedrock AgentCoreで作る自然言語インフラエージェント〜
yusukeshimizu
1
110
20250807_Kiroと私の反省会
riz3f7
0
210
【OptimizationNight】数理最適化のラストワンマイルとしてのUIUX
brainpadpr
2
470
リモートワークで心掛けていること 〜AI活用編〜
naoki85
0
140
生成AIによるデータサイエンスの変革
taka_aki
0
3k
Rubyの国のPerlMonger
anatofuz
3
730
AWS DDoS攻撃防御の最前線
ryutakondo
1
150
リリース2ヶ月で収益化した話
kent_code3
1
260
LTに影響を受けてテンプレリポジトリを作った話
hol1kgmg
0
360
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Bash Introduction
62gerente
614
210k
RailsConf 2023
tenderlove
30
1.2k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
22
1.4k
Visualization
eitanlees
146
16k
GraphQLとの向き合い方2022年版
quramy
49
14k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
332
22k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
283
13k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.3k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Transcript
Light and Shadow — Generated by Stable Diffusion 3.5 —
2025 9-10 (WBS) — 2025 9-10 — 2025-07-07 – p.1/58
https://speakerdeck.com/ks91/collections/fintech-2025-summer — 2025 9-10 — 2025-07-07 – p.2/58
( ) 1 6 9 (1) • 2 6 9
(2) • 3 6 16 Web3 (1) • 4 6 16 Web3 (2) • 5 6 23 (1) • 6 6 23 (2) • 7 6 30 (1) • 8 6 30 (2) • 9 7 7 (1) • 10 7 7 (2) • 11 7 14 12 7 14 13 7 21 (1) ( ) 14 7 21 (2) ( ) W-IOI ( ) — 2025 9-10 — 2025-07-07 – p.3/58
( 20 ) 1 ↑ 2 ↓ 2025 3 4
(TCP/IP ) 5 6 7 8 ↑ 9 ↓ 2024 ( ) 10 World Wide Web 11 Web API 12 * 13 git GitHub 14 (6/23 ) / (2 ) OK / — 2025 9-10 — 2025-07-07 – p.4/58
( ) Ethereum — 2025 9-10 — 2025-07-07 – p.5/58
( ) Ethereum ( ) — 2025 9-10 — 2025-07-07
– p.6/58
( ) — 2025 9-10 — 2025-07-07 – p.7/58
Y The DAO ⇒ Monacoin (2018), Bitcoin Gold (2020), etc.
Ethereum The DAO ( ) ( ) Ethereum Classic — 2025 9-10 — 2025-07-07 – p.8/58
M AI AI? ( ) AI ⇒ AI — 2025
9-10 — 2025-07-07 – p.9/58
H Ethereum NFT ⇒ NFT — 2025 9-10 — 2025-07-07
– p.10/58
H ( ) ⇒ — 2025 9-10 — 2025-07-07 –
p.11/58
S ( JPMC CBDC( )) 1 1USD Bit Coin ⇒
OK CBDC — 2025 9-10 — 2025-07-07 – p.12/58
S proof of state proof of works proof of stake
⇒ PoS PoS 2 — 2025 9-10 — 2025-07-07 – p.13/58
N ⇒ — . . . Discuss. — 2025 9-10
— 2025-07-07 – p.14/58
Ethereum Ethereum ( ) — 2025 9-10 — 2025-07-07 –
p.15/58
— 2025 9-10 — 2025-07-07 – p.16/58
Ethereum · → · → · → — 2025 9-10
— 2025-07-07 – p.17/58
↑ — 2025 9-10 — 2025-07-07 – p.18/58
(by ) 1. 2. ( ) ( ) . .
. cf. by McLuhan cf. by McLuhan → — 2025 9-10 — 2025-07-07 – p.19/58
by ⇒ ⇒ — 2025 9-10 — 2025-07-07 – p.20/58
by SNS AI AI ⇒ ( ) ⇒ — 2025
9-10 — 2025-07-07 – p.21/58
Ethereum EVM (Ethereum Virtual Machine) — 2025 9-10 — 2025-07-07
– p.22/58
Ethereum Vitalik Buterin, “Ethereum White Paper: A NEXT GENERATION SMART
CONTRACT & DECENTRALIZED APPLICATION PLATFORM” (Dec. 2013∼) 12 ( ) (= ) = = ( ) CPU ⇒ DApps DApps = / — 2025 9-10 — 2025-07-07 – p.23/58
= ( ) run = → — 2025 9-10 —
2025-07-07 – p.24/58
[Lamport 1984][Schneider 1990] ( ) (1) 0 ( ) (2)
(3) (4) ( ) ← — 2025 9-10 — 2025-07-07 – p.25/58
Ether (ETH) Ethereum EOA : Externally-Owned Account ( ) (
) ( ) ( ) ← Ether ( ) EVM EVM = Ethereum = — 2025 9-10 — 2025-07-07 – p.26/58
EVM : Ethereum Virtual Machine ঢ়ଶ ֎෦ΞΫλʔ ΞΧϯτ &7. ίʔυ
&UIFSˠ(BT ىಈ ίϯτϥΫτ ϝοηʔδ͔ɺ৽͍ࣗ͠ಈΦϒδΣΫτ ΞΧϯτؒͰΓऔΓ͞ΕΔσʔλ&UIFS ετϨʔδ ঢ়ଶ` τϥϯβΫγϣϯ ηοτ σδλϧॺ໊ &7. ਓؒͱ͔ ࣗಈ ΦϒδΣΫτ ( ) Gas ( EVM = ( burn)) — 2025 9-10 — 2025-07-07 – p.27/58
/ / (1) Ethereum Bitcoin ( OK) 1 — 2025
9-10 — 2025-07-07 – p.28/58
/ / (2) 3 ( ) · ( ) (
) 1 — 2025 9-10 — 2025-07-07 – p.29/58
/ / (3) ( ) ( ) 1 ( )
1,500 3,000 (← . . . ) Ethereum 2022 9 — 2025 9-10 — 2025-07-07 – p.30/58
/ / (4) Gwei Gwei ETH 32 ETH ( )
ETH ETH · 32 ETH ( OK) · 16 ETH ( ) 12 ( ) ( ) 1 — 2025 9-10 — 2025-07-07 – p.31/58
/ / (5) 32 1 (384 ) ( ) (
) 2 3 ( ) 256 512 — 2025 9-10 — 2025-07-07 – p.32/58
/ / (6) ( ) 5 2 3 (36 )
— 2025 9-10 — 2025-07-07 – p.33/58
/ / (7) ( ) ( ) DAO (RANDAO) 1
— 2025 9-10 — 2025-07-07 – p.34/58
Ethereum ߹ҙ͞Εͨཤྺ ϩʔΧϧʹෳΛҡ࣋
ϒϩοΫ εϩοτ ඵִؒ εϩοτͰ ΤϙοΫ ҉߸ֶతμΠδΣετ ϒϩοΫνΣʔϯͷҡ࣋ࢀՃऀ͕ϩʔΧϧʹཧ͢Δσʔλۭؒ ࣌ؒ ΑΓ৽͍͠ه ΦϒδΣΫτ τʔΫϯγεςϜͷεϚʔτίϯτϥΫτ ֤Ϣʔβͷ ߴͷঢ়ଶ ঢ়ଶ` ঢ়ଶ`` τϥϯβΫγϣϯ ΦϒδΣΫτͷੜ ·ͨঢ়ଶભҠͷࢦࣔ ແޮͳཤྺ ω ỽ τ ϫ ồ Ϋ Λ ௨ ͠ ͯ ૹ ड ৴ ͞ Ε Δ ϩ ồ Χ ϧ ʹ ࣋ ͭ ܨ͙ͨΊʹ&5) Ͱͷσϙδοτͱ σϙδοτ૯ֹͷ ♤ ૬ͷϢʔβʹΑΔ ΤϙοΫͷূݴ͕ඞཁ શΦϒδΣΫτͷભҠޙͷঢ়ଶ ͕ϋογϡ˞ʹू͞Ε ͦͷ ϧʔτ͕ϒϩοΫʹॻ͔ΕΔ ঢ়ଶભҠ ˞ϋογϡσʔλ܈ͷ҉߸ֶతμΠδΣετ ϋογϡ ɹΛߏʹදݱͨ͠ͷͰ ෆ߹ͷݕग़ʹ༻͍ΒΕΔ ETH ( ) ⇒ ETH = Ethereum Virtual Machine (EVM) 2 3 ETH ⇒ ETH — 2025 9-10 — 2025-07-07 – p.35/58
Ethereum (ex. ) (ex. ) ⇒ → — 2025 9-10
— 2025-07-07 – p.36/58
— 2025 9-10 — 2025-07-07 – p.37/58
ERC-20 ERC (Ethereum Request for Comments) 20 https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md (EIP: Ethereum
Improvement Proposal) ← EIP ( ) contract ERC20 { function totalSupply() constant returns (uint totalSupply); function balanceOf(address _owner) constant returns (uint balance); function transfer(address _to, uint _value) returns (bool success); function transferFrom(address _from, address _to, uint _value) returns (bool success); function approve(address _spender, uint _value) returns (bool success); function allowance(address _owner, address _spender) constant returns (uint remaining); event Transfer(address indexed _from, address indexed _to, uint _value); event Approval(address indexed _owner, address indexed _spender, uint _value); } name/ , symbol/ , decimals/ approve allowance ERC-777 ( ) — 2025 9-10 — 2025-07-07 – p.38/58
ERC-20 ERC-20 ← ( ) ( ) ⇒ ERC-20 (
ERC-20 ) ERC-20 ⇒ — 2025 9-10 — 2025-07-07 – p.39/58
(fungible) ERC-20 → ERC-223 (draft) or ERC-777 ( )( )
(non-fungible) ERC-721 ( ) ( ) ERC-1155 ( ) ERC-3525 (SLOT ) — 2025 9-10 — 2025-07-07 – p.40/58
— τʔΫϯ ସ՟ฎ εϚʔτίϯτϥΫτ ݕূՄೳͳঢ়ଶϚγϯ ϓϩϏφϯε དྷྺূ໌ ସՄೳ ঈؐෆೳ
ସՄೳ ঈؐՄೳ ସෆೳ ঈؐՄೳ ସෆೳ ঈؐෆೳ ূ໌͢Δ ಉఆ͢Δ ࢧ͍ ࠷ॳͷԠ༻ *%Χʔυ ηΩϡϦςΟ τʔΫϯ ূ݊ ηϯαʔ ྲྀɾ Ҩݴॻ อݥਃ ͢Δ ײ͢Δ தԝۜߦ σδλϧ௨՟ ҭήʔϜ ൿີ伴Λ͑Δ͔Βຊਓʁ ෛ࠴ Ξηοτͷ දݱΛҠసͰ͖Δʁ ొ͞Εͨίʔυͱ ͦͷ࣮ߦϩάͱ݁Ռͷ ਅਖ਼ੑΛ୲อͰ͖Δʁ ݖҖ͕ Կ͔ͷ༰Λূ໌͢Δʁ ࣋ଓ͢Δଘࡏʹ͍ͭͯ هΛΞοϓσʔτՄʁ ओମ͕͍ͳ͘ͳͬͯ աڈͷσʔλ༗ޮʁ /'5 Ұൠతͳ ೝࣝ ػೳͷ ੳ݁Ռ — 2025 9-10 — 2025-07-07 – p.41/58
— 2025 9-10 — 2025-07-07 – p.42/58
transfer settle, retrieve asset, retrieve token 3 — 2025 9-10
— 2025-07-07 – p.43/58
( ( )) ( ) / / — 2025 9-10
— 2025-07-07 – p.44/58
— 1. ( ) 2. ( ) 3. ( )
— 2025 9-10 — 2025-07-07 – p.45/58
token (ERC-20 ) $ brownie bake token GitHub git clone
$ git clone https://github.com/ks91/sample-smart-contracts.git sample-smart-contracts contracts, scripts tests token Token — 2025 9-10 — 2025-07-07 – p.46/58
OneTimeEscrow settle() function settle() public returns (bool) { require(_token_.balanceOf(address(this)) >=
_price_); /* this */ require(_asset_.getOwner() == address(this)); _token_.transfer(_seller_ , _price_); _asset_.transfer(_buyer_); emit Settled(); /* */ return true; } settle() transfer $ brownie compile — 2025 9-10 — 2025-07-07 – p.47/58
(1) from brownie import * import pytest seller = accounts[0]
buyer = accounts[1] def test_deploy_and_settle(Token, IndivisibleAsset, OneTimeEscrow): asset = accounts[0].deploy(IndivisibleAsset, "5322 Endo", "mˆ2", 300) token = accounts[0].deploy(Token, "Test Token", "TEST", 18, "1000 ether") — 2025 9-10 — 2025-07-07 – p.48/58
(2) token.transfer(buyer, 300, {’from’: accounts[0]}) escrow = accounts[0].deploy(OneTimeEscrow, token, buyer,
asset, seller, 300) accounts[0]/seller accounts[1]/buyer 300 300 TX buyer seller 300 bake Token 300 ETH wei — 2025 9-10 — 2025-07-07 – p.49/58
(3) token.transfer(escrow, 300, {’from’: buyer}) asset.transfer(escrow, {’from’: seller}) assert token.balanceOf(seller)
== 999999999999999999700 assert token.balanceOf(buyer) == 0 assert token.balanceOf(escrow) == 300 assert asset.getOwner() == escrow buyer ( ) 300 seller ( ) — 2025 9-10 — 2025-07-07 – p.50/58
(4) escrow.settle({’from’: seller}) assert token.balanceOf(seller) == 1000000000000000000000 assert token.balanceOf(buyer) ==
0 assert token.balanceOf(escrow) == 0 assert asset.getOwner() == buyer settle() seller OK — 2025 9-10 — 2025-07-07 – p.51/58
( ) — 2025 9-10 — 2025-07-07 – p.52/58
4. (1) × OK (2) 2025 7 3 ( )
23:59 JST ( ) Waseda Moodle — 2025 9-10 — 2025-07-07 – p.53/58
. . . . . . 17 15 (7/5( )
) ( ) (4 ) (4 ) ( ) (3 ) (2 ) (1 ) (1 ) — 2025 9-10 — 2025-07-07 – p.54/58
I — CO2 ⇒ . . . — 2025 9-10
— 2025-07-07 – p.55/58
— 2025 9-10 — 2025-07-07 – p.56/58
5. AI (1) AI (a) (b) (c) AI (2) 2025
7 10 ( ) 23:59 JST ( ) Waseda Moodle — 2025 9-10 — 2025-07-07 – p.57/58
— 2025 9-10 — 2025-07-07 – p.58/58