hypervisor icon indicating copy to clipboard operation
hypervisor copied to clipboard

Redstone integration example.

Open jakub-wojciechowski opened this issue 2 years ago • 0 comments

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 RedstoneOracle contract
  • fetch price through UniProxy contract
  • implement a simple price deviation checking method that will compare the TWAP and external oracle price ratios

jakub-wojciechowski avatar Jun 28 '23 17:06 jakub-wojciechowski