Here is broad outline of how we can implement the proposed changes to NuBot:
First of all, if the motion passes desrever and I should hire an additional developer for NuBot. Woolly_Sammoth has little time available due to another full time job and other obligations, so I would like to have him continue to implement exchange APIs as he has been doing. Then we will have two other developers. One should work on implementing the transfer of funds between tier 1 and tier 2. The other can be begin working on order book matching code. After the funds flow between tier 1 and tier 2, the flow between tier 2 and tier 3 can be implemented, probably by the same developer that worked on tier 1 and 2.
I will say a little about how order book matching will work. Take the example of the Bter BTC/NBT market, which you will see will be far superior in liquidity to the Bter BTC/USD market. We will make the order books of as many exchanges as possible available on the BTC/NBT Bter market. For instance, Bitfinex, Bitstamp and BTC-e. The Bter BTC/NBT market mirrors the combined order books of Bitfinex, Bitstamp and BTC-e. The entire depth of the order books is not replicated, only the top portion. How big that portion is depends on how much of a risk the double fill exploit proves to be, where orders are simultaneously filled by a bot at Bter and say Bitstamp by someone who is not an LPC.Even if this is employed extensively, the cost can be kept quite small by using a small amount of tier 1 liquidity. Losses could be made up with custodial grants or widened spreads. The merged order book on Bter will have slightly worse pricing in one sense than Bitstamp, Bitfinex and BTC-e. This is because two transaction fees must be included in the spread, one for Bter and one for, say, Bitfinex. I expect we can negotiate fee discounts to minimize the adverse effect of this. There is even a real chance we can be transaction fee free because what we are doing will bring so much volume to exchanges we support. In another sense, our pricing will be better because you will get the best price offered at the three exchanges for the full depth of your order. Let’s look at an example. Say I want to buy 10 BTC. Here are the buy BTC order books, presuming a special, negotiated transaction fee of 0.1% on all exchanges for our LPCs:
Bitstamp
Price, USD, BTC
310, 620, 2
311, 933, 3
313, 1252, 4
315, 630, 2
Bitfinex
Price, USD, BTC
314, 942, 3
316, 632, 2
317, 317, 1
319, 1595, 5
BTC-e
Price, USD, BTC
308, 924, 3
310, 620, 2
312, 624, 2
313, 1252, 4
Bter
Price, NBT, BTC, Mirrored Exchange
308.62, 925.85, 3, BTC-e
310.62, 621.24, 2, Bitstamp
310.62, 621.24, 2, BTC-e
311.62, 934.87, 3, Bitstamp
312.62, 625.25, 2, BTC-e
313.63, 1254.50, 4, Bitstamp
313.63, 1254.50, 4, BTC-e
314.63, 943.88, 3, Bitfinex
315.63, 631.26, 2, Bitstamp
316.63, 633.26, 2, Bitfinex
317.63, 317.63, 1, Bitfinex
319.64, 1598.19, 5, Bitfinex
The cost to purchase 10 BTC at each exchange, including a 0.2% transaction fee the buyer pays is:
Bitstamp: 3126.24 USD
Bitfinex: 3173.33 USD
BTC-e: 3113.21 USD
Bter: 3109.41 NBT
So, you pay less for your cryptoassets if you buy them with NBT instead of USD. And, you don’t have to use Bter. Bitstamp, Bitfinex and BTC-e would each have their own blended BTC/NBT order books as well that offer similar pricing as Bter, if the exchange supports NBT and we support the exchange.
Let’s examine how this works from the liquidity provider custodian perspective. Dan is an LPC mirroring the BTC-e order book. He opens accounts at BTC-e and ideally, all other supported exchanges, which we will say are CCEDK and Bter. Dan deposits an equal amount of funds in BTC-e, Bter and CCEDK. In each case half the deposit is BTC with the other half being USD for BTC-e and NBT for CCEDK and Bter. NuBot places buy and sell walls on CCEDK and Bter to mirror the BTC-e walls on the BTC/USD pair. It updates the CCEDK and Bter walls as the BTC-e wall changes. When one of his orders on either CCEDK or Bter is filled, NuBot executes a comparable market order on BTC-e immediately. Just as is the case now, from time to time these accounts may need to be rebalanced. The question of whether that can be done without losing funds other than transaction fees is complex with many variables. The question should be answered empirically, by tracking the actual costs of rebalancing. Similar issues exist with rebalancing costs now, although some of the variables are different. It is possible that an offset value will need to be used (for example, perhaps the BTC-e account will be repeatedly drained of BTC and it cannot be replenished at cost, on average, so BTC-e liquidity is offered at other exchanges at a 1% higher price than normal). This means NuBot will need to track losses and gains, including for rebalancing. This type of tracking is needed regardless of whether order book mirroring is implemented.
Another LPC mirrors Bitfinex at CCEDK and Bter. He does not need to concern himself with Dan’s orders placed on CCEDK and Bter. Limited, or small, collisions will occur when the BTC sell price at Bitfinex is at or below the BTC-e buy BTC price. Only the top price in combined order book will collide. This is not a problem, and it is self correcting when mirrored orders are placed at BTC-e and Bitfinex. With this design, collisions are actually profitable trades in the sense that custodians get to trade at a price more favourable than the price of the market they are mirroring. This design does not require coordination of LPC walls to prevent collisions, offering significant simplification over the way NuBot currently operates.
Edit: While the above example uses BTC, I expect similar mirroring would be done with other coins, such as Litecoin, Dogecoin, Ripples, etc. While in the example above the goal is to compete against USD, an LTC/NBT market would compete against LTC/USD and LTC/BTC pairs simultaneously by mirroring both types of trading pairs.