Originator Yield Oracle
For SMART Yield, the yield oracle observes the moving average of yield earned from the originator for a specific time window. Please see YieldOracle.sol and corresponding deployment originator smart contract script such as deploy-mainnet-compound-usdc.ts which has the configuration parameters defined on the
The oracle was built based on Uniswap v2 sliding window example (learn more on Building an Oracle in the Uniswap documentation).
In the case for the Compound USDC SMART Yield Pool, deploy-mainnet-compound-usdc.ts configures the oracle to obtain the moving average of yields with the following parameters:
windowSizeis set to 3 days of time window
granularityis set to 4, meaning that there will be 4 data points within the time window
By reliably sourcing and providing this data, it allows other smart contracts to perform key functions such as tranching risk appropriately to junior and senior tranches.