Skip to content

Commit

Permalink
yearn change to new fields
Browse files Browse the repository at this point in the history
  • Loading branch information
slasher125 committed Nov 22, 2023
1 parent ac0d251 commit 3ddbda4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/adaptors/yearn-finance/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ const getApy = async () => {
);

return data.map((p) => {
if (p.details.retired || p.details.hideAlways) return {};
if (p.details.isRetired || p.details.isHidden) return {};

const underlying = p.token.underlyingTokensAddresses;

// OP incentives via yvToken staking
const apyReward = p.apy?.staking_rewards_apr * 100 ?? 0;
const apyReward = p.apr?.extra?.stakingRewardsAPR * 100 ?? 0;

return {
pool: p.address,
chain: utils.formatChain(chain[0]),
project: 'yearn-finance',
symbol: utils.formatSymbol(p.token.display_symbol),
tvlUsd: p.tvl.tvl_deposited,
apyBase: p.apy.net_apy * 100,
tvlUsd: p.tvl.tvl,
apyBase: p.apr.netAPR * 100,
apyReward,
rewardTokens:
apyReward > 0 ? ['0x4200000000000000000000000000000000000042'] : [],
Expand Down

0 comments on commit 3ddbda4

Please sign in to comment.