Skip to content

Commit

Permalink
minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
pratikasr committed Mar 14, 2024
1 parent e85f946 commit a0521e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x/liquidationsV2/keeper/liquidate.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,10 +499,10 @@ func (k Keeper) CheckStatsForSurplusAndDebt(ctx sdk.Context, appID, assetID uint
// if netFeeCollectedData.NetFeesCollected.LTE(collector.DebtThreshold.Sub(collector.LotSize)) && auctionLookupTable.IsDebtAuction
// net = 200 debtThreshold = 500 , lotSize = 100

lots := ((collector.DebtThreshold).Sub(netFeeCollectedData.NetFeesCollected.Add(collector.LotSize))).Quo(collector.LotSize).Int64()
if lots >= 1 {
if netFeeCollectedData.NetFeesCollected.LTE(collector.DebtThreshold.Sub(collector.LotSize)) && auctionLookupTable.IsDebtAuction {
lots := ((collector.DebtThreshold).Sub(netFeeCollectedData.NetFeesCollected.Add(collector.LotSize))).Quo(collector.LotSize).Int64()
collateralToken, debtToken := k.DebtTokenAmount(ctx, collateralAssetID, debtAssetID, collector.LotSize, collector.DebtLotSize)
for i := int64(1); i <= lots; i++ {
for i := int64(0); i <= lots; i++ {
err := k.CreateLockedVault(ctx, 0, 0, "", collateralToken, debtToken, collateralToken, debtToken, sdk.ZeroDec(), appID, false, "", "", sdk.ZeroInt(), sdk.ZeroInt(), "debt", false, true, collateralAssetID, debtAssetID)
if err != nil {
return err
Expand Down

0 comments on commit a0521e4

Please sign in to comment.