Skip to content

Warn when limit/stop increase may be liquidatable at trigger price FEDEV-2399#2581

Closed
qwinndev wants to merge 6 commits into
releasefrom
fedev-2399
Closed

Warn when limit/stop increase may be liquidatable at trigger price FEDEV-2399#2581
qwinndev wants to merge 6 commits into
releasefrom
fedev-2399

Conversation

@qwinndev

Copy link
Copy Markdown
Contributor

Warns users when a Limit Increase / Stop Increase order that increases an existing position would be liquidatable at its trigger (execution) price, so they can add collateral or reduce leverage before it triggers.

Linear: https://linear.app/gmx-io/issue/FEDEV-2399

Behavior

  • Warn (non-blocking) for a resting Limit/Stop Increase on an existing position when the simulated resulting position would be liquidatable at the trigger price — submit/update stays enabled. Shown in the tradebox and the order editor (and via the editor that a chart-line drag opens).
  • Block (unchanged) remains the existing Market Increase guard (liquidatable at the mark price).
  • The check compares the next-position liquidation price against the trigger price (execution price) rather than the current mark price.

Changes

  • getIsPositionLiquidatableAtPrice shared helper (+ unit tests).
  • Tradebox increase liquidation guard scoped to Market Increase only (!isLimit); new selectTradeboxIncreaseLiquidationRiskWarning selector.
  • Shared LiquidatableIncreaseWarningCard, reused in the tradebox and the order editor.
  • Order editor computes the warning inline (non-blocking); the chart-line drag path is unchanged, so the warning surfaces in the editor it opens.
  • Warning copy translated across all locales.

Out of scope

  • Dynamic volatility / near-liquidation distance buffers (FEDEV-3906).
  • Failed-order LiquidatablePosition messaging and the Market Increase block copy (already implemented).

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying gmx-interface with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3fc41f8
Status: ✅  Deploy successful!
Preview URL: https://ccd23dad.gmx-interface.pages.dev
Branch Preview URL: https://fedev-2399.gmx-interface.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploying gmx-interface-home with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3fc41f8
Status:⚡️  Build in progress...

View logs

@github-actions

Copy link
Copy Markdown

Playwright Component Test Report

All tests passed.

View Report

Commit 3fc41f8

@qwinndev

Copy link
Copy Markdown
Contributor Author

Superseded by #2582 (branch renamed to fedev-2399-liquidatable-increase-warning for readability).

@qwinndev qwinndev closed this Jun 24, 2026
@qwinndev qwinndev deleted the fedev-2399 branch June 24, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant