Launch blocker: create_pair reverts for tokens with a digit in the symbol (UST1, CL8Y) #518
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#518
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 — launch blocker
create_pairreverts for any pair whose token symbol contains a digit, because the LP token the pair mints gets a symbol that fails cw20's[a-zA-Z\-]{3,12}validator. This blocks every planned economic pool: UST1/cUSTC, UST1/USTR, cLUNC/UST1, and any CL8Y pair. cLUNC/cUSTC (all-letter symbols) is the only combination among the wrapped/economic tokens that currently succeeds.Found in simulation while building pool-seeding tooling — no funds spent.
Reproduction
create_pair { asset_infos: [cLUNC, UST1] }on the factory (terra1ejpgvv7...) reverts in simulation:Isolation (each real token paired against an existing gem, via
/cosmos/tx/v1beta1/simulate):Root cause
contracts/pair/src/contract.rs~line 543 derives the LP symbol from the constituent token symbols:So the LP symbol for e.g. UST1/cUSTC is
UST1-cUST-LP, and for any CL8Y pairCL8Y-…-LP. The digit (1,8) then fails the cw20 symbol validator (cw20_mintable), which only permits[a-zA-Z\-], and the LP instantiate — and therefore the wholecreate_pair— reverts.Suggested fixes (any one; all need a migration)
UST1→UST). Smallest change, keeps human-readable LP tickers.Nonebranch already produces a validCL8Y-LP; reuse it. LPname/labelcan stay unique for display.cw20_mintable's symbol validator — arguably the correct fix; LP and many real tickers legitimately contain digits. Widest blast radius, so option 1 or 2 may be the safer launch-unblocker.Happy to retest any fix immediately in simulation before you spend a creation fee.
Approved
mentioned in issue #513
mentioned in commit
3259ae01ddmentioned in merge request !1052
Follow-up on the #518 unblock: we need LP tickers to keep digits
0-9(so UST1 / CL8Y stay recognizable:UST1-CUST-LP,CL8Y-CLUN-LP) and sanitize only non-alphanumeric characters from the asset-symbol prefixes.That cannot ship as a pair-only letter-strip. columbus-5
lp_token_code_idstill validates classic[a-zA-Z\-]{3,12}(no digits), so this requires a contract upgrade:{a}-{b}-LP.cw20-mintable[a-zA-Z0-9\-]{3,12}) stored and set as factorylp_token_code_id.UpdateConfigmust acceptpair_code_id/lp_token_code_id(not settable today) so newcreate_pairuses the upgraded codes. Factory wasm migrate + thatUpdateConfigis the operator path.Existing pairs keep their current LP tokens (instantiate-time only). I will update MR !1052 with the sanitizer change, factory code-id update, an upgrade script, and tests.
mentioned in commit
b53ebd60ffSanity check of MR !1052 (
fix/518-lp-symbol-digits@b53ebd6) against this issue's acceptance (keep digits, sanitize non-alnum only, factoryUpdateConfigcode ids, classic LP still rejects digits).Meets acceptance in code.
make verify-issue-518passed locally (7/7, no chain). CI on !1052 failed withci_quota_exceeded(not a code failure); merging without waiting for CI.Does not clear the launch blocker by itself. Economic
create_pairfor UST1/CL8Y stays blocked on columbus-5 until the operator upgrade runs: store factory+pair wasm → migrate factory to 1.6.0 →UpdateConfig { pair_code_id, lp_token_code_id }(reuseUPGRADE518_LP_CODE_ID=10184or storecw20_mintable.wasm). Then re-simulatecreate_pairfor UST1/cUSTC and CL8Y/cLUNC.Non-blocking test gaps: no mintable-LP success integration test for CL8Y (UST1 path is covered); no
UpdateConfig { lp_token_code_id: Some(0) }rejection test. Existing pairs are unchanged (instantiate-time LP only).mentioned in commit
e0b6033ae6mentioned in issue #521
marked as related to #521
mentioned in issue #516
mentioned in issue #532
mentioned in issue #534
mentioned in issue #542
Thanks for the rapid turnaround on this one — going straight to the digit-allowing LP token + factory code-id upgrade rather than a pair-only strip was the right call, and it unblocked the UST1 launch.
mentioned in issue #584