In practice, wrapped invoices will probably scale very poorly. This is because the lightning node for Alice will only consider routing to Bob, and the lightning node for Bob will only consider routing to Carol. The route will not be optimized at all.
Yep, routing failures compound, but if LN is to succeed, this kind of thing should be as reliable as sending your traffic through a VPN.
The solution for this of course is to to build a Bolt 11 invoice with all your Bob nodes specified in the route. Then the path-finding logic for Alice's node will try to build an optimal route.
If it's all done in a single route, I don't think this is any different than the wrap actually. But, if Alice can split the payment on multiple routes, one going to Bob and another to Carol, it'd provably be more reliable because each route requires less liquidity. It's like MMP then.
However, this still doesn't solve the problem, because adding Bob to the route doesn't mean that Bob will know to intercept that invoice, and charge a certain fee.
It depends on the problem you're trying to solve. If Alice pays Carol and Bob independently, but Bob only wants to accept the payment if Carol receives her payment, he can hold Alice's payment, cancelling it if Carol isn't paid and accepting it if she is.
With PTLCs you should be able to split payments like that. You could lock an invoice to the sum of a set of invoice secrets, for example (since points can be added).
reply
Ptlcs seem to be a big unlock for all kinds of stuff. Maybe we’ll get it after bolt12
reply