Replies: 16 comments 16 replies
-
Idea: Use LTC for the transactional engine (i.e. the current trade protocol) and add an LTC <=> BTC atomic (or 1-tx) swap market. |
Beta Was this translation helpful? Give feedback.
-
Thinking about the simplest possible way to do off-chain, while still keeping the privacy and decentralization of Bisq:
The above would be private, simple, cheap... but it would be missing most important Bisq security features (security deposit, mediation, arbitration). We could think how to add security features outside the main protocol in a modular way. Importantly since these would be voluntary add-ons we could experiment with many different solutions without over-complicating the basic system. Some add-ons we could try: -Payment account age / account signing Of course users would be able to filter the order book based on their chosen security add-ons. Since all of these would be external to the main protocol and not required, the market could quickly experiment with many of them and eventually converge on the most useful ones, which would end up being the standard through voluntary adoption. This combination would be extremely flexible, fast and cheap. The Bisq client would be ultra-light and maybe fully mobile or web-based. It would basically just be a P2P messaging system and order book message board. Maintaining it would be trivial since most development would happen outside the main client. It would also allow for quick evolution if, for example, the Lightning Network's smart contract capabilities are expanded in the future. |
Beta Was this translation helpful? Give feedback.
-
I think that the current Mempool situation is just temporary and we'll have "normal" fees in 2-3 weeks but yeah, this is definitely a great possibility to start this discussion. The same as fee markets are the best phases to think about (off-chain) scaling solutions. Right now, there is nothing comparable to Bisq out there but as soon as the current trade protocol gets useless, there will be alternatives. Referring to Liquid and AMM, I just wanted to bring up a thought. Your doubts are justified but as you say, they are continously working on Liquid and as far as I know, the current way to convert L-BTC to BTC is not the final solution. I'd be happy if someone corrects me but I am quiet sure that there are plans to make this conversion more decentralised through your own node (or Bisq's nodes) - as you also move your BTC to Liquid. I think it can also make sense to bring up USDT on Liquid to discussion. Maybe it can be useful for an AMM solution too or maybe it can be used as a fast "FIAT alternative". BTC gets traded against USDT and not bank wires or Transferwise transactions. The only thing that really gets traded against FIAT is USDT on Liquid. Gonna share this thread around, maybe some brainy individuals will help out. |
Beta Was this translation helpful? Give feedback.
-
My hopes are still pinned on: Reduce trade protocol to 1 single transaction With Schorr/Taproot bringing down fee's more mid-term, and hopefully further improvement to LN long term. |
Beta Was this translation helpful? Give feedback.
-
Ruben Somsen has developed an protocol to reduce the 4 transactions (on both chains) for a atomic cross chain swap to 2 txs. |
Beta Was this translation helpful? Give feedback.
-
Been thinking about this approach ... it's "out there", but thinking it might actually work. Not sure Bisq platform discussion article is the right place for this, but here goes: Is it possible that when both the buyer's payment method (e..g, altcoin, CBDC, mobile money) is ultra low fee and essentially instant, and the seller's funds are Lighting network (also ultra-low fee and very close to being instant), that the role of the P2P platform can be reduced? Assuming the CBDC tx fee is very low, and nearly instantaneous, and the trade is for the seller's funds on Lightning network (which also has a very low tx fee), then there essentially could simply a ping pong back and forth to transfer small amounts of value each time until the full amount of the trade has completed. For instance, to do a trade of $100, both Seller and the Buyer each put up a security bond of $10 (using anything really, ... LTC with multisig, or whatever). Once both have put up a security bond: Step 1.) Buyer's P2P client app sends the first chunk (e.g., $10 payment on the CBDC network), along with a LN invoice for that amount. Once the entire trade amount (e.g., $100) has completed (e.g., 10 X $10 trades), then each party releases the other's security bond back (seller releases buyer's security bond first, then buyer releases seller's security bond next). If there's a dispute, the arbitration protocol can begin. Arbitration scenarios:
This lets the P2P platform be primarily a trade advertising mechanism, and maybe automation for paying the chunks, and repository with documented evidence (e.g., fiat payment address provided by seller, LN Invoice(s) provided by buyer, etc.) for potential disputes. The amount of P2P arbitration should be at a trivial level since there's such very little monetary gain from trying to scam. Of course, my chunk amount used for an example ($10) and total trade size ($100) are hypothetical. Maybe that's something indicated in the trade offer, so that something like a $2K trade would have terms of 4 chunks X $500 each, which might be acceptable when both parties have a great reputation/score/trust history. And even if there's no automation involved, this still could work. The wildcard for this is the unknown if CBDCs, altcoins, and various fiat payment methods truly end up with ultra low cost fees and are nearly instantaneous. But even something like USDt on Liquid as buyer's payment method (with 2 minute (?) confirmations), the $2K trade (described above, 4 chunks X $500 each) could be completed within 10 minutes, if both sides are responding promptly. |
Beta Was this translation helpful? Give feedback.
-
Stablecoins can be used, like RSK's Dollar On Chain (DOC) which is backed only by rBTC. Or even USDT. That would eliminate the future trading issue and reduce the need of collateral amounts significantly. I'm not confident that CBDC will be good for Bisq, or for humanity in general: it won't be private so it will be harder than it is now to trade freely without raising flags. The only hole find in that system would be that a foreign country doesn't mind what strangers do as long as they keep using their assets. For example, CNY Central Bank could look somewhere else while americans hold CNY assets as that reduces the power of USD CBDC. Still, CNY foreign and local holders would be at a click of being demonetized for any reason. I think that the priorities would be:
|
Beta Was this translation helpful? Give feedback.
-
You are of course welcome anytime to build on Bitcoin Cash (or the upcoming Smart Cash sidechain) as a base layer trade protocol for your DEX. The Bitcoin Cash community would, no doubt, welcome you and support you enthusiastically. |
Beta Was this translation helpful? Give feedback.
-
I think its not the question if we like it or not (and of course I also don't like it as its attached to much more surveillance power and control compared to cash or even banks), but to be able to deal with a reality which is very likely to happen, at least from the Chinese side (not so sure that EU/US will manage to deliver anything, hopefully not as those concepts sound much more dystopian). @flix1 |
Beta Was this translation helpful? Give feedback.
-
Using the Liquid sidechain seems like the obvious easy solution for now, especially since it's a fork of Bitcoin and relatively easy to implement support for it into the Bisq trade protocol compared to the other exotic ideas being considered. Since it uses Bitcoin as its native token, it doesn't have any exchange rate risk, and it features 1 minute block times, very very low fees, and confidential transactions, so it would seem to greatly improve the Bisq user experience. If your only concern about using Liquid is the federation, I'm on the governance board of Liquid and I will represent the interests of the Bisq community there. Obviously the Liquid guys don't want to censor anything because that would be the end of Liquid's reputation. |
Beta Was this translation helpful? Give feedback.
-
Sure it's not a real problem now, but its a big difference from moving from the most censorship resistent chain to a federated one where many members are US bases companies (even if not we know the extra-territorial jurisdictional power the US (ab)use to apply whatever they want). But I agree that from all the potential alternative base layers its likely the best. The only thing is that it would likely not enable AMM as the smart contract capabilities are basically those of Bitcoin. I have not looked closer into the AMM models how they work in detail and I am not 100% if the potential trade-offs they use are acceptable for Bisq. But on my todo list to get a better idea about that. |
Beta Was this translation helpful? Give feedback.
-
I had a closer look to the 1 tx concept. Here is my summary and conclusion: bisq-network/proposals#279 (comment) |
Beta Was this translation helpful? Give feedback.
-
Here is an idea for a new Bisq version supporting multiple protocols: bisq-network/proposals#330 |
Beta Was this translation helpful? Give feedback.
-
I looked into Thorchain: https://docs.thorchain.org It is a quite sophisticated project not using classical atomic cross chain swaps but converting one asset to RUNE (their asset) and then from RUNE to the target asset. Funds on the native chains are controlled by a large group of signers (24of36) who have to bond a high amount of RUNE (1M). Liquidity providers can add native assets and receive RUNE in return. Once they leave they return the RUNE, get paid fees and get back their asset as share of the pool. On a high level its a federated Shapeshift model, where the federation members control the funds and need to provide a bond for security. As they use their internal asset it comes with feedback and volatility risks (e.g. if RUNE crashes the security is lost and node operators can steal the assets and lose only the now worthless RUNE. In fact its in their economic interest to do that as if they keep their RUNE bond they risk that it has lost all value. Beside that running a node is only for highly skilled sys admins who are experienced with running server clusters. It also requires very high capital investment. This combined reduces the level of decentralization and I assume the dev team are running most of those nodes which is probably also their revenue model as they do not earn anything on fees (only node operators and liquidity providers earn fees). It would also make sense as all the security lies in the hand of those nodes, so they probably prefer to keep a super majority controlled by them (and thus reduce the risk in case RUNE price crashes). As nodes are anonymous they can hide from potential regulatory pressure. All in all no model what Bisq could take ideas from and the overall security is IMO fragile as well as I doubt there is a high level of decentralisation. Beside that the algrithm for determining the price comes with some costs (slippage) and price is only determined by arbitrage traders (bots) who take advantage of price imbalances to external exchanges. I doubt this is the most efficient price discovery method. Those arbitrage trader earn a good revenue as well. Reminds again on Shapeshift where beside fees the arbitrage from price diffs was likely a major revenue stream. |
Beta Was this translation helpful? Give feedback.
-
Here's a proposal for a simple, fast transition to an off-chain protocol: bisq-network/proposals#331 |
Beta Was this translation helpful? Give feedback.
-
Hi all, Disclaimer: I'm working at COMIT (https://github.com/comit-network/). I find it interesting that you propose Liquid as a possible infrastructure to power Bisq's trade protocol. And I'm generally a fan of Liquid, it's confidential transaction format and it's low transaction fees and multi-currency transactions. We started looking into Liquid quite some time ago and built a simple demo for a Dex on Liquid powered by a wallet as a browser extension [0]. But that's not not what I came here for :D I want to raise an additional point why I think Liquid could be the right choice. And that is transaction covenants. While unfortunately not yet possible on Bitcoin, on Liquid we can build pretty powerful covenant scripts using the opcodes A borrower can take up a Bitcoin collateralized loan and receive a stable coin such as L-USDT. While the setup of the loan transaction is collaborative, the payback or liquidation is fully unilateral. The script itself ensures that the loan terms are adhered to. I'm aware that lending/borrowing is not the core focus of Bisq, but I'm convinced that with transaction covenants we can build more powerful things. One topic which was mentioned above was AMM. We started looking into AMM pools just recently and we think we can encode the logic of the pool and enforce it using a script. Ideally we can build all of this on top of Bitcoin, so I also want to link to [4,5] which are efforts to get transaction covenants into Bitcoin itself. Cheers [0] https://github.com/comit-network/waves and https://twitter.com/comit_network/status/1374246354931707905?s=20 |
Beta Was this translation helpful? Give feedback.
-
Due the high miner fees the life time of the current trade protocol seems to meet its final stages. Beside that there are some new developments and trends which we should consider for a potential redesign of Bisq.
Finally the recent Bisq fork from some Monero community members
adds pressure to find a solution as in case their fork will end up in a successful project it might take away a big chunk of the XMR trade volume which accounts for about 80-90% of the revenue of Bisq. Such a reduction in volume could render Bisq unsustainable.EDIT: See #5429 (comment) why not valid anymore IMOI was researching for alterantive trade protocol ideas over the past weeks (and with less intensity over the past years).
Here is a rough preliminary summary of that journey.
Bisq's attempts for a new trade protocol
Off chain trade protocol
The core idea to separate asset transfer and security is still a goal. Though the original proposed idea how to achieve that by tracking reusable BSQ bonds is probably not feasible and the idea is dropped.
Reduce trade protocol to 1 single transaction
It seems the most feasible approach but does only win us some time and even 1 tx might be too much mid-term.
Off-chain trading using a lightning network of BTC & tainted BSQ
Very interesting and sophisticated approach from @stejbac to move the trade protocol to a custom LN.
New developments and trends
The role of CBDC vs. traditional Fiat
I assume traditional Fiat with banks as we know it today might not be much relevant anymore in the mid-term future.
Most countries are working on their CBDC projects and some like China have already rolled it out in large scale pilot projects and will likely reach mainstream adoption and maybe even international adoption rather soon [1]. They are pushing hard to use it for international trade and combine it with efficiency improvements and cost reduction for cross border trade and payments. It is based on a permissioned blockchain infrastructure with bridges to permissionless cryto currencies (currently 12 are supported [2]). They even target atomic swaps between their permissioned chain and the persmissionless ones.
From what I have read so far it looks like integrating with any not supported coin can be done as a chained swap (e.g. XMR -> ETH -> YUAN / YUAN -> ETH -> XMR). There might be some friction and gates (KYC) for the supported coins but so far such is not visible and hopefully be not become a majore hurdle. In short the Chinese model seems to be easy to get integrated in a DEX, excluding the last hop to the CBDC on the permissioned layer.
From the EU and US projects I have not found anything more concrete yet but reading their highly contradictional and problematic requirements [3] (e.g. applying financial policy like negative interest rates and demurrage to the base layer) I doubt they will succeed and find acceptance. Also as centralbanks, banks and government bureaucrats are not famous for getting anything done in the technology field I doubt they will deliver anything solid.
With that in mind I think crypto to cryto exchanges will come much more under regulatory pressure and atomic cross chain swaps or other strong DEX models will be required for maintaining censorship resistence.
Automated market maker (AMM) based DEX
Liquidity is a main problem for any DEX. An approach to solve that are liquidity pools. Uniswap is one of the most famous examples for that. I have not looked closer into the details but it is obvious that usability is superior compared to the pure P2P based barter model used in Bisq where the "double coincidence of wants" is a limiting factor. It requires more complex smart contract capabilities as available in Bitcoin (at least I would not know how to get AMM implemented in bitcoin).
So I think for a Bisq redesign a solution which enables market maker pools would be superior to a pure P2P barter exchange model.
Atomic cross chain swaps
The idea is out since several years but now it seems to get more traction. I want to give an overview of some promising projects.
One downside with the atomic swap model on the base layer is that it requires still 3 transactions (maybe it could be reduced to 2?), so with high miner fees that will be an issue for adoption at least for lower volume trades. Transaction time is dependent on block confirmation time, so it is not a fast/instant exchange. Beside that you need to observe both blockchains, which comes with some storage/bandwidth/cpu costs or if that is delegated to public nodes with a trust/privacy/security trade off.
Mercury
This was the first atomic swap project [4] I am aware of, but it never took off and it is not in operation anymore. I just wanted to mention it as is shows that a technically and conceptually sound project does not guarantee success and user adoption.
Farcaster project
Farcaster [5] is funded by the Monero community and intended to support many different blockchains. They work on a reference implementation in Rust for a BTC - XMR swap. It is very protocol driven and the authors have several years of track record to work in that problem field. It is not based on HTLC (Hash Time Locked Contracts) but on Adapter Signatures and use zero knowledge proof.
Its hard to estimate when it will become production ready but could be in 3-6 months.
Comit
This startup [6] has implemented prototypes in Rust for several atomic swaps: XMR, ETH, GRIN, Liquid (work in progress). Not sure if they did LN as well so far but I assume that is for sure on their list.
I think they used a HTLC approach for the chains where that was possible and adaptor signatures for XMR (have not looked closer but I guess their work is based on the model of Farcaster).
Very ambitious project with interblockchain communication as long term goal.
Layer 2 solutions
Using Lightning network for a DEX comes with some challenges. There is no multisig support. Channel capacity is still not that high. Privacy for high volume transfers might be reduced as number of channels is more limited. Security for large volume transactions might not be strong enough still (edge cases with channel closures). There is lot of development ongoing and with new Bitcoin features like Schnorr LN will see bigger changes as well. There are layer 2 networks for major chains like ETH but its not universal for the multitude on altcoins, so any solution would be probably limited to those few chains (at least if swaps are the main use case). All that said, I am not following very closely LN, so those conclusions might be a result of lack of knowledge...
Atomic swaps via Lightning network
Atomic swaps between different Lightning networks (BTC, LTC) or Lightning network and its base layer (submarine swaps) [7] are implemented since a while but it seems the use case to swapping BTC to LTC has limited demand. More interesting coins like XMR cannot be swapped that way.
Statechain
A Layer 2 solution using adapter signatures for moving an utxo in a state chain [10]. Has some similarities with LN and Liquid but different trade offs.
There is a new project which has implemented that concept. Could be probably used for atomic swaps between multiple statechains in diff. base currencies, though not sure about the requirments if Monero for instance could work as base layer.
Sidechains
Another approach are side chains. Unfortunately for 2 way pegs there is no "perfect" trustless solution and maybe never will be as it would contradict the philosophy behind sidechains to be risk-free for the main chain.
Liquid
I have not looked closer into Liquid so far. But my main concern is that Liquid as a federated sidechain where the peg-out depends on one of the federation members might not find acceptance among Bisq users and from my perspective is problematic regarding censorship resistence. Though of course the immense brain power from Blocksteam and the wide range of innovation coming out if it is a strong reason to look closer into it to see if there is a potential use case for Bisq.
Rootstock (RSK)
Similar to Liquid its a federated sidechain thought it seems they worked very hard to reduce the risks and required trust to a high degree (using a layered combination of several aspects like merged mining, hardware security module, federation, etc.)
It is a huge ecosystem with a rich set of features (ETH compatible smart contracts, dns, storage, market place,...). It would require much more time to get deeper into it.
Tari
Tari [8] is a merge mined Sidechain with Monero using Mimblewimble for asset issuance and fast transfer. Use Tor by default. Founded by Fluffypony (Monero core contributor).
Tari will also support atomic swaps between itself and Monero. Still in development (testnet). Have not looked closer but seems like a promising project. Not sure about smart contract capabilities, seems more to be tailored for asset issuance.
Spacechains
A one way pegged sidechain concept by Ruben Somsen [9]. In discussion with him about potential applications for a DEX use case.
Others:
There are a lot of DEX projects out and its very time consuming to figure out which ones are worth to invest more time. Here are just a few which caught my attention.
https://boltz.exchange: DEX based on LN:
https://sovryn.app: Based on RSK. Automatic maker maker dex, loans,...
https://www.stacks.co: They use the Bitcoin blockchain for security (root their blockhashes in a tx). Earlier it was based on proof of burn then they moved to a staking model. They have a smart contract language and support child chains for scalability. Did not look closer to get a clear opinion.
https://www.thorchain.com: Shilled a lot and doing heavy annoying PR... might have interesting concept behind, but PR turned me off too much to invest more time. Seems to be based on collateralized liquidity providers and swaps on their native chain.
https://tendermint.com / https://cosmos.network : Popular smart contract blockchain SDK used by several interesting projects like https://lazyledger.org. Uses child chains for scalability.
Micropayment channels
Another option for a DEX is to stream the transfer in micro payment channels thus reducing the risk to the small amounts transferred in one round. Coinffeine was such a model using a Fiat payment provider which allowed free transfer and API access (OKPay). Thought the problem was that the payment provider would spot those micro transactions and the users lose their privacy and the payment provider could easily disallow that type of usage.
For an altcoin DEX model this could be more relevant again if both assets have fast and cheap transfer options. But if such infrastructure exists (e.g. LN for both assets) then atomic swap would be superior.
Conclusion
Unfortunately I have not found any convincing solution so far.
Atomic cross chain swaps are very promising but usability will not be that great and miner fees in the case of BTC will be an issue. In the context of competition with AMM based DEX projects I am not sure if they will manage to bootstrap.
Using a custom blockchain comes with the friction that a token is usually needed for using that DEX. There are many projects out in that field which are based on collateral which comes with volatility and liquidity risks.
Using a federated side chain reduces censorship resistence and usually rely on some IOU issued on that sidechain for being used as collateral in a DEX use case, so that would add another layer of risk and trust to the IOU issuer.
For securing a trade collateral seems to be the most common solution if atomic swap cannot be done. If the collateral is a DEX token the volatility and systemic feedback risk is rather high (e.g. if there is a hack the token might crash to zero very fast, so collaterals will not provide security anymore and adding more damage). Using BTC as collateral would be much more acceptable and more decoupled from the DEX.
So what properties should a DEX have?
Maybe too much asked for?
References:
[1] https://bsnbase.io, https://antchain.net/, https://trusple.network, https://www.youtube.com/watch?v=v_At6UHMGOc
[2] https://bsnbase.io/g/main/serviceNetworkLeague
[3] https://voxeu.org/article/design-choices-central-bank-digital-currency
[4] https://github.com/mappum/mercury
[5] https://github.com/farcaster-project, https://eprint.iacr.org/2020/1126.pdf, https://cryp.ee, https://ccs.getmonero.org/proposals/h4sh3d-atomic-swap-implementation.html
[6] https://comit.network/
[7] https://blog.lightning.engineering/announcement/2017/11/16/ln-swap.html, https://wiki.ion.radar.tech/tech/research/submarine-swap
[8] https://www.tari.com/, https://tarilabs.com/
[9] https://www.youtube.com/watch?v=N2ow4Q34Jeg
[10] https://medium.com/@RubenSomsen/statechains-non-custodial-off-chain-bitcoin-transfer-1ae4845a4a39
Beta Was this translation helpful? Give feedback.
All reactions