Bitcoin Forum
May 28, 2022, 04:11:07 PM *
News: Latest Bitcoin Core release: 23.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Idea: using Atomic Swaps to make Bitcoin invoices less prone to volatility  (Read 333 times)
20kevin20
Legendary
*
Offline Offline

Activity: 1078
Merit: 1475


Powerful promotion strategy https://bit.ly/3cRVjFi


View Profile
March 07, 2020, 08:41:02 PM
Merited by bones261 (4), ETFbitcoin (1), dkbit98 (1), Heisenberg_Hunter (1)
 #1

I keep wondering how Atomic Swaps could be used for the better of Bitcoin. A while ago I had the idea of using Atomic Swaps to anonymize your coins - which seems to be both a bad and a good idea at the same time according to the replies.

Now I have another idea. What if we could use Atomic Swaps in order to minimize the volatility of Bitcoin for invoices? A decentralized mechanism could be developed.

How does it work?
Let's say Bitcoin is worth $10k. A customer places an order worth $100 on a website and wants to pay with BTC. Upon placing the order, the customer has 90 seconds to send the 0.01BTC to the generated address with a minimum sat/byte requirement. The BTC will then instantly undergo an Atomic Swap from 0.01BTC to 100TUSD and in the end, when the txs all confirm and everything goes well, the business receives a total of 100TUSD in their wallet while the customer will also receive their ordered products.

What happens if there is no offer available to swap 100TUSD with 0.01BTC?[/b]
I'm thinking of two scenarios:
  1. There could be a main accepted stablecoin and multiple other stablecoins to be used for the swap in case there are no offers. If there is no 0.01BTC <-> 100TUSD offer, then the mechanism will go for a 0.01BTC <-> 100USDT swap. If this one does not work either, then go for the third option and so on until an offer is found.
  2. There could be a 5-10 minute to wait for the offer to be accepted while the customer also has a chance to "Cancel transaction". If the transaction is canceled before a Swap is initiated, then the customer receives their BTC back minus the fees.

What if there is no exact rate (100TUSD <-> 0.01BTC) offer available?
If there is no exact rate offered, then the mechanism will look for and accept any close rate. Upon setting up the system, the seller has the option to set which is the minimum accepted rate difference with 1% being the minimum as a requirement. If a seller wants to accept a difference of 3% rate (which could mean receiving between a maximum of 103 and a minimum of 97TUSD through the swap), that is their choice.

What happens if the Atomic Swap doesn't work?
I have had instances in my Komodo DEX's sessions in which the Atomic Swaps just didn't work. My BTC went through but the other peer did not have their tx confirmed in time. If that happens, the customer will get back the sum of BTC they sent as a refund and the order will not be processed by the website.

Now what I'm wondering is if such decentralized mechanism could be developed within websites or there needs to be a separate software to do all the work. Please remember I am not a developer and this is just an idea. It could be good or it could be shit. But maybe there is a developer out there who could take this idea and turn it into a reality. In that case, Bitcoin could be safely used by any business without having to worry about using a third party that converts your BTC into USD automatically or having to accept BTC and risking a big loss due to volatility. This mechanism could be developed as both a decentralized payment gate for a business and an easy BTC to USD (and vice versa) swap for anyone who wants to do it. The more it's used, the higher the chances are for orders to find an offer.

Any critics are apreciated. Smiley
1653754267
Hero Member
*
Offline Offline

Posts: 1653754267

View Profile Personal Message (Offline)

Ignore
1653754267
Reply with quote  #2

1653754267
Report to moderator
1653754267
Hero Member
*
Offline Offline

Posts: 1653754267

View Profile Personal Message (Offline)

Ignore
1653754267
Reply with quote  #2

1653754267
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 3668
Merit: 6171



View Profile
March 07, 2020, 10:25:33 PM
Merited by ETFbitcoin (1)
 #2

Cross-currency atomic swaps have problems with volatility: abusers can treat them as call options on the exchange rate by setting one up but backing out if the exchange rate doesn't move favourably in their direction.  (The same problem exists for lightning payments that cross currencies.)
mda
Member
**
Offline Offline

Activity: 144
Merit: 13


View Profile
March 08, 2020, 02:13:31 AM
Merited by aliashraf (1)
 #3

