Skip to content

Commit

Permalink
fix: remove liquidity checks when leaving spot opening auction
Browse files Browse the repository at this point in the history
Signed-off-by: Elias Van Ootegem <elias@vega.xyz>
  • Loading branch information
EVODelavega committed Mar 20, 2024
1 parent ba8d414 commit 1f80bbf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- [10946](https://github.com/vegaprotocol/vega/issues/10945) - Save dispatch strategy for recurring governance transfer in the database.
- [10943](https://github.com/vegaprotocol/vega/issues/10943) - Fix error message format when node vote is sent again.
- [10928](https://github.com/vegaprotocol/vega/issues/10928) - Fix `collateralIncreaseEstimate` for limit orders in isolated margin mode
- [10952](https://github.com/vegaprotocol/vega/issues/10952) - Fix bug that caused spot markets to get stuck in opening auction.

## 0.75.0

Expand Down
16 changes: 2 additions & 14 deletions core/execution/spot/auction.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,8 @@ func (m *Market) checkAuction(ctx context.Context, now time.Time, idgen common.I
return
}

// check that from liquidity point of view we can leave the opening auction
_, bestStaticBidVolume, _ := m.getBestStaticBidPriceAndVolume()
_, bestStaticAskVolume, _ := m.getBestStaticAskPriceAndVolume()
if m.getSuppliedStake().GTE(m.getTargetStake()) && bestStaticBidVolume > 0 && bestStaticAskVolume > 0 {
m.as.SetReadyToLeave()
}

if !m.as.CanLeave() {
if e := m.as.AuctionExtended(ctx, now); e != nil {
m.broker.Send(e)
}
return
}
// opening auction requirements satisfied at this point, other requirements still need to be checked downstream though
// opening auction period has expired, and we have trades, we should be ready to leave
// other requirements still need to be checked downstream though
m.as.SetReadyToLeave()
m.pMonitor.CheckPrice(ctx, m.as, trades, true, false)
if m.as.ExtensionTrigger() == types.AuctionTriggerPrice {
Expand Down

0 comments on commit 1f80bbf

Please sign in to comment.