-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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 TradingStrategy.ai #9966
Add TradingStrategy.ai #9966
Conversation
The adapter at projects/trading-strategy exports TVL:
|
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, your app has two issues, the open strategies are enzyme contracts, which we already count as part of enzyme tvl
And the hot wallets being hot wallets, we cant include as tvl. So, I am not sure if we can list you :(
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.
this can be reduced to
const { getConfig } = require('../helper/cache')
const chains = ["ethereum", "polygon", "base", "bsc", "arbitrum"]
chains.forEach(chain => {
module.exports[chain] = {
tvl: async (api) => {
const { strategies } = await getConfig('trading-strategy', 'https://tradingstrategy.ai/strategies/tvl')
const vaults = Object.values(strategies).filter(strat => strat.chain_id === api.chainId && strat.asset_management_mode === 'enzyme').map(i => i.address)
const tokens = await api.multiCall({ abi: 'address[]:getTrackedAssets', calls: vaults })
return api.sumTokens({ ownerTokens: tokens.map((t, i) => [t, vaults[i]])})
}
}
})
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.
Thank you for getting back @g1nt0ki.
What if I exclude our vaults from Enzyme adapter? I can speak with Enzyme about this, as we are in good terms.
We can also label them Trading Strategy + Enzyme.
There are couple of other digital asset management protocols who have a similar set up and wish we can find a solution for this.
@g1nt0ki ping here - please see the question above |
hi @miohtama sorry for the delayed response. Trying to understand the product a bit more, how does TradingStrategy UI interact with emzyme contracts, directly? or you have deployed your own contracts, that act as proxy/controller? |
Thank you for your response @g1nt0ki
Hope this helps. Also I believe you might run into similar questions with Uniswap v4, as multiple protocols are building on the top of its hooks. |
hi @miohtama Sorry, we cant show tvl in that case. But do you charge some fees? if so, we can pull and show the revenue/fee metric. Checked with the team, same will be applicable to the teams building on top of uni v4. |
Internal PR to see what CI says