Giveth-dapp: Add PAN, ANT, WBTC, USDC to the dapp and the simulation script

Created on 3 Sep 2020  ·  20Comments  ·  Source: Giveth/giveth-dapp

PAN doesnt work on cryptocompare... it doesnt work for PAN... and it doesnt have to be coin gecko... but it needs to be some service that has PAN

good first issue

Most helpful comment

more than happy to provide support and quick integration on the tokens you could not find through our API. Both for historical prices and for current ones.

All 20 comments

Code to be reviewed by Amin :-D

@arbreton Currently we need the price of token on specific day and hour.
A donation USDValue is set based on token price at the hour the donation is created (block timestamp in ethereum network).

Sounds perfect, I'm checking on this, making some room on the schedule

After reviewing the API and current implementation /coins/{id}/history is what we need, since we need to input the timestamp into the API, this will retrieve past USD prices for PAN 😁

Currently testing variations on this implementation

After reviewing the API and current implementation /coins/{id}/history is what we need, since we need to input the timestamp into the API, this will retrieve past USD prices for PAN 😁

@arbreton does it support hourly rates?

After reviewing the API and current implementation /coins/{id}/history is what we need, since we need to input the timestamp into the API, this will retrieve past USD prices for PAN 😁

@arbreton does it support hourly rates?

Sadly It doesn’t support hourly rates which could be important for volatility?

I can lookup some other APIs with timestamps in milliseconds like cryptocompare if needed

For hourly rates, do check out the /coins/{id}/market_chart endpoint in the https://www.coingecko.com/api docs

Minutely data will be used for duration within 1 day, Hourly data will be used for duration between 1 day and 90 days, Daily data will be used for duration above 90 days.

Let me know if that helps!

For hourly rates, do check out the /coins/{id}/market_chart endpoint in the https://www.coingecko.com/api docs

Minutely data will be used for duration within 1 day, Hourly data will be used for duration between 1 day and 90 days, Daily data will be used for duration above 90 days.

Let me know if that helps!

That’s definitely it!, I think is just what we need, I think i didn't saw that one

I will test with that route!✨

@tmlee You are a hero! Thank you so much for coming into the issue and helping us out!!

For hourly rates, do check out the /coins/{id}/market_chart endpoint in the https://www.coingecko.com/api docs

Minutely data will be used for duration within 1 day, Hourly data will be used for duration between 1 day and 90 days, Daily data will be used for duration above 90 days.

Let me know if that helps!

@tmlee Thanks for your guide. I also imagined using /coins/{id}/market_chart/range cause it would be better fit for our requirement. We need hourly rates and I reckon calling api using ranges 10 minutes before and 10 minutes after the requested hour. Do you think it will work out?

@arbreton Let's go with /coins/{id}/market_chart/range and for each timestamp call api using a range around timestamp. It would give us drastically less records that the one we seeking for is among them.

  • [ ] Update our Oracle Service to use coingecko instead of Cryptocompare
  • [ ] add all the tokens to the front end!
  • [ ] Update our Oracle Service to use coingecko instead of Cryptocompare
  • [ ] add all the tokens to the front end!

@GriffGreen you mean use coingecko for all tokens, including old ones cryptocompare supports (just eth token now)?

more than happy to provide support and quick integration on the tokens you could not find through our API. Both for historical prices and for current ones.

needs to be added to the simulation script

Tested PAN on Giveth 2 but the USD value wasn't right #1334

After some deep research, there was hidden pieces of code that resets usdValue, i rewrote that piece of code, now the usdValue of all tokens should be reflected correctly on donations
https://github.com/Giveth/feathers-giveth/pull/245
https://github.com/Giveth/giveth-dapp/issues/1442
This gh tasks could be closed now
Waiting for @aminlatifi review

After some deep research, there was hidden pieces of code that resets usdValue, i rewrote that piece of code, now the usdValue of all tokens should be reflected correctly on donations
Giveth/feathers-giveth#245

1442

This gh tasks could be closed now
Waiting for @aminlatifi review

Hey,
Thanks...the pull request didn't pass circleci check. Please fix it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vojtechsimetka picture vojtechsimetka  ·  6Comments

GriffGreen picture GriffGreen  ·  3Comments

krrisis picture krrisis  ·  6Comments

vojtechsimetka picture vojtechsimetka  ·  7Comments

danelsuga picture danelsuga  ·  6Comments