There is another idea to use atomic swaps to erase volatility:

https://bitcointalk.org/index.php?topic=5109561.

With few thousand shards bitcoin price rises to one million and twenty trillion market will be much harder to move than the current one.
aliashraf
Legendary
*
Offline Offline

Activity: 1400
Merit: 1074

Always remember the cause!


View Profile WWW
March 08, 2020, 06:03:34 AM
Last edit: March 08, 2020, 06:52:57 AM by aliashraf
 #4

With few thousand shards bitcoin price rises to one million and twenty trillion market will be much harder to move than the current one.

Good point: The ultimate solution to volatility is having bitcoin price and the market cap orders of magnitude higher and it is not achievable without basic improvement to performance, decentralization and security, all 3 at the same time.

The bad news is about a bunch of genius out there telling us: "It is impossible, it is 'Trilemma', it is 'Trisector', blah, blah" in cryptocurrency, people feel 'genius' too much, it is a contagious disease, take care  Wink

Anyway, in the thread, using Atomic Swap for moving coins intra-shard has been questioned basically.  I've proposed an alternative approach there which makes such transactions almost unnecessary.
ETFbitcoin
Legendary
*
Offline Offline

Activity: 2240
Merit: 4371


100% Deposit Match UP TO €5000!


View Profile
March 08, 2020, 06:51:24 AM
Merited by pooya87 (1)
 #5

So the idea is swapping Bitcoin with certain stablecoin? It's not bad idea, but it switching the trusted party from centralized exchange/payment processor (which convert BTC to USD automatically) to company/group which issue the stablecoin.

And Tether which used as example have shady reputation.

HeRetiK
Legendary
*
Offline Offline

Activity: 2212
Merit: 1749


the forkings will continue until morale improves


View Profile
March 08, 2020, 07:06:47 PM
 #6

Unless there's a decentralized stablecoin being swapped I have to agree with ETFbitcoin that this seems like you'd merely swap a centralized payment processor for a centralized stablecoin issuer. Even so I think it would be an interesting addition to our ecosystem. Whether there'd be a large enough market for those swaps to work reliably is a different question though.

ETFbitcoin
Legendary
*
Offline Offline

Activity: 2240
Merit: 4371


100% Deposit Match UP TO €5000!


View Profile
March 09, 2020, 04:00:18 AM
 #7

Unless there's a decentralized stablecoin being swapped I have to agree with ETFbitcoin that this seems like you'd merely swap a centralized payment processor for a centralized stablecoin issuer. Even so I think it would be an interesting addition to our ecosystem. Whether there'd be a large enough market for those swaps to work reliably is a different question though.

Decentralized stable coin already exist (such as Dai on ETH network), but it's less stable than other stablecoin and it's quite complicated.

Still, few person prefer hold/own stablecoin rather than fiat.

aliashraf
Legendary
*
Offline Offline

Activity: 1400
Merit: 1074

Always remember the cause!


View Profile WWW
March 09, 2020, 12:05:31 PM
 #8

Unless there's a decentralized stablecoin being swapped I have to agree with ETFbitcoin that this seems like you'd merely swap a centralized payment processor for a centralized stablecoin issuer. Even so I think it would be an interesting addition to our ecosystem. Whether there'd be a large enough market for those swaps to work reliably is a different question though.

Decentralized stable coin already exist (such as Dai on ETH network), but it's less stable than other stablecoin and it's quite complicated.

Still, few person prefer hold/own stablecoin rather than fiat.
Dai is not that much complicated and it is stable enough. I think Dai is more suffering from its scaling shortcomings because not every Eth holder is ok with putting like 33% more deposit in collateral, once they go short on Eth or btc, they mostly wanna go short completely rather than keeping a part of it in collateral and taking the risks. This is the problem behind Dai idea: the user and the arbitrageur are the same.
HeRetiK
Legendary
*
Offline Offline

Activity: 2212
Merit: 1749


the forkings will continue until morale improves


View Profile
March 09, 2020, 02:54:09 PM
 #9

Unless there's a decentralized stablecoin being swapped I have to agree with ETFbitcoin that this seems like you'd merely swap a centralized payment processor for a centralized stablecoin issuer. Even so I think it would be an interesting addition to our ecosystem. Whether there'd be a large enough market for those swaps to work reliably is a different question though.

