Investigate columbus-5 CW20 code_id 3 for migrate-adopt and factory whitelist #627
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#627
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?
Parent / related
Future investigation only — do not implement on the current migrate MR.
AGENTS_FRONTEND_TOKEN_MIGRATE.md(add a future source)This ticket is not a license to append
3toVITE_COMMUNITY_MIGRATE_CODE_IDSor callAddWhitelistedCodeId 3.Why
Columbus-5 code_id 3 is the original everybody-instantiate CW20 store. It is the single most common historical token wasm on-chain (MIR, TWD, VKR, WHALE, KUJI, and many Station-minted tokens). It is not on the factory whitelist and not on the retail migrate allowlist.
Live LCD (2026-08-24):
terra15kc4dkquya20yx09avpdw8796unj709xuyxjycdata_hashprefixF9B4AB2202A5110B…crates.io:cw20-base0.0.0–0.1.0(instance-dependent)terra15gwky…g40k6, TWD, VKRC, WHALEC, KUJIFactory whitelist today:
[6036, 8266, 10184, 11611, 11619]. Retail migrate default:6036,10184,8266,8654.Adopt keys off cw2 name, not
code_id.adopt.rsalready allowlistscrates.io:cw20-base. A code-3 instance would pass the name check and then likely smash onTOKEN_INFO/BALANCESbecause columbus-5 code 3 still uses the cw20-legacy layout (CanonicalAddr balances; TokenInfo raw key\u{0}\ntoken_info). See columbus-5 dApp guide.Listing 3 would admit every instantiate of that wasm (H-01 blast radius / catalogue B13).
Investigate (two tracks)
A. Migrate / adopt onto 11619
cw20-codeid-audits/scripts/fetch-lcd-wasm.sh 3) and decomp. Confirm storage keys vs currentcw20_base::state(BALANCES/TOKEN_INFO/ allowances).tax_mapabsent.CODE_ID=3 LAYER_B_LT=1 make verify-issue-589). Fail closed on mismatch.VITE_COMMUNITY_MIGRATE_CODE_IDS). Do not special-case MIR/KUJI addresses. Do not treat cw2cw20-basealone as proof the layout matches 10184.B. Factory whitelist (pair-asset)
cw20-tax/+taxed00xforks.Acceptance (when someone picks this up)
cw20-codeid-audits/codeids/3/REPORT.mdwith explicit go / no-go for (A) adopt and (B) factory list — they may differ.cw20-basemaps; adopt smash vs migrate-with-adapter.AddWhitelistedCodeIdafter REPORT GO.3from cw2 name alone.Do not
3to CoolifyVITE_COMMUNITY_MIGRATE_CODE_IDSor factory whitelist from this ticket alone.crates.io:cw20-basemeans the same crate/layout as 10184 (10184 also reportscw20-base; 6036 reportsterraswap-token).Out of scope (sibling stores)
Same-era
cw20-basestores that are not this ticket: 147 (aUST), 153 (ANC), 610 (ASTROC), 767 (Wormhole WETH), 1603 (stLuna), 1790 (bLuna), 4254 (STT), 5800 (LOOPC). Open a new ticket per id if those become product-relevant. GDEX 9788 / Terraswap current 7395 are also separate.marked as related to #626
marked as related to #603
marked as related to #589
marked as related to #582
mentioned in issue #626
mentioned in issue #628
marked as related to #628
mentioned in issue #603
mentioned in merge request !1145
Investigation recorded on !1145 (
issue-627-cw20-codeid-3).make verify-issue-62714/14.Acceptance
cw20-codeid-audits/codeids/3/REPORT.md— NO-GO for (A) adopt and (B) factory list (they match; both no-go).\x00\x0atoken_info+ CanonicalAddr balances vs modern unprefixedtoken_info+Addrmaps. Adopt smash (AdoptMissingTokenInfo/AdoptLegacyLayout) vs migrate-with-adapter (not built).codeids/3/census.json.AddWhitelistedCodeId 3.skills/AGENTS_FRONTEND_TOKEN_MIGRATE.md(S3-code3) andskills/AGENTS_CW20_CODE_ID_3.mdso agents do not append3from cw2 name alone.Do not (held)
3toVITE_COMMUNITY_MIGRATE_CODE_IDS.crates.io:cw20-baseas 10184 layout.Extra (fail-closed, not an importer)
Crate now reverts
AdoptLegacyLayoutif CanonicalAddrbalancekeys are present orTOKEN_INFOserde fails. That is defense in depth, not a retail GO.Layer A-lcd / B-lt on pinned bytes was fail-closed (
interface_version_7). A CanonicalAddr → Addr importer is a new ticket if product wants one later.mentioned in commit
1576710716!1145 merged to
main(15767107) without waiting for CI. Conflicts were docs/Makefile/AGENTS; live tax pin 11630 (from #628/#635) kept, plus do not append 3.make verify-issue-62714/14 (first pass + retest). Crate adopt 16 + Vitest migrate 10.Verdict unchanged: dual-track NO-GO (A adopt + B factory list). Coolify
VITE_COMMUNITY_MIGRATE_CODE_IDSmust not gain3. NoAddWhitelistedCodeId 3/ Refresh / RegisterListedPair from this ticket.Sibling stores (147, 153, …) stay out of scope — open a new ticket per id if needed.
mentioned in issue #638
marked as related to #638
Post-merge leftovers for the !1140/!1142/!1143/!1144/!1145 pass: #638.
mentioned in issue #690