Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Peer Swap
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
shigeyuki azuchi
March 23, 2022
Technology
100
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Peer Swap
GBEC解説動画の資料です↓
https://goblockchain.network/2022/03/peer_swap/
shigeyuki azuchi
March 23, 2022
More Decks by shigeyuki azuchi
See All by shigeyuki azuchi
SLH-DSA (SPHINCS+)
azuchi
0
12
Hyper Tree
azuchi
0
18
FORS
azuchi
0
31
クラスターmempool
azuchi
0
43
W-OTS+
azuchi
0
50
Shorのアルゴリズム
azuchi
0
71
DahLIAS: Discrete Logarithm-Based Interactive Aggregate Signatures
azuchi
0
55
Fiat-Shamir変換と注意点
azuchi
0
260
AssumeUTXOを利用したブロックチェーンの同期
azuchi
0
69
Other Decks in Technology
See All in Technology
Von-Neumann Machines, Dreams & The Futures of IT
ufried
0
130
人間はどの意思決定を手放せるのか
kawasima
15
8.1k
AIに任せた品質は、誰が見立てるのか - AI時代のテストマネジメント
nakanao
3
2.9k
Kiro Meetup #8 Kiro アップデート (2026/3/21〜2026/9/24)
katzueno
1
160
【技術的負債conf】事業成長に伴う技術的負債の説明責任とAIによるモニタリング、認知的負債について
i35_267
4
2.1k
AIエージェントの権限管理 3: Agentic RAG の Fine grained access control 編
ren8k
0
240
Making AI Agents Safe and Fast- Jev, Obsidian, and the Meta-Harness
x5gtrn
PRO
0
130
Oracle Cloud Network Path Analyzerを試してみた/I Tried Out Oracle Cloud Network Path Analyzer
masakiokuda
1
110
「ピッケル本」日本語版は4.0(第6版)が出版されるべき / pickaxe4-nagoyark05
kakutani
2
280
AI Agent入門〜今更聞けないAgentの話〜
hiromimaganuma
0
110
2026-09-18 gotanda.sre Terraformで複数環境作ったり、複数Stateに分割したりそれとTerragrunt / Terraform multi envs and multi states
masasuzu
4
710
Railsのように考える: See through the Master
snoozer05
PRO
5
1.3k
Featured
See All Featured
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
KATA
mclloyd
PRO
35
16k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
320
Design in an AI World
tapps
1
330
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.2k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
200
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Transcript
Peer Swap Lightning Network
1 LNチャネル残高のバランス Commitment Tx In Out アリスの残高 1,000,000 Funding UTXO
ボブの残高 5,000 チャネル参加者の一方の残高が極端に低い場合: • アリス→ボブのルーティングは可能だが、 逆のルーティングは失敗する。 ◦ 他のノードはチャネルのキャパシティは分かるが、 両者の残高のバランスは分からない。 • 失敗が続くと、ルーティングアルゴリズムが チャネルの評価を下げ、試行対象から除外される。 LN内の支払いの成功確率を上げるには、各チャネルの 残高が適切なバランスにあることが望ましい。
2 Circular Rebalance 1,000,000→500,000 5,000→505,000 700,000 250,000 1,250,000 2,000,000 1,200,000
1,000,000 650,000 350,000 500,040 500,030 500,020 500,010 500,000 自分が残高を持つ別のチャネルから、 残高を増やしたいチャネルへ支払いを実行し、 チャネル残高を調整する。 リバランスには課題も: • 希望する額のリバランスが可能な ルートが存在するか? • 通常のLN支払いと同様、 成功するかどうかはトライ&エラー • AMPにより支払いの分割も可能だが、 中間ホップが増える分手数料高に • バランスを調整可能なチャネルの有無
3 Peer Swap アリスの残高 1,000,000 ボブの残高 5,000 アリスの残高 500,000
ボブの残高 5,000 Onchain Tx In Out PeerSwap 500,000 ボブのUTXO カスタムメッセージを使って、 直接チャネルを開いている両者で、 チャネル残高とオンチェーン資金を Atomic Swap https://www.peerswap.dev / 直接チャネルを開いている相手との調整なので、 調整が付けば確実に低手数料でリバランスが可能 ※ただしオンチェーン手数料は発生する。 PeerSwap 500,000 PeerSwap Script or( and(pk(A), or(pk(B),sha256(H))), and(pk(B), after(N)) )
4 Swap-Out ① ネゴシエーションを開始 ③オンチェーン手数料をインボイスで支払い ④ Peer
Swap Scriptを含む オンチェーンTxをブロードキャスト ⑤ Txが承認されると、Peer Swap Scriptを 検証し、問題なければSwap Invoiceで支払い pre-mage アリスがオフチェーンで支払いをし、オンチェーン資金を得るケース ② オンチェーンTxの手数料を見積もり ⑥ プリイメージを公開し、 オフチェーン支払いを受け入れる ⑦ 開示されたプリイメージを使って、 オンチェーンの資金を入手
5 Swap-In ① ネゴシエーションを開始 (手数料の支払いステップは不要) ③ Peer
Swap Scriptを含む オンチェーンTxをブロードキャスト ④ Txが承認されると、Peer Swap Scriptを 検証し、問題なければSwap Invoiceで支払い pre-mage アリスがオンチェーン資金と交換で、チャネル残高を購入 ② 公開鍵ハッシュを返信 ⑤ プリイメージを公開し、 オフチェーン支払いを受け入れる ⑥ 開示されたプリイメージを使って、 オンチェーンの資金を入手