Skip to content

Dynamic Center Price

PermieBTS edited this page Aug 8, 2019 · 6 revisions

5.0 Dynamic Centre Price

5.0.1 Calculates the supposed centre price from the actual market in question.

5.1 Currently the only option is calculating from closest opposite orders. In active markets this likely represents the centre price pretty well, but there are occasions where it doesn't:

5.1.1 1. In low-liquidity markets with large spreads, the centre price may be significantly affected by dust orders, that is; tiny fractions of orders left over from previous trades.

5.1.2 2. In markets where there are only a few participants, the strategy can be easily manipulated to make a loss. An opponent can simply make a large enough order to fill the bots order, and move the centre price either way more than the bot's spread. Then the opponent can make an opposite trade and again move the centre price in the opposite direction enough to make the bot make a loss - making the opponent a profit.

5.1.3 The exact formula for determining the centre is highest_bid * sqrt( lowest_ask / highest_bid ). On a linear scale this makes the centre price appear slightly closer to the highest bid, but on a logarithmic scale it will appear exactly in the middle. This is because it must produce exactly the inverse price if the market is flipped. If the centre price was calculated simply by splitting the spread linearly in half, reversing the market would produce a different result, and so would yield different results depending on which asset the user assigns as Base or Quote.