defillama / defillama-server Goto Github PK
View Code? Open in Web Editor NEWServer for defillama
Server for defillama
Start point: src/cli/recomputeDaily.ts
The function storeTvl
in src/storeTvlInterval/getAndStoreTvl.ts
already accepts the block and the timestamp associated with the block. The utility job should be to find the desired blocks and execute the storeTvl
to store the old tvls.
the website for the recently added multiverseC2C was typed wrong when submitted I have tried creating a PR but somehow it has a conflict with the main branch could you please update it to https://multiverse.fntokens.xyz
trying to run server and missing some env variables. would this work with infura?
Cannot resolve variable at "provider.environment.ETHEREUM_RPC": Value not found at "file" source,
- Cannot resolve variable at "provider.environment.BSC_RPC": Value not found at "file" source,
- Cannot resolve variable at "provider.environment.POLYGON_RPC": Value not found at "file" source,
- Cannot resolve variable at "provider.environment.OUTDATED_WEBHOOK": Value not found at "file" source
This should serialize data in an easy format to be consumed by a chart.
Hi,
We would like to add the use of Supra's Oracle to Mirakle Defi. Their dynamic pricing is supported by SupraOracles.
Materials
-> https://mirakle.gitbook.io/home/
Rationale
Mirakle Defi uses Supra's oracle for dynamic pricing of the following assets: btc/usdt, eth/usdt, and fuse/usdt
Thank you in advance.
Best,
Keith
childProtocols
is not being returned from the summary endpoint and in the example case below, only 1 version of the protocol is being returned.
To reproduce: https://api.llama.fi/summary/dexs/uniswap?excludeTotalDataChart=true&excludeTotalDataChartBreakdown=true&dataType=dailyVolume
Recently discovered defi-llama. Hovering over the sidebar menu seems to make api calls to the server. It is not very noticeable however I ended up making over 150+ calls just by hovering my cursor across the page.
Not sure about the best approach here, maybe there is some benefit to this approach however, it seems redundant to make so many same calls.
The defillama API already responds with the slug for each DeFi protocol, however the documentation makes no mention of it. Where can I contribute to make that change?
I think the documentation should also include the Protocol interface. Anyone using TypeScript would greatly appreciate it.
defillama-server/src/protocols/data.ts
Lines 3 to 20 in 74ea7d7
Hello,
The price for Renzo ezETH on Linea does not seem to load up properly even though the address and asset is tracked on CoinGecko.
The endpoint https://coins.llama.fi/prices/current/linea:0x2416092f143378750bb29b79ed961ab195cceea5
Returns a blank response
{
"coins": {}
}
On CoinGecko you can verify that the address for ezETH is properly set 0x2416092f143378750bb29b79ed961ab195cceea5.
CoinGecko: https://www.coingecko.com/en/coins/renzo-restaked-eth
Unsure if this has anything to do with CG returning null
for the decimals for the above asset.
https://api.coingecko.com/api/v3/coins/linea/contract/0x2416092f143378750bb29b79ed961ab195cceea5
in the above you calculate the TVS for each oracle which is great
the only caveat is the "Internal" one which is misleading because it's an accumulation of a few separate ones
potential improvement is doing something like this:
https://github.com/007vasy/007vasy.github.io/blob/main/docs/index.html#L46..L48
which I am doing to avoid create false clusters:
https://007vasy.github.io/
hi, I have read this guide https://docs.llama.fi/list-your-project/how-to-update-a-project
I know that I need to complete an adapter, but the adapter only defines how to calculate TVL, and has nothing to do with the protocol (name, official website, logo...). How can I add my protocol?
Change my URLS
Looks like the Defillama set the wrong TIA (0x6fae4d9935e2fcb11fc79a64e917fb2bf14dafaa) price.
https://coins.llama.fi/prices/current/manta:0x6Fae4D9935E2fcb11fC79a64e917fb2BF14DaFaa
should be
https://www.geckoterminal.com/manta-pacific/pools/0x553f4ebe95a796af390019b9dbdd8e94014780c5?utm_source=coingecko&utm_medium=referral&utm_campaign=searchresults
Currently, only 5 starknet tokens are supported:
defillama-server/coins/src/adapters/tokenMapping_added.json
Lines 4723 to 4754 in 37559eb
You can verify it by sending a request to:
However I want support for starknet:0x042b8f0484674ca266ac5d08e4ac6a3fe65bd3129795def2dca5c34ecc5f96d2
to be added, which is wstETH on Starknet.
But what I cannot understand is that I have tried to read https://docs.llama.fi/coin-prices-api and follow the direction there, but how come some starknet tokens are already supported despite the absence of coins/src/adapters/bridges/starknet.ts
? From what I understood, I should create coins/src/adapters/bridges/starknet.ts
and define export default async function bridge
that would get the list of tokens from starknet.
Anyway, if you find it easier to just add a support for it directly, that would be great too, otherwise please let me know if what I think I should do is right.
The summary/fees/{protocol}
endpoint has some inconsistencies that I believe should be improved. I have not checked this behavior against the other fees/revenue endpoints, so it may also apply to those.
https://api.llama.fi/summary/fees/ethereum?dataType=dailyFees
and https://api.llama.fi/summary/fees/ethereum?dataType=dailyRevenue
both work as I would expect, but for dataType=totalFees
and dataType=totalRevenue
configs, I get a response with both totalDataChart and totalDataChartBreakdown returning null values. Based on the data I see in the dashboard, this shouldn't be the case. For Lyra, dailyFees
is the only config that produces non-null results.
Volume endpoints include excludeTotalDataChart and excludeTotalDataChartBreakdown flags. Given that volume and fees/revenue are given in the same format, I believe that the fees/revenue endpoints should include this same behavior even if it has virtually no effect on final usage of this data.
The link to the audit of the MinSwap protocol on Cardano does not lead to a valid audit file (it goes to 404)
todo:
We currently have ~$900k of usdt supplied to umee. It was added 2 weeks ago in #2878 and i have double checked that the IBC denom is correct. Further more I don't believe any of the assets on this PR are showing up on umee's defillama tvl
It may be useful to have a job run on a Github action run periodically (daily or weekly) to healthcheck all links found across all projects so you can get alerted and weed out dead links as soon as they are broken.
Example workflow: https://github.com/kargakis/awesome-carbon/blob/main/.github/workflows/ci.yml
This is a feature request.
I identified some steps to accomplish the request:
1- Changing computeTVL in @defillama/sdk to return the tokens locked up. Here is one suggestion of the output format for REN protocol
{
total: 1021225134.1998382,
tokens: [
{
usdAmount: 219793000,
tokenSymbol: 'REN',
amount: 184700000,
price: 1.19
},
{
usdAmount: 801432134.1998382,
tokenSymbol: 'USDT',
amount: 801661409.362916,
price: 0.999714
}
]
}
2- Adapting storeNewTvl
to store the protocol's tokens TVL in dynamo DB (https://github.com/DefiLlama/defillama-server/blob/master/src/utils/storeNewTvl.ts)
This call fails and doesn't return anything:
https://coins.llama.fi/prices/current/coingecko:boringdao-[old]
Could be the brackets?
Currently, ZEND (zkLend token) isn't supported. This can be confirmed by sending a request to
ZEND has been listed on Bybit and Kucoin:
Would be great if the server can support it, so I can make changes to DefiLlama-Adapters for ZEND staking
Hi awesome defillama team, I have clone the defillama-server repo and want to run the server on my local env, but it didn't work. Could you provide a guide how to run the defillama-server on local dev env? Thanks!
Here's what I have done:
Clone the defillama-server and the submodules
run yarn
in both the defillama-server and Defillama-Adapters repo to install the npm packages
In these step I got the following error
nfo To upgrade, run the following command:
$ curl --compressed -o- -L https://yarnpkg.com/install.sh | bash
$ cp patches/geturl.js node_modules/@ethersproject/providers/node_modules/@ethersproject/web/lib.esm/geturl.js
cp: node_modules/@ethersproject/providers/node_modules/@ethersproject/web/lib.esm/geturl.js: No such file or directory
error Command failed with exit code 1.
.env
file and added the required env variablesAnd here's the my .env file content
ETHEREUM_RPC=https://eth-mainnet.gateway.pokt.network/v1/5f3453978e354ab992c4da79
BSC_RPC=https://bsc-dataseed.binance.org/
POLYGON_RPC=https://polygon-rpc.com/
ARBITRUM_RPC=https://arb-mainnet.g.alchemy.com/v2/your-api-key
FANTOM_RPC=https://rpc.ftm.tools/
OPTIMISM_RPC=https://mainnet.optimism.io
XDAI_RPC=https://rpc.xdaichain.com/
OUTDATED_WEBHOOK=xxx
HARMONY_RPC=https://api.harmony.one
SPIKE_WEBHOOK=https://hooks.spike.sh/:token/push-events
MOCK_DYNAMODB_ENDPOINT=http://localhost:8000
Install dynamodb and start the dynamodb
Run yarn server
to start the defillama-server (Failed)
And here's part of the error messages
WARNING in ./DefiLlama-Adapters/node_modules/@defillama/sdk/node_modules/node-fetch/lib/index.js 163:11-38
Module not found: Error: Can't resolve 'encoding' in '/Users/xxx/defillama-server/DefiLlama-Adapters/node_modules/@defillama/sdk/node_modules/node-fetch/lib'
Module not found: Error: Can't resolve 'encoding' in '/Users/xxx/defillama-server/node_modules/cross-fetch/node_modules/node-fetch/lib'
ERROR in ./DefiLlama-Adapters/projects/pole/index.js 7:4-57
Module not found: Error: Can't resolve '@port.finance/port-sdk/lib/models/WalletId' in '/Users/xxx/defillama-server/DefiLlama-Adapters/projects/pole'
solution: pip install brotli
curl https://api.llama.fi/protocols -H "Accept: application/json" -vvvvv curl | brotli -d -
for the next poor soul
https://defillama.com/protocol/avnu
Data are missing between August 31 to September 6. Could you re-run the integration calls?
You can even re-run all calls from May 2nd.
Thanks
MCap is missing from: https://defillama.com/chains
Can you add MCap to this and other pages please? Thanks
here is the token info about vASTR
{
symbol: "vASTR",
address: "0x7746ef546d562b443AE4B4145541a3b1a3D75717",
decimals: 18,
redirect: "coingecko#bifrost-voucher-astr",
}
Explorer Link: https://astar-zkevm.blockscout.com/address/0x7746ef546d562b443AE4B4145541a3b1a3D75717
Coingecko Link: https://www.coingecko.com/en/coins/bifrost-voucher-astr
And this is a PR to implement it, PTAL. #6604
The real audit is listed here: https://www.certik.com/projects/wingriders
The corresponding github repository by CertiK leads to 404 (https://github.com/WingRiders/core-contracts/tree/audit). No complete audit is provided anywhere.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.