Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Web3 のリアリティ / The Reality of Web3

Web3 のリアリティ / The Reality of Web3

早稲田大学大学院経営管理研究科「フィンテック ─ 金融革新とインターネット」2023 夏クォーターの第3-4回で使用したスライドです。

Kenji Saito

June 12, 2023
Tweet

More Decks by Kenji Saito

Other Decks in Technology

Transcript

  1. Financial technology on the street. Generated by Stable Diffusion XL

    Beta — 2023 3-4 Web3 (WBS) — 2023 3-4 Web3 — 2023-06-12 – p.1/51
  2. ( ) 1 6 5 (1) • 2 6 5

    (2) • 3 6 12 Web3 (1) • 4 6 12 Web3 (2) • 5 6 19 (1) 6 6 19 (2) 7 6 26 (1) 8 6 26 (2) 9 7 3 (1) 10 7 3 (2) 11 7 10 (1) 12 7 10 (2) 13 7 24 (1) 14 7 24 (2) W-IOI — 2023 3-4 Web3 — 2023-06-12 – p.3/51
  3. ( 20 ) 1 2 3 4 (TCP/IP ) 5

    6 7 8 9 10 World Wide Web 11 Web API 12 13 git GitHub 14 (6/19 ) / (2 ) OK / — 2023 3-4 Web3 — 2023-06-12 – p.4/51
  4. Web3 (1) — Web3 (2) — on API ( )

    — 2023 3-4 Web3 — 2023-06-12 – p.6/51
  5. T TCP IP 1 ⇒ TCP : IP IP :

    — 2023 3-4 Web3 — 2023-06-12 – p.7/51
  6. 1. (1) (2) (plain text) ( ×) 2023 6 8

    ( ) 23:59 JST ( ) Waseda Moodle — 2023 3-4 Web3 — 2023-06-12 – p.10/51
  7. . . . . . . 47 31 (6/9( )

    ) ( ) 20 (1990 ) ( ) — 2023 3-4 Web3 — 2023-06-12 – p.11/51
  8. (tetrad) = ( ) 4 : ? : ? :

    ? : ? — — 2023 3-4 Web3 — 2023-06-12 – p.12/51
  9. ڧԽ ਰୀ ճ෮ ൓స ॏཁ͕ͩݟམͱ͞Ε͕ͪͳޮՌ ਰୀʹΑΓ෮׆ ൓సʹΑΓਰୀ ϦΞϧλΠϜऔҾͱ৘ใॲཧ ఻౷తͳۚ༥஥հ໾ʢྫ͑͹ɺ෺ཧతͳۜߦʣ ϐΞɾτΡɾϐΞͷۚ༥औҾʢྫ͑͹ɺσδλϧ௨՟ʣ

    ৴པੑͱϓϥΠόγʔͷ໰୊ʢྫ͑͹ɺϋοΩϯά΍σʔλ࿙Ӯʣ ஍ཧతো֐ͷఫഇ ৘ใอଘͷলεϖʔεԽʢ෺ཧతʣ طଘϝσΟΞʢग़൛౳ʣٴͼؔ࿈࢈ۀʢ੡ࢴɾҹ࡮౳ʣ ৘ใऔಘऀͷ໨ར͖ɾऔࣺબ୒ೳྗͷ޼੿ ৘ใྲྀ௨ͷߏ଄స׵ʢݸਓ͕ൃ৴ऀʹͳΕΔʣ ҙݟͷ෼அ ෆਖ਼֬ͳ৘ใͷྲྀ෍ ెఋ੍౓ 8FC ϝλόʔε ࣗ෼Ͱ஌ࣝ΍৘ใΛ֮͑Α͏ͱ͢Δ஌ࣝཉ هԱྗ ਓؒͷةػ࡯஌ೳྗ ௒ߴྸԽࣾձ ؂ࢹࣾձ ίϛϡχέʔγϣϯʢ଎౓ʗྔʣ ༏ӽత஍Ґʢ৘ใͷඇରশੑɺۭؒత੍໿ʹΑΔ༏Ґੑʣ ݸਓͷݖར બ୒ࢶ ମݧՁ஋ ๩͠͞ ֦֨ࠩେʢσδλϧσόΠυʣ ཉ๬ͷ૿Ճ ൜ࡑͷଟ༷Խ ৘ใͷอଘɾ׆༻ʹ͍ͭͯɺಛఆͷσόΠεʹඥ෇͔ͳ͍ εϓϦϯλʔωοτͷొ৔ ࠃՈʹΑΔ౷੍͕༰қʹͳΔ ϩʔΧϧϝσΟΞͷ෮ݖ ৘ใͷຽओԽͱ෼ࢄԽʹΑΔඇରশੑͷݮগʢΞΫηεͱػձͷฏ౳ੑʣ ଟ༷ੑͱ׮༰ੑͷଅਐʢݸਓతͳදݱͱ૝૾ྗʣ σδλϧർ࿑ Πϊϕʔγϣϯ ֶश ஶ࡞ݖͱॴ༗ݖ खࢴ΍೔هͳͲͷݸਓతͳه࿥ Ϋϥ΢υίϯϐϡʔςΟϯά ϓϥοτϑΥʔϜ ϒϩοΫνΣʔϯ ར༻ऀͷಗ໊ੑ ୠ͠ݶք͋Γ ݸਓͷ֊ڃ΍ϥϕϧʹनΘΕͳ͍ࣗ༝ͳҙࢥදࣔ σδλϧλτΡʔ ඦՊࣄయ ୳͍ͯ͠Δ৘ใʢ౴͑ʣ΁ͷΞΫηε͕଎͘ͳΔʢλΠύͷྑ͞ʣ ݸਓ͕ओମͱͳΔࣄۀ׆ಈ "* ૊৫͔Βݸਓ΁ͷύϫʔͷγϑτ ୭Ͱ΋͍ͭͰ΋ΞΫηεͰ͖Δ ୭Ͱ΋৘ใΛແྉͰෳ੡Ͱ͖Δ ௕࿝ͷ஌ܙ σδλϧσόΠε Ϛονϯά ൺֱ ళฮϏδωε ೥լঢ় γεςϜμ΢ϯ ۭؒͷ֦ுɾۭؒͷΠϯλʔωοτԽʢ"QQMF7JTJPO1SPʣ ଞਓͱͷڑ཭ ຽओओٛ ݱ࣮ੈքͱͷٯసʢωοτੈք͕ϝΠϯͰݱ࣮ࣾձ͕αϒʣ σδλϧґଘ — 2023 3-4 Web3 — 2023-06-12 – p.13/51
  10. Y ⇒ . . . — 2023 3-4 Web3 —

    2023-06-12 – p.16/51
  11. Web3 (1) — ← Web3 NFT DAO — 2023 3-4

    Web3 — 2023-06-12 – p.21/51
  12. .JOFDSBGU ʙ ҉߸ࢿ࢈ɾ/'5⁇ 3PCMPY ʙ ҉߸ࢿ࢈ɾ/'5ʓ 73$IBU ʙ ҉߸ࢿ࢈ɾ/'5ʷ 5IF4BOECPY

    ʙ ҉߸ࢿ࢈ɾ/'5ʓ ̍ ೔ ͷ Ϣ ồ β ਺ 0 200000 400000 600000 ˞IUUQTNNPTUBUTDPN͕ఏڙ͢ΔσʔλΛݩʹ࡞੒ ZEPETO (2018∼) ( NFT ) The Sandbox 100 Roblox/Minecraft 1 10 Axie Infinity (2018∼) [ ] ( NFT ) The Sandbox 2 Decentraland (2020∼) ( NFT ) The Sandbox 1 10 — 2023 3-4 Web3 — 2023-06-12 – p.25/51
  13. VRChat vs. NeosVR ( ) 73$IBU ʙ ҉߸ࢿ࢈ɾ/'5ʷ NeosVR (2018ʙ)

    ҉߸ࢿ࢈ɾ/'5ʓ ௚ۙ աڈ࣌ؒͷϐʔΫ աڈ࠷େͷϐʔΫ ಉ ࣌ ઀ ଓ Ϣ ồ β ਺ 0 10000 20000 30000 40000 ˞IUUQTTUFBNDIBSUTDPN͕ఏڙ͢Δ ɹσʔλΛݩʹ࡞੒ ˞ήʔϜϓϥοτ ϑΥʔϜ4UFBNͷ"1*͔Β ɹऔಘ͞ΕͨσʔλʹଇΔ NeosVR NFT ( ) VRChat — 2023 3-4 Web3 — 2023-06-12 – p.26/51
  14. Web 1-2-3 ͍ΘΏΔ 8FC 8FC ໰୊ͷۚ༥Խ Ϣʔβࣗ਎͕ʮ؆୯ʹʯσʔλͷੜ࢈ऀʹ ΋͏ͻͱͭ ͷࢭ༲ ࢭ༲

    4FNBOUJD8FC  l8FCzॳग़   8FC ˠ8FC           8FC ૊৫ʹ ؅ཧͤͣ͞ɺ σʔλΛϢʔβͷ खʹऔΓ໭ͦ͏ ͢΂ͯͷ໰୊͸ ͢΂ͯΛ ۚ༥τʔΫϯԽͯ͠ ղܾ͠Α͏ #FSOFST-FF ͷ #FSOFST-FF ͷ 0` 3FJMMZ ͷ 8PPE ͷ #JUDPJO ε ϊ ồ σ ϯ ࣄ ݅ Ϧ ồ Ϛ ϯ ɾ γ ἀ ỽ Ϋ Π ϯ λ ồ ω ỽ τ ঎ ༻ Խ &UIFSFVN 4PMJE ϓϩδΣΫτ΁ Ϣʔβࣗ਎ͱ ެӹͷͨΊʹ σʔλ͸ࣗ༝ʹ ׆༻Ͱ͖͍ͯΔ͔ʁ — 2023 3-4 Web3 — 2023-06-12 – p.28/51
  15. Web 3.0 Web3 Web 1.0 (Berners-Lee) : Read × Write

    → Web 2.0 (O’Reilly) : Read × Write ← (Web 1.0 ) Web 3.0 (Berners-Lee) → Solid (Social linked data) Web 3.0 → Web3 (Wood) Ethereum ← web3.js, web3.py Web3 (Dixon) : Read × Write × Own (Bloomberg) — 2023 3-4 Web3 — 2023-06-12 – p.29/51
  16. python 3.10.7 solc 0.8.19 ( ) (Solidity ( ) )

    node v20.2.0 ganache v7.8.0 (Ethereum RPC + ) eth-brownie 1.19.3 (Python Ethereum ) web3 5.31.3 (Python Ethereum ) py-solc-x 1.1.1 (Solidity Python + ) macOS Monterey 12.6.6 — 2023 3-4 Web3 — 2023-06-12 – p.30/51
  17. Python3 eth-brownie . . . $ python3 -m venv demoenv

    $ source demoenv/bin/activate $ pip install -U pip $ pip install wheel $ pip install eth-brownie web3.py — 2023 3-4 Web3 — 2023-06-12 – p.31/51
  18. : Bitcoin . . . : ( : ) (

    ) : : : ⇒ — 2023 3-4 Web3 — 2023-06-12 – p.33/51
  19. Ethereum        ߹ҙ͞Εͨཤྺ ϩʔΧϧʹෳ੡Λҡ࣋

    ϒϩοΫ εϩοτ  ඵִؒ  εϩοτͰ  ΤϙοΫ ҉߸ֶతμΠδΣετ ϒϩοΫνΣʔϯͷҡ࣋ࢀՃऀ͕ϩʔΧϧʹ؅ཧ͢Δσʔλۭؒ ࣌ؒ ΑΓ৽͍͠ه࿥ ΦϒδΣΫτ τʔΫϯγεςϜ౳ͷεϚʔτίϯτϥΫτ ֤Ϣʔβͷ ࢒ߴ౳ͷঢ়ଶ ঢ়ଶ` ঢ়ଶ`` τϥϯβΫγϣϯ ΦϒδΣΫτͷੜ੒ ·ͨ͸ঢ়ଶભҠͷࢦࣔ ແޮͳཤྺ ω ỽ τ ϫ ồ Ϋ Λ ௨ ͠ ͯ ૹ ड ৴ ͞ Ε Δ ϩ ồ Χ ϧ ʹ ࣋ ͭ ܨ͙ͨΊʹ͸&5) Ͱͷσϙδοτͱ σϙδοτ૯ֹͷ ♤ ૬౰ͷϢʔβʹΑΔ ΤϙοΫ΁ͷূݴ͕ඞཁ શΦϒδΣΫτͷભҠޙͷঢ়ଶ ͕ϋογϡ໦˞ʹू໿͞Ε ͦͷ ϧʔτ஋͕ϒϩοΫʹॻ͔ΕΔ ঢ়ଶભҠ ˞ϋογϡ໦σʔλ܈ͷ҉߸ֶతμΠδΣετ ϋογϡ ɹΛ໦ߏ଄ʹදݱͨ͠΋ͷͰ ෆ੔߹ͷݕग़ʹ༻͍ΒΕΔ . . . ETH ETH — 2023 3-4 Web3 — 2023-06-12 – p.34/51
  20. Ethereum Ethereum $ brownie console # eth-brownie (Python ) #

    ↓ Python >>> network.disconnect() # ( ) >>> network.connect(’mainnet’) # Ethereum >>> web3.eth.block_number # >>> web3.eth.get_block( ) # >>> web3.eth.get_block( ).get(’timestamp’) # >>> import datetime >>> dt = datetime.datetime.fromtimestamp( ) >>> print(dt) # — 2023 3-4 Web3 — 2023-06-12 – p.35/51
  21. &UIFSFVNωοτϫʔΫ  &7. &0" &5) ࢒ߴ &5) (BT εϚʔτ ίϯτϥΫτ

    ϝοηʔδʹΑΔ ݺͼग़͠ τϥϯβ Ϋγϣϯ ॺ໊ͯ͠ ౤ೖ ϒϩοΫʹ ૊ΈࠐΈˠ όϦσʔλ Ϣʔβ ॲ ཧ ˞(BT ͸ܭࢉࢿݯͷྔΛද͢ ˞(BT ࢖༻ྉΛ &5) Ͱࢧ෷͏Ϣʔβ͕τϥϯβΫγϣϯΛ౤ೖ͠ͳ͍ݶΓ ɹεϚʔτίϯτϥΫτ͸ಈ࡞͠ͳ͍ . . . Ethereum (EVM) ETH ↑ DAO EOA : Externally Owned Account — 2023 3-4 Web3 — 2023-06-12 – p.36/51
  22. $ brownie bake nft nft ( ) contracts SimpleCollectible.sol ERC-721

    (ERC : Ethereum Request for Comments) NFT $ cd nft # nft $ brownie console # eth-brownie (Python ) >>> network.disconnect() # >>> network.connect(’goerli’) # Ethereum >>> accounts.add( ) # >>> collectible = SimpleCollectible.deploy({’from’: accounts[0]}) # NFT 1,834,415 Gas — 2023 3-4 Web3 — 2023-06-12 – p.37/51
  23. NFT (Non-Fungible Token) 1 → ( ) → ( )

    ( ) ( ) NFT NFT — 2023 3-4 Web3 — 2023-06-12 – p.38/51
  24. ERC-721 NFT τʔΫϯ *% ൪߸ 63- ΞυϨε 63- /'5 Ұҙ

    Ұҙʁ Ұҙʁ Ұҙ ࣄ্࣮ Ұҙ ެ։伴ͷ μΠδΣετ ϝλσʔλ ίϯτϥΫτͱ͍͏ఆٛҬ ˞ͦͷίϯτϥΫτͱ͍͏ఆٛҬͷதͰ ࣮ઢ໼ҹͰࣔͨ͠ҰҙੑΛอূ͢Δʹա͗ͳ͍ ˞ഁઢ໼ҹͰࣔͨ͠Ұҙੑ͸ ࣮૷ɾӡ༻ͷ޻෉࣍ୈͰอূͰ͖Δ ɹྫ͑͹ 63- ʹͦΕ͕ࢦ͢Ϧιʔεͷ҉߸ֶతμΠδΣετΛؚΊΔ͜ͱ ྫ *1'4 ͷར༻ ʹΑΓ ɹ ʮ63-ˠσʔλʯͷҰҙੑΛอͯΔ ͦͷ৔߹Ͱ΋ʮσʔλˠ63-ʯͷҰҙੑ͸ແ͍ ର৅σʔλ ը૾౳ ॴ༗ऀ ϝλσʔλ 63- ର৅σʔλ 63- ൿີ伴 Ұҙ Ұҙʁ Ϣʔβ Ұҙʁ — 2023 3-4 Web3 — 2023-06-12 – p.39/51
  25. NFT URL NFT >>> collectible.createCollectible( URL) # NFT URL NFT

    NFT >>> network.disconnect() # >>> network.connect(’mainnet’) # Ethereum >>> collectible = SimpleCollectible.at(’ ’) # >>> collectible.ownerOf(OpenSea NFT ID) # >>> collectible.tokenURI(OpenSea NFT ID) # — 2023 3-4 Web3 — 2023-06-12 – p.40/51
  26. NFT σʔλ " ϒϩοΫνΣʔϯ #⒩ ʜ ʜ ϒϩοΫνΣʔϯ #⒪ ʜ

    ʜ εϚʔτίϯτϥΫτ $⒩ εϚʔτίϯτϥΫτ $⒪ ಛఆͷετϨʔδ ˞Ͳ͜ʹஔ͔ΕΑ͏ͱ΋ ɹ౳͍͠σʔλ͸ಉ͡΋ͷ ϒϩοΫνΣʔϯ͕ಉ͡Ͱ΋ҟͳͬͯ ͍ͯ΋ εϚʔτίϯτϥΫτ͕ҟͳ ΔΠϯελϯεͳΒఆٛҬ͸ผͱͳΔ ଟ͘ͷ৔߹ ې͡ΒΕͳ͍ ېࢭͰ͖ͳ͍ ˞/'5 ͕σʔλΛࢦ͢ํࣜͱσʔλΛ֨ೲ͢Δํࣜ͸ σʔλͷՄ༻ੑ͸ҟͳΔͱͯ͠΋ҰҙੑʹؔΘΔੑ࣭͸มΘΒͳ͍ ಉҰ εϚʔτίϯτϥΫτ $⒫ εϚʔτίϯτϥΫτ $⒬ /'5⒩ /'5⒪ /'5⒫ /'5⒬ /'5⒮ /'5⒭ σʔλ "  ېͣΔΑ͏ͳ ઃܭ͸ίετߴ ېࢭͰ͖ͳ͍ — 2023 3-4 Web3 — 2023-06-12 – p.41/51
  27. NFT NFT NFT >>> collectible.ownerOf( NFT ID) # >>> collectible.ownerOf(

    NFT ID) # NFT Ethereum Ethereum NFT NFT Ethereum Lazy Minting (?) ( ) (Gas ) — 2023 3-4 Web3 — 2023-06-12 – p.42/51
  28. DAO ಺෦ࢿຊˢ͋Δ ɹɹɹɹˣͳ͍ தԝʹࣗಈ ɹɹɹɹɹWT ɹɹɹɹɹɹதԝʹਓؒ ׬શͳ "* σʔϞϯ˞ ϑΥʔϥϜ˞

    XFC αʔϏε ϩϘοτΛ࢖໾ %"0 %"QQ˞ ݹయత૊৫ ɹɹɹɹɹपลʹਓؒ ɹɹɹɹWT पลʹࣗಈ ˞%"QQεϚʔτίϯτϥΫτʹΑΔΞϓϦέʔγϣϯ %FDFOUSBMJ[FE"QQ ˞ϑΥʔϥϜਓʑ͕ಛఆͷ࿩୊ʹ͍ͭͯٞ࿦ͨ͠Γ৘ใΛަ׵ͨ͠Γ͢Δ৔ ˞σʔϞϯόοΫάϥ΢ϯυͰՔಇ͠ ΠϕϯτʹࣗಈతʹରԠ͢ΔϓϩάϥϜ . . . Buterin DAO (2014) — 2023 3-4 Web3 — 2023-06-12 – p.44/51
  29. DAO Bitcoin DAO → DAO Ethereum DAO → . .

    . DAO ( ) ( ) DAO → . . . ( ) ↑ ( ) ← — 2023 3-4 Web3 — 2023-06-12 – p.45/51
  30. Web3 (1) ( . . . ) · DAO Web

    2.0 ( Web3 ) . . . — 2023 3-4 Web3 — 2023-06-12 – p.46/51
  31. 2. (1) (end; ) (2) 2023 6 15 ( )

    23:59 JST ( ) Waseda Moodle — 2023 3-4 Web3 — 2023-06-12 – p.50/51