You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's quite common for us to receive questions about why our numbers differ from the ones provided by other sites. This question is generally hard to answer because most of the time we don't have access to the code that other sites use to calculate TVL, so we need to guess what could be different, and most of the time that's impossible since there's a mixture of factors that could contribute to the disparities and we only have access to a single number, the TVL in USD.
To illustrate this further here's a breakdown of code transparency on multiple sites:
DefiPulse
At first glance it may seem like it is completely transparent since the code used for the adapters is open source on https://github.com/ConcourseOpen/DeFi-Pulse-Adapters. However, the code provided there is not sufficient to reproduce the results, due to the following problems:
The SDK used for all operations is closed source, there's some javascript code on the repo but all it does is just package the arguments into an HTTP call which gets sent to a server to get back the returned data. What's more, you need to have an API key to make these calls, and these keys are only handed to DefiPulse integration partners.
There's multiple adapters that make use of a token list that is closed source as well. There's no data on what gets a token included into that list or what tokens are included, so even if you manage to replicate the SDK you'll run into a wall here since it's impossible to reproduce this list.
Some adapters on the repository are not the actual ones being used. There's some adapters where this is really obvious, such as ones that have javascript syntax errors and won't even run, or the case of instadapp, which had it's TVL calculation updated multiple times but the last update on it's adapter is from June 2020, but there are other cases where it's more subtle.
For some adapters there seems to be some post-processing applied on the results which is not included in the open code. For example, for Matic the TVL matches the one returned by the adapter if you remove a few of the tokens returned, so it seems like the server applies some processing which is unknown to everybody else.
All the conversations with the teams integrating the adapters happen on completely private chats, so it's impossible to know what was discussed or what was decided to be included or not.
All of this together makes it impossible to reproduce their results, because even if you try to replicate what the SDK does, when you get a different result than what's on their website you'll need to navigate around all the things that could have been changed. Maybe some of the tokens returned have been removed from the calculation, maybe the token list is different from yours or there's a bug in their SDK which changes the results, or maybe the adapter you are looking at has been deprecated and is completely different from the actual one being used and you are just wasting your time, it's impossible to tell which of these are happening.
DefiStation and DeBank
Both of these have completely opaque systems where there's no information at all on how TVLs are calculated.
DefiStation generally works by taking the TVLs reported by the projects themselves so it may be possible to ask the project's devs or the community, but in my experience the scripts developed by the projects tend to be closed-source.
DeBank is just entirely closed-source.
DefiLlama
Everything is open source: our server, adapters, SDK and frontend. This makes it so anyone can reproduce our results and see exactly how the TVL of any project is calculated.
Conclusion
We are in a situation where everybody can tell how we calculate our TVLs but we can't tell how everybody else does it. So, when somebody asks us why our numbers are different, it's hard to pinpoint the reason and the best thing we can do is guess.
This discussion was converted from issue #147 on September 02, 2021 06:40.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
It's quite common for us to receive questions about why our numbers differ from the ones provided by other sites. This question is generally hard to answer because most of the time we don't have access to the code that other sites use to calculate TVL, so we need to guess what could be different, and most of the time that's impossible since there's a mixture of factors that could contribute to the disparities and we only have access to a single number, the TVL in USD.
To illustrate this further here's a breakdown of code transparency on multiple sites:
DefiPulse
At first glance it may seem like it is completely transparent since the code used for the adapters is open source on https://github.com/ConcourseOpen/DeFi-Pulse-Adapters. However, the code provided there is not sufficient to reproduce the results, due to the following problems:
All of this together makes it impossible to reproduce their results, because even if you try to replicate what the SDK does, when you get a different result than what's on their website you'll need to navigate around all the things that could have been changed. Maybe some of the tokens returned have been removed from the calculation, maybe the token list is different from yours or there's a bug in their SDK which changes the results, or maybe the adapter you are looking at has been deprecated and is completely different from the actual one being used and you are just wasting your time, it's impossible to tell which of these are happening.
DefiStation and DeBank
Both of these have completely opaque systems where there's no information at all on how TVLs are calculated.
DefiStation generally works by taking the TVLs reported by the projects themselves so it may be possible to ask the project's devs or the community, but in my experience the scripts developed by the projects tend to be closed-source.
DeBank is just entirely closed-source.
DefiLlama
Everything is open source: our server, adapters, SDK and frontend. This makes it so anyone can reproduce our results and see exactly how the TVL of any project is calculated.
Conclusion
We are in a situation where everybody can tell how we calculate our TVLs but we can't tell how everybody else does it. So, when somebody asks us why our numbers are different, it's hard to pinpoint the reason and the best thing we can do is guess.
Beta Was this translation helpful? Give feedback.
All reactions