Bitcoin Forum
February 28, 2021, 04:38:04 AM *
News: Latest Bitcoin Core release: 0.21.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: submarine swap to get incoming liquiidty - c-lightning  (Read 174 times)
darkv0rt3x
Member
**
Offline Offline

Activity: 196
Merit: 78

What is this?


View Profile
January 10, 2021, 12:43:09 PM
Last edit: January 11, 2021, 07:55:56 PM by darkv0rt3x
Merited by LoyceV (4), OmegaStarScream (3), ETFbitcoin (1), DireWolfM14 (1)
 #1

Hello.

I've been trying to understand how submarine swap works so that I can get some inbound liquidity but each site uses different names and terms and it's a bit challenging for a starter like me.

To start, I should say I run a full node and a c-lightning node.
I have 2 very small channels open to other node but these were only for testing when I started the lightning node.

So, to start, I already have a new address in my lightning node with the funds I want to use to open a larger channel and I'm looking for sites to perform this submarine swap for me.

I already visited a few like https://redshift.radar.tech/, https://zigzag.io/#/ but they are not suitable for my needs or because they are not exactly what I want or because they are running out of liquidity.

What other services/sites I can try?
I'll be using this thread also to ask questions and etc.

Minning Revolution - É possível, caralhoooo....
Lightning Node URI: 03fef777d58a529df02a3fb267690e0c9033767b555cc1c63844bb2d3498789f91@isvcxqviqbhrzpzpcmeh6u5ve42pvcjdukckec4mhdcwhnkff6qexdqd.onion:9735
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1614487084
Hero Member
*
Offline Offline

Posts: 1614487084

View Profile Personal Message (Offline)

Ignore
1614487084
Reply with quote  #2

1614487084
Report to moderator
LoyceV
Legendary
*
Offline Offline

Activity: 2142
Merit: 7556


Thick-Skinned Gang Leader


View Profile WWW
January 10, 2021, 12:56:15 PM
 #2

What other services/sites I can try?
I'm not sure about submarine swaps, but a simple exchange is possible in many ways. FixedFloat.com or CoinPlaza.it offer LN-exchanges, and for small amounts an altcoin is probably cheapest (in transaction fees). Alternatively, you can use a casino such as Lightning-Roulette.com or BC.Game to temporarily send some LN-funds to create inbound capacity, or buy something at Bitrefill.com.
I can even exchange it myself if you're okay with a very low fee on-chain transaction.
More alternatives: You can use Phoenix Wallet or BlueWallet (custodial LN) to send some funds too.



For the time being, I've given up on creating my own channels (for small amounts).

darkv0rt3x
Member
**
Offline Offline

Activity: 196
Merit: 78

What is this?


View Profile
January 10, 2021, 02:41:50 PM
 #3

What other services/sites I can try?
I'm not sure about submarine swaps, but a simple exchange is possible in many ways. FixedFloat.com or CoinPlaza.it offer LN-exchanges, and for small amounts an altcoin is probably cheapest (in transaction fees). Alternatively, you can use a casino such as Lightning-Roulette.com or BC.Game to temporarily send some LN-funds to create inbound capacity, or buy something at Bitrefill.com.
I can even exchange it myself if you're okay with a very low fee on-chain transaction.
More alternatives: You can use Phoenix Wallet or BlueWallet (custodial LN) to send some funds too.



For the time being, I've given up on creating my own channels (for small amounts).

I'm not looking for just simple exchanges, I'm looking for a way to perform these submarine swaps so that I can have inbound liquidity.
I already have BlueWallet on my phone. But the thing here is that I have funds in an address in my Lightning node and I want to use those funds to open a channel to get inbound liquidity.

Minning Revolution - É possível, caralhoooo....
Lightning Node URI: 03fef777d58a529df02a3fb267690e0c9033767b555cc1c63844bb2d3498789f91@isvcxqviqbhrzpzpcmeh6u5ve42pvcjdukckec4mhdcwhnkff6qexdqd.onion:9735
Myleschetty
Member
**
Offline Offline

Activity: 143
Merit: 14

Sovryn - Brings DeFi to Bitcoin


View Profile
January 10, 2021, 07:38:32 PM
 #4

What other services/sites I can try?
I'm not sure about submarine swaps, but a simple exchange is possible in many ways. FixedFloat.com or CoinPlaza.it offer LN-exchanges, and for small amounts an altcoin is probably cheapest (in transaction fees). Alternatively, you can use a casino such as Lightning-Roulette.com or BC.Game to temporarily send some LN-funds to create inbound capacity, or buy something at Bitrefill.com.
I can even exchange it myself if you're okay with a very low fee on-chain transaction.
More alternatives: You can use Phoenix Wallet or BlueWallet (custodial LN) to send some funds too.



For the time being, I've given up on creating my own channels (for small amounts).

