Product Logic Algorithm

Oracle dynamic weight Bancor algorithm

SwapAll introduces the external market price via the price oracle and thus changes the value weights of the pools of both cryptocurrencies in a trading pair, thereby avoiding value losses caused to the assets in the pools due to arbitrage opportunities.

After the external price is introduced via the oracle, the example of calculating the cryptocurrency weight change is as follows: