Skip to content

Commit

Permalink
fix build/lint
Browse files Browse the repository at this point in the history
  • Loading branch information
BrendanChou committed May 28, 2024
1 parent 782cb94 commit 6f9916c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion protocol/x/clob/keeper/mev.go
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ func (c *CumulativePnL) AddPnLForTradeWithFilledQuoteQuantums(
}

// Calculate fees.
bigFeeQuoteQuantums := lib.BigMulPpm(filledQuoteQuantums, feePpm, true)
bigFeeQuoteQuantums := lib.BigMulPpm(filledQuoteQuantums, lib.BigI(feePpm), true)
pnl.Sub(pnl, bigFeeQuoteQuantums)

c.AddDeltaToSubaccount(subaccountId, pnl)
Expand Down
4 changes: 2 additions & 2 deletions protocol/x/clob/keeper/process_single_match.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ func (k Keeper) persistMatchedOrders(
isTakerLiquidation := matchWithOrders.TakerOrder.IsLiquidation()

// Taker fees and maker fees/rebates are rounded towards positive infinity.
bigTakerFeeQuoteQuantums := lib.BigMulPpm(bigFillQuoteQuantums, takerFeePpm, true)
bigMakerFeeQuoteQuantums := lib.BigMulPpm(bigFillQuoteQuantums, makerFeePpm, true)
bigTakerFeeQuoteQuantums := lib.BigMulPpm(bigFillQuoteQuantums, lib.BigI(takerFeePpm), true)
bigMakerFeeQuoteQuantums := lib.BigMulPpm(bigFillQuoteQuantums, lib.BigI(makerFeePpm), true)

matchWithOrders.MakerFee = bigMakerFeeQuoteQuantums.Int64()
// Liquidation orders pay the liquidation fee instead of the standard taker fee
Expand Down
2 changes: 1 addition & 1 deletion protocol/x/clob/types/pending_updates.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func (p *PendingUpdates) AddPerpetualFill(
totalFee = big.NewInt(0)
}

bigFeeQuoteQuantums := lib.BigMulPpm(bigFillQuoteQuantums, feePpm, true)
bigFeeQuoteQuantums := lib.BigMulPpm(bigFillQuoteQuantums, lib.BigI(feePpm), true)

totalFee.Add(
totalFee,
Expand Down
2 changes: 1 addition & 1 deletion protocol/x/rewards/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (k Keeper) AddRewardSharesForFill(
lowestMakerFee := k.feeTiersKeeper.GetLowestMakerFee(ctx)
maxMakerRebatePpm := lib.Min(int32(0), lowestMakerFee)
// Calculate quote_quantums * max_maker_rebate. Result is non-positive.
makerRebateMulTakerVolume := lib.BigMulPpm(bigFillQuoteQuantums, maxMakerRebatePpm, false)
makerRebateMulTakerVolume := lib.BigMulPpm(bigFillQuoteQuantums, lib.BigI(maxMakerRebatePpm), false)
takerWeight := new(big.Int).Add(
bigTakerFeeQuoteQuantums,
makerRebateMulTakerVolume,
Expand Down

0 comments on commit 6f9916c

Please sign in to comment.