Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
amityadav0 committed Dec 6, 2024
1 parent 4827658 commit f9f9fb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion x/amm/keeper/query_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ func (k Keeper) PoolExtraInfo(ctx sdk.Context, pool types.Pool) types.PoolExtraI
tvl, _ := pool.TVL(ctx, k.oracleKeeper, k.accountedPoolKeeper)
lpTokenPrice, _ := pool.LpTokenPrice(ctx, k.oracleKeeper, k.accountedPoolKeeper)
avg := k.GetWeightBreakingSlippageAvg(ctx, pool.PoolId)
apr := avg.Mul(math.LegacyNewDec(52)).Quo(tvl)
apr := math.LegacyZeroDec()
if tvl.IsPositive() {
apr = avg.Mul(math.LegacyNewDec(52)).Quo(tvl)
}
return types.PoolExtraInfo{
Tvl: tvl,
LpTokenPrice: lpTokenPrice,
Expand Down
1 change: 0 additions & 1 deletion x/amm/keeper/update_pool_for_swap.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ func (k Keeper) UpdatePoolForSwap(
return err
}

// TODO: Some issue in weight breaking fee amount as we already multiply it
k.TrackWeightBreakingSlippage(ctx, pool.PoolId, sdk.NewCoin(tokenIn.Denom, weightRecoveryFeeAmount))
}

Expand Down

0 comments on commit f9f9fb8

Please sign in to comment.