Decentralized stable coin already exist (such as Dai on ETH network), but it's less stable than other stablecoin and it's quite complicated.

Still, few person prefer hold/own stablecoin rather than fiat.

There's a bunch of decentralized stablecoins, it's just that none of them appear to be fully reliable:
https://bitcointalk.org/index.php?topic=3421190.0

Honestly I think that's the main issue at heart here -- the challenge of creating a reliable, decentralized stablecoin. The irony being once we'd solve that issue, we wouldn't need hedged Bitcoin invoices as described by OP to begin with. We'd just use the stablecoin itself.

Wind_FURY
Legendary
*
Offline Offline

Activity: 2198
Merit: 1371



View Profile
March 11, 2020, 05:48:48 AM
 #10

Cross-currency atomic swaps have problems with volatility: abusers can treat them as call options on the exchange rate by setting one up but backing out if the exchange rate doesn't move favourably in their direction.  (The same problem exists for lightning payments that cross currencies.)


Plus OP's solution is good for convenience, and as a trust-minimized method for currency conversion, but for volatility reduction, I believe it's more a topic of market-liquidity than supplying a technical solution.

.
..........
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████
█████████████░░██████████████████████████░░███████████████████
███████████████░░██████████████████████████░░█████████████████
█████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███████████████
█████████████████░░░░░░░░░░██░░██░░░░░░░░░░██░░███████████████
███████████████████░░░░░░██░░██████░░░░░░██░░█████████████████
█████████████████████░░░░░░██████████░░░░░░███████████████████
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
.....I AM BLACKJACK.FUN.....
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████
█████████████░░██████████████████████████░░███████████████████
███████████████░░██████████████████████████░░█████████████████
█████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███████████████
█████████████████░░░░░░░░░░██░░██░░░░░░░░░░██░░███████████████
███████████████████░░░░░░██░░██████░░░░░░██░░█████████████████
█████████████████████░░░░░░██████████░░░░░░███████████████████
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
..........
CristianOff
Member
**
Offline Offline

Activity: 422
Merit: 97


View Profile
March 13, 2020, 06:48:26 PM
 #11

Yes, this sounds great however

I am shocked by how many people didn't know or don't know about the existence of such system. Merchants are already using it, only
that it's not popular.


It's called autosettlement. When you received a payment on your product using the crypto gateway or whatever coding logic you want to apply,
the BTC/crypto is sent directly to an exchange such as Binance/Coinbase and INSTANTLY converted into a stable coin. This thing exists and it's
everywhere.

You want to decentralize (the new addition) it but you did not say how.
HeRetiK
Legendary
*
Offline Offline

Activity: 2212
Merit: 1749


the forkings will continue until morale improves


View Profile
March 14, 2020, 08:38:36 AM
 #12

[...] This thing exists and it's everywhere.

In my opinion there's little difference between using an exchange to automatically convert to a stablecoin and using a payment provider like BitPay to convert to fiat.

Both requires trusting a third party and contains counterparty risk. Converting to a stablecoin seems more like an unnecessary extra step at this point (unless you then want to convert from the stablecoin to another digital asset of your choice).

NotATether
Legendary
*
Offline Offline

Activity: 882
Merit: 2944


Resist all tyrants!


View Profile WWW
March 14, 2020, 10:43:54 AM
 #13

It's called autosettlement. When you received a payment on your product using the crypto gateway or whatever coding logic you want to apply,
the BTC/crypto is sent directly to an exchange such as Binance/Coinbase and INSTANTLY converted into a stable coin. This thing exists and it's
everywhere.

I don't understand. Bitcoin.it doesn't have an entry for autosettlement, and a google search shows that what you're describing needs a centralized broker between the buyer and seller, which is already how its done. The problem is, this isn't instantaneous because the broker still has to send the payment to the seller which takes an arbitrary amount of time.

What OP is proposing requires someone to have a large stash of TUSD because two parties are trading BTC for TUSD anyway. So I'm not sure how this is going to work in practice because the seller needs to have a reserve of TUSD, and USD-backed stablecoins don't have an SPV wallet or full nodes for them, which will make the transaction, buyer and seller rely on an exchange that carries stablecoins, and could even exclude buyers and sellers who can't complete AML/KYC verification on the exchange.

