Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

Gitcoin Grant: Better APY Polling ($2k) #65

Closed
thebaoman opened this issue Mar 30, 2021 · 6 comments · May be fixed by #66
Closed

Gitcoin Grant: Better APY Polling ($2k) #65

thebaoman opened this issue Mar 30, 2021 · 6 comments · May be fixed by #66

Comments

@thebaoman
Copy link
Contributor

Right now APYs are calculated only on ETH denominated pairs.

They also hit the RPC node once per farm. This creates a laggy experience on mainnet, and on some EVM networks, results in calling the RPC node too many times and getting stuck in a loop.

We're looking for someone to improve the APY display system so that it:

  1. Shows APYs for all pairs.
  2. Batch calls for data needed for APYs to prevent too many calls.

In order to be accepted this PR should:

  • Pass standard lint tests.
  • Pass Bao Finance team security review.
  • Display APY for pairs that do not use ETH.
  • Reduce the number of calls used to show APY data.
  • Be well commented and able to update to support new pairs.
@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 1.1 ETH (2029.08 USD @ $1844.62/ETH) attached to it as part of the BaoFinance fund.

@gitcoinbot
Copy link

gitcoinbot commented Mar 31, 2021

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 265 years, 7 months from now.
Please review their action plans below:

1) nikbhintade has applied to start work (Funders only: approve worker | reject worker).

Hey, I can try this maybe I'll get this done before Sunday (4th April). I work with react but typescript will be new for me.

Also, the Bao logo is adorable.
2) eenagy has applied to start work (Funders only: approve worker | reject worker).

Add multicall support for the project. I was doing similar work on different projects with the same problem.

Out of curiosity went and tried out how this could be pulled into the project, and managed to pull together a minimal working implementation.

The idea to use https://www.npmjs.com/package/@makerdao/multicall, but there are a couple of different approaches to how this could be done.
3) blockcontractor has been approved to start work.

  1. Update/replace useAllStakedValue hook to use web3 batch requests or similar.

  2. Deal with non ETH denominated LP pairs using uniswap pricing from the SDK to get the value of the denominator in ETH as a multiplier for the calculation. Note that I think it makes sense to use mainnet uniswap pricing on xDai as well as mainnet, which is why I think it's better to use the SDK to fetch the data.

My experience:

  • Very strong react & typescript experience (professional)
  • Relatively new to web3, but learning fast

My availability:

  • I won't be working on this full time due to other commitments, so speed of delivery will be slower than someone who does have that luxury, but I will of course provide regular updates.

Learn more on the Gitcoin Issue Details page.

@gitcoinbot
Copy link

@blockcontractor Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@blockcontractor
Copy link

@gitcoinbot I am still working on this - I have a WIP draft PR open and I'll be committing more code today.

@blockcontractor
Copy link

@thebaoman ready for a review

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 1.1 ETH (2186.67 USD @ $1987.88/ETH) has been submitted by:


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

Successfully merging a pull request may close this issue.

4 participants