TWAP Oracles Deployment
Overview
To deploy a standard TWAP Oracle, you can use the TwapOracleFactoryNG
and TwapOracleFactorySNG
, depending on whether your underlyiong market usestwocrypto-ng
or stableswap-ng
AMMs.
Deployment
Deployment of Spectra TWAP oracles is done through the deployOracle()
method
It deploys an oracle of _oracleType
for a market composed of a PT of address _pt
and of market address _pool
. The OracleType _oracleType
field allows you to choose the type of oracle you want to deploy. The possible types are
The possible types specify the base asset (PT, YT, LP) followed by the quote asset (IBT, Underlying).
Setting yourself as the _initialOwner
allows you to upgrade the oracle implementation.
Deployment can be done through the common interface ITwapOracleFactory
, since both TwapOracleFactoryNG
and TwapOracleFactorySNG
both implement it.
Last updated