W7-C6: No order summary before signing — no estimated output, no fee estimate, no price impact, no min received #157

Closed
opened 2026-05-11 15:41:47 +00:00 by totdking · 7 comments
totdking commented 2026-05-11 15:41:47 +00:00 (Migrated from gitlab.com)
No description provided.
totdking commented 2026-05-11 15:45:40 +00:00 (Migrated from gitlab.com)

Issue Summary

The Place Limit form shows no pre-submission order summary. After filling in Price, Amount, and Expiry, the trader has no visibility into estimated output, gas fee, trading fee, price impact, or minimum received before clicking Place Limit and triggering the wallet prompt.


Reproduction Steps

  1. Navigate to /trade, select any pair, connect wallet
  2. Fill in Price, Amount, and Expiry fields
  3. Observe the form below the ADVANCED section and above the Place Limit button — no order summary, fee estimate, or estimated output is shown

Environment Details

Field Value
OS macOS (Apple M1 Pro, 14-inch)
Browser Google Chrome (desktop)
Network localterra (local Docker)
Frontend VITE_NETWORK=local npm run dev at localhost:3000

Wallet / Device Details

  • Wallet: Keplr browser extension
  • Wallet state: Connected — terra1...sl7cvv
  • Pair tested: EMBER / CORAL (terra146...c9mjav)

Severity / Impact

P2: polish . A trader cannot answer "what will I receive and what will it cost" before signing. On mainnet with real funds this is a meaningful trust gap — the first time a trader sees fee and output figures is inside the wallet prompt, not in the app. Found under W7-C6 (Slippage / price impact / min received — Display and Trader use dimensions).

cc: @PlasticDigits

### Issue Summary The Place Limit form shows no pre-submission order summary. After filling in Price, Amount, and Expiry, the trader has no visibility into estimated output, gas fee, trading fee, price impact, or minimum received before clicking Place Limit and triggering the wallet prompt. --- ### Reproduction Steps 1. Navigate to `/trade`, select any pair, connect wallet 2. Fill in Price, Amount, and Expiry fields 3. Observe the form below the ADVANCED section and above the Place Limit button — no order summary, fee estimate, or estimated output is shown --- ### Environment Details | Field | Value | |-------|-------| | OS | macOS (Apple M1 Pro, 14-inch) | | Browser | Google Chrome (desktop) | | Network | `localterra` (local Docker) | | Frontend | `VITE_NETWORK=local npm run dev` at `localhost:3000` | --- ### Wallet / Device Details - **Wallet:** Keplr browser extension - **Wallet state:** Connected — `terra1...sl7cvv` - **Pair tested:** EMBER / CORAL (`terra146...c9mjav`) --- ### Severity / Impact **P2: polish** **.** A trader cannot answer "what will I receive and what will it cost" before signing. On mainnet with real funds this is a meaningful trust gap — the first time a trader sees fee and output figures is inside the wallet prompt, not in the app. Found under **W7-C6** (Slippage / price impact / min received — Display and Trader use dimensions). cc: @PlasticDigits
totdking commented 2026-05-11 17:31:47 +00:00 (Migrated from gitlab.com)

mentioned in issue #116

mentioned in issue #116
PlasticDigits commented 2026-05-13 06:44:53 +00:00 (Migrated from gitlab.com)

mentioned in commit 60b1158ce5

mentioned in commit 60b1158ce5aded19b0cd97695ead9bbc7dd8573b
PlasticDigits commented 2026-05-13 06:45:15 +00:00 (Migrated from gitlab.com)

