Formula
NostraSwap imposes a LimitPriceImpactPerSecond on the oracle price to protect against manipulations. Upon initialization, the oracle price is set to be the market price:
For each trade, the oracle price is updated through the following rule:
Where
As opposed to TWAP, this method of calculating oracle price from market price can both provide price security and price freshness.
Last updated