Monday, October 24, 2016

The Basic idea and how it works on the trading sites

Here is the node class, untested, it will not even compile.  But, it has three methods, add, delete and traverse with some function. Notive it moves whole blocks around the block array..

Now, multiple bots will be traversing the graph, even as the graph becomes  modified, any bot, including the current bots.  Hence, the bots wait their turn to step through the graph,, Each bot leading the graph normalized.  We keep indices that get any bot back to where it was after being kicked off the priority queue.  The indices are updated, but that is not here.   

Bets on the betting graph involve multiple trading bots who want to run the graph, but the traders soon learn to keep the queue small and watch the run time block chain structure for an opening.  Sound familiar? Try node.js, it operates very similar.  But the key difference,the traders take queue size seriously.

Consider a trading site with an ongoing betting graph.  It offers users the option of traversing the current graph and collecting a block structure of it to 6 bits of precision.  So the betting site has pre-announced he betting precision, all bets quantized to 1/(2^5), I think, or 3% precision.

Who guarantees that the trading site is not keeping secrets books to a higher precision? Two things. 1) It ids essential we have the honest smart card so the code at the betting site is verifiable by all our bots. Remember, smart card can do honest functions over the graph, no humans allowed except what is published by contract. You have a guarantee of no cheating.

Let's add detail
You want to make a trade, you have your price and the betting site.  Once your trade goes on the queue, you will run the graph and find the bin that matches your trade.  The trading site bot maintains market liquidity, it always has at risk less liquidity than the market can stand, or else the some sub component of the graph restructures.  Who ciovers the losses and gains from the site market maker? The owner of the smart card verifying the site. The bot liquidity precision may be better than the trader, but it is published,we know before hand what the 'currency' risk is.



class node :
count = 0
link = None
nodes[] = None
def delete() : 
prev = self.link
prev.count = prev.count - self.count
for i in range(self.count)
prev.nodes[i]= prev.nodes[i+self.count]
prev.link = self.link
return(prev)
def add(next)
prev = self.link
for i in range(self.count)
prev.nodes[i+prev.count]=se;g.nodes[i]
prev.count = prev.count + self.count
prev.link =self.link
if self.freq < min.freq : min = self
def traverse(n,fun) :
if n == none return(none)
for i in range(n.count)
if fun(n.nodes[i]) : traverse(n.nodes[i],fun)
else : traverse n.link,fun)

No comments: