[Lightning-dev] An Argument For Single-Asset Lightning Network

Lloyd Fournier lloyd.fourn at gmail.com
Sat Jan 5 09:23:51 UTC 2019


Hi David and ZmnSCPxj,

ZmnSCPxj,

Thanks for your response. I messed something up with my response so my
original post didn't get into the archive. I put it in a gist:
https://gist.github.com/LLFourn/d0afa6b37207aed7cd73f6b9203c0def for
reference.

> I agree.
> When I was developing American Call Options on top of onchain HTLCs, I
came up with a similar construction for ensuring that the premium is paid
before the HTLCs setting up the option appear onchain.

I would be interested to see how your construction worked. You can actually
modify the construction I gave before (in the gist) to create a fair option
too. You just change it so the asset `C` is paid on both branches of the
HTLC. This changes `C` from collateral to a premium. This sounds a bit
different to what you describe as the premium isn't paid before the HTLCs
go onto the chain.

The only other proposal for options I've seen is:
https://www.ics.uci.edu/~jamesal1/Swaptions.pdf. I could be missing
something, but this seems to give Alice a free option on an option in this
one. The premium payment has the option problem: Bob cannot cancel his
offer of an option but Alice can take her time to accept it.

> However, can such a scheme scale on-Lightning?

The scalability issue with the scheme in payment channels is the lack of
objective ordering of events in layer 2. If Alice and Bob disagree on
whether "Take Offer" or "Cancel Offer" happened first, they will have to
close their channel and resolve their dispute on the blockchain. This means
that channels may have to go to the blockchain much more often than if you
were just doing payments. In practice, this problem might not be so severe.
Parties that have frequent disputes will just tend to stop opening channels
with each other. It still guarantees that in the worst case there are no
long options for either party.

---
David,

> Instead of Alice's node just locally constructing this path and trying
> to pay it like normal, she first sends a special probe to Charlie
> requesting a new hash for which only he knows the preimage.  With this
> hash plus the hash Alice received from Eliza, Alice sends a payment that
> requires both hashlocks be unlocked before anyone can claim the payment.

Moving the option from the random anonymous person (Alice) to the exchange
node is a good improvement. If participants become good at identifying
exchange nodes that delay in revealing the secret that might be enough to
make the cross asset payment idea practical.

As you hinted at, I think there is a simpler construction that is more
compatible with today's lightning:
1. Alice given `A` wants to send `B` to Bob with Charlie doing the exchange.
2. Charlie generates a secret `s` and makes a payment of `B` to Bob locked
under H(s)
3. Once Bob has the locked payment of `B` he sends H(s) to Alice
4. Alice then makes the payment of `A` under H(s) to Charlie.
5. Charlie now unlocks Alice's payment with `s` and receives `A`
6. Alice then learns `s` and sends it to Bob
7. Bob unlocks Charlie's payment with `s` and receives `B`

> In ZmnSCPxj's terminology, the option is now no longer
> free because Charlie must decide between potential routing income and
> potential option income

I didn't really get why the exchange would get any routing income from
this? The exchange is the receiver of a payment of BTC on one leg and the
sender of WJT on another. I'd expect the exchange would gain profit from
spreads rather than fees in these protocols.

Lloyd

\n

On Sat, Jan 5, 2019 at 6:01 PM ZmnSCPxj via Lightning-dev <
lightning-dev at lists.linuxfoundation.org> wrote:

> Good morning David,
>
> What happens if the exchange node only sends its preimage towards the
> payer and not towards the payee?
>
> If the payer and payee do not coordinate, then it becomes possible for the
> exchange node to take the funds without the payee gaining the ability to
> claim the payment.
> This might be used by a node to take proofs of payment without paying, by
> simulating the payer and exchange nodes.
> This may be important if the proof of payment is valuable, such as, the
> mentioned offline Lightning vending machines, or if the preimage is the
> decryption key for valuable data (e.g. ransomware; now the ransomware
> author may find it is scammed off their potential earnings).
>
> Regards,
> ZmnSCPxj
>
>
>
> Sent with ProtonMail Secure Email.
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Saturday, January 5, 2019 5:05 AM, David A. Harding <dave at dtrt.org>
> wrote:
>
> > On Thu, Dec 27, 2018 at 05:43:51AM +0000, ZmnSCPxj via Lightning-dev
> wrote:
> >
> > > We can try to mitigate this, but the solutions below all have
> significant drawbacks.
> >
> > An alternative is to give the person making the exchange the ability to
> > cancel the payment if they think the exchange rate has changed
> > unfavorably for them. I think you could do that by adding an extra
> > hashlock to the HTLC that's controlled by the exchanger. For example,
> > here's what we'd expect a cross-asset path to look like:
> >
> > Alice Bob Charlie Dan Eliza
> > 1.3 mBTC -> 1.3 mBTC -> 1.2 mBTC
> >
> >                             1.2 mWJT -> 1.1 mWJT -> 1.0 mWJT
> >
> >
> > Instead of Alice's node just locally constructing this path and trying
> > to pay it like normal, she first sends a special probe to Charlie
> > requesting a new hash for which only he knows the preimage. With this
> > hash plus the hash Alice received from Eliza, Alice sends a payment that
> > requires both hashlocks be unlocked before anyone can claim the payment.
> >
> > 1.  When this payment reaches the exchanger, Charlie, he checks that the
> >     payment includes a hashlock he controls before routing the payment
> on to
> >     a different asset.
> >
> > 2.  When the payment reaches receiver Eliza's node, she releases her
> >     PreImage (PI0) back along the path.
> >
> > 3.  When Eliza's preimage reaches exchanger Charlie's node, he releases
> >     his preimage (PI1) in both directions along the path and continues
> >     forwarding PI0 backwards. Eventually everyone receives both preimages
> >     through the usual offchain or onchain mechanisms.
> >
> >     Alice Bob Charlie Dan Eliza
> >     PI0 <- PI0 <- PI0 <- PI0 <- PI0 (start here)
> >     PI1 <- PI1 <- PI1 -> PI1 -> PI1
> >
> >
> > However, if the exchange rate changes too much for Charlie's comfort
> > before both preimages have been released, Charlie can unilaterally
> > decide to cancel the payment by simply not releasing his preimage.
> >
> > Note that by making the payment contingent on the approval of the
> > exchanger, the ability to create an underhanded call option is
> > transferred to the exchanger. However, this may be less concerning
> > because the exchanger can only keep this option open by refusing to
> > immediately claim the routing fees.
> >
> > For example, our exchanger Charlie is being offered 0.1 mBTC to route
> > the payment (a made up number). If he can route 100 such payments in a
> > day (another made up number), he can earn 10.0 mBTC from routing. By
> > comparison, if he delays a payment of 1.2 mBTC, he'd need to expect the
> > exchange rate to change by an order of magnitude within a day to earn
> > the same amount. In ZmnSCPxj's terminology, the option is now no longer
> > free because Charlie must decide between potential routing income and
> > potential option income. Whether or not exchangers play the option game
> > will therefore likely be based on the amount of honest routing income
> > they can earn relative to the exchange rate volatility (and also on how
> > good nodes get at tracking reliable routes).
> >
> > This idea certainly complicates the current protocol (both routing and
> > transaction construction), but maybe there are simplifications
> > available.
> >
> > -Dave
>
>
> _______________________________________________
> Lightning-dev mailing list
> Lightning-dev at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20190105/3dc2a953/attachment-0001.html>


More information about the Lightning-dev mailing list