Skip to content
This repository has been archived by the owner on Aug 6, 2021. It is now read-only.

remove coingecko api calls for Price and use an on-chain source #34

Open
miguel567 opened this issue Dec 5, 2020 · 3 comments
Open

Comments

@miguel567
Copy link
Collaborator

on the holdings/save endpoint we are using coingecko. Let's use an on-chain source.

@dudesahn
Copy link
Contributor

dudesahn commented Dec 5, 2020

https://etherscan.io/address/0x73353801921417f465377c8d898c6f4c0270282c#readContract

This is Keep3r's on-chain oracle; you can see the pairs here: https://feeds.uniquote.finance

We could ask Andre to update this any future pairs that Yearn may need (such as zLOT).

All current volatile pairs we need price data for (YFI, LINK, ETH, WBTC, CRV) are already supported.

@dudesahn
Copy link
Contributor

dudesahn commented Dec 5, 2020

Code will be simple:

Note: WETH, YFI, CRV, LINK have 18 decimals, WBTC has 8, USDC has 6

WETH: current(0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2, 1000000000000000000, 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48)/1e6

WBTC: current(0x2260fac5e5542a773aa44fbcfedf7c193bc2c599, 100000000, 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2)/1e18*WETH

YFI: current(0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e, 1000000000000000000, 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2)/1e18*WETH

CRV: current(0xd533a949740bb3306d119cc777fa900ba034cd52, 1000000000000000000, 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2)/1e18*WETH

LINK: current(0x514910771af9ca656af840dff83e8264ecf986ca, 1000000000000000000, 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2)/1e18*WETH

@miguel567
Copy link
Collaborator Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants