The Missing Link of the Lightning Network: A Decentralized Liquidity Marketplace
以太坊爱好者
2021-09-03 10:31
本文约2853字,阅读全文需要约11分钟
Supplementing entry liquidity is a problem that every node in the Lightning Network must face more or less.

Original title: "Introduction | The Missing Link of the Lightning Network: A Decentralized Liquidity Market" by Lisa Neigut

Liquidity ads (ad literally means "advertising") is a specification that was recently implemented in c-lightning v0.10.1 and is an important addition to the Lightning Network. Although it is light in size, it allows the network to coordinate liquidity deployment in the network in a decentralized manner and ensure accessibility.

Liquidity ads solve a common problem with receiving payments over the Lightning Network: where and how to get inbound liquidity.

In fact, replenishing the entry liquidity is a problem that every node in the Lightning Network must face more or less.

Why Booked Liquidity Matters

Whether it is to receive payments or route payments, the liquidity of entry is extremely important.

The total amount of your incoming liquidity is the upper limit of the payment you can receive in the lightning network; this is self-evident for suppliers/service providers who use the lightning network; for ordinary nodes, Also related to the total amount of routing fees that can be obtained.

All in all, the role of recorded liquidity is:

  • Accepting Liquidity in the Lightning Network

  • earn routing fees

Entry liquidity and routing fees

Earning routing fees in the Lightning Network is to obtain handling fees by referring payment transactions. This part of the harvest will be accumulated in the local balance of your node's channel (local balance).

In other words, your Lightning Network balance will increase as you convert incoming liquidity into outgoing liquidity, and this process will happen in all channels.

Here, let's consider a hypothetical example where a routing node earns fees by referring payment transactions. Let's take a look at how the amount of routing fees he can get is limited by the account entry capacity when the channel is opened.

We assume that this node has two channels at the beginning, and the balance of the channel allows payment transactions to shuttle between the two channels. This node () then center the route. His channels have an incoming capacity of 1000 Satoshi and an outgoing capacity of 1000 Satoshi.

1000sats <----->  0sats 1000sats <-------> 0sats

A "routing fee" of 100 Satoshi (sat) is set for the two channels, which means that every time a payment transaction passes through,100 Satoshi is charged.

As we can see, as the number of referrals increases, the node's channel fees will gradually erode its routing ability - as it nets him the cost of transferring funds.

Just demonstrate it. Assuming we send payments back and forth through these two channels, every time we pay, we have to givePay 100 Satoshi.

Then, at the beginning:

1000sats <----->  0sats 1000sats <-------> 0sats

We then use these two channels to send payment transactions back and forth. Every time we pay the maximum payable amount, so for the first payment we pay 1000 Satoshi, after subtracting the 100 Satoshi fee, the receiver gets 900 Satoshi

After so many referrals,There is no way to pay for the transaction in the referral. This node routed 9 payment transactions.

At the beginning, the node has an output capacity of 1000 Satoshi (that is, the money it can spend) and an input capacity of 1000 Satoshi.

After referring 9 payment transactions, the node now has 1900 Satoshi output capacity and 100 Satoshi input capacity.

You managed to earn 900 Satoshi with this pair of state channels through the referral payment transaction. If our nodes want to continue to do routing transaction business, we need more entry capacity.

Making Liquidity Accessible and Cheaper

To some extent, each node needs to enter liquidity.

Because this is a fundamental part of running a Lightning Network node - the Lightning Network only makes sense for the node if it can gain entry capacity.

Now, there are many ways to replenish the entry capacity:

  • Use the lightning network to buy something, you can get the credit capacity

  • Use a loop out service like Lightning Labs' Loop or Boltz to push funds from your Lightning Network node back to your on-chain wallet

  • Collaborate with friends to open a channel with sufficient balance

  • Use a third-party bulletin board such as LightningNetwork.plus

  • Purchase credited capacity from known service providers such as LNBig's liquidity service

  • Find someone willing to rent out credited capacity to you through a centralized auction

  • Liquidity ads are different from these methods: you find nodes through the gossip network of Lightning Network to rent the entry capacity.

    Ads (advertising) are decentralized, any node with a public channel can create one and send it to every node on the network. It is very simple to rent the advertised liquidity, which is to open a channel with the node that publishes the advertisement. You also know who is the person who opened the channel with you - before you open the lease, you can see which channels the other party has.

Liquidity is not homogeneous

On the Lightning Network, liquidity is not homogeneous, they are embedded in the network, which consists of nodes and their channel balances.

In a liquidity network, no two channels have the same meaning - each channel is unique and connects different parts of the network. New channels don't have the same effect on the Lightning Network channel graph either. Where a newly joined node is in the network and the heuristic of the shortest path will also vary depending on the nodes he connects to.

In other words: each newly created channel has a completely different impact on a node's position in the network graph. A new channel to a node might bring that node closer to the center quickly; connecting to another node might not help that.

It is difficult to price this new incoming liquidity without knowing where a new channel will fit in the network graph. Even if a well-meaning third party tries to "rate" the value of different peer nodes, it is difficult to accurately estimate the value of incoming funds from an unknown node. In fact, it is still an open question to distinguish which nodes have which attributes are worth allocating liquidity to establish channels with.

Difficulties in estimating value also make it difficult to discern which of the recorded liquidity is valuable.

For example, if my node is advertising liquidity, how do you know how much to pay me?

The answer to this question will vary from node to node, because the value of the liquidity I provide also depends in part on the current liquidity situation of your node and the relative position of your node and mine in the channel map.

trade off

trade off

advantage:

advantage:

  • Simply submit an on-chain transaction to rent onboarded liquidity. Funds do not need to be pre-locked in auction accounts.

  • Any node with an open channel can create an advertisement.

  • Before the lease starts, you can know the situation of your channel opponents.

  • Lease lasts for one month (4032 blocks)

  • Partial lease terms are enforceable on-chain*

  • shortcoming:

  • shortcoming:

  • There is no guarantee that liquidity will be available. The opponent may have run out of funds, or may not be able to provide you with a sufficient amount

  • Nodes that rent out funds must decide the fee rate for the funds in advance (there is no plug-and-play auction mechanism to determine its price). However, this can be mitigated by third-party services that can help you take available liquidity and then execute it with a dual-funded/liquidity ad.

  • The market for liquidity can be more fragmented because anyone can request liquidity from you at any time.

  • You have to investigate the peers that provide you liquidity yourself.

  • * The rented funds will be locked in a to_remote output with CSV (relative timelock).

    To understand the difference between centralized liquidity pool auctions and Liquidity ads specifications, see Bitcoin Optech’s push on July 28.

Use Liquidity Ads Now

The just-released v0.10.1 of c-lightning already includes an implementation of the draft liquidity ads proposal.

(over)

(over)

(There are many hyperlinks in this article, you can click "Read the original text" on the lower left to get it from the EthFans website)


以太坊爱好者
作者文库