bug: Swap fails out of gas — SWAP_GAS_LIMIT 400k too low #14

Closed
opened 2026-03-13 01:39:54 +00:00 by Brouie · 9 comments
Brouie commented 2026-03-13 01:39:54 +00:00 (Migrated from gitlab.com)

Description

Swap transaction fails with out of gas error. The hardcoded SWAP_GAS_LIMIT (400000) is insufficient — actual usage was 434150.

Error

Transaction failed: out of gas in location: Loading CosmWasm module: execute; gasWanted: 400000, gasUsed: 434150: out of gas

Expected

Gas limit for swaps should accommodate actual usage. Suggest bumping to 600000 to match REMOVE_LIQUIDITY_GAS_LIMIT.

Location

frontend-dapp/src/services/terraclassic/transactions.ts line 7:
const SWAP_GAS_LIMIT = 400000;

Steps to Reproduce

  1. Connect simulated wallet
  2. Select EMBER/CORAL pair
  3. Enter 10000 EMBER
  4. Click Swap
  5. TX fails with out of gas
## Description Swap transaction fails with out of gas error. The hardcoded SWAP_GAS_LIMIT (400000) is insufficient — actual usage was 434150. ## Error `Transaction failed: out of gas in location: Loading CosmWasm module: execute; gasWanted: 400000, gasUsed: 434150: out of gas` ## Expected Gas limit for swaps should accommodate actual usage. Suggest bumping to 600000 to match REMOVE_LIQUIDITY_GAS_LIMIT. ## Location frontend-dapp/src/services/terraclassic/transactions.ts line 7: `const SWAP_GAS_LIMIT = 400000;` ## Steps to Reproduce 1. Connect simulated wallet 2. Select EMBER/CORAL pair 3. Enter 10000 EMBER 4. Click Swap 5. TX fails with out of gas
Brouie commented 2026-03-13 02:02:26 +00:00 (Migrated from gitlab.com)

mentioned in issue #1

mentioned in issue #1
Brouie commented 2026-03-13 04:22:43 +00:00 (Migrated from gitlab.com)

mentioned in issue #18

mentioned in issue #18
PlasticDigits commented 2026-03-13 06:54:38 +00:00 (Migrated from gitlab.com)

mentioned in commit 06a9ae5310

mentioned in commit 06a9ae5310a144003943f5f02525e4cbf694c6ca
PlasticDigits commented 2026-03-13 06:54:42 +00:00 (Migrated from gitlab.com)

mentioned in merge request !719

mentioned in merge request !719
PlasticDigits commented 2026-03-13 06:55:01 +00:00 (Migrated from gitlab.com)

Fix implemented in !719: bumped SWAP_GAS_LIMIT from 400k to 600k to accommodate actual usage (~434k). Requesting review from @Brouie.

Fix implemented in !719: bumped SWAP_GAS_LIMIT from 400k to 600k to accommodate actual usage (~434k). Requesting review from @Brouie.
PlasticDigits commented 2026-03-13 06:55:49 +00:00 (Migrated from gitlab.com)

mentioned in commit ed535637a7

mentioned in commit ed535637a730cf580bba1d0b842de7ceba5ab122
Brouie (Migrated from gitlab.com) closed this issue 2026-03-13 12:12:27 +00:00
Brouie commented 2026-03-13 12:12:29 +00:00 (Migrated from gitlab.com)

Verified fixed — SWAP_GAS_LIMIT bumped to 600000 in latest commit.

Verified fixed — SWAP_GAS_LIMIT bumped to 600000 in latest commit.
Brouie commented 2026-04-04 04:34:13 +00:00 (Migrated from gitlab.com)

mentioned in issue #49

mentioned in issue #49
Brouie commented 2026-04-06 03:36:43 +00:00 (Migrated from gitlab.com)

mentioned in issue #50

mentioned in issue #50
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#14
No description provided.