Fetching Price Data

TODO -- the meta oracle provides various types of prices and aggregations which should be carefully considered and chosen for your particular use case

TODO -- Warning: Be very careful while using the Average aggregation with TWAPDuration = 1 (instantaneous spot price) as manipulating the spot price will also skew the average. Median should still be OK to use though, as long as you're also including at least twice as many sufficiently long enough TWAPDurations!

Be careful while using TWAPs in isolation and without aggregation with low time durations; as short term TWAPS can be easily manipulated by bad actors!

Spot Price

TODO

Settlement Price

TODO

Multiple Prices

TODO

Aggregated Price

TODO

Safety Considerations

in general, it's better to use an aggregation. e.g. use MAX of spot & recent LTWAPs (60 sec - 60+ mins) while selling calls, but MIN while buying calls; vice-versa for puts -- such that it's "favorable to the party involved". MEDIAN is also a good choice, generally speaking.

Last updated