Skip to content

Commit 2c8b106

Browse files
committed
add dym dex
1 parent 8df5533 commit 2c8b106

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

projects/dymension-dex.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
async function tvl() {
2+
const pools = await fetch("https://fetchnetworkdatarequest-xqbg2swtrq-uc.a.run.app/?networkId=dymension_1100-1&dataType=pools").then(r=>r.json())
3+
const dym = pools.reduce((sum, pool)=>{
4+
const dymAssets = pool.poolAssets.find(a=>a.token.denom === "adym").token.amount/1e18
5+
return sum+dymAssets
6+
}, 0)
7+
8+
return {
9+
"coingecko:dymension": dym*2
10+
}
11+
}
12+
13+
module.exports = {
14+
methodology: 'Liquidity in DEX',
15+
dymension:{
16+
tvl
17+
}
18+
}

0 commit comments

Comments
 (0)