BitShares Forum

Main => General Discussion => Topic started by: monsterer on January 16, 2015, 05:18:43 pm

Title: DEX Arbitrage to increase liquidity
Post by: monsterer on January 16, 2015, 05:18:43 pm
If there were markets in the DEX which enabled internal arbitrage, it could help with providing liquidity and narrowing spreads.

For example, if we had the pairs:

btc/usd
btc/eur
eur/usd

You would be able to do triangular arbitrage between them which would narrow the spreads and be less risky than running a market maker.

Cheers, Paul.
Title: Re: DEX Arbitrage to increase liquidity
Post by: speedy on January 16, 2015, 05:53:56 pm
Are you saying the blockchain protocol itself would be doing arbitrage?

I like it - sounds like the arbitrage profits could be a nice extra source of yield for BitAsset holders.

Of course there is no liquidity for bitbtc/bitusd yet so that would need to improve before this made any difference.
Title: Re: DEX Arbitrage to increase liquidity
Post by: Rune on January 16, 2015, 06:08:33 pm
I believe this will be re-enabled in the same update as we will get relative orders, 0.7, hopefully coming within a few weeks.
Title: Re: DEX Arbitrage to increase liquidity
Post by: toast on January 16, 2015, 06:24:15 pm
bitasset pairs are already fixed in the hard fork coming with 0.5.0

I don't like the idea of market-making by the blockchain. If you're so sure you could design a good MM algorithm for the blockchain, why don't you do it yourself and make some money?
Title: Re: DEX Arbitrage to increase liquidity
Post by: monsterer on January 16, 2015, 10:47:29 pm
Are you saying the blockchain protocol itself would be doing arbitrage?

No - just having those markets available (or permutations thereof) makes arbitrage possible, which means all participants get an opportunity to participate. No need to have an official blockchain bot.
Title: Re: DEX Arbitrage to increase liquidity
Post by: Rune on January 17, 2015, 05:01:28 pm
If we get relative orders for cross pairs in 0.7, and assuming that our pricefeeds are highly precise and reliable for each asset, it will be possible to offer absolutely insane spreads, like 0.001% or less for pairs like BitGOLD/BitUSD with guaranteed profitability through automated hedging.
Title: Re: DEX Arbitrage to increase liquidity
Post by: xeroc on January 17, 2015, 05:25:34 pm
If we get relative orders for cross pairs in 0.7, and assuming that our pricefeeds are highly precise and reliable for each asset, it will be possible to offer absolutely insane spreads, like 0.001% or less for pairs like BitGOLD/BitUSD with guaranteed profitability through automated hedging.
not sure about the precision of feeds .. bts are traded at a spread across different platforms .. that spread appears in the feeds too ... not sure how balanced this spread vs. nr. of delegates for the media really is .. we should analyse the spread of the variance of the feeds more closely .. but something in the range of 0.1% to 0.5 feels more realistic .. for now .. (just a gut feeling though)
Title: Re: DEX Arbitrage to increase liquidity
Post by: Rune on January 17, 2015, 08:36:20 pm
If we get relative orders for cross pairs in 0.7, and assuming that our pricefeeds are highly precise and reliable for each asset, it will be possible to offer absolutely insane spreads, like 0.001% or less for pairs like BitGOLD/BitUSD with guaranteed profitability through automated hedging.
not sure about the precision of feeds .. bts are traded at a spread across different platforms .. that spread appears in the feeds too ... not sure how balanced this spread vs. nr. of delegates for the media really is .. we should analyse the spread of the variance of the feeds more closely .. but something in the range of 0.1% to 0.5 feels more realistic .. for now .. (just a gut feeling though)

It has to be standardized so what the feeds really report are the price of BTS in USD, and then the price of every other asset in USD, and then combines these two together to form the BTS/asset feed (that way the relative data of two feeds will produce the exact asset to asset rate). This will only be crucial if relative orders indeed are implemented for cross pairs.
Title: Re: DEX Arbitrage to increase liquidity
Post by: julian1 on January 17, 2015, 09:39:57 pm
I would love to see this too for http://xchain.info.

