SlideShare a Scribd company logo
Payment Channel

Introduction
2017/10/03 blockchain.tokyo #1
@mosa_siru
@mosa_siru ( )
•
• TV
• Gunosy
PO
@mosa_siru as engineer
•
• (DeNA)
• (Gunosy)
• (Gunosy)
1. Payment channel
2. HTLCs
bitcoin micro payment
•
• (API )
• bitcoin 1 1
• 2017/10 150
• ( ) 10
• 3.47
• platform


user
• platform user
• platform BTC 

user 10 

platform BTC
• user platform
•
• platform
Payment channel
• trustless ( )
• off-chain transaction(
broadcast )
• off-chain
Payment Channel Introduction
Multisig
• 

( ) of ( )
• 2 of 3 ( 3 2
• 1 of 2 ( )
• 2 of 2 ( )
P2SH Redeem script: OP_2 [A's pubkey] [B's pubkey] OP_2 OP_CHECKMULTISIG
CLTV(CheckLockTimeVerify)
• BIP65 (Final) (OP_CHECKLOCKTIMEVERIFY)
• unspentable


( BTC )
※ nLockTime
( UTXO )
CSV(CheckSequenceVerify)
• BIP112 (Final) (OP_CHECKSEQUENCEVERIFY)
• (
) unspentable 

BTC (3 )
•
• CLTV CSV TimeLock
Payment Channel
Payment Channel
• trustless(A, B )
• trustless 2 of 2 multisig(A, B
)
• fund
• off-chain
(100 )
Payment Channel (1)
A → B micro payment
1. A 2 of 2(multisig) fund 1BTC deposite
broadcast
2. 1 txid 1 1BTC A
refund transaction 

B CSV CLTV
3. 1 broadcast (channel open
Payment Channel (2)
4. deposite address A, B
A B
(off-chain)


deposite address => B(0.01BTC), A(0.99BTC) 

deposite address => B(0.02BTC), A(0.98BTC)

…
5. B broadcast
(channel close)
Bob => Alice
https://bitcoin.org/en/developer-guide#micropayment-channel
Trustless (1)
• B
• refund transaction( ) broadcast 1 (CSV
or CLTV) A
• refund transaction B B
fund deposite
• B 1 A
Trustless (2)
• A
• B broadcast
Time Lock
• refund CLTV( )
channel close (B )
CSV( )
• CLTV nLockTime(
)
• deposite txid
refund transaction 

segwit
•
• channel
• deposite
•
HTLC
HTLC

(Hashed TimeLock Contracts)
• CSV, CTLV TimeLock HashLock
• A => B => C
• channel
• B A
• Lightning Network
HTLC (1)
A => C micro payment
1. A => B , B => C payment channel
2. C A r
hash(r)
generate rOpen
channel
Open
channel
HTLC (2)
3. A => B 1BTC tx1 (off-chain)

IF
1. B r
2. 10 A (CLTV) ※refund .
4. Tx1 B => C 1BTC tx2 (off-chain)
1. C r
2. 5 B (CTLV) ← tx1
5. C r tx2 broadcast 1BTC
r B tx1 broadcast 1BTC
HTLC (1)
• trustless A => B => C
•
• tx2 tx1 refund B
CSV
CLTV tx2
HTLC (2)
• Tx1 (A => B) tx2
segwit
id
• r
pre-image
Payment Channel

(Bidirectional)
Payment Channel
(Bidirectional)
• payment channel
• channel 2
fund
• Time Lock, Hash Lock
Payment Channel
(Bidirectional)
1. A, B 5BTC 2 of 2 fund
opening transaction (off-chain)
2. A secret1, B secret2( )
hash
Payment Channel
(Bidirectional)
3. A commitment transaction tx2 B (off-chain)
4. B commitment transaction tx1 A (off-chain)
100block secret 

opening transaction broadcast.
Payment Channel
(Bidirectional)
A => B 1BTC
5. tx3, tx4 secret
6. Secret 1, 2 hash tx1, tx2
transaction
• A => B 1BTC A tx1, tx2
secret
• A tx1 broadcast A 5BTC
100block B 5BTC
secret1 10BTC
Payment Channel
(Bidirectional)
7. transaction broadcast
Payment Channel Introduction
•
layer2
• CTLV, CSV
•
trustless
• …
@mosa_siru

More Related Content

PDF
Mining Correlations on Massive Bursty Time Series Collection (DASFAA2015)
PDF
高いChurn耐性と検索性能を持つキー順序保存型構造化オーバレイネットワークSuzakuの提案と評価
PDF
Concurrency in Go by Denys Goldiner.pdf
PDF
Gate level minimization (2nd update)
PDF
Inc decsourcefile
PPSX
Matematika Dasar Bab II Fungsi Real
PPTX
Otter 1
PDF
Where in the world is Franz Kafka? | Will LaForest, Confluent
Mining Correlations on Massive Bursty Time Series Collection (DASFAA2015)
高いChurn耐性と検索性能を持つキー順序保存型構造化オーバレイネットワークSuzakuの提案と評価
Concurrency in Go by Denys Goldiner.pdf
Gate level minimization (2nd update)
Inc decsourcefile
Matematika Dasar Bab II Fungsi Real
Otter 1
Where in the world is Franz Kafka? | Will LaForest, Confluent

What's hot (20)

PDF
xilinx fpga problems
PDF
C coroutine
PDF
Gc in golang
PDF
Gc in golang
PDF
actel fpga problems
PDF
Ece512 h1 20139_621386735458ece512_test2_solutions
PDF
Scalability comparison: Traditional fork-join-based parallelism vs. Goroutine...
PDF
Magento Meetup Wroclaw Date And Time In Magento With Multistore (Maciej Harbu...
PDF
最近作ったN個のCPANモジュール Yokohama.pm #10
PDF
Rubinius @ RubyAndRails2010
PDF
Network block diagram
PPTX
Graph theory basics
PPTX
2021 Quantum Challenge ex.1
DOC
bask, bfsk, bpsk
PPTX
Brief GAUT tutorial
PPTX
Signal Flow Graph ( control system)
PDF
Clojure+ClojureScript Webapps
DOC
M3 - Banfi Cavallo - Fila di sedie
PDF
Pt 3 xii cs final
PDF
aiboのAI:DeepLearning認識
xilinx fpga problems
C coroutine
Gc in golang
Gc in golang
actel fpga problems
Ece512 h1 20139_621386735458ece512_test2_solutions
Scalability comparison: Traditional fork-join-based parallelism vs. Goroutine...
Magento Meetup Wroclaw Date And Time In Magento With Multistore (Maciej Harbu...
最近作ったN個のCPANモジュール Yokohama.pm #10
Rubinius @ RubyAndRails2010
Network block diagram
Graph theory basics
2021 Quantum Challenge ex.1
bask, bfsk, bpsk
Brief GAUT tutorial
Signal Flow Graph ( control system)
Clojure+ClojureScript Webapps
M3 - Banfi Cavallo - Fila di sedie
Pt 3 xii cs final
aiboのAI:DeepLearning認識
Ad

Similar to Payment Channel Introduction (20)

PPTX
Lightning network used in blockchain and its application
PPTX
Technology of Lightning Network in Tel Aviv, Israel
PPTX
Smart contracts and applications part I
PPTX
Introduction to State Channels & Payment Channels
PPTX
Programmable consumer protection and scalabiity
PPTX
Lightning Network
PDF
Intro. to Lightning Network (Bitcoin/Litecoin) - Blockchain Developers Malaysia
PDF
190221 masterclass blockchain
PPTX
Smart Network Economics: Payment Channels
PDF
State channels and scalability
PDF
Block Chain Technology Report
PPTX
Blockchain in Business 2018
PDF
PPT Class Blockchain - Validation and CASE.pdf
PDF
Beyond Bitcoin - v7
PDF
IRJET- Bitcoin – A New Currency in the ERA of Investment
DOCX
Bitcoin A Peer-to-Peer Electronic Cash SystemSatoshi Naka.docx
PDF
Bitcoin P2P currency
PPTX
digitised and decentralized blockchain technology for bitcoin transaction
PPTX
Fundamentals of Blockchain Technology
PPTX
DataArt Innovation Showcase Blockchain Billing
Lightning network used in blockchain and its application
Technology of Lightning Network in Tel Aviv, Israel
Smart contracts and applications part I
Introduction to State Channels & Payment Channels
Programmable consumer protection and scalabiity
Lightning Network
Intro. to Lightning Network (Bitcoin/Litecoin) - Blockchain Developers Malaysia
190221 masterclass blockchain
Smart Network Economics: Payment Channels
State channels and scalability
Block Chain Technology Report
Blockchain in Business 2018
PPT Class Blockchain - Validation and CASE.pdf
Beyond Bitcoin - v7
IRJET- Bitcoin – A New Currency in the ERA of Investment
Bitcoin A Peer-to-Peer Electronic Cash SystemSatoshi Naka.docx
Bitcoin P2P currency
digitised and decentralized blockchain technology for bitcoin transaction
Fundamentals of Blockchain Technology
DataArt Innovation Showcase Blockchain Billing
Ad

More from mosa siru (13)

PDF
LayerXのQAチームで目指したい動き方 (社内資料)
PDF
開発速度が速い #とは(LayerX社内資料)
PDF
KYC and identity on blockchain
PPTX
マイニングプールの収益配分と攻撃手法
PDF
Go, memcached, microservices
PDF
ニュースパスのクローラーアーキテクチャとマイクロサービス
PDF
マイクロにしすぎた結果がこれだよ!
PDF
lua_nginx_module JSON-RPC 2.0 Batch Request
PDF
Elasticsearch for Hackadoll
PDF
捗るリコメンドシステムの裏事情(ハッカドール)
PDF
Twitter SmartList (第5回若手webエンジニア交流会)
PDF
コミュニティ分類アルゴリズムの高速化とソーシャルグラフへの応用
PDF
how to make twitter list automatically
LayerXのQAチームで目指したい動き方 (社内資料)
開発速度が速い #とは(LayerX社内資料)
KYC and identity on blockchain
マイニングプールの収益配分と攻撃手法
Go, memcached, microservices
ニュースパスのクローラーアーキテクチャとマイクロサービス
マイクロにしすぎた結果がこれだよ!
lua_nginx_module JSON-RPC 2.0 Batch Request
Elasticsearch for Hackadoll
捗るリコメンドシステムの裏事情(ハッカドール)
Twitter SmartList (第5回若手webエンジニア交流会)
コミュニティ分類アルゴリズムの高速化とソーシャルグラフへの応用
how to make twitter list automatically

Recently uploaded (20)

PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
TLE Review Electricity (Electricity).pptx
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Spectroscopy.pptx food analysis technology
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Machine learning based COVID-19 study performance prediction
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Empathic Computing: Creating Shared Understanding
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
August Patch Tuesday
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
Spectral efficient network and resource selection model in 5G networks
Digital-Transformation-Roadmap-for-Companies.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
TLE Review Electricity (Electricity).pptx
SOPHOS-XG Firewall Administrator PPT.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Network Security Unit 5.pdf for BCA BBA.
Spectroscopy.pptx food analysis technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Machine learning based COVID-19 study performance prediction
A comparative analysis of optical character recognition models for extracting...
Mobile App Security Testing_ A Comprehensive Guide.pdf
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Empathic Computing: Creating Shared Understanding
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
OMC Textile Division Presentation 2021.pptx
August Patch Tuesday
MIND Revenue Release Quarter 2 2025 Press Release
Diabetes mellitus diagnosis method based random forest with bat algorithm

Payment Channel Introduction