Real-Time Recursive Routing in Payment Channel Network: �A Bidding-based Design�
1
Jiayuan Liu∗,1, Canhui Chen∗,1, Lulu Zhou2 and Zhixuan Fang1,3
September, 2022
1 Tsinghua University, 2 Yale University, 3 Shanghai Qi Zhi Institute
Authors
2
1 Tsinghua University, 2 Yale University, 3 Shanghai Qi Zhi Institute
Jiayuan Liu∗,1
Canhui Chen∗,1
Lulu Zhou2
Zhixuan Fang1,3
Outline
3
Introduction
4
Payment Channel Network (PCN)
5
$3
$5
Alice
Bob
Total channel escrow = $8
Tx: Alice send Bob $2
➖$2
+$2
Payment Channel Network (PCN)
6
$1
$7
Alice
Bob
Tx: Alice send Bob $2
Total channel escrow = $8
$3 ➖$2 = $1
$5 +$2 = $7
Payment Channel Network (PCN)
7
Alice
Bob
Charlie
Tx: Alice send Charlie $2
$3
$5
$4
$7
Payment Channel Network (PCN)
8
Alice
Bob
Charlie
Tx: Alice send Bob $2
$3
$5
$4
$7
Tx: Bob send Charlie $2
$1
$7
$2
$9
More participants => Network
Payment Channel Network (PCN)
9
Alice
Bob
Charlie
Hash Lock
Hash Lock
Alice
Bob
Charlie
Alice
Bob
Charlie
Hash Lock
Routing in PCN
The problem of selecting intermediate nodes to ensure successful and efficient transaction transfer in PCN.
The sender specifies the relay route for each transaction
10
RTRR: Auction Phase
11
pi: Tx success probability from current node vi to target node
v1
v2
v3
vK-1
vK
s
p1
p2
p3
pK-1
pK
Preceding node on tx route
fi : bid (tx fee) proposed by node vi
f1
f2
f3
fK-1
fK
Assume node s selects v2 as its subsequent node
RTRR: Recursive Outsourcing
12
pi: Tx success probability from current node vi to target node
v1
v2
v3
vK-1
vK
s
fi : bid (tx fee) proposed by node vi
f1
f2
f3
fK-1
fK
Preceding node on tx route
ṽ1
ṽ2
ṽ3
ṽK-1
ṽK
Assume node s selects v2 as its subsequent node
Implementation
13
Alice
Bob
3(a). Case 1 -- Successful (the transaction succeeds within Tt ). Bob receives all locked funds (μ + f + d), i.e., receiving the value and fee, and get back the security deposit locked on his side.
3(b). Case 2 – Impassable. Alice receives all locked funds (μ + f + d), i.e., receiving deposit as compensation, and get back the value and fee locked on her side.
d
Alice
Bob
d
μ+f
Send HTLC-bid contract with sig(Bob)
Send back HTLC-bid with sig(Alice, sig(Bob))
Alice
Bob
Hash Lock with h(R)
μ+f+d
0
Send back correct preimage R
Hash Lock with h(R)
Alice
Bob
Hash Lock with h(R)
μ+f+d
Case Impassable:
Case Successful:
0
14
Response timeout τ
u (auctioneer)
v1 (bidder 1)
v2 (bidder 2)
Request bidding:
tx(value, destination)
Request bidding:
tx(value, destination)
Decide fee f1
Bidding: HTLC-bid
(value, f1+d1, Tt, Tb, sig1(1))
Decide fee f2
Bidding: HTLC-bid
(value, f2+d2, Tt, Tb, sig2(2))
Bidding lock
Bidding lock
Case 1: Successful
Case 2: Impassable
Restart auction
Requesting bidding on its neighbors
Get preimage from
subsequent node
Send back preimage
[Update channel balance]
Balance: +f2
Balance: -f2
Balance: -d2
Balance: +d2
No preimage received in Timeout Tt
[Update channel balance]
Select and sign contract: sigu(2)
……
Transfer lock (Tt)
Transfer lock (Tt)
Auction
Outsourcing
RTRR
Protocol:
Performance Guarantee
15
| K | L | θ | η’s lower bound |
1 | 5 | 5 | 0.8 | 50.1% |
2 | 5 | 10 | 0.8 | 77.8% |
3 | 5 | 5 | 0.5 | 59.2% |
Experiment Settings
16
Experiment Results
17
Summary
18
THANKS
19