Pages:
Author

Topic: Brainstorming: On chain decentralized exchange possible on Bitcoin Blockchain? - page 2. (Read 501 times)

legendary
Activity: 3472
Merit: 10611
does not make sense to have an order book on a blockchain
former is inconstant, latter immutable

the order-book itself is not stored on the blockchain, there is no reason for that. it can be anywhere because there is no reason for it to even be stored. the contract or the script which is the executed order or the trade is stored on the blockchain.
legendary
Activity: 1652
Merit: 4392
Be a bank
does not make sense to have an order book on a blockchain
former is inconstant, latter immutable
legendary
Activity: 2086
Merit: 1282
Logo Designer ⛨ BSFL Division1
Defi built directly on bitcoin blockchain would be a bad idea, because even uniswap that is on ethereum have problems with huge fees and failed transactions.
That being said, I believe some people are working on second layer solution that will enable better decentralized exchange for Bitcoin.
This is better because fees can be much lower and transaction can be faster. Meanwhile, we can use Bisq exchange.

BIP-119 sure looks interesting:
https://utxos.org/
 
sr. member
Activity: 860
Merit: 423
Revisiting this thread after a long time because I stumbled upon an article. Most of you have opined here that Decentralized Exchange is not possible on Bitcoin Blockchain. But, the following article is claiming otherwise. What is your opinion?

Bitcoin DeFi May Be Unstoppable: What Does It Look Like?
legendary
Activity: 1666
Merit: 1196
STOP SNITCHIN'
Recently I used Uniswap Exchange, which appears to be a fantastic product to me. It is a simple smart contract interface for swapping ERC20 tokens. I wonder, if a similar product is possible on Bitcoin Blokchain. USDT, BSQ, RSK and some other tokens already runs on Bitcoin Blockchain. How about a decentralized asset exchange between BTC and these tokens? Is not it technically feasible?

I'm not sure about a comprehensive DEX, but Bitcoin-based atomic swaps are possible using nLocktime and shared secrets. TierNolan pointed this out years ago:

No it's not. I assume that you mean that the problem is that B's coins will remain locked until A agrees to unlock, but this is solved with locktime as described by gmaxwell, see also here.

Sounds reasonable.

A picks a random number x

A creates TX1: "Pay w BTC to if (x for H(x) known and signed by B) or (signed by A & B)"

A creates TX2: "Pay w BTC from TX1 to , locked 48 hours in the future, signed by A"

A sends TX2 to B

B signs TX2 and returns to A

1) A submits TX1 to the network

B creates TX3: "Pay v alt-coins to if (x for H(x) known and signed by A) or (signed by A & B)"

B creates TX4: "Pay v alt-coins from TX3 to , locked 24 hours in the future, signed by B"

B sends TX4 to A

A signs TX4 and sends back to B

2) B submits TX3 to the network

3) A spends TX3 giving x

4) B spends TX1 using x

This is atomic (with timeout).  If the process is halted, it can be reversed no matter when it is stopped.

Before 1: Nothing public has been broadcast, so nothing happens
Between 1 & 2: A can use refund transaction after 48 hours to get his money back
Between 2 & 3: B can get refund after 24 hours.  A has 24 more hours to get his refund
After 3: Transaction is completed by 2
- A must spend his new coin within 24 hours or B can claim the refund and keep his coins
- B must spend his new coin within 48 hours or A can claim the refund and keep his coins

For safety, both should complete the process with lots of time until the deadlines.

There are some alternative ideas for accomplishing the same thing without using locktime, like a specialized altchain:

Quote
Another proposal of cross-chain p2ptrade is to use specialized altchain with properties for efficient operation of p2ptrade from bitcoin chain. Additionally, we use only single standard bitcoin transaction which looks exactly the same as normal payment (no nlocktime, no multisig, no special script).

Assuming the altchain has actual economic value to support it, it can even serve as proxy for (relatively) efficient zero-trust p2p market between fe. BTC and LTC thanks to arbitraging market makers.

The Lightning Network can also facilitate this:

Quote from: achow101
If someone wanted to be paid in Litecoin over the Lightning Network but you only have Bitcoin channels, you can (in theory, I don't know if this is implemented) route your payment through a node that has both Bitcoin and Litecoin channels using the same HTLC secrets and it would be totally fine. The only caveat is the exchange rate between Bitcoin and Litecoin which would have to be negotiated with that node doing the bridging between Bitcoin and Litecoin.
https://bitcointalksearch.org/topic/m.48997244
sr. member
Activity: 860
Merit: 423
Recently I used Uniswap Exchange, which appears to be a fantastic product to me. It is a simple smart contract interface for swapping ERC20 tokens. I wonder, if a similar product is possible on Bitcoin Blokchain. USDT, BSQ, RSK and some other tokens already runs on Bitcoin Blockchain. How about a decentralized asset exchange between BTC and these tokens? Is not it technically feasible?
Pages:
Jump to: