Options Oracles

The OptSwap DEX itself can serve as an oracle for the options contracts traded on it. The prices of the options contracts are available as the Last Traded Price (LTP) and as the Time Weighted Average Price (TWAP).

While the LTP provides useful information, it should not be utilized directly in smart-contracts as it's subject to instantaneous fluctuations and potential manipulation by bad actors. To overcome this, the prices are aggregated in a price accumulator which can be used to derive the TWAP for a given duration.

Note that the Options LTP/TWAP Oracles for the DEX are optional and are not part of the stock DEXes that are deployed for deploy-time & run-time gas savings. Governance can deploy new contracts with TWAP Oracles separately, if there is demand for them. If your use-case really requires On-Chain TWAP Oracles, get in touch with governance.

Last Traded Price

TODO

Last Traded Timestamp

TODO

Cumulative Price

TODO

Calculating Time Weighted Average Price

TODO

Last updated