BitShares Forum

Main => General Discussion => Topic started by: fluxer555 on August 18, 2017, 03:06:31 pm

Title: Reinforcing Smartcoin Pegs Through Feed-Tracked Orders
Post by: fluxer555 on August 18, 2017, 03:06:31 pm
The idea is very simple. Allow buy/sell orders to be placed at the feed price. These orders track with the feed price (or prices, in the case of two smartcoins). For safety, we could also have a minimum or maximum price (based on whether they are buying or selling) needed for the order to execute.

This would essentially allow the blockchain to act as a 0% spread conversion agent for any pair that includes at least one smartcoin. This is completely opt-in of course, so normal buy/sell orders can still be placed, and any standing tracked buy/sell orders will be matched with them as prices change, giving more liquidity that way too.

This seems like a no-brainer to me. What am I missing?
Title: Re: Reinforcing Smartcoin Pegs Through Feed-Tracked Orders
Post by: fluxer555 on August 18, 2017, 03:11:25 pm
Also, I think we should decidedly not support "offsets" from the price feed, as this loses easy parity with other tracked buyers/sellers. The only way to match these offset-tracked orders would be through normal limit orders (other than using the exact same offset, of course) which is at odds with this feature's intended benefit- reinforcing the peg. It's also a lot easier to implement without this, both core/UI wise.
Title: Re: Reinforcing Smartcoin Pegs Through Feed-Tracked Orders
Post by: Thom on August 18, 2017, 03:47:19 pm
I fully agree, and always thought the "offsets" were counterproductive. Not sure the reason they were introduced.
Title: Re: Reinforcing Smartcoin Pegs Through Feed-Tracked Orders
Post by: yvv on August 18, 2017, 04:31:15 pm
BTSbots allows you to make feed tracking orders with offset, which you can set to 0 if you wish. This does not help to keep the peg, because nobody is going to take your order at feed price if better offer is there. But nevertheless, this is very simple and effective strategy for automated market making which would be absolutely cool to have in default client (with offsets of course).
Title: Re: Reinforcing Smartcoin Pegs Through Feed-Tracked Orders
Post by: pc on August 18, 2017, 06:01:44 pm
Also, I think we should decidedly not support "offsets" from the price feed, as this loses easy parity with other tracked buyers/sellers. The only way to match these offset-tracked orders would be through normal limit orders (other than using the exact same offset, of course) which is at odds with this feature's intended benefit- reinforcing the peg. It's also a lot easier to implement without this, both core/UI wise.

If you don't allow an offset you can support the peg only on one side, because orders from both sides would cancel each other out.

Also, why should market makers place orders *at* the feed price in the first place? They'd take all the risk but can't make a profit from it.
If you want to support the peg, allow offsets - this will create competition among market makers, which means more liquidity, and with more liquidity market makers will be forced to use small offsets.
Title: Re: Reinforcing Smartcoin Pegs Through Feed-Tracked Orders
Post by: fluxer555 on August 19, 2017, 05:11:50 pm
@pc, would you be in favor of this being implemented if it did allow for price offsets?
Title: Re: Reinforcing Smartcoin Pegs Through Feed-Tracked Orders
Post by: pc on August 19, 2017, 07:29:45 pm
I don't see why it shouldn't be implemented.
Perhaps a market maker (or other trader) can tell us if that'd be a useful feature for them? I can see at least one use case, and that's worker payments denominated in bitUSD. Buying a significant sum of bitUSD at a small offset would be easier if you can set an order with a feed-dependent price.
Title: Re: Reinforcing Smartcoin Pegs Through Feed-Tracked Orders
Post by: yvv on August 19, 2017, 09:53:28 pm

Perhaps a market maker (or other trader) can tell us if that'd be a useful feature for them?

It is extremely useful feature for market making, and for trading in general. Surprisingly, such a simple strategy as just following a feed price with fixed spread, turns out to be profitable most of the time. But, you know, this feature is already implemented in btsbots wallet and everybody can use it. Some people may say that there is no sense to re-invent a bicycle.  Btsbots have a weakness though, which may keep somebody from using it: you need to trust a centralized price feeds. But, these centralized feeds are often more reliable than feeds posted by witnesses on BTS. Also, btsbots provide feeds not only for MPA, but for many UIA too. IMO, ideally it would be cool to resolve centralization issue by implementing price feed tracking in BTS wallet, and also improve the quality of price feeds and also add feeds for major UIA. If some people blame me that I want too much, they will probably be right.
Title: Re: Reinforcing Smartcoin Pegs Through Feed-Tracked Orders
Post by: George_Bitspark on August 21, 2017, 07:26:24 am
This would be very useful as currently the only way to do this is with a third party Bot- BTSbots is also closed source. Having this done onchain would be good for liquidity providers who, when the bid is higher than the settlement price, short something into existence and sell for a profit then need to buy it back (feed price originally paid ideally) to close the position.
Title: Re: Reinforcing Smartcoin Pegs Through Feed-Tracked Orders
Post by: JonnyB on August 21, 2017, 09:01:36 am
Placing relative orders would be amazing.
Yes BTSbots can do this but it would be so much better built in to the exchange GUI using witness price feeds.
Title: Re: Reinforcing Smartcoin Pegs Through Feed-Tracked Orders
Post by: yvv on August 21, 2017, 12:51:34 pm
Quote
This would be very useful as currently the only way to do this is with a third party Bot- BTSbots is also closed source.

Alt wrote in trollbox:

Quote
btsbots.com have already open source for some days: https://github.com/pch957/btsbots-demo-2016

but it can't handle the fork good, so you'd better wait for the new release.

Title: Re: Reinforcing Smartcoin Pegs Through Feed-Tracked Orders
Post by: yvv on August 21, 2017, 01:18:35 pm
If the feed price tracking will be implemented in standard client, one thing will happen for sure: this will put BTS DEX a mile ahead of competitors. Can somebody name an exchange with any sort of automated trading out of the box?