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 5229bf3 commit e9ab866Copy full SHA for e9ab866
projects/elys-lending/index.js
@@ -0,0 +1,19 @@
1
+const { get } = require('../helper/http')
2
+
3
+async function tvl(api) {
4
+ const { net_stakings } = await get('https://api.elys.network/elys-network/elys/masterchef/chain_tvl')
5
+ net_stakings.filter(i => i.denom === 'USDC').map(i => api.addCGToken('usd-coin', i.amount))
6
+}
7
8
9
+async function borrowed(api) {
10
+ const { usdc_staking, net_stakings } = await get('https://api.elys.network/elys-network/elys/masterchef/chain_tvl')
11
+ api.addCGToken('usd-coin', usdc_staking)
12
+ net_stakings.filter(i => i.denom === 'USDC').map(i => api.addCGToken('usd-coin', i.amount * -1))
13
14
15
16
+module.exports = {
17
+ timetravel: false,
18
+ elys: { tvl, borrowed, }
19
0 commit comments