Oracles

Outcome Tokens and Liquidity Pools

Pascal's AMM uses the pricing curve k=x*y to determine price according to the ratio of tokens in a liquidity pool, and therefore does not rely on an outside oracle at this time for pricing feeds.

This also means that Pascal is not at risk of Oracle manipulation, and with Solana's Proof of Work consensus and high TPS, flash-loan attacks are not really feasible in current conditions.

Similarly goes for front-running of transactions, which is not really possible on Solana at the moment.

Market Resolution

Pascal uses a 30-minute TWAP of an asset's underlying price as the fixing price for settlement from Pyth and Switchboard Oracles.

Pascal uses the following criteria to determine valid oracle prices for its TWAP:

  • Price != null

  • Price > 0

  • Confidence/Price < 0.25 to ensure the confidence is tight enough

  • Number of valid updates in TWAP period > 30 to ensure freshness.

In case of oracle issues where the number of TWAP updates is less than 30 in the period, then Pascal will use an off-chain calculation for the settlement price. It will take a historical backfill of the settlement period taken from the oracle provider.

If the historical backfill has clearly erroneous data after applying the above filtering, the fixing price will be an off-chain calculation of the 30-minute TWAP taken from exchange capture using the ccxt library.

Last updated