diff --git a/src/api/farms.ts b/src/api/farms.ts index 061e264cb..006984c59 100644 --- a/src/api/farms.ts +++ b/src/api/farms.ts @@ -205,6 +205,7 @@ const getFarmsData = yieldFarm, }, price.oraclePrice ?? globalFarm.priceAdjustment.toBigNumber(), + isXyk, balance.freeBalance, ) @@ -416,6 +417,7 @@ function getFarmApr( yieldFarm: PalletLiquidityMiningYieldFarmData }, priceAdjustment: BigNumber, + isXyk: boolean, potBalance?: string, ) { const { globalFarm, yieldFarm } = farm @@ -498,7 +500,7 @@ function getFarmApr( const isDistributed = distributedRewards.div(potMaxRewards).gte(0.999) // multiply by 100 since APR should be a percentage - apr = isDistributed ? BN_0 : apr.times(100) + apr = isDistributed ? BN_0 : apr.div(isXyk ? 2 : 1).times(100) const minApr = loyaltyFactor ? apr.times(loyaltyFactor) : null