diff --git a/x/hard/keeper/liquidation.go b/x/hard/keeper/liquidation.go index ca0f2737..b95c3c59 100644 --- a/x/hard/keeper/liquidation.go +++ b/x/hard/keeper/liquidation.go @@ -284,11 +284,9 @@ func (k Keeper) IsWithinValidLtvRange(ctx sdk.Context, deposit types.Deposit, bo } totalBorrowableUSDAmount := sdk.ZeroDec() - totalDepositedUSDAmount := sdk.ZeroDec() for _, depCoin := range deposit.Amount { lData := liqMap[depCoin.Denom] usdValue := sdk.NewDecFromInt(depCoin.Amount).Quo(sdk.NewDecFromInt(lData.conversionFactor)).Mul(lData.price) - totalDepositedUSDAmount = totalDepositedUSDAmount.Add(usdValue) borrowableUSDAmountForDeposit := usdValue.Mul(lData.ltv) totalBorrowableUSDAmount = totalBorrowableUSDAmount.Add(borrowableUSDAmountForDeposit) }