protocol-subgraphs icon indicating copy to clipboard operation
protocol-subgraphs copied to clipboard

lifetimeReserveFactorAccrued is incorrect for V3 markets

Open defispartan opened this issue 3 years ago • 1 comments

The accruedToTreasury value looks correct, but lifetimeReserveFactorAccrued > lifetimeSupplierInterestAccrued which does not make sense as reserve factor is a percentage of supplier interest.

Query:

{
  reserves(first: 50, orderBy: lastUpdateTimestamp, orderDirection: desc) {
      id 
      underlyingAsset
      lifetimeReserveFactorAccrued
      lifetimeSuppliersInterestEarned 
      accruedToTreasury
   }
}

defispartan avatar Jun 28 '22 02:06 defispartan

I'm not sure if that's wrong. lifetimeReserveFactorAccrued is "borrow fees + liquidation fees + flashloan protocol fees + (portal fees)" where lifetimeSuppliersInterestEarned is only "accumulated interest on aTokens" ( not 100% srure, but i think excluding all the other fees that lps get)

sakulstra avatar Jul 07 '22 12:07 sakulstra