Closed parkerburchett closed 1 year ago
The backscratcher vault has been sunset and is not earning yield anymore atm, and it is encouraged to move to the new and improved yCRV wrapper and its derivatives st-ycrv or lp-ycrv to earn yield on crv at yearn. Thus this wont be fixed but fix will be noted so the code isnt duplicated elsewhere
Backscratcher.apy(self, _: ApySamples) -> Apy
at https://github.com/yearn/yearn-exporter/blob/master/yearn/special.py overestimates the APY from virtual price by looking back at APY from virtual price increases from the start of the pool instead of comparing the increase in virtual price from a year ago. This causes it to incorrectly measure APY from fees as ~2.3% instead of the APY from fees in the last year of ~.3%.This is the function with the error
This section in particular is wrong.
curve_3_pool.get_virtual_price()
tracks the lp token value increase from swap fees from the start of the pool more than 2 years ago. The 3pool contract was deployed on Sep 6, 2020To fix this you can update the function like this.
The way it is written now overestimates the APY by about 2%.
The virtual price only increases by ~0.34% in the last year instead of 2.37% since the lifetime of the pool.