-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Blacksail Finance TVL adapter for Sonic Mainnet #12932
Conversation
Error while running adapter at projects/blacksail:
|
Error while running adapter at projects/blacksail:
|
Error while running adapter at projects/blacksail:
|
Error while running adapter at projects/blacksail:
|
Error while running adapter at projects/blacksail:
|
What origin do I need to whitelist in the API? |
please read token balances using on chain methods instead of a proprietary api. In its current form this adapter is impossible to debug or audit |
@waynebruce0x We can call the balances of the strategies directly on chain if you prefer, but the issue remains in the fact that we need to multiply the balances by the USD value of the LPs held by the strategy which requires a custom API since each LP price is calculated differently per DEX. Do you have some suggestions here? Do we have a public LP pricing API we can use, or can we use our API for the pricing portion only? This is the same reason why beefy.finance uses a custom API endpoint. |
Our price API supports a range of LPs and we should be able to support any missing assets that are a significant portion of your TVL |
Error while running adapter at projects/blacksail:
|
Error while running adapter at projects/blacksail:
|
Error while running adapter at projects/blacksail:
|
Error while running adapter at projects/blacksail:
|
@waynebruce0x do you mind taking a look at this error? I implemented on chain methods to grab the strategy balances and calculate the total tvl for the chain. May still need to whitelist a domain in CORS to allow us to pull the strategy addresses from the blacksail API |
Our server infra does not have a static IP - can you give us a key or make the API public? |
@waynebruce0x Thanks for taking a look, I have created an API key for you to use, what's the most secure way for me to send it over to you to store in the env? |
Error while running adapter at projects/blacksail:
|
Error while running adapter at projects/blacksail:
|
have you got discord? can you join our server and tag me in a message? Failing that, telegram? |
projects/blacksail/index.js
Outdated
const response = await fetch('https://api.blacksail.finance/stats', { | ||
method: 'GET', | ||
headers: { | ||
'x-api-key': process.env.BLACKSAIL_API_KEY, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi, can you share this api key, unsure why this is a protected route.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I have shared the API key with @waynebruce0x via discord DMs previously to add to the .env. What's your discord tag I can DM it to you as well?
The adapter at projects/blacksail exports TVL:
|
added a hack for now, will fix it once we get the api |
@g1nt0ki Hi thanks for working on PR 12932 for Blacksail, reading the comments I have shared the API key with @waynebruce0x via discord DM previously to add to the env, would you like a copy as well? I see the PR was closed without calling the API at all, whats up with that? Also it seems like we aren't properly calculating the price of our largest pool which is a beets (WeightedPool) LP from this strategy with roughly 5K tvl: 0xAc57B713C630f188bc2d95c2ae3C27A1DE1DebA1 |
NOTE
Please enable "Allow edits by maintainers" while putting up the PR.
package-lock.json
file as part of your changes, we use lockfileVersion 2, and most use v1 and using that messes up our CIName (to be shown on DefiLlama):
Blacksail Finance
Twitter Link:
https://x.com/blacksail_fi
List of audit links if any:
https://app.solidproof.io/projects/blacksail
https://docs.blacksail.finance/about-blacksail-finance/audits/in-house-audit
Website Link:
https://app.blacksail.finance/
Logo (High resolution, will be shown with rounded borders):
https://docs.blacksail.finance/~gitbook/image?url=https%3A%2F%2F198229502-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fi9vbjZSWtXcZaBayytwv%252Fuploads%252FgwVIhnoQzfk2f6q8kT3r%252Fbsf-black.png%3Falt%3Dmedia%26token%3D28513eb7-5067-481f-ae50-59ac4980ea90&width=768&dpr=1&quality=100&sign=d7fee2e9&sv=2
https://docs.blacksail.finance/~gitbook/image?url=https%3A%2F%2F198229502-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fi9vbjZSWtXcZaBayytwv%252Fuploads%252F6JWmH8geJBq9IWRhp7om%252Fbsf.png%3Falt%3Dmedia%26token%3D06b917ea-2024-4a2e-8327-7ee37c018fbe&width=768&dpr=1&quality=100&sign=9131b2cf&sv=2
Current TVL:
22,536.77
Treasury Addresses (if the protocol has treasury)
0x0c16Da76872131bC6095f73b894B4757873dAce1
Chain:
Sonic: 146
Coingecko ID (so your TVL can appear on Coingecko, leave empty if not listed): (https://api.coingecko.com/api/v3/coins/list)
Coinmarketcap ID (so your TVL can appear on Coinmarketcap, leave empty if not listed): (https://api.coinmarketcap.com/data-api/v3/map/all?listing_status=active,inactive,untracked&start=1&limit=10000)
Short Description (to be shown on DefiLlama):
Blacksail Finance is an advanced smart contract yield compounding suite built on the Sonic Blockchain network. Blacksail helps users earn more cryptocurrency by automatically compounding their DeFi rewards for their crypto tokens into their original assets, allowing users to easily earn more of their favorite holdings.
Token address and ticker if any:
Category (full list at https://defillama.com/categories) *Please choose only one:
Yield Aggregator
Oracle Provider(s): Specify the oracle(s) used (e.g., Chainlink, Band, API3, TWAP, etc.):
Implementation Details: Briefly describe how the oracle is integrated into your project:
Documentation/Proof: Provide links to documentation or any other resources that verify the oracle's usage:
forkedFrom (Does your project originate from another project):
methodology (what is being counted as tvl, how is tvl being calculated):
TVL is the usd value of all LP tokens deposited in each vault strategy contract on Blacksail Finance.
Github org/user (Optional, if your code is open source, we can track activity):