yearn / yearn-api-archived

Collection of serverless API
23 stars 24 forks source link

TVL calculation #38

Closed miguel567 closed 3 years ago

miguel567 commented 3 years ago

This endpoint uses Dudesahn's documentation: https://hackmd.io/@dudesahn/BkxKfTzqw#Totals-reasoning-above-in-%E2%80%9CCalculating-Totals-Avoiding-Double-Counting%E2%80%9D

It uses Holdings endpoint as input, so you need to call at least once /holdings/save The structure has been aligned with Defipulse. I've added a "calculations" section in the json to demonstrate the "double counting" issue.