Skip to content

Commit

Permalink
add bagful apy info
Browse files Browse the repository at this point in the history
  • Loading branch information
bagful committed Dec 6, 2024
1 parent 8fbedf2 commit be2b8d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/adaptors/bagful/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,16 @@ const apy = async () => {
if (pool === undefined) {
continue;
}
let apyBase;
let apy;
let tvlUsd = BigNumber(pool.tvl)
.div(Math.pow(10, token.decimals))
.multipliedBy(tokenPrices[token.priceKey])
.toNumber();

if (token.isFixedRate) {
apyBase = token.fixedRate;
apy = token.fixedRate;
} else {
apyBase =
apy =
tvlUsd === 0
? '0'
: (token.dailyRewardAmount *
Expand All @@ -104,7 +104,7 @@ const apy = async () => {
symbol: token.symbol,
underlyingTokens: [pool.poolAssets],
tvlUsd,
apyBase,
apy,
});
}
return apyInfos;
Expand Down

0 comments on commit be2b8d3

Please sign in to comment.