We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce44360 commit c792417Copy full SHA for c792417
projects/yei-swap/index.js
@@ -0,0 +1,22 @@
1
+const { getConfig } = require('../helper/cache')
2
+const { sumTokens2 } = require('../helper/unwrapLPs')
3
+
4
+module.exports = {
5
+ sei: {
6
+ tvl,
7
+ },
8
+}
9
10
+async function tvl(api) {
11
+ const { pools, } = await getConfig('yei-swap', 'https://swap-api.yei.finance/pools')
12
13
14
+ const ownerTokens = []
15
+ for (const { token0, token1, address} of pools) {
16
+ if (token0?.address && !token0.symbol.startsWith('stata')) ownerTokens.push([[token0.address], address])
17
+ if (token1?.address && !token1.symbol.startsWith('stata')) ownerTokens.push([[token1.address], address])
18
+ }
19
20
+ return sumTokens2({ api, ownerTokens, permitFailure: true })
21
22
0 commit comments