Open steepdawn974 opened 2 years ago
I completely agree, I also noticed there's pretty big friction with sideshift... Full disclosure I also chucked my referral link in there ($0.16 to date) to get something back from this large fee.
However I would like to avoid doing two swaps if possible. I'm even thinking of coding my own LN-BTC -> L-BTC atomic swap service (haven't researched much). I would've hoped boltz.ai would support this currency conversion, among other swap providers. Maybe it isn't a popular pair yet :/
Still open to doing this in the mean time, but would make things a bit more complex doing a swap with bitcoind RPC, wait for confirmation then do another swap. Also we don't have any access to a liquid wallets/node and make that swap transaction. At the moment we're only sending to liquid addresses. Probably will not extend to full liquid support until people desire to receive payments on that network.
How about supporting multiple swap options and then at the moment of payment code automatically uses cheapest one that works at that moment?
Also probably there will be some alternative hedging options without swapping to USDT using derivatives in future, see https://twitter.com/LNMarkets/status/1473017215620370441.
TIL there is another service that could be used for swaps - https://fixedfloat.com/, they also have some API. Unfortunatelly, no Liquid Network support currently.
Here's some concept of trustless and noncustodial LN <-> stablecoin swaps. https://twitter.com/jokoono/status/1501213103714971666
Also probably there will be some alternative hedging options without swapping to USDT using derivatives in future, see https://twitter.com/LNMarkets/status/1473017215620370441.
And they implemented this. Here instead of selling LN BTC for USDT, you can instead deposit to @LNMarkets and then immediately convert BTC in your account to "synthetic USD", which basically is 1x leveraged BTCUSD futures short position that hedges BTC volatility vs USD. API docs - https://docs.lnmarkets.com/api/v1/#tag/Swap.
For context - https://twitter.com/LNMarkets/status/1595748989990830080.
Here's some LNBits extension (in Python!) providing synthetic stablecoins, using derivatives - https://github.com/lnbits/stable-wallets. Haven't studied it in details yet, but maybe could be something useful.
== This is a PROPOSAL. Happy to discuss ==
Situation
Currently, Weakhands mode allows to immediatly swap incoming BTC payments to L-USDT using Sideshift.ai. Swaps on Sideshift are relatively expensive, roughly 1.5% from what I can gather. They removed the Fee section from the FAQ and probably cover everything from via spreads.
Proposal
SideSwap.io is a better alternative, and currently the cheapest way on the market. Drawback: does not support Lightning payments
From their TG chat:
We're focused on adoption and removing barriers to use liquid. To help pay our bills, we charge a 0.1% fee on any pegin or pegout. If you swap through our instant swap, we have a 0.6-0.7% spread (from which we pay 0.2% to hedge, so profits are just below 0.5%). Swap and token market orders have a 0.1% fee.
Howto
To swap on-chain BTC to L-BTC via SideSwap, two steps would be necessary
order
is sufficient or would only place you in the order book.