yearn / yearn-vaults-v2-subgraph

26 stars 41 forks source link

Bug: Harvest event reports are not showing up #75

Closed storming0x closed 3 years ago

storming0x commented 3 years ago

Tried the following query filtering for Iron Bank strategy here: https://yearn-hub.vercel.app/strategy/Curve%20Iron%20Bank%20Pool%20yVault/0x864F408B422B7d33416AC678b1a1A7E6fbcF5C8c

And its showing 0 reports as result when on etherscan it shows several harvest trxs.

{
    strategies(where: {
    id: "0x864f408b422b7d33416ac678b1a1a7e6fbcf5c8c"
  }) {
      id
      name
      vault {
        token { symbol }
        shareToken { symbol }
      }
      address
      debtLimit
      rateLimit
      performanceFeeBps
        latestReport {
        id
        gain
        totalGain
        }
      reports {
        id
        timestamp
        blockNumber
        gain
        loss
        totalGain
        totalLoss
        totalDebt
        debtLimit
        debtAdded
        results {
          apr
          durationPr

        }
      }
    }
}

Screen Shot 2021-05-31 at 17 44 59

jstashh commented 3 years ago

@dougstorm the harvests field of this strategy is being populated, do you want to be using that here instead of reports, or should harvests be categorised as reports as well? not sure what the difference is.

storming0x commented 3 years ago

@dougstorm the harvests field of this strategy is being populated, do you want to be using that here instead of reports, or should harvests be categorised as reports as well? not sure what the difference is.

i didnt notice the harvests are available, but im looking to add the APRs that are available as a sub node of reports which are called StrategyReportResults i believe, so agree if we have reports and harvests it can be confussing which one to used.

In my case im looking for APR, profit, loss, trx hash for harvests