diff --git a/apps/indexer-sentio/queries/pool_snapshots.sql b/apps/indexer-sentio/queries/pool_snapshots.sql index 5003acaa..f5cd2d94 100644 --- a/apps/indexer-sentio/queries/pool_snapshots.sql +++ b/apps/indexer-sentio/queries/pool_snapshots.sql @@ -45,7 +45,9 @@ SELECT timestamp, borrowIndex AS borrow_index, borrowApr AS borrow_apr, totalFeesUsd AS total_fees_usd, - userFeesUsd AS user_fees_usd, + ( + borrowedAmountUsd * borrowApr - suppliedAmountUsd * supplyApr + ) / 100 / 365 / 24 as user_fees_usd, protocolFeesUsd AS protocol_fees_usd FROM `BasePoolSnapshot_raw` WHERE timestamp > timestamp('{{timestamp}}') \ No newline at end of file