bug: Multi-hop swap out of gas — 600k insufficient for routed swaps #22

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

Description

Multi-hop swaps via the router fail with out of gas. The SWAP_GAS_LIMIT (600000) is sufficient for single-pair swaps but not for multi-hop routes.

Error

out of gas in location: wasm contract; gasWanted: 600000, gasUsed: 601616: out of gas

Route Tested

EMBER → JADE → TOPAZ (2-hop route)

Expected

Gas limit should scale based on number of hops. Suggest 600k per hop (e.g. 2 hops = 1200k).

Steps to Reproduce

  1. Connect wallet
  2. Select EMBER as From, TOPAZ as To
  3. Route shows EMBER → JADE → TOPAZ
  4. Enter 10 EMBER, set slippage to 5%
  5. Click Swap — fails with out of gas

Notes

Single-pair swaps work fine at 600k. This is a new issue since the router was just implemented.

## Description Multi-hop swaps via the router fail with out of gas. The SWAP_GAS_LIMIT (600000) is sufficient for single-pair swaps but not for multi-hop routes. ## Error `out of gas in location: wasm contract; gasWanted: 600000, gasUsed: 601616: out of gas` ## Route Tested EMBER → JADE → TOPAZ (2-hop route) ## Expected Gas limit should scale based on number of hops. Suggest 600k per hop (e.g. 2 hops = 1200k). ## Steps to Reproduce 1. Connect wallet 2. Select EMBER as From, TOPAZ as To 3. Route shows EMBER → JADE → TOPAZ 4. Enter 10 EMBER, set slippage to 5% 5. Click Swap — fails with out of gas ## Notes Single-pair swaps work fine at 600k. This is a new issue since the router was just implemented.
Brouie commented 2026-03-16 02:37:11 +00:00 (Migrated from gitlab.com)

mentioned in issue #18

mentioned in issue #18
Brouie commented 2026-03-16 05:43:01 +00:00 (Migrated from gitlab.com)

mentioned in commit 217d253ad3

mentioned in commit 217d253ad324054340af57f09325f719eefc885e
Brouie commented 2026-03-16 05:43:04 +00:00 (Migrated from gitlab.com)

mentioned in merge request !725

mentioned in merge request !725
Brouie commented 2026-03-16 05:50:08 +00:00 (Migrated from gitlab.com)

mentioned in commit 7790a6d69b

mentioned in commit 7790a6d69be19f58f3410e64e51d7614376692cc
PlasticDigits commented 2026-03-16 07:27:54 +00:00 (Migrated from gitlab.com)

mentioned in commit 46a71f04dd

mentioned in commit 46a71f04dd9046c8e0ac4e636d4c75bb74b125ac
PlasticDigits commented 2026-03-16 07:33:19 +00:00 (Migrated from gitlab.com)

@Brouie Please verify fix.

@Brouie Please verify fix.
Brouie commented 2026-03-17 04:23:31 +00:00 (Migrated from gitlab.com)

mentioned in commit 506165730d

mentioned in commit 506165730d9687b40db021acdc5ba7790c0327d6
Brouie commented 2026-03-17 04:23:46 +00:00 (Migrated from gitlab.com)

mentioned in merge request !727

mentioned in merge request !727
Brouie commented 2026-03-18 02:37:37 +00:00 (Migrated from gitlab.com)

mentioned in merge request !728

mentioned in merge request !728
PlasticDigits commented 2026-03-18 03:20:48 +00:00 (Migrated from gitlab.com)

mentioned in commit 11bd1887f0

mentioned in commit 11bd1887f0e4b51e665c1616e59568c1cd78ad89
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-03-18 03:20:48 +00:00
PlasticDigits commented 2026-03-18 03:22:38 +00:00 (Migrated from gitlab.com)

mentioned in commit 911c542e68

mentioned in commit 911c542e68c2bce3e675f2c4e50137ce5349fa31
PlasticDigits commented 2026-03-18 03:22:57 +00:00 (Migrated from gitlab.com)

mentioned in commit be5544adfd

mentioned in commit be5544adfdd520e70e2e979ac24d0a10e3a5e0b7
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#22
No description provided.