Skip to content

Commit 6f2972d

Browse files
authored
Peter/fix loans incentive apr computation (#1256)
* chore: update monetary to latest 0.7.3 * fix: convert incentives apr computation to percentage * fix: change loans incentives annualized return to have label APR
1 parent 4bf3e13 commit 6f2972d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/components/LoanApyTooltip/BreakdownGroup.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const BreakdownGroup = ({ apy, rewardsApy, ticker, rewardsTicker, isBorrow }: Br
2929
</StyledApyTooltipGroup>
3030
{!!rewardsApy && (
3131
<StyledApyTooltipGroup gap='spacing1' wrap>
32-
<Dd color='tertiary'>Rewards APY {rewardsTicker}:</Dd>
32+
<Dd color='tertiary'>Rewards APR {rewardsTicker}:</Dd>
3333
<Dt color='primary'>{getApyLabel(rewardsApy)}</Dt>
3434
</StyledApyTooltipGroup>
3535
)}

src/pages/Loans/LoansOverview/components/LoanActionInfo/RewardsGroup.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const RewardsGroup = ({ isBorrow, apy, assetCurrency, rewards, prices }: Rewards
2626
return (
2727
<>
2828
<DlGroup justifyContent='space-between'>
29-
<Dt>Rewards APY {rewards.currency.ticker}</Dt>
29+
<Dt>Rewards APR {rewards.currency.ticker}</Dt>
3030
<Dd>{getApyLabel(subsidyRewardApy)}</Dd>
3131
</DlGroup>
3232
<DlGroup justifyContent='space-between'>

src/utils/helpers/loans.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const getSubsidyRewardApy = (
4141
}
4242

4343
const exchangeRate = rewardCurrencyPriceUSD / positionCurrencyPriceUSD;
44-
const apy = reward.toBig().mul(exchangeRate);
44+
const apy = reward.toBig().mul(exchangeRate).mul(100);
4545

4646
return apy;
4747
};

0 commit comments

Comments
 (0)