
The following is an example of the quoting process, using the BNB to BUSD price as an example.
๐ท๐ท ๐ทMiners pass their approved prices into the quoting contract, and then credit the two assets in proportion to their prices. They will be charged 1% of BNB as a commission for mining to get an SPX token reward.
๐๐Note: There is a certain capital threshold here, depending on the size of the traded asset. In order to ensure accurate prices, miners need to pledge a certain size of assets and take the corresponding risks to ensure the price resistance to attack.๐
๐๐ ๐After hitting the asset contract and waiting for T0 time (currently about 5 minutes), the verifier can buy BNB or BUSD with the minerโs offer during this cycle, if no one deals within T0, the offer will be accepted by the system; if the verified person completely deals, the price will be invalid, and partial deal will be partially invalid. After this time, the asset can be retrieved.
๐๐Note, here you can see the difference between the direct prediction machine used by SPHINX and most indirect prediction machines in the market. It requires miners to deposit real money to guarantee the accuracy of the price, thus avoiding the risk of introducing third parties outside the chain. Validators are similar to the presence of arbitrageurs in Uniswap, with the potential for unpredictable losses to liquidity providers. This is exactly the mechanism by which Uniswap forms prices.
๐๐In order for an offer not to be closed by a validator, there needs to be no room for arbitrage in either direction.๐ The price prognosticator of the SPHINX protocol actually predicts the price in the future T0 cycle to some extent, rather than just being an indirect prognosticatorโs reaction to past prices. The setting of T0 here depends on the verification time of the block and the frequency of transactions of the underlying asset. On the Binance Smart Chain, T0 can be set as short as 1 block, about 3 seconds.
๐ ๐๐While taking the order, the verifier needs to quote a new order out, and the size of the new order is required to be beta times the size of his own order. The verifier does not have to pay a commission when taking the order, and does not participate in the mining reward.
๐๐Note, the verifier is not only able to eat the minerโs offer, but also can eat the previous verifierโs offer, but should also meet the requirement that the size of the eaten order is a beta of the previous one.
๐๐This results in a price chain p0 -> p1 -> p2 โฆโฆ with T0 time as the maximum offer interval, and an asset size chain x0 -> x1 -> x2 โฆโฆ. The price chain and the asset size chain will be eventually terminated due to capital constraints due to asset size limitations. Meanwhile, the system can set the beta flexibly according to the volatility of the asset. For example, when the current offer deviates from the last effective offer by more than 10%, the current offer size factor beta equals to 10.
๐๐๐The final block price is generated by a certain algorithm in the SPHINX protocol, according to the block record, by the quotes in effect in the block, assuming that the quotes in effect in a block are (p1, x1), (p2, x2) (p3, x3)โฆ then the block price P=โpi*xi/โxi. If there is no quote in effect in the block, then the previous block price will be used.๐๐๐
๐๐Note: Block price formation is the result of a game between miners and validators, and the final block price is a weighted average of the offers. During the gaming process the verifier cannot use a flash loan to attack the oracle machine, because unreasonable offers will be eaten by other verifiers, thus making the loanee unable to repay the loan and invalidating the transaction.
Broadcast block prices through cross-chain communication protocols.
The SPHINX protocol constructs a price oracle machine network for heterogeneous networks. This oracle machine network supports only one-way price transmission. The price generating oracle machine runs on top of the SPHINX Hub, which is responsible for broadcasting the oracle machine prices.
The messages are propagated via the Interchain Communication Protocol (IBC). A proxy node collects the messages and independently verifies the authenticity of the oracle machine price information (transaction pair, block height, time, signature, etc.). The problem of double spending is ignored here, thus simplifying the model, but still strictly ordering the messages. ๐
๐๐Note that the cross-chain communication protocol here focuses on the latency and throughput of the cross-chain protocol. The SPHINX Hub that generates the price information has the highest block-out speed. When the price information is synchronized to a block with a slower block production speed, it is adapted by the proxy node to aggregate the price information of multiple blocks into a single price.
๐๐๐SPX value: The mining fees are distributed to the dividend contracts and then to all holders of supplied circulating SPX.โ๏ธ
