Skip to content

Commit

Permalink
fix: Stader
Browse files Browse the repository at this point in the history
  • Loading branch information
0xpeluche committed Aug 8, 2024
1 parent 8126035 commit 835ce8c
Showing 1 changed file with 4 additions and 38 deletions.
42 changes: 4 additions & 38 deletions projects/stader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,27 @@ async function getData() {
return _res;
}

async function hbarTvl(timestamp) {
async function hbarTvl() {
const res = await get("https://universe.staderlabs.com/common/tvl");
return {
"hedera-hashgraph": res.hedera.native,
};
}

async function fantomTvl() {
const res = await getData();
return {
"fantom": res.fantom.native,
};
}


async function maticTvl() {
const res = await getData();
return {
"matic-network": res.polygon.native,
};
}

async function terra2Tvl() {
const res = await getData();
return {
"terra-luna-2": res.terra.native || 0,
};
}

async function bscTvl() {
const res = await getData();
return {
binancecoin: res.bnb.native,
};
}

async function nearTvl() {
const res = await getData();
return {
near: res.near.native,
};
}

async function ethTvl(api) {
return await api.call({
abi: "uint256:totalAssets",
Expand All @@ -61,28 +39,16 @@ module.exports = {
timetravel: false,
methodology:
"We aggregated the assets staked across Stader staking protocols",
/*terra: {
tvl,
},*/
hedera: {
tvl: hbarTvl,
},
// its on ethereum because funds are locked there
/* ethereum: {
tvl: maticTvl
}, */
fantom: {
tvl: () => ({}),
},
terra2: {
tvl: terra2Tvl,
},
// ethereum: {
// tvl: maticTvl
// },
bsc: {
tvl: bscTvl,
},
near: {
tvl: nearTvl,
},
ethereum: {
tvl: async (api) => {
const res = await getData();
Expand Down

0 comments on commit 835ce8c

Please sign in to comment.