hypervisor
hypervisor copied to clipboard
Redstone integration example.
Don't merge -> it's just an example of integration.
The solidity version of gamma contracts is <8, therefore not to interfere with the existing code we must create a separate contract RedstoneOracle.sol which will perform price data validation and extraction.
Additionally, there is a need to update pragma in two dependent uniswap libraries to avoid compilations conflicts:
pragma solidity >=0.4.0 <0.8.0;
There are a few tests located in redstone.test.ts that demonstrate how to:
- fetch price directly from
RedstoneOraclecontract - fetch price through
UniProxycontract - implement a simple price deviation checking method that will compare the TWAP and external oracle price ratios