diff --git a/chains/chainMonitor.js b/chains/chainMonitor.js index 8bc6b3b..74c860f 100644 --- a/chains/chainMonitor.js +++ b/chains/chainMonitor.js @@ -265,16 +265,10 @@ function ChainMonitor() { async function calculateApr(chain, annualProvision, bondedTokens, communityTax, blocksPerYear, actualBlocksPerYear) { const path = chain.path try { - if (path === 'dydx' && process.env.APYBARA_API_KEY) { - const opts = { - headers: { - 'X-ACCESS-KEY': `${process.env.APYBARA_API_KEY}` - }, - ...gotOpts - } - const aprRequest = await got.get("https://api.protocolstaking.info/v0/protocols/dydx", opts).json(); + if (path === 'dydx') { + const aprRequest = await got.get("https://api.lacertalabs.xyz/data/stakingapr", gotOpts).json(); return { - calculatedApr: aprRequest[0]?.rewardRate + calculatedApr: parseFloat(aprRequest['0']?.average_stakingapr) } } else if (path === 'sifchain') { const aprRequest = await got.get("https://data.sifchain.finance/beta/validator/stakingRewards", gotOpts).json();