Bug: Custom slippage not passed to router for multi-hop swaps #38

Closed
opened 2026-03-23 02:16:55 +00:00 by Brouie · 4 comments
Brouie commented 2026-03-23 02:16:55 +00:00 (Migrated from gitlab.com)

Steps:\n1. Set slippage to 5% in UI\n2. Swap OPAL → ONYX → CORAL (multi-hop via router)\n\nExpected: max_spread = 0.05 (5%)\nGot: max_spread = 0.01 (1%)\n\nError: Max spread assertion: actual spread (0.050533) exceeds max allowed (0.01)\n\nCustom slippage setting is ignored for router execute_swap_operations. Only affects direct pair swaps.

**Steps:**\n1. Set slippage to 5% in UI\n2. Swap OPAL → ONYX → CORAL (multi-hop via router)\n\n**Expected:** max_spread = 0.05 (5%)\n**Got:** max_spread = 0.01 (1%)\n\nError: Max spread assertion: actual spread (0.050533) exceeds max allowed (0.01)\n\nCustom slippage setting is ignored for router execute_swap_operations. Only affects direct pair swaps.
Brouie commented 2026-03-23 04:31:43 +00:00 (Migrated from gitlab.com)

mentioned in issue #18

mentioned in issue #18
PlasticDigits commented 2026-03-23 05:02:16 +00:00 (Migrated from gitlab.com)

Fix merged on `main` (commit a6cc1a7): router + dapp now require `max_spread` and forward it on every hop so UI slippage applies to multi-hop swaps.

Requesting QA review — @brouie please verify multi-hop swaps with custom slippage (e.g. 5%) against deployed router after upgrade.

Note: Issue reopened so tracking stays open until QA / deployment sign-off.

Fix merged on \`main\` (commit a6cc1a7): router + dapp now require \`max_spread\` and forward it on every hop so UI slippage applies to multi-hop swaps. **Requesting QA review** — @brouie please verify multi-hop swaps with custom slippage (e.g. 5%) against deployed router after upgrade. Note: Issue reopened so tracking stays open until QA / deployment sign-off.
PlasticDigits commented 2026-03-23 05:02:29 +00:00 (Migrated from gitlab.com)

Formatting note: Previous comment used escaped backticks by mistake. Summary: fix is on main; please QA multi-hop + custom slippage after router contract is redeployed.

**Formatting note:** Previous comment used escaped backticks by mistake. Summary: fix is on main; please QA multi-hop + custom slippage after router contract is redeployed.
Brouie commented 2026-03-23 06:51:37 +00:00 (Migrated from gitlab.com)

mentioned in issue #39

mentioned in issue #39
Brouie (Migrated from gitlab.com) closed this issue 2026-03-23 06:52:00 +00:00
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#38
No description provided.