nullcount/LN-Analysis

Routing Considerations

Opened this issue · 3 comments

A routing node seeking profit should:

  1. Route more payments
  2. Route larger payments
  3. Raise node fee (base and rate)

Costs need to be reduced:

  1. Opening a channel incurs miner fee
  2. Rebalancing (sending payment to self) incurs routing fee
  3. Time spent waiting to route a payment

A node should find the optimal channel placement and fee rate. Placing a channel should either increase routed payments or decrease rebalancing costs.

A node can only view the channel capacity of other nodes. It cannot see the balances.

I want to make sure i understand our goal by putting it into my own words.

We want to maximize

  • our minimum fees,
  • transaction opportunities,
  • the number of shortest paths the node is a part of

and we want to minimize

  • the number of nodes we control,
  • channels open
  • rebalance cost for each channel.

Here is a paste from the notes I took from when we met up.

Add channels to be a cut node. (Or join pendants to the graph so there is a flow.)
Add channels to shorten the most shortest paths.
Charge highest low fee you can charge.
Instances where we can allow someone to rebalance cheaper.
Rebuild channel information and payment routes.
Longest cheapest path?

Everything you said is correct.

To explain the last two on your notes:

  1. Rebuild channel information and payment routes

There is a vulnerability in the LN routing algorithm which allows the balance of a channel to be guessed by essentially brute forcing payments of increasing amount until the node forwards the payment.

It can be done for free and takes up to a min per channel balance revealed.

  1. Longest cheapest path?

An alternative routing algorithm to increase the number of hops for privacy but still pay the cheapest fee.

We want to fold the network in on itself. Picking nodes at random and finding the shortest paths between them will help us identify the center of the network. From there, we can do a breadth first search to find the edge of the network. These are the nodes that we want to find the longest shortest paths between. I want to experiment by shortening the shortest paths between 4 mutually distant edge nodes.