From 1df36787f0d8e3473774bdfe8696391f2950e4e6 Mon Sep 17 00:00:00 2001 From: ze97286 Date: Thu, 8 Aug 2024 09:52:07 +0100 Subject: [PATCH 1/2] fix: order spam check for spot fixed --- core/execution/spot/market.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/execution/spot/market.go b/core/execution/spot/market.go index aa15fe8e9e..597074e04a 100644 --- a/core/execution/spot/market.go +++ b/core/execution/spot/market.go @@ -3349,10 +3349,9 @@ func (m *Market) checkOrderForSpam(side types.Side, orderPrice *num.Uint, orderS price, _ = num.UintFromDecimal(orderPrice.ToDecimal().Mul(m.priceFactor)) } - minQuantum := assetQuantum.Mul(quantumMultiplier) value := num.UintZero().Mul(num.NewUint(orderSize), price).ToDecimal() value = value.Div(m.positionFactor) - required := minQuantum.Mul(assetQuantum) + required := assetQuantum.Mul(quantumMultiplier) if value.LessThan(required) { return fmt.Errorf(fmt.Sprintf("order value (%s) is less than minimum holding requirement for spam (%s)", value.String(), required.String())) } From fddb1344449c7920d19c8486dde291e97fb16198 Mon Sep 17 00:00:00 2001 From: ze97286 Date: Thu, 8 Aug 2024 10:08:44 +0100 Subject: [PATCH 2/2] fix: added to change log --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 902d6ea067..dcef12293a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,11 +20,11 @@ - [11528](https://github.com/vegaprotocol/vega/issues/11528) - Added support for eligible entities reward. - [11372](https://github.com/vegaprotocol/vega/issues/11372) - Support combined filters for the `AMM` API. - [11535](https://github.com/vegaprotocol/vega/issues/11535) - Added support for lottery rank distribution strategy. -### 🐛 Fixes +### 🐛 Fixes - [11521](https://github.com/vegaprotocol/vega/issues/11521) - Restore `AMM` position factor when loading from a snapshot. - [11526](https://github.com/vegaprotocol/vega/issues/11526) - `EstimateAMMBounds` now respects the market's decimal places. - +- [11540](https://github.com/vegaprotocol/vega/issues/11540) - Fix spam check for spots to use not double count quantum. ## 0.77.5