Update (GitLab #157 — pre-submit limit summary)

Implemented and merged to main (commit on main includes merge of fix/157-limit-order-pre-submit-summary).

What changed

  • /trade + /limits: New Limit order summary before signing card above Place limit explains resting execution (filled over time by other traders), explicitly not taker slippage / pool price impact / min received.
  • Metrics shown: % deviation vs current reference (same math as the price field), maker placement fee = floor(effective_fee_bps / 2) from pair get_fee_config + optional fee-discount get_discount, and min LUNC for increase_allowance + place_limit_order (estimateLimitOrderPlaceSequenceUlunaFeesTotal).
  • Copy/tooltip: LimitOrderPriceField help text now mentions non-immediate execution vs market.
  • Docs: docs/frontend.md § Trade page — limit order pre-submit summary, docs/limit-orders.md dApp bullet, skills/AGENTS_FRONTEND_LIMIT_ORDER_PRICE.md cross-links.

Verification checklist for QA

  1. Open /trade, pick a pair, Limit tab — confirm the summary card appears above Place limit with the three bullets + doc link.
  2. Type a limit price — vs current reference should show a signed % (or — if no valid typed price / ref).
  3. Maker placement fee line should show bps (e.g. half of 30 → 15 bps when no tier discount); connect wallet to pick up discount if registered.
  4. Est. network fee shows ~X LUNC (non-zero floor from env gas price).
  5. /limits standalone page — same card with data-testid="limits-page-pre-submit-summary".
  6. Market tab unchanged — still shows expected receive / min after slippage for taker swaps.
  7. Run Vitest: limitOrderFeeSummary.test.ts, LimitOrderPreSubmitSummary.test.tsx, TradePage.test.tsx.

@totdking — please verify on your side (localterra + Keplr as in the issue) and confirm the trust gap for #157 is addressed; leaving the issue open per implementer request.

## Update (GitLab #157 — pre-submit limit summary) Implemented and merged to `main` (commit on `main` includes merge of `fix/157-limit-order-pre-submit-summary`). ### What changed - **`/trade` + `/limits`:** New **Limit order summary before signing** card above **Place limit** explains resting execution (filled over time by other traders), explicitly **not** taker slippage / pool price impact / min received. - **Metrics shown:** **% deviation vs current reference** (same math as the price field), **maker placement fee** = `floor(effective_fee_bps / 2)` from pair `get_fee_config` + optional fee-discount `get_discount`, and **min LUNC** for `increase_allowance` + `place_limit_order` (`estimateLimitOrderPlaceSequenceUlunaFeesTotal`). - **Copy/tooltip:** `LimitOrderPriceField` help text now mentions non-immediate execution vs market. - **Docs:** `docs/frontend.md` § [Trade page — limit order pre-submit summary](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/blob/main/docs/frontend.md#trade-page-limit-order-pre-submit-summary), `docs/limit-orders.md` dApp bullet, `skills/AGENTS_FRONTEND_LIMIT_ORDER_PRICE.md` cross-links. ### Verification checklist for QA 1. Open **`/trade`**, pick a pair, **Limit** tab — confirm the summary card appears **above** **Place limit** with the three bullets + doc link. 2. Type a limit **price** — **vs current reference** should show a signed **%** (or **—** if no valid typed price / ref). 3. **Maker placement fee** line should show **bps** (e.g. half of 30 → **15** bps when no tier discount); connect wallet to pick up **discount** if registered. 4. **Est. network fee** shows **~X LUNC** (non-zero floor from env gas price). 5. **`/limits`** standalone page — same card with `data-testid="limits-page-pre-submit-summary"`. 6. **Market** tab unchanged — still shows expected receive / min after slippage for taker swaps. 7. Run **Vitest:** `limitOrderFeeSummary.test.ts`, `LimitOrderPreSubmitSummary.test.tsx`, `TradePage.test.tsx`. @totdking — please verify on your side (localterra + Keplr as in the issue) and confirm the trust gap for #157 is addressed; leaving the issue **open** per implementer request.
PlasticDigits commented 2026-05-27 05:15:50 +00:00 (Migrated from gitlab.com)

QA verification (agent, 2026-05-27)

Verified GitLab #157 on main @ 3f6a2e5 (merged via fix/157-limit-order-pre-submit-summary / 60b1158). No additional code changes required.

Verification checklist

  1. /trade → Limit tab — data-testid="trade-limit-pre-submit-summary" renders above Place limit with resting-order copy + three bullets + limit-orders.md link (browser MCP, wallet connected, EMBER/CORAL pair).
  2. Limit price → % vs reference — typed price shows signed deviation (e.g. +2.8%); — when ref/price invalid (component + browser).
  3. Maker placement fee — shows bps after pair fee queries resolve (e.g. 90 bps = ½ of 180 bps effective on test pair); Loading… while queries run.
  4. Est. network fee — ~32.57 LUNC min for allowance + place sequence (non-zero).
  5. /limits — same card with limits-page-pre-submit-summary after pair selection (hidden until pair chosen because fee/ref need terra1 pair address).
  6. Market tab — limit pre-submit card hidden on Market; market panel still exposes slippage + trade-market-quote (Expected receive / Min. after slippage) when simulation runs (code + existing trade tests).
  7. Vitest — limitOrderFeeSummary.test.ts, LimitOrderPreSubmitSummary.test.tsx, TradePage.test.tsx (incl. #157 case): 19/19 passed.

Optional / docs

  • LimitOrderPriceField intro copy mentions non-immediate resting vs market.
  • docs/frontend.md § pre-submit summary, docs/limit-orders.md, skills/AGENTS_FRONTEND_LIMIT_ORDER_PRICE.md present.

Infra used

LocalTerra OK, host Postgres :5432, indexer :3001, frontend :3000.

Closing — trust gap addressed: traders see deviation, maker placement fee, and min network LUNC before wallet sign; resting limits correctly omit taker slippage / pool impact / min-received (market path retains those).

## QA verification (agent, 2026-05-27) Verified GitLab #157 on `main` @ `3f6a2e5` (merged via `fix/157-limit-order-pre-submit-summary` / `60b1158`). No additional code changes required. ### Verification checklist 1. **`/trade` → Limit tab** — `data-testid="trade-limit-pre-submit-summary"` renders **above** **Place limit** with resting-order copy + three bullets + `limit-orders.md` link (browser MCP, wallet connected, EMBER/CORAL pair). 2. **Limit price → % vs reference** — typed price shows signed deviation (e.g. **+2.8%**); **—** when ref/price invalid (component + browser). 3. **Maker placement fee** — shows **bps** after pair fee queries resolve (e.g. **90 bps** = ½ of **180 bps** effective on test pair); **Loading…** while queries run. 4. **Est. network fee** — **~32.57 LUNC** min for allowance + place sequence (non-zero). 5. **`/limits`** — same card with `limits-page-pre-submit-summary` after pair selection (hidden until pair chosen because fee/ref need `terra1` pair address). 6. **Market tab** — limit pre-submit card hidden on Market; market panel still exposes slippage + `trade-market-quote` (**Expected receive** / **Min. after slippage**) when simulation runs (code + existing trade tests). 7. **Vitest** — `limitOrderFeeSummary.test.ts`, `LimitOrderPreSubmitSummary.test.tsx`, `TradePage.test.tsx` (incl. #157 case): **19/19 passed**. ### Optional / docs - `LimitOrderPriceField` intro copy mentions non-immediate resting vs market. - `docs/frontend.md` § pre-submit summary, `docs/limit-orders.md`, `skills/AGENTS_FRONTEND_LIMIT_ORDER_PRICE.md` present. ### Infra used LocalTerra OK, host Postgres `:5432`, indexer `:3001`, frontend `:3000`. Closing — trust gap addressed: traders see deviation, maker placement fee, and min network LUNC **before** wallet sign; resting limits correctly omit taker slippage / pool impact / min-received (market path retains those).
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-05-27 05:15:51 +00:00
PlasticDigits commented 2026-06-25 13:12:35 +00:00 (Migrated from gitlab.com)

mentioned in issue #411

mentioned in issue #411
PlasticDigits commented 2026-06-25 14:12:46 +00:00 (Migrated from gitlab.com)

mentioned in issue #414

mentioned in issue #414
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic#157
No description provided.