Author

Topic: Idea: using Atomic Swaps to make Bitcoin invoices less prone to volatility (Read 366 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
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)
legendary
Activity: 3122
Merit: 2178
Playgram - The Telegram Casino
  • Customer pays the amount of BTC and the transaction will undergo an Atomic Swap to convert the BTC into a decentralized stablecoin

Better Wink


I'm not talking about the regular-pleb-trader with hundreds or thousands in trading capital. I'm talking about the whale-cumulators that trade/risk millions. I believe it's safer to hold USDT in your wallet, than holding USD in an exchange that can be hacked anytime, and without warning.

I see we have a misunderstanding as I'm not talking about traders at all Cheesy For those indeed USDT may be the better option, even though I personally would not entrust USDT with larger sums, even when holding it in my own wallet.

I mentioned trading as a possible upside of exchanging to stablecoins rather than fiat. Apart from that I mostly had merchants trying to avoid volatility in mind. For those cash in the bank is presumably more interesting than trading capital in a crypto-wallet.

legendary
Activity: 2898
Merit: 1823
[...] 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.


I'm not talking about the regular-pleb-trader with hundreds or thousands in trading capital. I'm talking about the whale-cumulators that trade/risk millions. I believe it's safer to hold USDT in your wallet, than holding USD in an exchange that can be hacked anytime, and without warning.
legendary
Activity: 1134
Merit: 1599
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.
legendary
Activity: 3122
Merit: 2178
Playgram - The Telegram Casino
[...] 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.
legendary
Activity: 2898
Merit: 1823
[...] 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.
legendary
Activity: 3122
Merit: 2178
Playgram - The Telegram Casino
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.
legendary
Activity: 3472
Merit: 10611
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.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
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.
legendary
Activity: 3122
Merit: 2178
Playgram - The Telegram Casino
[...] 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).
member
Activity: 421
Merit: 97
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.
legendary
Activity: 2898
Merit: 1823
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.
legendary
Activity: 3122
Merit: 2178
Playgram - The Telegram Casino
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://bitcointalksearch.org/topic/list-list-of-decentralized-stablecoins-3421190

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.
legendary
Activity: 1456
Merit: 1176
Always remember the cause!
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.
legendary
Activity: 3122
Merit: 2178
Playgram - The Telegram Casino
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.
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
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.
legendary
Activity: 1456
Merit: 1176
Always remember the cause!
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.
mda
member
Activity: 144
Merit: 13
There is another idea to use atomic swaps to erase volatility:

https://bitcointalksearch.org/topic/sharding-strategy-held-together-by-atomic-swaps-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.
staff
Activity: 4284
Merit: 8808
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.)
legendary
Activity: 1134
Merit: 1599
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
Jump to: