Skip to content

Commit e9ab866

Browse files
committed
track elys earn DefiLlama#13074
1 parent 5229bf3 commit e9ab866

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

projects/elys-lending/index.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)