Skip to content

Commit 396fbe2

Browse files
merge ekubo and ekubo evm
1 parent e89c0bc commit 396fbe2

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

projects/ekubo/index.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,35 @@
11
const { sumTokens } = require('../helper/chain/starknet')
22
const { getConfig } = require('../helper/cache')
3+
const { sumTokensExport } = require('../helper/unwrapLPs')
34

45
const market = '0x00000005dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b'
56

6-
async function tvl(api) {
7+
async function starknetTvl(api) {
78
const tokens = await getConfig('ekubo', "https://mainnet-api.ekubo.org/tokens")
89
return sumTokens({ api, owner: market, tokens: tokens.map(t => t.l2_token_address) })
910
}
1011

12+
const config = {
13+
ethereum: {
14+
owners: ['0xe0e0e08a6a4b9dc7bd67bcb7aade5cf48157d444'],
15+
blacklistedTokens: []
16+
}
17+
}
18+
19+
Object.keys(config).forEach(chain => {
20+
config[chain].fetchCoValentTokens = true
21+
config[chain].tokenConfig = { onlyWhitelisted: false }
22+
})
23+
24+
const ethTvl = sumTokensExport(config.ethereum)
25+
1126
module.exports = {
1227
methodology: 'Value of LP in the DEX, includes LPs that are out of range and thus not providing active liquidity',
1328
starknet: {
14-
tvl
29+
tvl: starknetTvl
30+
},
31+
ethereum: {
32+
tvl: ethTvl
1533
},
1634
isHeavyProtocol: true,
1735
}

0 commit comments

Comments
 (0)