Skip to content

Commit d6382d0

Browse files
committed
add fuel staking
1 parent cda8c35 commit d6382d0

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

src/adaptors/fuel-staking/index.js

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
const axios = require('axios');
2+
3+
const apy = async () => {
4+
const [apyData, supplyData] = await Promise.all(
5+
[
6+
'https://mainnet-explorer.fuel.network/staking/apy',
7+
'https://rest-fuel-seq.simplystaking.xyz/cosmos/staking/v1beta1/pool',
8+
].map((i) => axios.get(i))
9+
);
10+
11+
const id = 'fuel-network';
12+
const price = (
13+
await axios.get(`https://coins.llama.fi/prices/current/coingecko:${id}`)
14+
).data.coins[`coingecko:${id}`].price;
15+
16+
return [
17+
{
18+
pool: '0x675b68aa4d9c2d3bb3f0397048e62e6b7192079c',
19+
project: 'fuel-staking',
20+
chain: 'fuel-ignition',
21+
symbol: 'FUEL',
22+
apyBase: Number(apyData.data.amount),
23+
tvlUsd: (supplyData.data.pool.bonded_tokens / 1e9) * price,
24+
url: 'https://app.fuel.network/staking/on-fuel',
25+
},
26+
];
27+
};
28+
29+
module.exports = {
30+
apy,
31+
};

0 commit comments

Comments
 (0)