Skip to content

Commit

Permalink
Round up when calculating impact price subticks (backport #1982) (#1985)
Browse files Browse the repository at this point in the history
Co-authored-by: jayy04 <[email protected]>
  • Loading branch information
mergify[bot] and jayy04 authored Jul 30, 2024
1 parent c93b768 commit c522048
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions protocol/x/clob/memclob/memclob.go
Original file line number Diff line number Diff line change
Expand Up @@ -2208,10 +2208,7 @@ func (m *MemClobPriceTimePriority) getImpactPriceSubticks(
// Impact order was fully matched. Calculate average impact price.
return types.GetAveragePriceSubticks(
impactNotionalQuoteQuantums,
new(big.Int).Div(
accumulatedBaseQuantums.Num(),
accumulatedBaseQuantums.Denom(),
),
lib.BigRatRound(accumulatedBaseQuantums, true),
clobPair.QuantumConversionExponent,
), true
}
Expand Down

0 comments on commit c522048

Please sign in to comment.