Now what I'm wondering is if such decentralized mechanism could be developed within websites or there needs to be a separate software to do all the work.

This looks more like something that will need a centralized exchange in order to work.

pooya87
Legendary
*
Offline Offline

Activity: 2730
Merit: 6704


New year, New century, New bitcoin plans


View Profile
March 14, 2020, 10:49:38 AM
 #14

In my opinion there's little difference between using an exchange to automatically convert to a stablecoin and using a payment provider like BitPay to convert to fiat.

actually there is a huge difference.
fiat is trusted, it is secure and its value is relatively stable, you can use fiat anywhere you want since it is accepted everywhere without needing any sort of conversion.
meanwhile altcoins are not-trusted, have high risk and in some cases those that are supposed to be "stable" are not so stable. you still have to exchange the altcoin with fiat to be able to use it which also includes a % exchange fee.

HeRetiK
Legendary
*
Offline Offline

Activity: 2212
Merit: 1749


the forkings will continue until morale improves


View Profile
March 14, 2020, 11:47:27 AM
 #15

actually there is a huge difference.
fiat is trusted, it is secure and its value is relatively stable, you can use fiat anywhere you want since it is accepted everywhere without needing any sort of conversion.
meanwhile altcoins are not-trusted, have high risk and in some cases those that are supposed to be "stable" are not so stable.

Good point, I guess what I meant to say is that this form of instant-conversion doesn't really have any upsides (unlike a decentralized approach, which may come with upsides that make the downsides worth it).


you still have to exchange the altcoin with fiat to be able to use it which also includes a % exchange fee.

Using a payment provider that automatically converts Bitcoin to fiat also comes with a fee, so without knowing details about respective fee structures I presume this cost ends up pretty much the same.

ETFbitcoin
Legendary
*
Offline Offline

Activity: 2240
Merit: 4371


100% Deposit Match UP TO €5000!


View Profile
March 14, 2020, 07:51:18 PM
 #16

It's called autosettlement. When you received a payment on your product using the crypto gateway or whatever coding logic you want to apply,
the BTC/crypto is sent directly to an exchange such as Binance/Coinbase and INSTANTLY converted into a stable coin. This thing exists and it's
everywhere.

I don't understand. Bitcoin.it doesn't have an entry for autosettlement, and a google search shows that what you're describing needs a centralized broker between the buyer and seller, which is already how its done. The problem is, this isn't instantaneous because the broker still has to send the payment to the seller which takes an arbitrary amount of time.

That's because he's talking about centralized broker or crypto payment processor which exchange BTC to fiat the moment transaction received.

Wind_FURY
Legendary
*
Offline Offline

Activity: 2198
Merit: 1371



View Profile
March 15, 2020, 08:41:15 AM
 #17

[...] This thing exists and it's everywhere.

In my opinion there's little difference between using an exchange to automatically convert to a stablecoin and using a payment provider like BitPay to convert to fiat.

Both requires trusting a third party and contains counterparty risk. Converting to a stablecoin seems more like an unnecessary extra step at this point (unless you then want to convert from the stablecoin to another digital asset of your choice).


But it might actually be a necessary extra-step if the trader is not comfortable holding his/her millions in an exchange.

.
..........
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████
█████████████░░██████████████████████████░░███████████████████
███████████████░░██████████████████████████░░█████████████████
█████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███████████████
█████████████████░░░░░░░░░░██░░██░░░░░░░░░░██░░███████████████
███████████████████░░░░░░██░░██████░░░░░░██░░█████████████████
█████████████████████░░░░░░██████████░░░░░░███████████████████
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
.....I AM BLACKJACK.FUN.....
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████
█████████████░░██████████████████████████░░███████████████████
███████████████░░██████████████████████████░░█████████████████
█████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███████████████
█████████████████░░░░░░░░░░██░░██░░░░░░░░░░██░░███████████████
███████████████████░░░░░░██░░██████░░░░░░██░░█████████████████
█████████████████████░░░░░░██████████░░░░░░███████████████████
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
..........
HeRetiK
Legendary
*
Offline Offline

Activity: 2212
Merit: 1749


