Backtesting

The backtesting was done using real data from UniswapV2 ETH/USDC pool from May-11-2021 08:10:15 AM +UTC to May-25-2021 10:48:34 AM +UTC.

There are two major events that could be used to benchmark NostraSwap's oracle price to TWAPs. The event in red is the largest organic price movement in a short time span from 3000 USDC per ETH to 2000 USDC per ETH. The event in blue is a major slippage/dump at block 12473496. Ideally, Nostradamus's Robust Oracle Price should be accurate to follow along with the organic price movement in the red circle and secure enough to not be manipulated in the blue circle.

Organic Price Movement (Red Circle)

The result shows that when the LimitPriceImpactPerSecond is set to 0.019% (around 0.25% per block), the Robust Oracle Price can keep up with the organic price action of UniswapV2's ETH/USDC pool similar to 2 minutes TWAP while 30 minutes TWAP failed to provide an accurate price.

Flash Dip (Blue Circle)

NostraSwap’s oracle price also showed the level of security on par with 30 minutes TWAP as the price was not affected by the slippage in the blue circle unlike 2 minutes TWAP.

Off-Chain Oracle Comparison

NostraSwap’s oracle price is highly correlated with Chainlink’s, but is updated much more frequently.

Last updated