Closed terminator0x closed 3 years ago
I've got a question suddenly while implementing this. Should the oracle contract is a maintained oracle or non-maintained oracle? Non-maintained oracle implementation is here, https://github.com/Keydonix/uniswap-oracle
I've got a question suddenly while implementing this. Should the oracle contract is a maintained oracle or non-maintained oracle? Non-maintained oracle implementation is here, https://github.com/Keydonix/uniswap-oracle
Non-maintained please. Actually use the example you have shared, it's a good one :)
I've got a question suddenly while implementing this. Should the oracle contract is a maintained oracle or non-maintained oracle? Non-maintained oracle implementation is here, https://github.com/Keydonix/uniswap-oracle
Non-maintained please. Actually use the example you have shared, it's a good one :)
Okay, I got it.
Right now we're fetching token prices from the coingecko api .
This is fine but also a bit dangerous because when the crypto market experiences flash crashes or sudden pumps the coingecko servers tend to be overwhelmed and this would mean anyone using the wrapper at these times would get a less than stellar experience.
So for this reason we need to implement price oracle contracts for both
Uni V2
andSushi
. The contracts should be calledPriceOracleUni.sol
andPriceOracleSushi.sol
respectively and should be added in the/wrapper
folder.For further reading on this please checkout the official uni v2 docs.
Also implement the contracts using the sliding window mechanism as shown here for uni. Since sushi is basically just uni v2 contracts with different addresses, also do the same for sushi.
Acceptance Criteria
I should be able to call a function in either of the contracts called
getTokenPrice(address tokenAddress)
and easily get the price of the token.ETA
4 days