Fujicracy / fuji-v2

Cross-chain money market aggregator
https://fuji-v2-frontend.vercel.app
15 stars 10 forks source link

Get price when missing Chainlink address #559

Closed pedrovalido closed 1 year ago

pedrovalido commented 1 year ago

There is a missing wstETH price feed in chainlink as noticed in on of the integrations. As discussed, it was left as a //todo to fix that integration after this issue has been addressed.

I actually think Chainlink does not have a wstETH/usd public price feed on mainnet. However, I see aave makes a work around here: https://etherscan.io/address/0xA9F30e6ED4098e9439B2ac8aEA2d3fc26BcEbb45#readContract

pedrovalido commented 1 year ago

Daigaro found a solution for this issue: "I have a solution for this: a chainlink computed oracle, you combine two oracles to get a price feed. In this case wsteth/eth then eth/usd to get wsteth/usd. https://github.com/La-DAO/xocolatl-contracts/blob/main/contracts/utils/chainlink/ChainlinkComputedOracle.sol"

0xdcota commented 1 year ago

This was temporarily solved by deploying contract that returns wsteth/usd calculated price feed here.

pedrovalido commented 1 year ago

Great :) @DaigaroCota please push the contract code somewhere in the repo so that we can use it in the future.

0xdcota commented 1 year ago

Great :) @DaigaroCota please push the contract code somewhere in the repo so that we can use it in the future.

Good point sir, I created a PR and requested your review.