Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove liquidity checks when leaving spot opening auction #10953

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading