GitHunt
M3

m30m/tvl-calculator-example

Pure javascript utility to compute total deposits and borrows from on-chain data.

Solend Total Value Locked Calculator Demo

Pure javascript utility to compute total deposits and borrows from on-chain data. Works by fetching obligation for every user and computing a sum of deposits and borrows (obligation properties) for each asset.

Useful as a demo for reading on-chain Solend data.

Setup

yarn

Run Demo

node index.js

Example output:

Number of users: 441
Total Deposits:
SOL 7887231713716
ETH 114515764
USDC 999987385884
BTC 60057
Total Borrows:
SOL 1229709380228
USDC 204904889842
ETH 6920310
BTC 17997

Languages

JavaScript100.0%
Created September 21, 2021
Updated September 21, 2021