gitcoinco / grants-stack-api

GNU Affero General Public License v3.0
13 stars 2 forks source link

spike: investigate options for pulling in token prices #22

Open nfrgosselin opened 1 year ago

nfrgosselin commented 1 year ago

Overview Timebox to an hour —> identify a service / option for how to pull in accurate token prices and update gitcoinco/grants-round#1048 with plan

Details Say more

thelostone-mc commented 1 year ago

From @DanieleSalatti

I'm working on gitcoinco/grants-stack-api#22

Any reason why we are not using the Uniswap Pricing API?

We can pick one stablecoin per chain and use that to fetch the pricing for non-stable stuff. This works as long as Uniswap exists on the chain.

Some chains are not going to have Uniswap, but imo we can assume there will be other exchanges we can use to get data from the chain itself. Fantom has fUni which is a fork of Uniswap - the SDK might work there, or we can check the SDK code and directly call fUni on-chain. fUni doesn't have many tokens. Sushi does though.

(I'm wondering how this can work with other FIATs, where e.g. people in EU might want to show amounts in EUR instead of USD...thinking of this especially as a decentralised protocol that people might want to use in slightly different ways)

Sushi on FTM does not have BUSD, which is a stable anyway. All other use cases seem to be covered.

codenamejason commented 1 year ago

Has Chainlink or Redstone/Warp come up in any convos? @thelostone-mc @DanieleSalatti