In this repo you will find the code responsible to get data positions from the subrgaph and calculate the TVL by users. The main scripts is generating a output as CSV and there is another one that can be used to generate the JSON file.
npm install // install all packages
npm run watch //other terminal tab
npm run start // other terminal tab
Now you can see the outputData.csv file. That's it.