Lightning as a BTC/BCH gateway

I get quarterly payments via CashApp, which I can trade on the app for BTC, and send out via the lightning network. I have been thinking about how to convert BTC to BCH without paying their insane on-chain transaction fees. It seems like one could set up a lightning node that accepted both BTC and BCH deposits ( of course the BCH would be just on chain, we don’ need lighting, we have bandwidth) and allowed users to trade one for the other. So I would send my BTC there from BCH, and hope that there was a BCH user trying to make a purchase from a BTC only shop ( or send BCH to CashApp ) and exchange BTC for BCH at that rate. Since both of use would be motivated by our own need for the other currencies, it would be a low or no cost exchange, I would hope.

If there were many lightning nodes operated by BCH users, they could even be used to settle transactions between other lightning nodes. I suspect that BTC will never cooperate with us to establish atomic swaps but this might be a good substitute. I’m an experienced developer, and an experienced crypto user, but I am not by any means an expert in the technical details of block chains, so be gentle.

So like an atomic swap but for BCH. Gotcha.

Some very quick thoughts:

  1. These services already exist (not LN atomic swap, though). However, recently, because of low usage and HIGH failure rates, sideshift.ai removed LN support
  2. People would already need to have BTC on LN, and if they didn’t, would need to pay an on chain fee to open a channel.
    2.a) Someone still needs to pay to close the channel for the BTC to not be lost

Not to say there is no solution, but I don’t know how much volume there would be and how practical it is either.

1 Like

I liked the idea of ping-pong swaps:

Bascially you open channels on both networks, and change their state little by little until the full order is filled.

So, if 2 parties already have LN channels, they could open a channel on BCH and then do a ping-pong session to adjust the amounts.

1 Like

Here you can swap from LN to BCH Online Crypto Exchange Platform with the Best Rates | StealthEX.io

1 Like

I have thoguht of that as well. That was actually the reason I thought of lgihting. You could sit and send five dollar transactions back and for the with a monero user all day, and bay a few pennies in fees, but with BTC on chain it would kill you. But using lightning, you could use their unpublished transaction scheme as a locking mechanism for no cost.

The other thought I had was to establish an oracle that can ( for a small fee ) watch a BTC address ( I have nodes for BCH, BTC, XMR. and ARR ) for a transaction from a second known address, and when it arrives, trigger the contract Or at least so I assume, I am unclear about exactly who processes smart contracts, and how often … I would imagine some of the might exist for decades. do the contracts have some sort of "wake on la"n feature, so the the oracle could sent data to it?
"
I’d love pointers to documents with more detail. I have seen documentation of the language itself, but not much on context.

This is kind of what Thorchain does, their nodes run nodes on all supported networks (including BCH) and watch addresses involved in swaps, and if nodes don’t carry out orders their stake on Thorchain would get slashed.

1 Like

I with that Thorchain was 15 different chains, each of which did one thing ( Yep, he’s a UNIX guy ) there are so many things it does that I found myself suffering from analysis paralysis.

Thanks, next time I get a quarterly payout, they will be my first stop.