all the notary nodes query the daily ECB price data and then convert the price pairs into abstract singleton currency values. These abstract values have the property that the distance from the currencyA/currencyB price and the corresponding ratio of the abstract values are minimized. Basically a matrix of N*N numbers are reduced to N numbers, quite a lot of data space saved
these abstract datapoints are used to create long term splines. splines are mathematical equations that fit the data points and have the character that the lines are very smooth and change very slowly. A spline is able to calculate the smooth price at any point inside the range of initial values, it interpolates perfectly.
every block, the spline data is used to generate a pricefeed entry and if a notary node mines a block, it includes the pricefeed data. This allows all the non-notary nodes to get the rawpricefeed data as it is in the KMD blockchain.
<we are just getting started, the raw prices are not the official paxprices>
To calculate the paxprice, the following is done:
A. the previous 500+ (537) pricefeeds are put into a circular buffer.
B. a deterministic random seed to randomize the starting point in the circular buffer
C. iterate from the zero point to find the first price point that has a 51% correlation, eg. over half the other data points are within the specified tolerance of 2%. The first price that meets this condition is the correlated price for the height.
D. The prior 537 correlated prices are smoothed using a noise filter, basically a dotproduct that has the property of smoothing the price. It wont be the average price, but rather a weighted price relative to the initial correlated price point
E. In order to sidestep small reorgs, the value for a specific height is changed to be the value of height -10
Due to D. a lot of correlated prices have to be distorted for there to be any large change in the pax price.
Due to C, the majority of pricefeeds must be distorted for any of them to even be selected to be a correlated price
Due to B, it is not possible to predict what the correlated price will be for any future block
Due to 1, if any notary node tries to distort the pricefeed, it is obvious to all that they are conducting an attack
The aim of pax is not for speculation, but to provide something that has stable value that the mass market can understand and relate to. It is much more the currency exchange booth type of prices than forex