I'm not looking for just simple exchanges, I'm looking for a way to perform these submarine swaps so that I can have inbound liquidity.
I already have BlueWallet on my phone. But the thing here is that I have funds in an address in my Lightning node and I want to use those funds to open a channel to get inbound liquidity.
Redshift is the best option for submarine swap and I dont know why you are looking for another site but I once read that the lightning labs released Loop last year which is already integrated by some crypto exchange site but if thats not what you are looking. Have you try out https://submarineswaps.org/?


Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1218
Merit: 1766


Write @Rath or quote my post to notify me


View Profile WWW
January 10, 2021, 08:07:13 PM
 #5

Redshift is the best option for submarine swap and I dont know why you are looking for another site but I once read that the lightning labs released Loop last year which is already integrated by some crypto exchange site but if thats not what you are looking. Have you try out https://submarineswaps.org/?

RedShift and https://submarineswaps.org/ support only a BTC -> LN swap. OP actually needs to perform a reverse submarine swap (LN -> BTC) in order to get incoming liquidity. I have been in touch with OP since yesterday and we are still looking looking for a decent platform to perform the swap. Earlier today, we found ZigZag which looked promising, but they could accept only ~0.0005 BTC via the Lightning Network. It looks like the maximum deposit has changed to 0.04 BTC, so we might give it a go in a moment.

Myleschetty
Member
**
Offline Offline

Activity: 143
Merit: 14

Sovryn - Brings DeFi to Bitcoin


View Profile
January 10, 2021, 08:46:07 PM
 #6

Redshift is the best option for submarine swap and I dont know why you are looking for another site but I once read that the lightning labs released Loop last year which is already integrated by some crypto exchange site but if thats not what you are looking. Have you try out https://submarineswaps.org/?

RedShift and https://submarineswaps.org/ support only a BTC -> LN swap. OP actually needs to perform a reverse submarine swap (LN -> BTC) in order to get incoming liquidity. I have been in touch with OP since yesterday and we are still looking looking for a decent platform to perform the swap. Earlier today, we found ZigZag which looked promising, but they could accept only ~0.0005 BTC via the Lightning Network. It looks like the maximum deposit has changed to 0.04 BTC, so we might give it a go in a moment.
Thats good to know but what about the lightning loop create by the lightning labs as a ease way to manage inbound and outbound liquidity on the lightning network https://lightning.engineering/loop/? It could be a substitute

DireWolfM14
Legendary
*
Offline Offline

Activity: 1036
Merit: 2117


Join the world-leading crypto sportsbook NOW!


View Profile
January 10, 2021, 11:21:46 PM
Last edit: January 10, 2021, 11:48:03 PM by DireWolfM14
 #7

You could go the round-about way and use Electrum.  If you were to open a channel in Electrum with incoming capacity, you can create an invoice for your node channel.  Electrum allows reverse submarine swaps, and it's pretty straight forward to use.  Of course you'll need to open a channel in Electrum with slightly more bitcoin to allow for the amount you need send from your node, then use it's swap feature to return the coins to on-chain.

The advantage is you're doing it all yourself without having to trust any other service.

  ▄▄█████▄▄███████▄▄
 ███████████
     ▀▀███▄
█████████████        ▀██▄
█████████████          ██▄
███████████            ██▄
██▀▀█████▀▀              ██
██                       ██
██                       ██
▀██                     ██▀
 ▀██                   ██▀
  ▀██▄               ▄██▀
    ▀███▄▄       ▄▄███▀
       ▀▀█████████▀▀
███████████    LEADING CRYPTO SPORTSBOOK & CASINO    ███████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
..PLAY NOW!..
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1218
Merit: 1766


Write @Rath or quote my post to notify me


View Profile WWW
January 10, 2021, 11:39:40 PM
 #8

Thats good to know but what about the lightning loop create by the lightning labs as a ease way to manage inbound and outbound liquidity on the lightning network https://lightning.engineering/loop/? It could be a substitute

Loop works only with LND while OP is using c-lightning, so it is out of the question for now. However, their Lightning Terminal looks really convenient to use.

If you were to create a channel in Electrum with incoming capacity, you can create an invoice for your node channel.

How would you create such a channel?

The advantage is you're doing it all yourself without having to trust any other service.

A proper submarine swap should make use of HTLCs to perform itself trustlessly. Redshift and ZigZag seem to use them properly. Electrum uses boltz-backend which is developed and also used by Boltz

DireWolfM14
Legendary
*
Offline Offline

Activity: 1036
Merit: 2117


Join the world-leading crypto sportsbook NOW!


View Profile
January 10, 2021, 11:47:47 PM
Last edit: January 10, 2021, 11:57:49 PM by DireWolfM14
 #9

If you were to create a channel in Electrum with incoming capacity, you can create an invoice for your node channel.
How would you create such a channel?

*open.  Grin


The advantage is you're doing it all yourself without having to trust any other service.
A proper submarine swap should make use of HTLCs to perform itself trustlessly. Redshift and ZigZag seem to use them properly. Electrum uses boltz-backend which is developed and also used by Boltz


Yes, of course.  My point was that the Boltz backend has implanted HTLCs properly and it's use is trustless.  It seems like better alternative than searching the internet for some random site that does reverse submarine swaps, or claims to.  And would be an acceptable workaround for the OP.  

  ▄▄█████▄▄███████▄▄
 ███████████
     ▀▀███▄
█████████████        ▀██▄
█████████████          ██▄
███████████            ██▄
██▀▀█████▀▀              ██
██                       ██
██                       ██
▀██                     ██▀
 ▀██                   ██▀
  ▀██▄               ▄██▀
    ▀███▄▄       ▄▄███▀
       ▀▀█████████▀▀
███████████    LEADING CRYPTO SPORTSBOOK & CASINO    ███████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
..PLAY NOW!..
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1218
Merit: 1766


Write @Rath or quote my post to notify me


View Profile WWW
January 10, 2021, 11:57:57 PM
 #10

*open.  Grin

Oh, my intention was not to nitpick. I think that I also use "open" and "create" interchangeably in this context. How would you open a channel with incoming capacity? I think there is no other way than performing a reverse submarine swap, pushing the funds to the other side (possible in other implementations) or simply spending some of the coins after the channel has been opened.

DireWolfM14
Legendary
*
Offline Offline

Activity: 1036
Merit: 2117


Join the world-leading crypto sportsbook NOW!


View Profile
January 11, 2021, 12:10:02 AM
Merited by ETFbitcoin (2), Rath_ (2)
 #11

I just did this a few minutes ago in Testnet:

I already had an open channel, I just checked the details, and incoming capacity is zero:



Back on the channels tab, I clicked the "Swap" button in the upper right:



In the swap dialog I clicked on the "Max" button:



I watched as the transaction populated my history (just for the fees,) then checked my channel again.  Incoming capacity is at max:


  ▄▄█████▄▄███████▄▄
 ███████████
     ▀▀███▄
█████████████        ▀██▄
█████████████          ██▄
███████████            ██▄
██▀▀█████▀▀              ██
██                       ██
██                       ██
▀██                     ██▀
 ▀██                   ██▀
  ▀██▄               ▄██▀
    ▀███▄▄       ▄▄███▀
       ▀▀█████████▀▀
███████████    LEADING CRYPTO SPORTSBOOK & CASINO    ███████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
..PLAY NOW!..
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1218
Merit: 1766


Write @Rath or quote my post to notify me


View Profile WWW
January 11, 2021, 12:27:36 AM
 #12

I just did this a few minutes ago in Testnet: [...]

I see. I completely misunderstood you. I thought that you were trying to say that it was possible to open a channel with incoming liquidity without any extra steps. Still, it's not as cost-effective as using any of the services mentioned beforehand. You need to pay extra for the channel opening transaction fee. The fees are extremely high right now, so I guess it's not a good idea for now.

DireWolfM14
Legendary
*
Offline Offline

Activity: 1036
Merit: 2117


Join the world-leading crypto sportsbook NOW!


View Profile
January 11, 2021, 12:46:56 AM
 #13

I completely misunderstood you. I thought that you were trying to say that it was possible to open a channel with incoming liquidity without any extra steps.

That makes sense now, sorry for the confusion.

  ▄▄█████▄▄███████▄▄
 ███████████
     ▀▀███▄
█████████████        ▀██▄
█████████████          ██▄
███████████            ██▄
██▀▀█████▀▀              ██
██                       ██
██                       ██
▀██                     ██▀
 ▀██                   ██▀
  ▀██▄               ▄██▀
    ▀███▄▄       ▄▄███▀
       ▀▀█████████▀▀
███████████    LEADING CRYPTO SPORTSBOOK & CASINO    ███████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
..PLAY NOW!..
darkv0rt3x
Member
**
Offline Offline

Activity: 196
Merit: 78

What is this?


View Profile
January 11, 2021, 12:14:32 PM
 #14

Hello.

I just caught up with the conversation.
Yesterday I installed Electrum Wallet and opened a new wallet compatible with Lightning Network (I opened one other wallet that was not compatible). But it's on the mainnet.

However I want to do this on my c-lightning node.
I'm not very comfortable yet with the concept of submarine swaps because I couldn't still follow all the steps that it performs until the goal is complete, but I'm sure that after doing this for at least one time, I'll be able to understand it.

So, this said, I'm waiting for @_Rath to become available to guide me trough the process. I really don't want to mess things up because I'll be using the biggest amount ever of BTC in this process. It's not that much for most people but it is for me!

