fix(swap): CL8Y to UST1 hits the gas-estimate under-run #1328
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#1328
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Retail Swap of CL8Y → UST1 on
dex.cl8y.comfails with the dApp out-of-gas toast: the transaction needed more gas than estimated. That string is the humanized under-estimate infrontend-dapp/src/utils/humanizeTerraTxError.ts. The dApp does not LCD-simulate execute gas; the envelope is the per-message fallback infrontend-dapp/src/services/terraclassic/terraClassicFeeEstimate.ts.Expected / actual
gas_wantedabove measuredgas_usedand completes without that toast.Not duplicates
Closed gas tickets are other pairs or other message shapes. Keyword overlap on “gas” is not this bug.
Given / When / Then
Given a columbus-5 Swap of CL8Y to UST1 on
/with the current fee envelope,When the wallet signs the dApp
Fee,Then
gas_usedstays belowgas_wanted, the humanized under-estimate toast does not appear, and the swap completes.Acceptance criteria
gas_wantedvsgas_usedand the route shape (direct pair vs hybrid hops).Test plan
Attack / abuse
gas_wantedbelow the measured floor for this shape.Verification
gas_used < gas_wantedand no under-estimate toast.First-pass model recommendation
Recommendation: grok-high
The failure can be the static envelope, a hybrid hop, or the wallet rewriting
Fee. That is wallet and gas-estimate scope, not a single known local edit.PR #1332 is merged.
make verify-issue-1328passed: 95 tests across four files. This run skipped the optional live simulation because no funded simulation address was configured; PR #1332 records the Columbus-5 simulation evidence. The merged change documents invariants G1328-1–G1328-7 in ADR 0013 andskills/AGENTS_TERRACLASSIC_GAS.md, with links from the frontend and testing docs.Remaining: complete the queued cl8y-pm inbox card, “Verify CL8Y to UST1 gas on Columbus-5” (
49becf11-4b53-4441-9f01-07b99852f78e): sign one forward Columbus-5 swap, record route, tx hash,gas_wantedandgas_used, and confirmgas_used < gas_wantedwith no under-estimate toast. Keep #1328 open until that operator check is complete.Related but distinct: #1222 gas-envelope census; #1264 USTC→USTR wrap+2-hop gas; newer #1329 hybrid limit-order gas and #1330 route visibility/selection do not track this wallet check.