ydaemon icon indicating copy to clipboard operation
ydaemon copied to clipboard

Bug: UI showing incorrect earned amount

Open karelianpie opened this issue 1 year ago • 4 comments

Initially reported by @defiglenn in https://github.com/yearn/yearn.fi/issues/199

What happened 🆘

Yearn.finance showing incorrect 'earned' amount for vault token holders.

  • Balance is sometimes showing 0 amount when user had previously seen earned amount above 0. https://discord.com/channels/734804446353031319/734811808401063966/1109253025958211675
  • Balance sometimes showing negative amount after user deposits
  • https://discord.com/channels/734804446353031319/734811808401063966/1109253025958211675
  • Balance not increasing after a harvest has taken place. A user reported to me on telegram how, despite a harvest completing 10 hours ago where the share price on yearn.vision had increased, his earned amount was unchanged.

To Reproduce 🔂

Steps to reproduce the behavior: View earned amount in vault, see how it changes after a deposit and harvest

More 🔎

karelianpie avatar Jun 09 '23 05:06 karelianpie

@0xBasically can I take this one?

visitskyworld avatar Jul 13 '23 01:07 visitskyworld

@0xBasically can I take this one?

sure

0xBasically avatar Jul 13 '23 13:07 0xBasically

@Majorfi I reckon this is coming from yDaemon

karelianpie avatar Aug 18 '23 10:08 karelianpie

Earned amount is an estimate coming from the Subgraph, then doing some FIFO computation to try to determine the expected amount earned. Nothing is calculated on the FE yes

Majorfi avatar Aug 18 '23 15:08 Majorfi