Subhasis Thakur and John Breslin
Data Science Institute
National University of Ireland Galway
A balanced routing
algorithm for blockchain
offline channels using
flocking
-
- SFI Research Centre
- Precision pasture-based
dairying (agtech)
- Blockchain applications
in the dairy supply chain
2
Scalability problem
3
Offline channels
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Load balancing
problem in the
Lightning Network
20
Privacy-preserved
load balancing
problem
How can we ensure uniform
usage of channels without
revealing channel balances?
Flocking-based routing21
https://commons.wikimedia.org/wiki/File:S
ort_sol_pdfnet2.jpg (Public Domain)
Step 1: Convert channels to nodes of a network
Step 2: Assign coordinates to each channel
22
(Vj
,Vb
)
Flocking of channels
1. A set of channels
moves away from each
other if used in a PBT
2. The set of mirrored
channels moves close
to each other
23
24
Flocking of channels
Zone of Repulsion
Zone of Alignment
Zone of Attraction
Angle of the channel
Coordinate of each channel
is in positive numbers
Hence, the angle of each
channel is in the range
[0,90]
25
Coordinate updating
26
Angle1
= 180 degrees + mean angle of the channels in the
repulsion zone (opposite of channels in the repulsion zone)
Angle2
= Mean angle of the channels in the alignment zone
Xi
= Xi
+ 0.2(Cos(Angle1
) + Cos(Angle2
))
Yi
= Yi
+ 0.2(Sin(Angle1
) + Sin(Angle2
))
Routing protocol
27
● Updated coordinates are regularly announced
● Routing as per the shortest path
28
Bitcoin Lightning Network
Data used = three subgraphs of BLN
# of
nodes
Average
degree
Average
channel
balance
(simu-
lated)
Average
PBT
value
(simu-
lated)
400,
600,
800
11 7 0.5
Network with 400
nodes
The standard deviation of
channels remain low for
balanced routing
29
Network with 600
nodes
The standard deviation of
channels remain low for
balanced routing
30
Network with 800
nodes
The standard deviation of
channels remain low for
balanced routing
31
The number of completed
PBTs for balanced routing
is higher than the same for
shortest path routing
Average path length for
PBTs is lower for balanced
routing
32
33
Thank you:
any questions?
subhasis.thakur@nuigalway.ie
john.breslin@nuigalway.ie

A Balanced Routing Algorithm for Blockchain Offline Channels using Flocking