Minning Revolution - É possível, caralhoooo....
Lightning Node URI: 03fef777d58a529df02a3fb267690e0c9033767b555cc1c63844bb2d3498789f91@isvcxqviqbhrzpzpcmeh6u5ve42pvcjdukckec4mhdcwhnkff6qexdqd.onion:9735
Myleschetty
Member
**
Offline Offline

Activity: 143
Merit: 14

Sovryn - Brings DeFi to Bitcoin


View Profile
January 11, 2021, 04:53:30 PM
Merited by Rath_ (1)
 #15

Thats good to know but what about the lightning loop create by the lightning labs as a ease way to manage inbound and outbound liquidity on the lightning network https://lightning.engineering/loop/? It could be a substitute
Loop works only with LND while OP is using c-lightning, so it is out of the question for now. However, their Lightning Terminal looks really convenient to use.
Oh. I see and what do you suggest will be the perfect solution to the OP problem cause I really want to know and it will also help alot of people in future.

Hello.

I just caught up with the conversation.
Yesterday I installed Electrum Wallet and opened a new wallet compatible with Lightning Network (I opened one other wallet that was not compatible). But it's on the mainnet.

However I want to do this on my c-lightning node.
I'm not very comfortable yet with the concept of submarine swaps because I couldn't still follow all the steps that it performs until the goal is complete, but I'm sure that after doing this for at least one time, I'll be able to understand it.

So, this said, I'm waiting for @_Rath to become available to guide me trough the process. I really don't want to mess things up because I'll be using the biggest amount ever of BTC in this process. It's not that much for most people but it is for me!
Even with the mastery of Rath, I think using big amount of BTC for the process when you are not comfortable with submarine swap concept is not a good suggestion and it will be good if you try it out with few coin first.

Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1218
Merit: 1766


Write @Rath or quote my post to notify me


View Profile WWW
January 11, 2021, 05:16:57 PM
Merited by darkv0rt3x (1)
 #16

Oh. I see and what do you suggest will be the perfect solution to the OP problem cause I really want to know and it will also help alot of people in future.

In the end, we have decided to use Boltz instead of ZigZag. Before performing the swap, OP will open a direct channel to Boltz's node, which seems to be fairly well-connected. The transaction fees are extremely high right now, so OP has decided to wait a few days before he opens that channel. Any suggestions are welcome!

Even with the mastery of Rath, I think using big amount of BTC for the process when you are not comfortable with submarine swap concept is not a good suggestion and it will be good if you try it out with few coin first.

That's a good idea! We have already tried sending a few thousand satoshis to ZigZag twice, but both payments have failed due to routing problems. We will see if it works for Boltz.

darkv0rt3x
Member
**
Offline Offline

Activity: 196
Merit: 78

What is this?


View Profile
January 11, 2021, 07:26:59 PM
Merited by Rath_ (1)
 #17


.....

That's a good idea! We have already tried sending a few thousand satoshis to ZigZag twice, but both payments have failed due to routing problems. We will see if it works for Boltz.

@Rath_ allow me to correct a small detail.
Actually, the attempts I did with a few thousands sats were from my node to my BlueWallet on my phone. I could do a few transactions in the past to and from my BlueWallet to and from my node.
I can't be precise right now, but back then, I think someone opened a channel to me of 600k sats. Not sure if all those small transactions back then were made with that channel or not.

Anyways, yes, I'm waiting on the fees to get lower. I already have the command prepared to open the channel. Then, it's just wait for the confirmations and perform the RSS (rev submarine swap).

Minning Revolution - É possível, caralhoooo....
Lightning Node URI: 03fef777d58a529df02a3fb267690e0c9033767b555cc1c63844bb2d3498789f91@isvcxqviqbhrzpzpcmeh6u5ve42pvcjdukckec4mhdcwhnkff6qexdqd.onion:9735
darkv0rt3x
Member
**
Offline Offline

Activity: 196
Merit: 78

What is this?


View Profile
January 16, 2021, 12:15:10 AM
Last edit: January 16, 2021, 10:40:08 AM by darkv0rt3x
 #18

An update to this post.

After digging a bit more around about reverse submarine swaps and after a lot of patience from @Rath_ in helping me understanding at a high level what is going under the hood in a reverse submarine swap, I came up with a small illustration that I hope it help others to understand (also at a high level, meaning in a less technical way), how a reverse submarine swap works and how you create incoming capacity with this feature/service.

Here it is. I'm obviously open to improvements to this illustration and other comments/critics.

 

*****************************************************************************************************************************************************************************************


Minning Revolution - É possível, caralhoooo....
Lightning Node URI: 03fef777d58a529df02a3fb267690e0c9033767b555cc1c63844bb2d3498789f91@isvcxqviqbhrzpzpcmeh6u5ve42pvcjdukckec4mhdcwhnkff6qexdqd.onion:9735
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!