Skip to content

Commit 6ae6f10

Browse files
authored
Merge pull request #2317 from bifrost-io/master
feat: update veth address and add manta network pool
2 parents fc56db6 + 1a31cfe commit 6ae6f10

File tree

1 file changed

+18
-25
lines changed
  • src/adaptors/bifrost-liquid-staking

1 file changed

+18
-25
lines changed

src/adaptors/bifrost-liquid-staking/index.js

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
1-
const sdk = require('@defillama/sdk');
2-
const BigNumber = require("bignumber.js")
31
const utils = require('../utils');
42

5-
const veth = '0x4bc3263eb5bb2ef7ad9ab6fb68be80e43b43801f';
6-
const veth_1='0xc3d088842dcf02c13699f936bb83dfbbc6f721ab'
3+
const veth = '0xc3997ff81f2831929499c4eE4Ee4e0F08F42D4D8';
74

85
const getApy = async () => {
9-
const contract_veth = (await sdk.api.erc20.totalSupply({ target: veth })).output / 1e18;
10-
const contract_veth1 = (await sdk.api.erc20.totalSupply({ target: veth_1 })).output / 1e18;
11-
const contract_veth1_null_address_balance = (await sdk.api.erc20.balanceOf({ owner:'0x000000000000000000000000000000000000dEaD',target: veth_1, })).output / 1e18;
12-
136
const vToken = await utils.getData('https://api.bifrost.app/api/site');
147

158
const priceKeys = [
169
'ethereum',
17-
'filecoin',
1810
'polkadot',
1911
'kusama',
2012
'bifrost-native-coin',
2113
'moonbeam',
2214
'moonriver',
23-
'astar'
15+
'astar',
16+
'manta-network',
2417
]
2518
.map((t) => `coingecko:${t}`)
2619
.join(',');
@@ -50,17 +43,6 @@ const getApy = async () => {
5043
rewardTokens: ['GLMR'],
5144
};
5245

53-
const vFIL = {
54-
pool: 'filecoin-vfil',
55-
chain: 'Filecoin',
56-
project: 'bifrost-liquid-staking',
57-
symbol: 'vFIL',
58-
tvlUsd: vToken.vFIL.tvm * prices['coingecko:filecoin'].price,
59-
apyBase: Number(vToken.vFIL.apyBase),
60-
apyReward: Number(vToken.vFIL.apyReward),
61-
rewardTokens: ['FIL'],
62-
};
63-
6446
const vASTR = {
6547
pool: 'astar-vstr',
6648
chain: 'Astar',
@@ -105,19 +87,30 @@ const getApy = async () => {
10587
rewardTokens: ['KSM'],
10688
};
10789

90+
const vMANTA = {
91+
pool: 'manta-vMANTA',
92+
chain: 'manta',
93+
project: 'bifrost-liquid-staking',
94+
symbol: 'vMANTA',
95+
tvlUsd: vToken.vMANTA.tvm * prices['coingecko:manta-network'].price,
96+
apyBase: Number(vToken.vMANTA.apyBase),
97+
apyReward: Number(vToken.vMANTA.apyReward),
98+
rewardTokens: ['MANTA'],
99+
};
100+
108101
const vETH = {
109102
pool: veth,
110103
chain: 'ethereum',
111104
project: 'bifrost-liquid-staking',
112105
symbol: 'veth',
113-
tvlUsd: new BigNumber(contract_veth).plus(contract_veth1).minus(contract_veth1_null_address_balance).toNumber() * prices['coingecko:ethereum'].price,
114-
apyBase: vToken.vETH2.apyBase,
115-
apyReward:vToken.vETH2.apyReward,
106+
tvlUsd: vToken.vETH.tvm * prices['coingecko:ethereum'].price,
107+
apyBase: Number(vToken.vETH.apyBase),
108+
apyReward: Number(vToken.vETH.apyReward),
116109
underlyingTokens: [veth],
117110
rewardTokens: ['ETH'],
118111
};
119112

120-
return [vETH, vDOT, vGLMR, vMOVR, vKSM, vBNC, vFIL, vASTR];
113+
return [vETH, vDOT, vGLMR, vMOVR, vKSM, vBNC, vASTR, vMANTA];
121114
};
122115

123116
module.exports = {

0 commit comments

Comments
 (0)