Calculating TVL for the pool contracts #11057
Answered
by
0xtomoon
0xmonkeyking
asked this question in
Q&A
-
How can I calculate TVL for pool contracts in the protocol? Which functions are useful? |
Beta Was this translation helpful? Give feedback.
Answered by
0xtomoon
Jul 21, 2024
Replies: 1 comment
-
@0xmonkeyking https://github.com/DefiLlama/DefiLlama-Adapters/blob/main/projects/stargatefinance-v2/index.js#L91
Here is one example which uses sumTokens2. Hope it answers your question. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
0xmonkeyking
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@0xmonkeyking
There are several functions in the
projects/helper/unWrapLPs.js
You can use
sumTokens2
function to get tokens balance from pool contracts.https://github.com/DefiLlama/DefiLlama-Adapters/blob/main/projects/stargatefinance-v2/index.js#L91
Here is one example which uses sumTokens2. Hope it answers your question.