Skip to content

Commit

Permalink
Merge pull request #11391 from vegaprotocol/11389-rebase-fair-price
Browse files Browse the repository at this point in the history
fix: use asset-scaled AMM fair-price for rebase check on submission
  • Loading branch information
jeremyletang authored Jun 17, 2024
2 parents e328f7a + 4d5e5c9 commit 7f2a828
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/execution/future/market.go
Original file line number Diff line number Diff line change
Expand Up @@ -5438,7 +5438,7 @@ func (m *Market) SubmitAMM(ctx context.Context, submit *types.SubmitAMM, determi
}

// create a rebasing order if the AMM needs it i.e its base if not within best-bid/best-ask
if ok, side, quote := m.needsRebase(submit.Parameters.Base); ok {
if ok, side, quote := m.needsRebase(pool.BestPrice(nil)); ok {
order, err = m.getRebasingOrder(quote, side, submit.SlippageTolerance, pool)
if err != nil {
m.broker.Send(
Expand Down

0 comments on commit 7f2a828

Please sign in to comment.