the forkings will continue until morale improves


View Profile
March 15, 2020, 10:29:57 AM
 #18

[...] This thing exists and it's everywhere.

In my opinion there's little difference between using an exchange to automatically convert to a stablecoin and using a payment provider like BitPay to convert to fiat.

Both requires trusting a third party and contains counterparty risk. Converting to a stablecoin seems more like an unnecessary extra step at this point (unless you then want to convert from the stablecoin to another digital asset of your choice).


But it might actually be a necessary extra-step if the trader is not comfortable holding his/her millions in an exchange.

Why would someone instantly converting their BTC to fiat leave their money in an exchange?

In both the fiat and the stablecoin case you have to funnel your money through a centralized exchange that could potentially deny your outgoing transaction. Main difference being that when using stablecoins you need to move those back to a centralized exchange once you decide to get some fiat, hence the extra step. Meanwhile you're exposed to counterparty risk by the stablecoin-issuing entitity.

My trust in banks and fiat currencies is limited (otherwise I wouldn't be here), but my trust in centrally issued stablecoins even moreso.

20kevin20
Legendary
*
Offline Offline

Activity: 1078
Merit: 1475


Powerful promotion strategy https://bit.ly/3cRVjFi


View Profile
March 15, 2020, 11:15:41 AM
 #19

Looks like one thing I haven't thought of is how will one business convert their earnings from a stablecoin to fiat without going through a centralized party.

What if the mechanism allows a chain of 2 consecutive transactions: BTC -> stablecoin -> fiat (the final tx working same way BisQ allows to convert BTC -> fiat through banks) so the business can, in the end, have real money sitting in their bank accounts?

In other words, the revised mechanism would work the following way:
  • Customer receives a BTC invoice that expires in a matter of minutes
  • Customer pays the amount of BTC and the transaction will undergo an Atomic Swap to convert the BTC into a decentralized stablecoin
  • If the Atomic Swap finishes successfully, the business owner now has the USD decentralized stablecoin in their account. Now the order is processed. If the Atomic Swap fails, the BTC amount minus the fees is returned to the customer
  • The amount of USD held in the stablecoin will be automatically placed on the order book so the business owner could receive real USD in their bank account through a p2p swap similar to what BisQ conducts

If you're wondering why there is the need of an intermediary currency (the stablecoin), it's to make sure the business owner will receive the exact USD amount of their invoice. For example, if the business owner wants to convert their money into real fiat, chances are there will be no offer to purchase stablecoins through banks. In that case, the stablecoins will sit in the business owner's account until an offer will be available.

Now I see a larger problem popping up which is: why would someone want to purchase a stablecoin with fiat? It sounds like I'm asking you to switch my dollar bills for yours, which makes no sense. The platform allowing this entire mechanism must also be popular enough to have an offer at any given time for business owners.
ETFbitcoin
Legendary
*
Offline Offline

Activity: 2240
Merit: 4371


100% Deposit Match UP TO €5000!


View Profile
March 15, 2020, 06:33:16 PM
 #20

What if the mechanism allows a chain of 2 consecutive transactions: BTC -> stablecoin -> fiat (the final tx working same way BisQ allows to convert BTC -> fiat through banks) so the business can, in the end, have real money sitting in their bank accounts?

I never use BisQ crypocurrency-to-fiat (and vice-versa), but AFAIK :
1. The process isn't fully automated
2. There's very strict limit to prevent scam attempt
3. Bisq volume isn't that big

You've done some of your research, but IMO it's not practical for today due to these points i mentioned above.

Now I see a larger problem popping up which is: why would someone want to purchase a stablecoin with fiat? It sounds like I'm asking you to switch my dollar bills for yours, which makes no sense. The platform allowing this entire mechanism must also be popular enough to have an offer at any given time for business owners.

Fiat and stablecoin have different usage,
1. Stablecoin is often used to buy cryptocurrency since it's easier, faster and cheaper (usually)  to deposit/withdraw compared with fiat where deposit/withdraw took days
2. If you only make few buy/sell cryptocurrency in long time, fiat is better option since you don't need to bother using stablecoin (e.g. looking wallet which support stablecoin, buy stablecoin and sell stablecoin)

Pages: [1] 2 »  All
  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!