If an active market can be established for GATEBTC/BitUSD and GATEBTC/BitBTC then folks (except MM) can forget about GATEBTC and it becomes possible for the Gateway to perform direct BTC <> BitUSD etc exchange.

Albeit there's still an issue with front-running.

On another note, I believe anxpro does some constructed/synthetic pairs trading to create extra liquidity for non-USD to bitcoin trading.
Title: Re: DEX Arbitrage to increase liquidity
Post by: starspirit on January 17, 2015, 10:01:32 pm
Assuming I've understood the proposition correctly, I don't think that what is being suggested in the OP will actually help to narrow the spreads. If it were possible, then any stock exchange for example could simply offer cross-stock trades (creating the required triangularities) to improve the liquidity and spreads in each of its stock listings.

Instead what I think would happen is that all three pairs would trade at spreads, and the cost of trading around the triangle would limit arbitrage as before. Eg if you created a market in BTC/USD and got hit on your buy BTC / sell USD order, you could not simultaneously sell BTC for BTS and buy USD for BTS without incurring the spread costs in those markets, meaning the arbitrage is ineffective. Instead you would need to wait to get hit on those positions at market or better, in which case you are simply assuming the risk of the market-maker.

Title: Re: DEX Arbitrage to increase liquidity
Post by: biophil on January 17, 2015, 10:13:28 pm
Assuming I've understood the proposition correctly, I don't think that what is being suggested in the OP will actually help to narrow the spreads. If it were possible, then any stock exchange for example could simply offer cross-stock trades (creating the required triangularities) to improve the liquidity and spreads in each of its stock listings.

Instead what I think would happen is that all three pairs would trade at spreads, and the cost of trading around the triangle would limit arbitrage as before. Eg if you created a market in BTC/USD and got hit on your buy BTC / sell USD order, you could not simultaneously sell BTC for BTS and buy USD for BTS without incurring the spread costs in those markets, meaning the arbitrage is ineffective. Instead you would need to wait to get hit on those positions at market or better, in which case you are simply assuming the risk of the market-maker.

That's correct; arbitrage doesn't directly add liquidity, it removes it. Every time someone executes a triangular arbitrage trade, the order book gets smaller.

Obviously, arbitrage is still extremely valuable, since it enforces price consistency. It's even possible that allowing arbitrage will help increase liquidity indirectly since there will be more market activity, which compounds into more activity.
Title: Re: DEX Arbitrage to increase liquidity
Post by: starspirit on January 17, 2015, 11:06:40 pm
Assuming I've understood the proposition correctly, I don't think that what is being suggested in the OP will actually help to narrow the spreads. If it were possible, then any stock exchange for example could simply offer cross-stock trades (creating the required triangularities) to improve the liquidity and spreads in each of its stock listings.

Instead what I think would happen is that all three pairs would trade at spreads, and the cost of trading around the triangle would limit arbitrage as before. Eg if you created a market in BTC/USD and got hit on your buy BTC / sell USD order, you could not simultaneously sell BTC for BTS and buy USD for BTS without incurring the spread costs in those markets, meaning the arbitrage is ineffective. Instead you would need to wait to get hit on those positions at market or better, in which case you are simply assuming the risk of the market-maker.

That's correct; arbitrage doesn't directly add liquidity, it removes it. Every time someone executes a triangular arbitrage trade, the order book gets smaller.

Obviously, arbitrage is still extremely valuable, since it enforces price consistency. It's even possible that allowing arbitrage will help increase liquidity indirectly since there will be more market activity, which compounds into more activity.

I agree it can enforce price consistency, but only to the extent that price discrepancies are greater than the combined spread costs of doing the arbitrage. At high spread costs the potential for arbitrage is very limited. Consider that the external exchange (eg BTER) already has such a triangle - bitUSD/BTC, bitUSD/USD and BTC/USD, but there are high spreads and limited arbitrage if any going on in the bitUSD pairs.

It should also be noted that enforcing (limited) price consistency is also not the same as ensuring close pegging of bitUSD. If the market values bitUSD at a discount to USD, this will be reflected in all the corresponding pairs.

Having said that, there may be other reasons to add bitAsset v bitCurrency pairs to the market, so I'm not averse to the idea only questioning the rationale. What will attract people ultimately is the ability to make profits at reasonable cost (transaction spreads and fees) and with reasonable comfort around the collateral and counterparty risks. For example for some reason the largest crypto exchanges remain those with limited crypto listings.
Title: Re: DEX Arbitrage to increase liquidity
Post by: monsterer on January 18, 2015, 12:09:10 am
Triangular arbitrage creates efficient markets, which means the narrowest equalised spreads across each market the triangle works on. It doesn't doesn't add liquidity directly, but the increased trading activity can give rise to more liquidity arriving to take advantage of the increase in trading.
Title: Re: DEX Arbitrage to increase liquidity
Post by: starspirit on January 18, 2015, 01:33:02 am
Triangular arbitrage creates efficient markets, which means the narrowest equalised spreads across each market the triangle works on. It doesn't doesn't add liquidity directly, but the increased trading activity can give rise to more liquidity arriving to take advantage of the increase in trading.
I can't see how this is true. Arbitragers will only step in when the relative prices deviate by an amount that covers the spread costs in each market. When the relative prices are within that range, there is no arbitrage opportunity and the spreads and liquidity in each market are unaffected. So if the relative prices are deviating a lot, there may be some marginal increase to one-way trading activity to bring them in line, but that's about it.

If the new pair is a more attractive trading pair for other reasons, then true, it might attract more traders to the market, who then branch out and improve liquidity in a range of pairs - but that could be any pair to initiate this, not necessarily a cross-pair to complete a triangle.

I credit you on exploring new ideas, but I'm just skeptical it will give the result you want.
Title: Re: DEX Arbitrage to increase liquidity
Post by: monsterer on January 20, 2015, 04:42:03 pm
bitasset pairs are already fixed in the hard fork coming with 0.5.0

I'm still showing 'not enough feeds' for bitUSD/bitBTC on 0.5.1
Title: Re: DEX Arbitrage to increase liquidity
Post by: graffenwalder on January 20, 2015, 04:45:36 pm
500 more blocks till hardfork
Title: Re: DEX Arbitrage to increase liquidity
Post by: monsterer on January 20, 2015, 04:50:47 pm
500 more blocks till hardfork

Pah! I'm impatient :)
Title: Re: DEX Arbitrage to increase liquidity
Post by: islandking on January 20, 2015, 04:58:50 pm
500 more blocks till hardfork

500 blocks until a BTS price drop.... :D
Title: Re: DEX Arbitrage to increase liquidity
Post by: graffenwalder on January 20, 2015, 06:18:21 pm
500 more blocks till hardfork

Pah! I'm impatient :)
Seems it's still not working. Just imported my vesting balances without a problem.
But the insufficient feeds remain.

Edit: bitbtc bitusd market worked after putting in an order.
But Bitgold bitusd, still gives insufficient feeds
Title: Re: DEX Arbitrage to increase liquidity
Post by: clayop on January 20, 2015, 07:38:45 pm
Seems it's still not working. Just imported my vesting balances without a problem.
But the insufficient feeds remain.

Edit: bitbtc bitusd market worked after putting in an order.
But Bitgold bitusd, still gives insufficient feeds

BitUSD:BitCNY market also gives insufficient feeds error.

Plus a question. Is relative order applied to BitAssets pair as well? e.g. BitUSD:BitCNY. IMO, this will greatly attract market makers who want to make a profit in remittance market.