Research/Bitcoin Dev Archive / lightning-dev list
Lightning Pool: A Non-Custodial Channel Lease Marketplace
4 messages, Nov 2 to 17, 2020. Started by Olaoluwa Osuntokun.
Olaoluwa Osuntokun (2), ZmnSCPxj (2)
Hi y'all,
We've recently released a new system which may be of interest to this list, Lightning Pool [1]. Alongside a working client [2], we've also released a white paper which goes deeper into the architecture of the system.
Pool builds on some earlier ideas that were tossed around the ML concerning creating a market for dual-funding channels for the network (though the concept itself pre-dates those posts). Rather than target dual-funded channels, we focus on the current uni-directional channels, and allow users to buy+sell what we call a "channel lease" that packages up inbound (and also potentially outbound via side-car channels!) liquidity paying out a premium for a fixed duration.
Live testnet+mainnet markets were also released today, giving routing nodes a new stable revenue source, and allowing those that need inbound to bootstrap their new Lightning Service a new automated way to do so.
This is just our first alpha release which contains some limits/simplifications in the system itself. We plan to continue to iterate on the system to implement new things like streaming interest payments, and the version of side-car channels (buy a channel for a 3rd party) described in the paper amongst many other things.
[1]: https://lightning.engineering/posts/2020-11-02-pool-deep-dive/ [2]: https://github.com/lightninglabs/pool [3]: https://lightning.engineering/lightning-pool-whitepaper.pdf
Good morning laolu,
Thank you for your hard work!
Is there a documentation for the client/server intercommunications protocol? How stable is this protocol?
A thought occurs to me:
* The payment of the lease effectively shifts risk from established forwarding nodes to those purchasing incoming liquidity (i.e. new forwarding nodes, and merchants).
* The merchant/new forwarding node speculatively pays for the incoming channel lease, in the hope that it will recoup the loss in the future.
There exists the risk that it cannot actually utilize the incoming capacity it purchased.
* I believe this improves risk-sharing and improves the system health overall.
A random, possibly-dumb idea is that a leased channel should charge 0 fees initially. Or, to be more specific:
* The advertisement for the channel lease should include a channel feerate. * At channel setup the *published* channel feerate should be 0. * Both participants keep track of how much "should" have been paid in fee using the agreed-upon lease feerate. * Once the "should" fee matches the original lease cost, the lessor is now free to set the channel feerate to nonzero.
Enforcing that is a problem, however, since channel updates are unilateral, and of course the lessee cannot afford to close the channel it leased in case the lessor sets a nonzero feerate ahead of time.
This effectively makes the lease rate (cost per unit time per satoshi-in-channel) reflect the expected low-risk rate of return, which may be useful for market discovery.
Secondarily to the Shadowchain discussion, it should be noted that if all onchain UTXOs were signed with n-of-n, there would not be a need for a fixed orchestrator; all n participants would cooperatively act as an orchestrator. On the other hand, that requires cooperation (a single non-cooperating party is enough to disrupt the entire construction and require expensive onchain resolution), as well as a broadcast medium, and the simplest implementation of a broadcast medium over IP is to elect a participant to receive all messages and broadcast all the messages to the other participants, which is basically what the orchestrator is **also** doing. Thus the tradeoff may be acceptable.
Regards, ZmnSCPxj
Hi Z,
Thanks for such kind words!
Quoted text (2 lines)
> Is there a documentation for the client/server intercommunications > protocol?
Long form documentation on the client/server protocol hasn't yet been written. However, just like Loop, the Pool client uses a fully-featured gRPC protocol to communicate with the server. The set of protobufs describing the current client <-> server protocol can be found here [1].
Quoted text (1 line)
> How stable is this protocol?
I'd say it isn't yet to be considered "stable". We've branded the current release as an "alpha" release, as we want to leave open the possibility of breaking changes in the API itself (in addition to the usual disclaimers), though it's also possible to use proper upgrade mechanisms to never really _have_ to break the current protocol as is.
Quoted text (5 lines)
> A random, possibly-dumb idea is that a leased channel should charge 0 fees initially. > Enforcing that is a problem, however, since channel updates are > unilateral, and of course the lessee cannot afford to close the channel it > leased in case the lessor sets a nonzero feerate ahead of time.
Agreed that the purchaser of a lease should be able to also receive a fee rate guarantee along with the channel lifetime enforcement. As you point out, in order to be able to express something like this, the protocol may need to be extended to allow nodes to advertise certain pair-wise channel updates, that are only valid if _both_ sides sign off on each other's advertisements, similar to the initial announcement signatures message. On lookers in the network would possibly be able to recognize these new modified channel update requirements via interpreting the bits in the channel announcement itself, which requires both sides cooperating to produce. It's also possible to dictate in the order of the channel lease itself that the channel be unadvertised, though I know how you feel about unadvertised channels :).
In the context of Lighting Pool itself, the employed node rating system can be used to protect lease buyers from nodes that ramp up their fees after selling a lease, using a punitive mechanism. From the PoV of the incentives though, they should find the "smoothed" out revenue attractive enough to set reasonable fees within sold channel leases.
One other thing that the purchaser of a lease needs to consider is effective utilization of the leased capital. As an example, they should ensure they're able to fully utilize the purchased bandwidth by using "htlc acceptor" type hooks to disallow forward through the channel (as they could be used to rebalance away the funds) to clamp down on "lease leak".
I plan to significantly extend the current "security analysis" section to cover these aspects as well as some other considerations w.r.t the interaction of Lifted UTXOs timeouts and batch confirmation/proposal in the context of Shadowchains. There'll also eventually be a more fleshed out implementation section once we ship some features like adding additional duration buckets. The git repo of the LaTeX itself (which is embedded in the rendered PDF) can be found here [2].
Quoted text (4 lines)
> Secondarily to the Shadowchain discussion, it should be noted that if all > onchain UTXOs were signed with n-of-n, there would not be a need for a > fixed orchestrator; all n participants would cooperatively act as an > orchestrator.
This is correct, and as you point out moving to an n-of-n structure between all participants runs into a number of scalability/coordination/availability issues. The existence of the orchestrator also serves to reduce the availability requirements of the participants, as the only need to be online to accept/validate a shadowchain block that contains any of its lifted UTXOs. With an addition of a merkle-tree/MMR/SMT over all chain state that's committed to in each block (say P2CH-style within the orchestrator's output), an offline participant would still be able to "fully validate" all operations that happened while they were away. This structure could also be used to allow _new_ participants to audit the past history of the chain as well, and can also be used to _authenticate_ lease rate data in the context of CLM/Pool (so an authenticated+verifiable price feed of sorts).
In the context of the Pool shadowchain, the existence of the orchestrator allows the participants to make other tradeoffs given it's slightly elevated signing position. Consider that it may be "safe" for participants to instantly (zero conf chans) start using any channels created via a lease as double spending the channel output itself requires coordination of _all_ the participants as well as the orchestrator as all accounts are time lock encumbered. Examining the dynamic more closely: as the auctioneer's account in the context of Pool/CLM isn't encumbered, then they'd be the only one able to spend their output unilaterally. However, they have an incentive to not do so as they'd forfeit any paid execution fees in the chain. If we want to strengthen the incentives to make "safe zero conf channel lease usage" work, then an on-chain bond can be created that's threaded through with each execution auction batch. The auctioneer would then be required to sign its account output with a "single show signature" allowing some/all the participants of the Pool to collect a security deposit as the auctioneer violated the zero conf agreement.
[1]: https://github.com/lightninglabs/pool/blob/master/poolrpc/auctioneer.proto [2]: https://github.com/lightninglabs/pool-paper
-- Laolu
Good morning laolu,
Sorry for the late reply.
Quoted text (29 lines)
> > A random, possibly-dumb idea is that a leased channel should charge 0 fees initially. > > Enforcing that is a problem, however, since channel updates are > > unilateral, and of course the lessee cannot afford to close the channel it > > leased in case the lessor sets a nonzero feerate ahead of time. > > Agreed that the purchaser of a lease should be able to also receive a fee > rate guarantee along with the channel lifetime enforcement. As you point > out, in order to be able to express something like this, the protocol may > need to be extended to allow nodes to advertise certain pair-wise channel > updates, that are only valid if _both_ sides sign off on each other's > advertisements, similar to the initial announcement signatures message. On > lookers in the network would possibly be able to recognize these new > modified channel update requirements via interpreting the bits in the > channel announcement itself, which requires both sides cooperating to > produce. It's also possible to dictate in the order of the channel lease > itself that the channel be unadvertised, though I know how you feel about > unadvertised channels :). > > In the context of Lighting Pool itself, the employed node rating system can > be used to protect lease buyers from nodes that ramp up their fees after > selling a lease, using a punitive mechanism. From the PoV of the incentives > though, they should find the "smoothed" out revenue attractive enough to set > reasonable fees within sold channel leases. > > One other thing that the purchaser of a lease needs to consider is effective > utilization of the leased capital. As an example, they should ensure they're > able to fully utilize the purchased bandwidth by using "htlc acceptor" type > hooks to disallow forward through the channel (as they could be used to > rebalance away the funds) to clamp down on "lease leak".
On the one hand, one possible use-case for this would be for a new forwarding node to come online. As forwarding nodes must first *receive* a forwarding request before they can actually forward, incoming capacity is necessary as well in such a deployment.
But restricting forwards as you propose would make this exercise pointless, at least for forwarding nodes; to a forwarding node, getting forwards *is* the intended model and restricting those would just reduce its potential earnings.
Now, in rebalancing away the incoming capacity, the channel lessor not only pays to the lessee the forwarding fee, but as well, also creates incoming capacity on *another* channel of the lessee. If the lessee is a forwarding node, then it has still achieved what it wants, that is, it retains incoming capacity still.
Even if the lessee is primarily a receiving merchant, if the lessor is able to successfully rebalance at all, then, again, *some* incoming capacity will appear on a different channel of the lessee.
So this is only really problematic if we are giving some kind of feerate assurance, since the incoming capacity never really disappears (unless the lessor actively overpays the forwarding fee to the lessee, and such an outright gift is likely more valuable than purchasing more incoming capacity), it just moves elsewhere. It *could* move to a channel where reaching the lessee costs more for most nodes on the network, so I believe this is potentially an actual loss.
In a sense, a rebalance is an aggregation of multiple smaller payments. Suppose I am a forwarding node that is lucky enough to be channeled to a popular merchant. The channel to the merchant gets a lot of little payments and eventually saturates. If I have funds elsewhere, I can aggregate those multiple smaller payments into a single large payment from one of my other channels, and transfer to the popular channel to the popular node, so that more smaller payments can come into my channel with the popular merchant.
So I think rebalancing is good for the network in general, and should be supported well.
Regards, ZmnSCPxj