gate: audit CW20 code 8266 before SpaceUSD/UST1 whitelist #581

Closed
opened 2026-08-20 03:28:03 +00:00 by PlasticDigits · 49 comments
PlasticDigits commented 2026-08-20 03:28:03 +00:00 (Migrated from gitlab.com)

Gate

Blocked by #589 (generalized CW20 code-id audit harness). Do not factory AddWhitelistedCodeId 8266 and do not CreatePair / seed SpaceUSD/UST1 (or any other 8266 pair) until:

  1. That harness issue is closed (folder, standard procedure, decompile pipeline, automated suite), and
  2. This issue is closed with a recorded go/no-go taken from cw20-codeid-audits/codeids/8266/REPORT.md (decomp + suite), not from an optimizer rebuild.

Hash-equal rebuild is not required. Confirming the downloaded LCD wasm SHA-256 equals CodeInfo.data_hash is still required (identity of the binary). Proving a rust-optimizer rebuild matches that hash is not a gate.

Parent ops: #558 (CMM-custodied SpaceUSD/UST1 LP). Policy: docs/runbooks/cw20-whitelist-policy.md / #377 H-01. Contrast: ALPHA 8654 is already a live cw20_taxed template (do not whitelist that either). 8266 is a different wasm and still needs its own audit — LCD query surface is not a substitute for reading the binary.

Factory today: GetWhitelistedCodeIds = [6036, 10184] only. CreatePair SpaceUSD+UST1 currently fails CodeIdNotWhitelisted (verified 2026-08-20). That is the correct failure until this gate passes.


What 8266 is (public LCD + docs)

Field Value
Code ID 8266
data_hash 953AD60CF6D8C9631B99ADC84C3ABF4083815743F86FF81B2A422FDFDF5F95C0
Store uploader (CodeInfo.creator) terra1yq3d4h9g4ncale3mcwuhcfdge8hzjx666umlhg
Instantiate permission Everybody (anyone can instantiate)
LCD crate name (query parse errors) terraport_token::msg::QueryMsg
Instantiations on columbus-5 1686 contracts (LCD /code/8266/contracts, 2026-08-20)

Canonical Terraport “Token code” instance (same code ID, label Token Terraport V2), created at height 15307849:

  • terra1ex0hjv3wurhj4wgup4jzlzaqj4av6xqd8le4etml7rg9rs207y4s8cdvrp
  • Admin: terra1m67k3ak5d05k7tzukstkujxptw0tnwt8cmf5kcxm6vwd403l4teshm07ls
  • token_info: name Terraport, symbol TERRA, 6 dp

The same wasm is also used for Terraport LP CW20s (example label lp, init terraport liquidity token / uLP). SpaceUSD is one permissionless instantiate of that binary, not a unique template.

SpaceUSD instance (the #558 leg)

Field Value
Address terra1cvd5cgrs8rrl96hte34n57497u5f9cwuv3e6ztxgetkx4uzmcdyswv79zl
Label Spaceship Dollars_token_contract
Created height 27154948
Creator / admin / minter / marketing terra133n0pv8jwllxwmrhymgfllglw9l0j5e765x5d9
Decimals 6
total_supply now 530000000 = 530 human
total_supply_at block 27154948 30000000 = 30 human (minter has expanded supply since instantiate)
Mint cap 1000000000000000 = 1,000,000,000 human
Holders (all_accounts) 43
CMM balance 200032180 = 200.032180 (already staged for the pool)
tax_map query absent (unknown variant)

Issuer wallet is also the SpaceshipRacer validator operator (terravaloper133n0pv8jwllxwmrhymgfllglw9l0j5e76m2fak). That is public association only — not an audit of the wasm.

Tokenlist already lists SpaceUSD at this address with 6 dp.


8266 vs already-whitelisted 6036

6036 (factory SL1) 8266 (this issue)
LCD crate cw20_base::msg::QueryMsg terraport_token::msg::QueryMsg
Public docs TerraSwap columbus-5 token code id 6036 (docs.terraswap.io) Terraport V2 token / LP wasm (not in TerraSwap’s published code id table)
Extra queries vs cw20-base — balance_at, total_supply_at, all_spender_allowances
Checksum 7C7DE408E1081C72947567E4D002456B2EB95C66517E4D955A401C453B1881A2 953AD60C…F5F95C0

balance_at takes { address, height }; total_supply_at takes { block }. That matches a snapshot / historical-balance extension (governance/staking style), which is not automatically a rebase. It is also not proof of 1:1 transfer/send. The audit must show that a holder’s current balance never changes except via explicit transfer/mint/burn.


Public claims vs what we can verify

Terraport docs (Mint Your CW20 Token) tell issuers to instantiate “this binary” and state it was audited by CertiK, and that Terraport will migrate tokens on chain upgrades so issuers need not act.

CertiK project page: skynet.certik.com/projects/terraport (audit history includes a 2024-08-23 delivery; listed token contract is the TERRA instance above). File-level hashes on Skynet (e.g. contract.rs) are not a wasm checksum. Treat the CertiK claim as unverified marketing for listing. A CertiK zip / source SHA is an optional appendix only — it does not gate this issue.

Terraport 2023-04-10 ~$4M incident (CertiK post-mortem): liquidity-wallet / centralization, classified out of audit scope; CertiK audited after the exploit. That is not evidence that 8266 is FoT, and it is not a reason to skip wasm review. It is a reminder that Terraport-adjacent ops and admin keys have a real loss history.

Our own docs/terraport.md: Terraport DEX core source is not in their public repos (TerraSwap upstream is). terraport_token wasm is similarly not pinned to a public git SHA in this repo. That is why listing evidence is LCD wasm decomp + automated suite, not a rebuild.


Risks the audit must close (H-01 / P2)

  1. Fee-on-transfer / send tax — pair and limit escrow credit declared amounts (#448, fee_on_transfer_creates_reserve_imbalance). 8266 has no tax_map query; a hidden skim in transfer/send would still break P2. ALPHA 8654 is the worked example of “query surface looked listable until tax_map”.
  2. Rebase / reflection / auto-balance mutation — snapshot queries (balance_at / total_supply_at) raise this question. Historical checkpoints are OK; elastic supply that changes idle balances is not.
  3. Factory-global whitelist — AddWhitelistedCodeId 8266 admits all 1686 current instantiations (TERRA, Terraport LPs, SpaceUSD, plus any future Everybody instantiate) to CreatePair. Even a clean template is a listing/spam surface. Prefer listing SpaceUSD only after the template is approved; still assume other 8266 tokens can appear in /create.
  4. Instance admin / migrate after listing — SpaceUSD admin is the issuer. F6 (#582) pins listing-time code_id and re-checks the whitelist on writes, so migrate-off-template fail-closes. Same-code-id admin setters (hidden tax, pause, honeypot) are not covered by F6 and must be caught by decomp + suite.
  5. Mint inflation — minter = admin, cap 1e9 human vs 530 circulating. Not a P2 bug; it is a pool-dilution / “USD” ticker risk for a CMM-custodied 1:1 UST1 book.
  6. Name is not a peg — SpaceUSD/UST1 in #558 is 1 SpaceUSD = 1 UST1 by inventory, not an oracle. Do not treat CertiK/Terraport branding as a dollar backing.

Do not add pair balance-delta / FoT swap math to “make 8266 work” (H-01; Balancer STA 2020 class).


Audit checklist (must attach evidence on this issue)

Per the generalized code-id procedure (#589) and cw20-whitelist-policy.md:

  • Harness issue closed (folder, procedure, decompile scripts, automated suite)
  • Download LCD wasm for code 8266; confirm SHA-256 equals data_hash 953AD60C…F5F95C0 (binary identity — not a rebuild)
  • Decompile that wasm into cw20-codeid-audits/codeids/8266/decomp/
  • Human audit of decompiled code: no fee-on-transfer, no transfer tax, no rebase/reflection, no hook that mutates unrelated balances, no honeypot / hidden mint / allowance backdoor
  • Map balance_at / total_supply_at to snapshot-only (or document if they can change live balances)
  • Automated suite green on 8266 for all DEX invariants that touch CW20 assets, all common CW20 behaviors, and all catalogue exploit rows (or explicit N/A + reason)
  • codeids/8266/REPORT.md attached / merged with go or no-go
  • Explicit go/no-go: whitelist 8266 for #558 SpaceUSD/UST1, or wrap SpaceUSD into 10184 instead (same pattern as rejecting natives / taxed CW20s)

Optional appendix only (does not block): public source URL, CertiK zip, or optimizer rebuild hash.


Acceptance

  • #589 is closed
  • This issue has a written go or no-go based on the 8266 decomp + suite report
  • Go: 2-of-3 may AddWhitelistedCodeId 8266, then #558 SpaceUSD/UST1 create+provide with receiver = CMM
  • No-go: SpaceUSD/UST1 stays blocked, or proceeds only via a 10184 wrap; 8266 stays off the factory whitelist
  • #558 workstream 1 does not close while this issue is open

Labels / owner

ops + governance (DEX 2-of-3 whitelist) / security review

Priority

P1 for #558 SpaceUSD/UST1 only — not a launch-blocker for existing 6036/10184 pairs

## Gate **Blocked by [#589](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/589)** (generalized CW20 code-id audit harness). Do **not** factory `AddWhitelistedCodeId` **8266** and do **not** `CreatePair` / seed **SpaceUSD/UST1** (or any other 8266 pair) until: 1. That harness issue is closed (folder, standard procedure, decompile pipeline, automated suite), and 2. This issue is closed with a recorded **go/no-go** taken from `cw20-codeid-audits/codeids/8266/REPORT.md` (decomp + suite), **not** from an optimizer rebuild. **Hash-equal rebuild is not required.** Confirming the downloaded LCD wasm SHA-256 equals `CodeInfo.data_hash` is still required (identity of the binary). Proving a rust-optimizer rebuild matches that hash is **not** a gate. Parent ops: [#558](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/558) (CMM-custodied SpaceUSD/UST1 LP). Policy: [`docs/runbooks/cw20-whitelist-policy.md`](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/blob/main/docs/runbooks/cw20-whitelist-policy.md) / [#377](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/377) **H-01**. Contrast: ALPHA **8654** is already a live `cw20_taxed` template (do not whitelist that either). **8266 is a different wasm** and still needs its own audit — LCD query surface is not a substitute for reading the binary. Factory today: `GetWhitelistedCodeIds` = **`[6036, 10184]`** only. `CreatePair` SpaceUSD+UST1 currently fails `CodeIdNotWhitelisted` (verified 2026-08-20). That is the correct failure until this gate passes. --- ## What 8266 is (public LCD + docs) | Field | Value | |-------|--------| | Code ID | **8266** | | `data_hash` | `953AD60CF6D8C9631B99ADC84C3ABF4083815743F86FF81B2A422FDFDF5F95C0` | | Store uploader (`CodeInfo.creator`) | `terra1yq3d4h9g4ncale3mcwuhcfdge8hzjx666umlhg` | | Instantiate permission | **Everybody** (anyone can instantiate) | | LCD crate name (query parse errors) | `terraport_token::msg::QueryMsg` | | Instantiations on columbus-5 | **1686** contracts (LCD `/code/8266/contracts`, 2026-08-20) | Canonical Terraport “Token code” instance (same code ID, label **Token Terraport V2**), created at height **15307849**: - `terra1ex0hjv3wurhj4wgup4jzlzaqj4av6xqd8le4etml7rg9rs207y4s8cdvrp` - Admin: `terra1m67k3ak5d05k7tzukstkujxptw0tnwt8cmf5kcxm6vwd403l4teshm07ls` - `token_info`: name Terraport, symbol **TERRA**, 6 dp The same wasm is also used for Terraport **LP CW20s** (example label `lp`, init `terraport liquidity token` / `uLP`). SpaceUSD is one permissionless instantiate of that binary, not a unique template. ### SpaceUSD instance (the #558 leg) | Field | Value | |-------|--------| | Address | `terra1cvd5cgrs8rrl96hte34n57497u5f9cwuv3e6ztxgetkx4uzmcdyswv79zl` | | Label | `Spaceship Dollars_token_contract` | | Created | height **27154948** | | Creator / **admin** / **minter** / marketing | `terra133n0pv8jwllxwmrhymgfllglw9l0j5e765x5d9` | | Decimals | **6** | | `total_supply` now | `530000000` = **530** human | | `total_supply_at` block 27154948 | `30000000` = **30** human (minter has expanded supply since instantiate) | | Mint **cap** | `1000000000000000` = **1,000,000,000** human | | Holders (`all_accounts`) | **43** | | CMM balance | `200032180` = **200.032180** (already staged for the pool) | | `tax_map` query | **absent** (unknown variant) | Issuer wallet is also the SpaceshipRacer validator operator (`terravaloper133n0pv8jwllxwmrhymgfllglw9l0j5e76m2fak`). That is public association only — not an audit of the wasm. Tokenlist already lists SpaceUSD at this address with 6 dp. --- ## 8266 vs already-whitelisted **6036** | | **6036** (factory SL1) | **8266** (this issue) | |--|------------------------|------------------------| | LCD crate | `cw20_base::msg::QueryMsg` | `terraport_token::msg::QueryMsg` | | Public docs | TerraSwap columbus-5 **token code id 6036** ([docs.terraswap.io](https://docs.terraswap.io/docs/resources/contract-addresses/)) | Terraport V2 token / LP wasm (not in TerraSwap’s published code id table) | | Extra queries vs cw20-base | — | **`balance_at`**, **`total_supply_at`**, **`all_spender_allowances`** | | Checksum | `7C7DE408E1081C72947567E4D002456B2EB95C66517E4D955A401C453B1881A2` | `953AD60C…F5F95C0` | `balance_at` takes `{ address, height }`; `total_supply_at` takes `{ block }`. That matches a **snapshot / historical-balance** extension (governance/staking style), which is **not automatically a rebase**. It is also **not proof** of 1:1 `transfer`/`send`. The audit must show that a holder’s *current* `balance` never changes except via explicit transfer/mint/burn. --- ## Public claims vs what we can verify Terraport docs ([Mint Your CW20 Token](https://terraport.gitbook.io/terraport-docs/developers/mint-your-cw20-token)) tell issuers to instantiate “this binary” and state it was **audited by CertiK**, and that Terraport will **migrate** tokens on chain upgrades so issuers need not act. CertiK project page: [skynet.certik.com/projects/terraport](https://skynet.certik.com/projects/terraport) (audit history includes a 2024-08-23 delivery; listed token contract is the TERRA instance above). File-level hashes on Skynet (e.g. `contract.rs`) are **not** a wasm checksum. Treat the CertiK claim as **unverified marketing** for listing. A CertiK zip / source SHA is an optional appendix only — it does **not** gate this issue. Terraport **2023-04-10 ~$4M** incident ([CertiK post-mortem](https://www.certik.com/blog/post-mortem-terraport-finance)): **liquidity-wallet / centralization**, classified out of audit scope; CertiK audited *after* the exploit. That is **not** evidence that 8266 is FoT, and it is **not** a reason to skip wasm review. It is a reminder that Terraport-adjacent ops and admin keys have a real loss history. Our own `docs/terraport.md`: Terraport DEX core source is **not** in their public repos (TerraSwap upstream is). `terraport_token` wasm is similarly **not** pinned to a public git SHA in this repo. That is why listing evidence is **LCD wasm decomp + automated suite**, not a rebuild. --- ## Risks the audit must close (H-01 / P2) 1. **Fee-on-transfer / send tax** — pair and limit escrow credit **declared** amounts ([#448](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/448), `fee_on_transfer_creates_reserve_imbalance`). 8266 has no `tax_map` query; a hidden skim in `transfer`/`send` would still break **P2**. ALPHA 8654 is the worked example of “query surface looked listable until `tax_map`”. 2. **Rebase / reflection / auto-balance mutation** — snapshot queries (`balance_at` / `total_supply_at`) raise this question. Historical checkpoints are OK; elastic supply that changes idle balances is not. 3. **Factory-global whitelist** — `AddWhitelistedCodeId 8266` admits **all 1686** current instantiations (TERRA, Terraport LPs, SpaceUSD, plus any future Everybody instantiate) to `CreatePair`. Even a clean template is a listing/spam surface. Prefer listing SpaceUSD only after the **template** is approved; still assume other 8266 tokens can appear in `/create`. 4. **Instance admin / migrate after listing** — SpaceUSD `admin` is the issuer. **F6** ([#582](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/582)) pins listing-time `code_id` and re-checks the whitelist on writes, so migrate-off-template fail-closes. Same-code-id admin setters (hidden tax, pause, honeypot) are **not** covered by F6 and must be caught by decomp + suite. 5. **Mint inflation** — minter = admin, cap **1e9** human vs **530** circulating. Not a P2 bug; it is a pool-dilution / “USD” ticker risk for a CMM-custodied 1:1 UST1 book. 6. **Name is not a peg** — SpaceUSD/UST1 in #558 is **1 SpaceUSD = 1 UST1 by inventory**, not an oracle. Do not treat CertiK/Terraport branding as a dollar backing. Do **not** add pair balance-delta / FoT swap math to “make 8266 work” (H-01; Balancer STA 2020 class). --- ## Audit checklist (must attach evidence on this issue) Per the generalized code-id procedure ([#589](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/589)) and `cw20-whitelist-policy.md`: - [ ] Harness issue closed (folder, procedure, decompile scripts, automated suite) - [ ] Download LCD wasm for code **8266**; confirm SHA-256 equals `data_hash` `953AD60C…F5F95C0` (binary identity — **not** a rebuild) - [ ] Decompile that wasm into `cw20-codeid-audits/codeids/8266/decomp/` - [ ] Human audit of decompiled code: no fee-on-transfer, no transfer tax, no rebase/reflection, no hook that mutates unrelated balances, no honeypot / hidden mint / allowance backdoor - [ ] Map `balance_at` / `total_supply_at` to snapshot-only (or document if they can change live balances) - [ ] Automated suite green on 8266 for all DEX invariants that touch CW20 assets, all common CW20 behaviors, and all catalogue exploit rows (or explicit N/A + reason) - [ ] `codeids/8266/REPORT.md` attached / merged with go or no-go - [ ] Explicit go/no-go: whitelist **8266** for #558 SpaceUSD/UST1, or wrap SpaceUSD into **10184** instead (same pattern as rejecting natives / taxed CW20s) Optional appendix only (does **not** block): public source URL, CertiK zip, or optimizer rebuild hash. --- ## Acceptance - [ ] [#589](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/589) is closed - [ ] This issue has a written **go** or **no-go** based on the 8266 decomp + suite report - [ ] **Go:** 2-of-3 may `AddWhitelistedCodeId 8266`, then #558 SpaceUSD/UST1 create+provide with `receiver` = CMM - [ ] **No-go:** SpaceUSD/UST1 stays blocked, or proceeds only via a **10184** wrap; **8266 stays off** the factory whitelist - [ ] #558 workstream 1 does not close while this issue is open ## Labels / owner ops + governance (DEX 2-of-3 whitelist) / security review ## Priority P1 for #558 SpaceUSD/UST1 only — not a launch-blocker for existing 6036/10184 pairs
PlasticDigits commented 2026-08-20 03:28:04 +00:00 (Migrated from gitlab.com)

marked as related to #558

marked as related to #558
PlasticDigits commented 2026-08-20 03:28:11 +00:00 (Migrated from gitlab.com)

mentioned in issue #558

mentioned in issue #558
PlasticDigits commented 2026-08-20 03:32:43 +00:00 (Migrated from gitlab.com)
  1. Factory global whitelist spam is mitigated by the lunc fee, however means that the code source must be audited and non exploitable even if spaceusd specific configuration is safe, before the codeid can be whitelisted
3. Factory global whitelist spam is mitigated by the lunc fee, however means that the code source must be audited and non exploitable even if spaceusd specific configuration is safe, before the codeid can be whitelisted
PlasticDigits commented 2026-08-20 03:33:27 +00:00 (Migrated from gitlab.com)

Source hunt (Terraport repos) — 2026-08-20

Did not find a public store-code tx or a build that reproduces LCD data_hash. Did find a partial source dump that fingerprints to the live wasm.

Fingerprint: on-chain cw2 == GitHub crate

SpaceUSD raw contract_info (cw2):

{"contract":"crates.io:terraport-token","version":"0.0.0"}

That is exactly CONTRACT_NAME / CARGO_PKG_VERSION in Terraport-Finance/Terra-token-contract (Cargo.toml package terraport-token 0.0.0; contract.rs crates.io:terraport-token). LCD parse errors naming terraport_token::msg::QueryMsg are the same crate (hyphen → underscore).

Query surface in that src/msg.rs matches columbus-5, including the awkward split BalanceAt { height } vs TotalSupplyAt { block } (not a generic cw20-base). That is a strong interface match, not a checksum match.

Single content commit: d854a2199e 2024-01-18, message certik audited, author Man12C (Terra Classic tooling forks: finder / station / LocalTerra — not a published CertiK report). The org’s other public repos are listings/adapters only (assets, DefiLlama, keplr-registry). No factory/pair/router wasm repo.

Claimed monorepo is not public

Cargo.toml says:

  • repository = "https://github.com/terraport/classic_terraport" → 404
  • GitHub org terraport → 0 public repos
  • classic_terraport = { path = "../../packages/classic_terraport", version = "2.5.2" } → not in this dump, not on crates.io (unlike classic_terraswap)

instantiate in contract.rs takes classic_terraport::token::InstantiateMsg, not the InstantiateMsg sitting in the dumped msg.rs. So this GitHub tree is an extracted contract crate from a private Terraport workspace. It will not compile as-is; we cannot optimizer-build it to check 953AD60C….

What that dump actually is (lineage)

cw20-base 0.14 + SnapshotMap BALANCES with Strategy::EveryBlock + TOTAL_SUPPLY_HISTORY map. Same shape as Astroport xastro_token (historical balance_at / total_supply_at for staking/governance), not cw20_taxed.

In the dumped execute path, transfer / send / transfer_from debit and credit the same amount (no skim). Snapshots are checkpoints for queries; they do not rebase idle balances in this source. That is a review of the dump, not a proof the LCD wasm is that commit.

Still missing for a go/no-go

  1. Private classic_terraport tree (or a CertiK zip whose wasm SHA-256 equals LCD data_hash)
  2. Store-code tx for 8266 (uploader terra1yq3d4…). Publicnode FCD has pruned below height 25616144, so first instantiate (height 15307849, Terraport V2 TERRA token) is off the cheap archive; need an archival LCD/Finder
  3. Reproducible optimizer build (rust-optimizer + missing package) vs 953AD60C…

Until (1)+(3), treat Terra-token-contract as the best public candidate source, not as verified provenance. Ask Terraport for the classic_terraport SHA that produced 8266, or download LCD wasm and diff against a rebuild.

## Source hunt (Terraport repos) — 2026-08-20 Did not find a public store-code tx or a build that reproduces LCD `data_hash`. Did find a **partial source dump** that fingerprints to the live wasm. ### Fingerprint: on-chain cw2 == GitHub crate SpaceUSD raw `contract_info` (cw2): ```json {"contract":"crates.io:terraport-token","version":"0.0.0"} ``` That is exactly `CONTRACT_NAME` / `CARGO_PKG_VERSION` in [Terraport-Finance/Terra-token-contract](https://github.com/Terraport-Finance/Terra-token-contract) (`Cargo.toml` package `terraport-token` **0.0.0**; `contract.rs` `crates.io:terraport-token`). LCD parse errors naming `terraport_token::msg::QueryMsg` are the same crate (hyphen → underscore). Query surface in that `src/msg.rs` matches columbus-5, including the awkward split **`BalanceAt { height }`** vs **`TotalSupplyAt { block }`** (not a generic cw20-base). That is a strong interface match, not a checksum match. Single content commit: `d854a2199e` **2024-01-18**, message `certik audited`, author [Man12C](https://github.com/Man12C) (Terra Classic tooling forks: finder / station / LocalTerra — not a published CertiK report). The org’s other public repos are **listings/adapters only** (`assets`, DefiLlama, keplr-registry). No factory/pair/router wasm repo. ### Claimed monorepo is not public `Cargo.toml` says: - `repository = "https://github.com/terraport/classic_terraport"` → **404** - GitHub org [`terraport`](https://github.com/terraport) → **0 public repos** - `classic_terraport = { path = "../../packages/classic_terraport", version = "2.5.2" }` → **not in this dump**, not on crates.io (unlike `classic_terraswap`) `instantiate` in `contract.rs` takes `classic_terraport::token::InstantiateMsg`, **not** the `InstantiateMsg` sitting in the dumped `msg.rs`. So this GitHub tree is an **extracted contract crate from a private Terraport workspace**. It will not compile as-is; we cannot optimizer-build it to check `953AD60C…`. ### What that dump actually is (lineage) cw20-base **0.14** + `SnapshotMap` `BALANCES` with `Strategy::EveryBlock` + `TOTAL_SUPPLY_HISTORY` map. Same *shape* as Astroport `xastro_token` (historical `balance_at` / `total_supply_at` for staking/governance), not `cw20_taxed`. In the dumped execute path, `transfer` / `send` / `transfer_from` debit and credit the **same `amount`** (no skim). Snapshots are checkpoints for queries; they do not rebase idle balances in this source. **That is a review of the dump, not a proof the LCD wasm is that commit.** ### Still missing for a go/no-go 1. Private `classic_terraport` tree (or a CertiK zip whose **wasm SHA-256** equals LCD `data_hash`) 2. Store-code tx for 8266 (uploader `terra1yq3d4…`). Publicnode FCD has pruned below height **25616144**, so first instantiate (height **15307849**, Terraport V2 TERRA token) is off the cheap archive; need an archival LCD/Finder 3. Reproducible optimizer build (`rust-optimizer` + missing package) vs `953AD60C…` Until (1)+(3), treat [Terra-token-contract](https://github.com/Terraport-Finance/Terra-token-contract) as **the best public candidate source**, not as verified provenance. Ask Terraport for the `classic_terraport` SHA that produced 8266, or download LCD wasm and diff against a rebuild.
PlasticDigits commented 2026-08-20 03:33:54 +00:00 (Migrated from gitlab.com)

On (4) this is a serious security issue, as a migrated token to a new codeid could violate our whitelist policy, need a seperate security issue to track potential exploits, mitigation, and severity

On (4) this is a serious security issue, as a migrated token to a new codeid could violate our whitelist policy, need a seperate security issue to track potential exploits, mitigation, and severity
PlasticDigits commented 2026-08-20 03:37:29 +00:00 (Migrated from gitlab.com)

mentioned in issue #582

mentioned in issue #582
PlasticDigits commented 2026-08-20 03:37:46 +00:00 (Migrated from gitlab.com)

marked as related to #582

marked as related to #582
PlasticDigits commented 2026-08-20 03:37:51 +00:00 (Migrated from gitlab.com)

Gate: #582

Item (4) is protocol-wide, not 8266-only. Factory checks CW20 code_id only at CreatePair; pair swap/provide/limit never re-checks. Any listed instance whose wasm admin is still set can MsgMigrateContract onto a different (including taxed) code id and keep trading — H-01 / P2 / SEC-I01 H05.

Do not close this issue with a go on AddWhitelistedCodeId 8266 and do not CreatePair SpaceUSD/UST1 until #582 has a written severity + mitigation decision.

GitLab license here does not support blocks issue links, so the gate is this comment + #582’s Gate section.

Live listed pair assets today are all protocol-admin’d (2-of-3 or wrap-stack CMM). SpaceUSD would be the first third-party migrate key. Permissionless 6036 CreatePair already admits issuer-admin tokens that could migrate after listing.

## Gate: [#582](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/582) Item **(4)** is protocol-wide, not 8266-only. Factory checks CW20 `code_id` **only at `CreatePair`**; pair swap/provide/limit never re-checks. Any listed instance whose wasm **admin** is still set can `MsgMigrateContract` onto a different (including taxed) code id and keep trading — H-01 / P2 / SEC-I01 H05. **Do not close this issue with a go on `AddWhitelistedCodeId` 8266** and **do not CreatePair SpaceUSD/UST1** until #582 has a written severity + mitigation decision. GitLab license here does not support `blocks` issue links, so the gate is this comment + #582’s Gate section. Live listed pair assets today are all protocol-admin’d (2-of-3 or wrap-stack CMM). SpaceUSD would be the first **third-party** migrate key. Permissionless **6036** CreatePair already admits issuer-admin tokens that could migrate after listing.
PlasticDigits commented 2026-08-20 04:12:13 +00:00 (Migrated from gitlab.com)

Finder / FCD: store-code tx for 8266

Public LCD is pruned; public FCD (what Finder uses as api) still has the 2023 store-code. The earlier note that publicnode FCD is pruned below height 25616144 applies to LCD, not FCD.

Store-code (code id 8266)

Field Value
Tx 5829A7EA57F177B17DA509FB1AE6221A016BACB15C4CC8ECC1C61E281B0D2BAC
Height 15307833 (2023-11-07 10:28:07Z)
Sender terra1yq3d4h9g4ncale3mcwuhcfdge8hzjx666umlhg
Event code_checksum 953ad60cf6d8c9631b99adc84c3abf4083815743f86ff81b2a422fdfdf5f95c0

Checksum matches live LCD CodeInfo.data_hash 953AD60C…F5F95C0. First instantiate (Terraport V2 TERRA, label Token Terraport V2) is 96s later at height 15307849: D1BA89BD75C97F3311D43D18781150847F2CF972480455B24B13CAC78CBB517D. Same morning the uploader stored 8254–8266 in a burst; 8266 was last.

What is pruned vs what still serves history

Host Lowest height / notes
LCD https://terra-classic-lcd.publicnode.com 25616144 — no 15.3M blocks/txs
LCD https://lcd.terra-classic.hexxagon.io 26980332
LCD https://api-lunc-lcd.binodes.com 29037463
LCD GET /cosmwasm/wasm/v1/code/8266 Current state only (creator, data_hash, wasm bytes, instantiate Everybody) — this still works
FCD https://terra-classic-fcd.publicnode.com Has height 15.3M
FCD https://fcd.terra-classic.hexxagon.io Same

API gotcha: FCD /v1/txs/{hash} (plural) 404s — it proxies pruned LCD. Use /v1/tx/{hash} (singular), /v1/blocks/{height}, or /v1/txs?account=….

Finder backends (assets.terra.money/chains.json / Hexxagon assets.hexxagon.io/chains.json):

SpaceUSD instantiate is new enough for both LCD and FCD: height 27154948, tx A99C0E54395DB7330815F3037DEFD0C3A3CC5E5AE0B6106D7D88857B2353EB5D.

No rented archive node is required for the store-code hash. This still does not reproduce data_hash from source (private classic_terraport / CertiK wasm SHA) — it only pins the on-chain store tx.

## Finder / FCD: store-code tx for 8266 Public **LCD** is pruned; public **FCD** (what Finder uses as `api`) still has the 2023 store-code. The earlier note that publicnode FCD is pruned below height 25616144 applies to **LCD**, not FCD. ### Store-code (code id 8266) | Field | Value | |-------|--------| | Tx | `5829A7EA57F177B17DA509FB1AE6221A016BACB15C4CC8ECC1C61E281B0D2BAC` | | Height | **15307833** (2023-11-07 10:28:07Z) | | Sender | `terra1yq3d4h9g4ncale3mcwuhcfdge8hzjx666umlhg` | | Event `code_checksum` | `953ad60cf6d8c9631b99adc84c3abf4083815743f86ff81b2a422fdfdf5f95c0` | Checksum matches live LCD `CodeInfo.data_hash` `953AD60C…F5F95C0`. First instantiate (Terraport V2 TERRA, label **Token Terraport V2**) is 96s later at height **15307849**: `D1BA89BD75C97F3311D43D18781150847F2CF972480455B24B13CAC78CBB517D`. Same morning the uploader stored **8254–8266** in a burst; 8266 was last. ### What is pruned vs what still serves history | Host | Lowest height / notes | |------|------------------------| | LCD `https://terra-classic-lcd.publicnode.com` | **25616144** — no 15.3M blocks/txs | | LCD `https://lcd.terra-classic.hexxagon.io` | 26980332 | | LCD `https://api-lunc-lcd.binodes.com` | 29037463 | | LCD `GET /cosmwasm/wasm/v1/code/8266` | **Current state only** (creator, `data_hash`, wasm bytes, instantiate **Everybody**) — this still works | | FCD `https://terra-classic-fcd.publicnode.com` | Has height 15.3M | | FCD `https://fcd.terra-classic.hexxagon.io` | Same | **API gotcha:** FCD `/v1/txs/{hash}` (plural) 404s — it proxies pruned LCD. Use **`/v1/tx/{hash}`** (singular), `/v1/blocks/{height}`, or `/v1/txs?account=…`. Finder backends (`assets.terra.money/chains.json` / Hexxagon `assets.hexxagon.io/chains.json`): - [finder.terra.money/classic](https://finder.terra.money/classic) → lcd publicnode (pruned), **api** `https://terra-classic-public-api.publicnode.com` - [finder.terraclassic.community/columbus-5](https://finder.terraclassic.community/columbus-5/) → lcd Hexxagon (pruned), **api** `https://api.terra-classic.hexxagon.io` ### Links - Store 8266: [classic/tx/5829A7EA…](https://finder.terra.money/classic/tx/5829A7EA57F177B17DA509FB1AE6221A016BACB15C4CC8ECC1C61E281B0D2BAC) · [Galaxy columbus-5](https://finder.terraclassic.community/columbus-5/tx/5829A7EA57F177B17DA509FB1AE6221A016BACB15C4CC8ECC1C61E281B0D2BAC) - First instantiate: [classic/tx/D1BA89BD…](https://finder.terra.money/classic/tx/D1BA89BD75C97F3311D43D18781150847F2CF972480455B24B13CAC78CBB517D) - Code 8266 (LCD `CodeInfo`): [classic/code/8266](https://finder.terra.money/classic/code/8266) · [columbus-5/code/8266](https://finder.terraclassic.community/columbus-5/code/8266) - Direct FCD: `https://terra-classic-fcd.publicnode.com/v1/tx/5829A7EA57F177B17DA509FB1AE6221A016BACB15C4CC8ECC1C61E281B0D2BAC` · `https://terra-classic-fcd.publicnode.com/v1/blocks/15307833` - Uploader history jump: `/v1/txs?account=terra1yq3d4h9g4ncale3mcwuhcfdge8hzjx666umlhg&limit=100&offset=483530149` SpaceUSD instantiate is new enough for **both** LCD and FCD: height **27154948**, tx `A99C0E54395DB7330815F3037DEFD0C3A3CC5E5AE0B6106D7D88857B2353EB5D`. No rented archive node is required for the store-code hash. This still does not reproduce `data_hash` from source (private `classic_terraport` / CertiK wasm SHA) — it only pins the on-chain store tx.
PlasticDigits commented 2026-08-20 04:28:16 +00:00 (Migrated from gitlab.com)

Source identification (LCD wasm + store tx + compiler fingerprint)

This is crate identity, not a byte-identical rebuild. It uses the store-code pin from the Finder/FCD note plus the GitHub dump from the earlier source hunt.

1. On-chain bytes are pinned

Check Value
LCD GET /cosmwasm/wasm/v1/code/8266 data_hash 953AD60CF6D8C9631B99ADC84C3ABF4083815743F86FF81B2A422FDFDF5F95C0
SHA-256 of LCD data wasm same 953AD60C…F5F95C0
Store tx (FCD /v1/tx/…) 5829A7EA57F177B17DA509FB1AE6221A016BACB15C4CC8ECC1C61E281B0D2BAC height 15307833
Event code_checksum 953ad60c…5f95c0 (same)
Creator terra1yq3d4h9g4ncale3mcwuhcfdge8hzjx666umlhg

Wasm size: 327509 bytes.

2. Compiler fingerprint (from panic paths in the wasm)

The binary was not built with a 2023–2024 optimizer. Embedded rustc commit 69f9c33d71c871fc16ac445211281c6e7a340943 is rustc 1.66.0 (2022-12-12). CosmWasm changelog: that toolchain is cosmwasm/workspace-optimizer:0.12.11 / rust-optimizer:0.12.11 only (0.12.10 = 1.65; 0.12.12 = 1.67.1). Registry paths are /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/… (pre-sparse crates.io git index), which matches 0.12.11 and rules out 0.12.13+ (sparse index + newer rustc).

Crate versions also baked into those paths:

Crate Version in 8266.wasm
cosmwasm-std 1.3.3 (published 2023-08-22; so compile is ≥ that, ≤ store 2023-11-07)
serde 1.0.188
serde-json-wasm 0.5.1 (0.5.2 is 2024-01-23 — after store)
cw-storage-plus 0.14.0
base64 0.13.1

Dump Cargo.toml says cosmwasm-std = "1.0.0" (^1.0.0). Latest 1.x at store time was 1.5.0 (2023-10-31). The wasm is 1.3.3, so they compiled with a Cargo.lock (not a fresh resolve on 2023-11-07). That lockfile is not in the public dump.

3. Live instance + wasm type paths = crate terraport-token 0.0.0

SpaceUSD (terra1cvd5c…wv79zl) raw key contract_info (cw2):

{"contract":"crates.io:terraport-token","version":"0.0.0"}

LCD unknown-variant error (live):

Error parsing into type terraport_token::msg::QueryMsg: unknown variant `…`, expected one of
`balance`, `balance_at`, `total_supply_at`, `token_info`, `minter`, `allowance`,
`all_allowances`, `all_spender_allowances`, `all_accounts`, `marketing_info`, `download_logo`

Those names are rustc type paths / serde variant lists inside the wasm, not docs:

  • crates.io:terraport-token + 0.0.0
  • terraport_token::msg::QueryMsg
  • terraport_token::msg::ExecuteMsg
  • terraport_token::state::TokenInfo
  • classic_terraport::token::InstantiateMsg

Execute serde list in the wasm: transfer, burn, send, increase_allowance, decrease_allowance, transfer_from, send_from, mint, update_minter, burn_from, update_marketing, upload_logo. No tax_map / cw20_taxed / classic_terraswap / xastro.

Storage keys in the wasm match the dump state.rs: balance + balance__checkpoints + balance__changelog (SnapshotMap EveryBlock) and total_supply_history. Error strings match dump error.rs (Minting cannot exceed the cap, Duplicate initial balance addresses, Logo binary data exceeds 5KB limit, …).

Public candidate source: Terraport-Finance/Terra-token-contract commit d854a2199e (2024-01-18, message certik audited). Cargo.toml package name terraport-token 0.0.0; CONTRACT_NAME crates.io:terraport-token; query enum is the same awkward BalanceAt { height } vs TotalSupplyAt { block }.

That is enough to name the crate. It is not enough to claim d854a219 is the exact tree that produced 953AD60C….

4. What still does not match (do not treat as go)

GitHub dump vs CertiK file SHA. Skynet lists 247 audited files. One contract.rs SHA-256 is f9cdb90d4f29062c163fef323481d94d9f98b5c41dc61bfc3aafe7c20e5f9afa (UI F9C…AFA). Dump src/contract.rs SHA-256 is 1BAD15D8772BBB6614E165C08F5D580654A5120FA5ACBCE939DDCE5D83FEFDA2. Mismatch. CertiK hashes source files, not the wasm data_hash, and the listed contract.rs may not even be the token crate (DEX core is in the same audit). CertiK artifact SHA vs LCD data_hash: unavailable / not matched.

Dump date vs store date. Wasm stored 2023-11-07. Dump commit 2024-01-18. Two months later; no Cargo.lock; classic_terraport still private (https://github.com/terraport/classic_terraport 404). instantiate takes classic_terraport::token::InstantiateMsg (with marketing) — TerraSwap classic_terraswap 2.5.2 token InstantiateMsg has no marketing and uses cw 0.8 / cosmwasm 0.16. Terraport reused the version number on a rewritten package. Substituting crates.io classic_terraswap 2.5.2 cannot reproduce this wasm.

Rebuild attempt. Reconstructed a minimal classic_terraport::token::InstantiateMsg (marketing + validate/get_cap) beside the dump, pinned wasm-known crates (cosmwasm-std 1.3.3, serde 1.0.188, serde-json-wasm 0.5.1, …), and ran cosmwasm/workspace-optimizer:0.12.11. Did not finish a wasm: 2026 crates.io resolves transitives that need rustc > 1.66 (itoa 1.0.18, edition-2024 zeroize/base64ct before pinning). Without the original lockfile + private package, data_hash is not reproduced.

Dump execute path (review of GitHub, not of the wasm CFG): transfer / send debit and credit the same amount (no skim). BALANCES snapshots are checkpoints; total_supply_history is written on mint/burn/init only. Idle balances are not rebased in this source. That is still not a substitute for a 1:1 staging probe on the LCD binary.

Checklist update

  • LCD wasm 8266; checksum 953AD60C…F5F95C0 (and store tx)
  • Best public source named: terraport-token 0.0.0 / Terra-token-contract d854a219 + private classic_terraport 2.5.2
  • Canonical tree whose optimizer output equals 953AD60C… (need Terraport lockfile + classic_terraport SHA, or CertiK zip with wasm SHA)
  • balance_at / total_supply_at are snapshot queries in the dump; wasm storage keys match SnapshotMap / history map
  • Staging 1:1 transfer/send probe
  • CertiK file SHA vs dump: mismatch; vs LCD wasm: unavailable
  • Go/no-go for whitelist 8266 — not yet (also blocked on #582)

Ask Terraport for: (1) classic_terraport git SHA used for 8266, (2) Cargo.lock from that build, (3) any CertiK zip that includes the optimized wasm whose SHA-256 is 953AD60C….

## Source identification (LCD wasm + store tx + compiler fingerprint) This is **crate identity**, not a byte-identical rebuild. It uses the store-code pin from the Finder/FCD note plus the GitHub dump from the earlier source hunt. ### 1. On-chain bytes are pinned | Check | Value | |-------|--------| | LCD `GET /cosmwasm/wasm/v1/code/8266` `data_hash` | `953AD60CF6D8C9631B99ADC84C3ABF4083815743F86FF81B2A422FDFDF5F95C0` | | SHA-256 of LCD `data` wasm | **same** `953AD60C…F5F95C0` | | Store tx (FCD `/v1/tx/…`) | `5829A7EA57F177B17DA509FB1AE6221A016BACB15C4CC8ECC1C61E281B0D2BAC` height **15307833** | | Event `code_checksum` | `953ad60c…5f95c0` (same) | | Creator | `terra1yq3d4h9g4ncale3mcwuhcfdge8hzjx666umlhg` | Wasm size: 327509 bytes. ### 2. Compiler fingerprint (from panic paths in the wasm) The binary was **not** built with a 2023–2024 optimizer. Embedded rustc commit `69f9c33d71c871fc16ac445211281c6e7a340943` is **rustc 1.66.0** (2022-12-12). CosmWasm changelog: that toolchain is **`cosmwasm/workspace-optimizer:0.12.11` / `rust-optimizer:0.12.11`** only (0.12.10 = 1.65; 0.12.12 = 1.67.1). Registry paths are `/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/…` (pre-sparse crates.io git index), which matches 0.12.11 and **rules out** 0.12.13+ (sparse index + newer rustc). Crate versions also baked into those paths: | Crate | Version in 8266.wasm | |-------|----------------------| | `cosmwasm-std` | **1.3.3** (published 2023-08-22; so compile is ≥ that, ≤ store 2023-11-07) | | `serde` | **1.0.188** | | `serde-json-wasm` | **0.5.1** (0.5.2 is 2024-01-23 — after store) | | `cw-storage-plus` | **0.14.0** | | `base64` | **0.13.1** | Dump `Cargo.toml` says `cosmwasm-std = "1.0.0"` (`^1.0.0`). Latest 1.x at store time was **1.5.0** (2023-10-31). The wasm is **1.3.3**, so they compiled with a **Cargo.lock** (not a fresh resolve on 2023-11-07). That lockfile is **not** in the public dump. ### 3. Live instance + wasm type paths = crate `terraport-token` 0.0.0 SpaceUSD (`terra1cvd5c…wv79zl`) raw key `contract_info` (cw2): ```json {"contract":"crates.io:terraport-token","version":"0.0.0"} ``` LCD unknown-variant error (live): ``` Error parsing into type terraport_token::msg::QueryMsg: unknown variant `…`, expected one of `balance`, `balance_at`, `total_supply_at`, `token_info`, `minter`, `allowance`, `all_allowances`, `all_spender_allowances`, `all_accounts`, `marketing_info`, `download_logo` ``` Those names are **rustc type paths / serde variant lists** inside the wasm, not docs: - `crates.io:terraport-token` + `0.0.0` - `terraport_token::msg::QueryMsg` - `terraport_token::msg::ExecuteMsg` - `terraport_token::state::TokenInfo` - `classic_terraport::token::InstantiateMsg` Execute serde list in the wasm: `transfer`, `burn`, `send`, `increase_allowance`, `decrease_allowance`, `transfer_from`, `send_from`, `mint`, `update_minter`, `burn_from`, `update_marketing`, `upload_logo`. **No** `tax_map` / `cw20_taxed` / `classic_terraswap` / `xastro`. Storage keys in the wasm match the dump `state.rs`: `balance` + `balance__checkpoints` + `balance__changelog` (`SnapshotMap` `EveryBlock`) and `total_supply_history`. Error strings match dump `error.rs` (`Minting cannot exceed the cap`, `Duplicate initial balance addresses`, `Logo binary data exceeds 5KB limit`, …). Public candidate source: [Terraport-Finance/Terra-token-contract](https://github.com/Terraport-Finance/Terra-token-contract) commit `d854a2199e` (2024-01-18, message `certik audited`). `Cargo.toml` package name `terraport-token` **0.0.0**; `CONTRACT_NAME` `crates.io:terraport-token`; query enum is the same awkward **`BalanceAt { height }` vs `TotalSupplyAt { block }`**. That is enough to name the crate. It is **not** enough to claim `d854a219` is the exact tree that produced `953AD60C…`. ### 4. What still does not match (do not treat as go) **GitHub dump vs CertiK file SHA.** Skynet lists 247 audited files. One `contract.rs` SHA-256 is `f9cdb90d4f29062c163fef323481d94d9f98b5c41dc61bfc3aafe7c20e5f9afa` (UI `F9C…AFA`). Dump `src/contract.rs` SHA-256 is `1BAD15D8772BBB6614E165C08F5D580654A5120FA5ACBCE939DDCE5D83FEFDA2`. **Mismatch.** CertiK hashes source files, not the wasm `data_hash`, and the listed `contract.rs` may not even be the token crate (DEX core is in the same audit). **CertiK artifact SHA vs LCD `data_hash`: unavailable / not matched.** **Dump date vs store date.** Wasm stored **2023-11-07**. Dump commit **2024-01-18**. Two months later; no `Cargo.lock`; `classic_terraport` still private (`https://github.com/terraport/classic_terraport` 404). `instantiate` takes `classic_terraport::token::InstantiateMsg` (with `marketing`) — TerraSwap `classic_terraswap` **2.5.2** token `InstantiateMsg` has **no** `marketing` and uses cw 0.8 / cosmwasm 0.16. Terraport reused the version number on a **rewritten** package. Substituting crates.io `classic_terraswap 2.5.2` cannot reproduce this wasm. **Rebuild attempt.** Reconstructed a minimal `classic_terraport::token::InstantiateMsg` (marketing + `validate`/`get_cap`) beside the dump, pinned wasm-known crates (`cosmwasm-std 1.3.3`, `serde 1.0.188`, `serde-json-wasm 0.5.1`, …), and ran **`cosmwasm/workspace-optimizer:0.12.11`**. Did **not** finish a wasm: 2026 crates.io resolves transitives that need rustc > 1.66 (`itoa 1.0.18`, edition-2024 `zeroize`/`base64ct` before pinning). Without the original lockfile + private package, **`data_hash` is not reproduced.** **Dump execute path (review of GitHub, not of the wasm CFG):** `transfer` / `send` debit and credit the same `amount` (no skim). `BALANCES` snapshots are checkpoints; `total_supply_history` is written on mint/burn/init only. Idle balances are not rebased in this source. That is still **not** a substitute for a 1:1 staging probe on the LCD binary. ### Checklist update - [x] LCD wasm 8266; checksum `953AD60C…F5F95C0` (and store tx) - [x] Best public source named: `terraport-token` 0.0.0 / Terra-token-contract `d854a219` + private `classic_terraport` 2.5.2 - [ ] Canonical tree whose optimizer output equals `953AD60C…` (need Terraport lockfile + `classic_terraport` SHA, or CertiK zip with **wasm** SHA) - [x] `balance_at` / `total_supply_at` are snapshot queries in the dump; wasm storage keys match `SnapshotMap` / history map - [ ] Staging 1:1 `transfer`/`send` probe - [x] CertiK file SHA vs dump: **mismatch**; vs LCD wasm: **unavailable** - [ ] Go/no-go for whitelist 8266 — **not yet** (also blocked on #582) Ask Terraport for: (1) `classic_terraport` git SHA used for 8266, (2) `Cargo.lock` from that build, (3) any CertiK zip that includes the **optimized wasm** whose SHA-256 is `953AD60C…`.
PlasticDigits commented 2026-08-20 12:39:19 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1107

mentioned in merge request !1107
PlasticDigits commented 2026-08-20 13:31:31 +00:00 (Migrated from gitlab.com)

mentioned in issue #584

mentioned in issue #584
PlasticDigits commented 2026-08-20 13:31:33 +00:00 (Migrated from gitlab.com)

marked as related to #584

marked as related to #584
PlasticDigits commented 2026-08-21 00:16:25 +00:00 (Migrated from gitlab.com)

mentioned in issue #585

mentioned in issue #585
PlasticDigits commented 2026-08-21 00:46:47 +00:00 (Migrated from gitlab.com)

#584 columbus-5 F6 migrate is not done. Factory 1.9.0 is live, but 3/14 pairs are still 1.14.0 (no pin). Do not AddWhitelistedCodeId 8266 and do not close this issue go. Remaining gate after #584 14/14: 8266 source review (or SpaceUSD admin cleared / wrap-to-10184).

#584 columbus-5 F6 migrate is **not done**. Factory 1.9.0 is live, but **3/14** pairs are still 1.14.0 (no pin). Do **not** `AddWhitelistedCodeId 8266` and do **not** close this issue go. Remaining gate after #584 14/14: 8266 source review (or SpaceUSD admin cleared / wrap-to-10184).
PlasticDigits commented 2026-08-21 00:50:25 +00:00 (Migrated from gitlab.com)

mentioned in issue #391

mentioned in issue #391
PlasticDigits commented 2026-08-21 00:50:27 +00:00 (Migrated from gitlab.com)

F6 prerequisite is live on columbus-5 (factory 1.9.0, all 14 pairs 1.15.0, pair_code_id 11601). That does not close this issue. Still do not AddWhitelistedCodeId 8266 / CreatePair SpaceUSD until 8266 source review (or SpaceUSD wasm admin cleared, or wrap-to-10184).

F6 prerequisite is **live** on columbus-5 (factory 1.9.0, all 14 pairs 1.15.0, `pair_code_id` 11601). That does **not** close this issue. Still do not `AddWhitelistedCodeId 8266` / `CreatePair` SpaceUSD until 8266 source review (or SpaceUSD wasm admin cleared, or wrap-to-10184).
PlasticDigits commented 2026-08-21 01:15:13 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1109

mentioned in merge request !1109
PlasticDigits commented 2026-08-21 01:15:48 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1110

mentioned in merge request !1110
PlasticDigits commented 2026-08-21 01:25:11 +00:00 (Migrated from gitlab.com)

!1110 (F6 upgrade-582 LCD retries / UpdateConfig { pair_code_id } / skip-already-migrated) is merged to main. That does not change this gate: 8266 stays off the factory whitelist until this issue has a written go/no-go with source-review hashes. Do not AddWhitelistedCodeId 8266. Related leftover: #585 (freeze UX).

[!1110](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/392) (F6 upgrade-582 LCD retries / `UpdateConfig { pair_code_id }` / skip-already-migrated) is merged to `main`. That does **not** change this gate: **8266 stays off** the factory whitelist until this issue has a written go/no-go with source-review hashes. Do not `AddWhitelistedCodeId 8266`. Related leftover: [#585](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/585) (freeze UX).
PlasticDigits commented 2026-08-21 03:42:24 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1111

mentioned in merge request !1111
PlasticDigits commented 2026-08-21 03:43:19 +00:00 (Migrated from gitlab.com)

#585 dApp + indexer freeze visibility is ready for review in !1111. That MR does not unblock 8266 listing. Gate remains live F6 on chain + source review of 8266 (this issue).

#585 dApp + indexer freeze visibility is ready for review in !1111. That MR does **not** unblock 8266 listing. Gate remains live F6 on chain + source review of 8266 (this issue).
PlasticDigits commented 2026-08-21 11:53:37 +00:00 (Migrated from gitlab.com)

mentioned in commit e5bb6227bab00592847b12f5af6304107f53399c

mentioned in commit e5bb6227bab00592847b12f5af6304107f53399c
PlasticDigits commented 2026-08-21 12:42:39 +00:00 (Migrated from gitlab.com)

Source-in-wasm verification (optimizer rebuild in /tmp)

Worked outside the DEX tree (/tmp/cw20-8266-rebuild). cosmwasm/rust-optimizer:0.12.11 linux/amd64 (rustc 1.66.0 69f9c33d7 — same commit as the LCD binary). Dump is Terra-token-contract d854a219 plus a stub classic_terraport 2.5.2. No DEX sources were changed.

Byte-identical rebuild: still no

Artifact SHA-256 Bytes
LCD code 8266 953AD60CF6D8C9631B99ADC84C3ABF4083815743F86FF81B2A422FDFDF5F95C0 327509
Rebuild (std default, no stargate) 4F9D1D947483572382F3DFD534672ABE3C598C655FBE720FF00EDCB5C0253DD5 318433
Rebuild (stargate + staking) 9518E09E6D017A0388E02EDE4423B1738CE1533E071DAA9F0C15F09F64469102 325169
Rebuild (stargate only) 993665B43F7A88BEBBFF392FB20A19B90014F146C3CC1753B5D6576A3755B114 324806

Closest size gap is 2.3–2.7 KB. That is not cmp identical. Do not treat any of those rebuild hashes as the store checksum.

Source identity: the dump is the crate inside 8266

Every dump-derived identifier below is a literal substring of the LCD wasm (not a docs claim):

  • cw2 crates.io:terraport-token / 0.0.0
  • rustc 69f9c33d71c871fc16ac445211281c6e7a340943
  • registry paths: cosmwasm-std-1.3.3, cw-storage-plus-0.14.0, serde-1.0.188, serde-json-wasm-0.5.1, base64-0.13.1
  • types: terraport_token::msg::QueryMsg, terraport_token::msg::ExecuteMsg, terraport_token::state::TokenInfo, classic_terraport::token::InstantiateMsg, cw_storage_plus::snapshot
  • execute serde / attrs: transfer, burn, send, increase_allowance, decrease_allowance, transfer_from, send_from, mint, update_minter, burn_from, update_marketing, upload_logo
  • query serde: balance, balance_at, total_supply_at, token_info, minter, allowance, all_allowances, all_spender_allowances, all_accounts, marketing_info, download_logo
  • storage keys: balance / balance__checkpoints / balance__changelog / total_supply_history / allowance / allowance_spender
  • errors: Unauthorized, Cannot set to own account, Allowance is expired, No allowance for this account, Minting cannot exceed the cap, Logo binary data exceeds 5KB limit, Invalid xml preamble for SVG, Invalid png header, Invalid expiration value, Duplicate initial balance addresses, name/symbol/decimals validate strings, Initial supply greater than cap

Absent in the LCD wasm: tax_map, fee_on_transfer, reflection, rebase, elastic, cw20_taxed, classic_terraswap, xastro.

Dump execute_transfer / execute_send debit and credit the same amount. Snapshots are SnapshotMap EveryBlock plus total_supply_history written on mint/burn/init only. That review now applies to the live binary, not only the GitHub dump: the wasm carries those exact type paths, variant names, storage keys, and error strings.

Why the hash still misses (and what unblocked a wasm at all)

A naive 2026 host resolve still dies. What actually compiled:

  1. Generate Cargo.lock inside rust-optimizer:0.12.11 (cargo 1.66, git crates.io index).
  2. Pin wasm-known crates (cosmwasm-std / serde / serde-json-wasm / cw-storage-plus / base64) and 2023-era transitives. Unpinned 2026 latest pulls edition-2024 base64ct 1.8.3 / zeroize 1.9.0 and semver rust-version > 1.66.
  3. Do not add cosmwasm-crypto as a direct dep — its default features pull rand_core/getrandom and break wasm32.
  4. ahash 0.7.6 was yanked 2023-10-23 (after the CosmWasm 1.3.3 lockfile, before store 2023-11-07). 0.7.7+ compile getrandom on wasm32. Path-patched the yanked crates.io tarball.
  5. Official cosmwasm-std 1.3.3 does not export requires_terra. LCD does (requires_terra + requires_stargate + requires_iterator, all empty stubs). Enabling stargate plus a dummy requires_terra in the stub closed most of the size gap (9 KB → ~2.7 KB) and matched the LCD export set. staking adds requires_staking, which LCD does not export.

The remaining 2–3 KB is the private classic_terraport tree + the original lockfile we still do not have. Extra unused types in that package would change bytes without changing the string surface above.

Checklist

  • LCD wasm 8266; checksum 953AD60C…F5F95C0 (and store tx)
  • Canonical public crate shown to be the crate inside the wasm (string / type / serde / error / storage-key identity). Best public tree: terraport-token 0.0.0 / d854a219 + private classic_terraport 2.5.2
  • Optimizer output SHA-256 equals LCD data_hash (still open — need Terraport Cargo.lock + real classic_terraport SHA)
  • Source review: no FoT / tax / rebase in the dump and no such vocabulary in the LCD binary
  • balance_at / total_supply_at are snapshot queries (dump + wasm keys)
  • Staging 1:1 transfer / send probe (not run; this pass was compile-only)
  • CertiK file SHA vs dump: mismatch; vs LCD wasm: unavailable (unchanged)
  • Go/no-go for whitelist 8266 — NO-GO on byte-hash. Source review of the live binary is no longer the blocker.

8266 stays off AddWhitelistedCodeId until ops accept source-identity (this note) in lieu of cmp identity, or Terraport provides the 2023-11-07 lockfile + classic_terraport SHA and the hash matches. Staging 1:1 probe still recommended on a throwaway Everybody instantiate (not SpaceUSD mainnet funds). F6 is already live; it does not replace this gate.

## Source-in-wasm verification (optimizer rebuild in `/tmp`) Worked **outside** the DEX tree (`/tmp/cw20-8266-rebuild`). `cosmwasm/rust-optimizer:0.12.11` linux/amd64 (rustc **1.66.0** `69f9c33d7` — same commit as the LCD binary). Dump is Terra-token-contract `d854a219` plus a stub `classic_terraport` 2.5.2. No DEX sources were changed. ### Byte-identical rebuild: still no | Artifact | SHA-256 | Bytes | |----------|---------|------:| | LCD code **8266** | `953AD60CF6D8C9631B99ADC84C3ABF4083815743F86FF81B2A422FDFDF5F95C0` | 327509 | | Rebuild (std default, no stargate) | `4F9D1D947483572382F3DFD534672ABE3C598C655FBE720FF00EDCB5C0253DD5` | 318433 | | Rebuild (`stargate` + `staking`) | `9518E09E6D017A0388E02EDE4423B1738CE1533E071DAA9F0C15F09F64469102` | 325169 | | Rebuild (`stargate` only) | `993665B43F7A88BEBBFF392FB20A19B90014F146C3CC1753B5D6576A3755B114` | 324806 | Closest size gap is **2.3–2.7 KB**. That is **not** `cmp` identical. Do not treat any of those rebuild hashes as the store checksum. ### Source identity: the dump **is** the crate inside 8266 Every dump-derived identifier below is a **literal substring** of the LCD wasm (not a docs claim): - cw2 `crates.io:terraport-token` / `0.0.0` - rustc `69f9c33d71c871fc16ac445211281c6e7a340943` - registry paths: `cosmwasm-std-1.3.3`, `cw-storage-plus-0.14.0`, `serde-1.0.188`, `serde-json-wasm-0.5.1`, `base64-0.13.1` - types: `terraport_token::msg::QueryMsg`, `terraport_token::msg::ExecuteMsg`, `terraport_token::state::TokenInfo`, `classic_terraport::token::InstantiateMsg`, `cw_storage_plus::snapshot` - execute serde / attrs: `transfer`, `burn`, `send`, `increase_allowance`, `decrease_allowance`, `transfer_from`, `send_from`, `mint`, `update_minter`, `burn_from`, `update_marketing`, `upload_logo` - query serde: `balance`, `balance_at`, `total_supply_at`, `token_info`, `minter`, `allowance`, `all_allowances`, `all_spender_allowances`, `all_accounts`, `marketing_info`, `download_logo` - storage keys: `balance` / `balance__checkpoints` / `balance__changelog` / `total_supply_history` / `allowance` / `allowance_spender` - errors: `Unauthorized`, `Cannot set to own account`, `Allowance is expired`, `No allowance for this account`, `Minting cannot exceed the cap`, `Logo binary data exceeds 5KB limit`, `Invalid xml preamble for SVG`, `Invalid png header`, `Invalid expiration value`, `Duplicate initial balance addresses`, name/symbol/decimals validate strings, `Initial supply greater than cap` **Absent** in the LCD wasm: `tax_map`, `fee_on_transfer`, `reflection`, `rebase`, `elastic`, `cw20_taxed`, `classic_terraswap`, `xastro`. Dump `execute_transfer` / `execute_send` debit and credit the **same** `amount`. Snapshots are `SnapshotMap` `EveryBlock` plus `total_supply_history` written on mint/burn/init only. That review now applies to the **live binary**, not only the GitHub dump: the wasm carries those exact type paths, variant names, storage keys, and error strings. ### Why the hash still misses (and what unblocked a wasm at all) A naive 2026 host resolve still dies. What actually compiled: 1. Generate `Cargo.lock` **inside** `rust-optimizer:0.12.11` (cargo 1.66, git crates.io index). 2. Pin wasm-known crates (`cosmwasm-std` / `serde` / `serde-json-wasm` / `cw-storage-plus` / `base64`) and 2023-era transitives. Unpinned 2026 latest pulls edition-2024 `base64ct` 1.8.3 / `zeroize` 1.9.0 and `semver` rust-version > 1.66. 3. Do **not** add `cosmwasm-crypto` as a direct dep — its default features pull `rand_core/getrandom` and break `wasm32`. 4. `ahash` **0.7.6** was **yanked 2023-10-23** (after the CosmWasm 1.3.3 lockfile, before store 2023-11-07). 0.7.7+ compile `getrandom` on wasm32. Path-patched the yanked crates.io tarball. 5. Official `cosmwasm-std` **1.3.3 does not export `requires_terra`**. LCD does (`requires_terra` + `requires_stargate` + `requires_iterator`, all empty stubs). Enabling `stargate` plus a dummy `requires_terra` in the stub closed most of the size gap (9 KB → ~2.7 KB) and matched the LCD export set. `staking` adds `requires_staking`, which LCD does **not** export. The remaining 2–3 KB is the private `classic_terraport` tree + the original lockfile we still do not have. Extra unused types in that package would change bytes without changing the string surface above. ### Checklist - [x] LCD wasm 8266; checksum `953AD60C…F5F95C0` (and store tx) - [x] Canonical public crate **shown to be the crate inside the wasm** (string / type / serde / error / storage-key identity). Best public tree: `terraport-token` 0.0.0 / `d854a219` + private `classic_terraport` 2.5.2 - [ ] Optimizer output SHA-256 equals LCD `data_hash` (still open — need Terraport `Cargo.lock` + real `classic_terraport` SHA) - [x] Source review: no FoT / tax / rebase in the dump **and** no such vocabulary in the LCD binary - [x] `balance_at` / `total_supply_at` are snapshot queries (dump + wasm keys) - [ ] Staging 1:1 `transfer` / `send` probe (not run; this pass was compile-only) - [x] CertiK file SHA vs dump: **mismatch**; vs LCD wasm: **unavailable** (unchanged) - [ ] Go/no-go for whitelist **8266** — **NO-GO on byte-hash**. Source review of the live binary is no longer the blocker. **8266 stays off** `AddWhitelistedCodeId` until ops accept source-identity (this note) in lieu of `cmp` identity, **or** Terraport provides the 2023-11-07 lockfile + `classic_terraport` SHA and the hash matches. Staging 1:1 probe still recommended on a throwaway Everybody instantiate (not SpaceUSD mainnet funds). F6 is already live; it does not replace this gate.
PlasticDigits commented 2026-08-21 13:08:16 +00:00 (Migrated from gitlab.com)

classic_terraport is a TerraSwap package rename (not Astroport, not drop-in classic_terraswap)

Private classic_terraport 2.5.2 is almost certainly terraswap/classic-terraswap v2.5.2 packages/classic_terraswap + contracts/terraswap_token, find-replaced. LCD 8266 rustc-names classic_terraport::token::InstantiateMsg. It has no classic_terraswap, terraswap, or astroport strings — so crates.io astroport and a Cargo alias of classic_terraswap are ruled out (those would keep their package names in type paths).

Public TerraSwap v2.5.2 Dump / 8266
Token crate terraswap-token 0.0.0 terraport-token 0.0.0
Types crate classic_terraswap 2.5.2 classic_terraport 2.5.2
token.rs instantiate no marketing + marketing (SpaceUSD JSON has it)
Symbol validate [A-Za-z-] only same error strings in the wasm
cw / std 0.8 / 0.16 + terra-cosmwasm 2.2.0 + stargate 0.14 / 1.3.3 in the wasm; LCD exports requires_stargate + requires_terra
Snapshots none balance_at / total_supply_at live in the token crate, not this package

terraswap/terraswap packages/terraswap/src/token.rs is the same no-marketing shape. Not a second source.

What is actually in public classic_terraswap 2.5.2

src/: token, asset, factory, pair, querier, router, mock_querier, testing.

asset.rs uses terra_cosmwasm::TerraQuerier for native compute_tax / deduct_tax (LUNC/USTC bank tax, not CW20 FoT). Those strings (TerraQuerier, TaxRate, TaxCap) are absent from 8266 — so even if the private repo still has asset.rs for factory/pair, it is not linked into the token wasm.

terra-cosmwasm 2.2.0 is the usual Classic source of requires_terra on std 0.16. Official std 1.3.3 does not export that. 8266 has the export and no terra_cosmwasm type path — empty stub or a thin port, not the 0.16 crate compiled in.

Plan update (next)

Do not stub token.rs only as the last word. Inventory + reconstruct from the public TerraSwap tree:

  1. Clone classic-terraswap tag v2.5.2; SHA-256 every packages/classic_terraswap/src/* file.
  2. Map each module: dump reference? rustc path in 8266? (token = yes/yes; asset/pair/factory/router = no/no).
  3. Copy the package → crate name classic_terraport 2.5.2; edit token.rs only first (add marketing); port deps 0.16 → 1.3.3 / cw 0.14; drop or stub terra-cosmwasm; keep stargate; rebuild with rust-optimizer:0.12.11.
  4. Compare hash/size to LCD 953AD60C… / 327509. Token-only stub vs full-package reconstruct: if they hash the same, unused modules DCE and the gap is lockfile/derives/requires_terra helper.

Full table and stop conditions: /tmp/cw20-8266-audit-581/CLASSIC-TERRASWAP-INVENTORY.md (also linked from HASH-REPRO-PLAN.md / AUDIT.md in that worktree). DEX repo still untouched.

8266 stays off the whitelist. Native tax helpers in public asset.rs are not a transfer skim and are not in this wasm.

## `classic_terraport` is a TerraSwap package rename (not Astroport, not drop-in `classic_terraswap`) Private `classic_terraport` **2.5.2** is almost certainly [`terraswap/classic-terraswap` `v2.5.2`](https://github.com/terraswap/classic-terraswap/tree/v2.5.2) `packages/classic_terraswap` + `contracts/terraswap_token`, find-replaced. LCD 8266 rustc-names `classic_terraport::token::InstantiateMsg`. It has **no** `classic_terraswap`, `terraswap`, or `astroport` strings — so crates.io `astroport` and a Cargo alias of `classic_terraswap` are ruled out (those would keep their package names in type paths). | | Public TerraSwap `v2.5.2` | Dump / 8266 | |--|--|--| | Token crate | `terraswap-token` 0.0.0 | `terraport-token` 0.0.0 | | Types crate | `classic_terraswap` 2.5.2 | `classic_terraport` 2.5.2 | | `token.rs` instantiate | no `marketing` | **+ marketing** (SpaceUSD JSON has it) | | Symbol `validate` | `[A-Za-z-]` only | same error strings in the wasm | | cw / std | 0.8 / **0.16** + `terra-cosmwasm` 2.2.0 + **stargate** | 0.14 / **1.3.3** in the wasm; LCD exports `requires_stargate` + `requires_terra` | | Snapshots | none | `balance_at` / `total_supply_at` live in the **token crate**, not this package | [`terraswap/terraswap`](https://github.com/terraswap/terraswap) `packages/terraswap/src/token.rs` is the same no-marketing shape. Not a second source. ### What is actually in public `classic_terraswap` 2.5.2 `src/`: `token`, `asset`, `factory`, `pair`, `querier`, `router`, `mock_querier`, `testing`. `asset.rs` uses `terra_cosmwasm::TerraQuerier` for **native** `compute_tax` / `deduct_tax` (LUNC/USTC bank tax, not CW20 FoT). Those strings (`TerraQuerier`, `TaxRate`, `TaxCap`) are **absent** from 8266 — so even if the private repo still has `asset.rs` for factory/pair, it is **not linked** into the token wasm. `terra-cosmwasm` 2.2.0 is the usual Classic source of `requires_terra` on std **0.16**. Official std **1.3.3** does not export that. 8266 has the export and no `terra_cosmwasm` type path — empty stub or a thin port, not the 0.16 crate compiled in. ### Plan update (next) Do not stub `token.rs` only as the last word. **Inventory + reconstruct from the public TerraSwap tree:** 1. Clone `classic-terraswap` tag `v2.5.2`; SHA-256 every `packages/classic_terraswap/src/*` file. 2. Map each module: dump reference? rustc path in 8266? (`token` = yes/yes; `asset`/pair/factory/router = no/no). 3. Copy the package → crate name `classic_terraport` 2.5.2; edit **`token.rs` only** first (add `marketing`); port deps 0.16 → 1.3.3 / cw 0.14; drop or stub `terra-cosmwasm`; keep `stargate`; rebuild with `rust-optimizer:0.12.11`. 4. Compare hash/size to LCD `953AD60C…` / 327509. Token-only stub vs full-package reconstruct: if they hash the same, unused modules DCE and the gap is lockfile/derives/`requires_terra` helper. Full table and stop conditions: `/tmp/cw20-8266-audit-581/CLASSIC-TERRASWAP-INVENTORY.md` (also linked from `HASH-REPRO-PLAN.md` / `AUDIT.md` in that worktree). DEX repo still untouched. **8266 stays off** the whitelist. Native tax helpers in public `asset.rs` are not a transfer skim and are not in this wasm.
PlasticDigits commented 2026-08-21 13:10:51 +00:00 (Migrated from gitlab.com)

mentioned in commit 0fb74a7017

mentioned in commit 0fb74a70174a5aa8572f8350d327a0d40b97f514
PlasticDigits commented 2026-08-22 02:38:55 +00:00 (Migrated from gitlab.com)

LocalTerra 1:1 probe + source-in-wasm check (2026-08-22)

Work was done only under /tmp/cw20-8266-audit-20260822/ (LCD download, dump clone, optimizer rebuild, throwaway receiver). No DEX repo files were changed. Do not AddWhitelistedCodeId 8266.

1. LCD bytes reconfirmed

Check Value
LCD GET /cosmwasm/wasm/v1/code/8266 data_hash 953AD60CF6D8C9631B99ADC84C3ABF4083815743F86FF81B2A422FDFDF5F95C0
SHA-256 of downloaded data same
Size 327509 bytes
Exports execute, instantiate, query, allocate, deallocate, interface_version_8, requires_terra, requires_stargate, requires_iterator — no migrate

2. Same bytes stored on LocalTerra

Field Value
Store tx 473A4328CA688DA3C2CB2CFEC0689C2872FB854ED5E30D595C975B954324178A height 271640
LocalTerra code_id 25
On-chain code_checksum / data_hash 953ad60c…5f95c0 (same LCD hash)
Instantiate permission Everybody

Throwaway instantiate (Everybody) — not SpaceUSD mainnet:

Field Value
Instantiate tx EA50FC5C880313134462A4C0752C8AB9BB50EE7263DBFF8E661B9595CC3E4008 height 271991
Contract terra1xe69x2m33ynth0ez00tdnns9rnapsa45d2q8r2av5tmnu9xtpl8qv286fp
Label 8266-probe
Init name Probe Token / PROBE / 6 dp / mint cap 1e15 / marketing set / initial 1000 + 100 human to test1 + test3

3. Staging 1:1 probe — PASS (LCD binary, not the dump)

All amounts are raw (6 dp). Idle holder = test3 unless noted.

Action Declared Sender Δ Recipient Δ Idle Tx
transfer 123456 −123456 +123456 unchanged 100000000 05DDA0B6…3283E0CA h 272604
mint 500000 — +500000 unchanged 514D423B…99BB60FC h 272617
burn 100000 −100000 — unchanged 2B8182A7…FB88A478 h 272625
transfer_from 777 owner −777 +777 spender 0 851988A5…2149C229 h 272640
send → throwaway receiver 55555 −55555 +55555 unchanged CDF80A74…A2A5B22C h 274953
send_from 1111 owner −1111 +1111 spender 0, idle unchanged A9085BD8…A7DC4326 h 274995

send / send_from dispatched cw20::receiver::ReceiverExecuteMsg::Receive with the same amount (receiver wasm events: action=receive amount=55555 / 1111). Failed send to an EOA / to the token itself reverted with balances unchanged (atomic with the hook).

Other live behavior matching dump error.rs / contract.rs:

  • tax_map / rebase queries: unknown variant; expected list is exactly dump QueryMsg (balance, balance_at, total_supply_at, token_info, minter, allowance, all_allowances, all_spender_allowances, all_accounts, marketing_info, download_logo).
  • Execute serde list (from send to self): transfer, burn, send, increase_allowance, decrease_allowance, transfer_from, send_from, mint, update_minter, burn_from, update_marketing, upload_logo. No receive / tax_map / rebase.
  • Unauthorized mint → Unauthorized.
  • Oversize mint → Minting cannot exceed the cap.
  • Oversize transfer → Overflow: Cannot Sub with 623456 and 999999999999 (subtracts the declared amount; no hidden fee before the check).

4. Snapshots are historical only (LocalTerra)

SnapshotMap EveryBlock + total_supply_history:

Query Result Meaning
balance_at test1/test3 at instantiate height 271991 0 changelog stores pre-block value
total_supply_at block 271991 1100000000 history map writes the new supply at H
balance_at idle at later height equals live balance (100000000, then 100000777 after transfer_from) idle not rebased

Idle live balance did not change across transfer / mint / burn / send / a later block, except when that address was an explicit transfer_from recipient.

5. Source that is in the wasm (identity, not byte-hash)

The LCD / LocalTerra binary is crate terraport-token 0.0.0 (terraport_token::msg::{QueryMsg,ExecuteMsg}, classic_terraport::token::InstantiateMsg, terraport_token::state::TokenInfo, cw_storage_plus::snapshot::ChangeSet<…Uint128>, keys balance / balance__checkpoints / balance__changelog / total_supply_history). Public dump: Terraport-Finance/Terra-token-contract d854a219.

Dump execute_transfer / execute_send / *_from debit and credit the same amount. LocalTerra execution of the LCD bytes now shows that CFG is what the chain runs — not only what the later dump says.

No tax_map, cw20_taxed, fee_on_transfer, rebase, or reflection strings in the wasm. cw20::receiver::ReceiverExecuteMsg is present (standard Send hook wrapper).

6. Optimizer rebuild — still not 953AD60C…

Reconstructed in /tmp from dump src/ + classic_terraport token-only stub (marketing + TerraSwap validate strings) + cosmwasm/rust-optimizer:0.12.11 linux/amd64. Lockfile generated inside rustc 1.66. Direct crates pinned to wasm-known versions (cosmwasm-std 1.3.3, serde 1.0.188, serde-json-wasm 0.5.1, cw-storage-plus 0.14.0, base64 0.13.1) plus 2023-era transitives so 2026 crates.io does not pull edition-2024 base64ct 1.8.3 / syn 2.0.119.

Artifact SHA-256 Bytes
LCD / LocalTerra code 25 953AD60CF6D8C9631B99ADC84C3ABF4083815743F86FF81B2A422FDFDF5F95C0 327509
This rebuild (stargate + requires_terra stub) 75BDA9CA2C4E3C090C4229965E4BE209CB56363AD3BC02F9C7F7D479ED759BE3 323836

−3673 bytes. Exports match LCD except this rebuild also exports __getrandom_custom (1.66 + rand_core/getrandom needs a wasm shim; LCD has no getrandom strings). Type/error/storage strings match the dump. Still not cmp-identical.

Private classic_terraport + original Cargo.lock (or a CertiK zip that includes the optimized wasm) remain the missing inputs for a hash go. CertiK file SHA vs dump is still a mismatch / not required.

Checklist

  • LCD wasm 8266; checksum 953AD60C…F5F95C0
  • Dump crate shown inside the wasm (strings / types / serde / errors / keys)
  • Staging 1:1 transfer / send / transfer_from / send_from on this exact LCD binary (LocalTerra code 25)
  • balance_at / total_supply_at snapshot-only on LocalTerra
  • Source review: no FoT / tax / rebase on dump and on executed LCD bytes
  • Canonical tree whose optimizer output equals 953AD60C… — open (3.7 KB short)
  • CertiK match — not required
  • Go / no-go — NO-GO for whitelist until hash match (issue acceptance). 1:1 + source identity are no longer the open items.

Go / no-go

NO-GO for AddWhitelistedCodeId 8266 / SpaceUSD CreatePair. The live wasm is the dump crate and it is not FoT/rebase under LocalTerra execution. The written hash-equal rebuild is still missing. Residual instance risks unchanged: SpaceUSD wasm admin = issuer; mint cap 1e9 human vs 530 circulating; name ≠ peg; Everybody instantiate (LUNC fee accepted as spam control).

## LocalTerra 1:1 probe + source-in-wasm check (2026-08-22) Work was done only under `/tmp/cw20-8266-audit-20260822/` (LCD download, dump clone, optimizer rebuild, throwaway receiver). **No DEX repo files were changed.** Do **not** `AddWhitelistedCodeId 8266`. ### 1. LCD bytes reconfirmed | Check | Value | |-------|--------| | LCD `GET /cosmwasm/wasm/v1/code/8266` `data_hash` | `953AD60CF6D8C9631B99ADC84C3ABF4083815743F86FF81B2A422FDFDF5F95C0` | | SHA-256 of downloaded `data` | **same** | | Size | 327509 bytes | | Exports | `execute`, `instantiate`, `query`, `allocate`, `deallocate`, `interface_version_8`, `requires_terra`, `requires_stargate`, `requires_iterator` — **no `migrate`** | ### 2. Same bytes stored on LocalTerra | Field | Value | |-------|--------| | Store tx | `473A4328CA688DA3C2CB2CFEC0689C2872FB854ED5E30D595C975B954324178A` height **271640** | | LocalTerra `code_id` | **25** | | On-chain `code_checksum` / `data_hash` | `953ad60c…5f95c0` (same LCD hash) | | Instantiate permission | Everybody | Throwaway instantiate (Everybody) — **not** SpaceUSD mainnet: | Field | Value | |-------|--------| | Instantiate tx | `EA50FC5C880313134462A4C0752C8AB9BB50EE7263DBFF8E661B9595CC3E4008` height **271991** | | Contract | `terra1xe69x2m33ynth0ez00tdnns9rnapsa45d2q8r2av5tmnu9xtpl8qv286fp` | | Label | `8266-probe` | | Init | name Probe Token / PROBE / 6 dp / mint cap `1e15` / marketing set / initial 1000 + 100 human to test1 + test3 | ### 3. Staging 1:1 probe — **PASS** (LCD binary, not the dump) All amounts are raw (6 dp). Idle holder = test3 unless noted. | Action | Declared | Sender Δ | Recipient Δ | Idle | Tx | |--------|----------|----------|-------------|------|-----| | `transfer` | 123456 | −123456 | +123456 | unchanged 100000000 | `05DDA0B6…3283E0CA` h 272604 | | `mint` | 500000 | — | +500000 | unchanged | `514D423B…99BB60FC` h 272617 | | `burn` | 100000 | −100000 | — | unchanged | `2B8182A7…FB88A478` h 272625 | | `transfer_from` | 777 | owner −777 | +777 | spender **0** | `851988A5…2149C229` h 272640 | | `send` → throwaway receiver | 55555 | −55555 | +55555 | unchanged | `CDF80A74…A2A5B22C` h 274953 | | `send_from` | 1111 | owner −1111 | +1111 | spender **0**, idle unchanged | `A9085BD8…A7DC4326` h 274995 | `send` / `send_from` dispatched `cw20::receiver::ReceiverExecuteMsg::Receive` with the **same** amount (receiver wasm events: `action=receive amount=55555` / `1111`). Failed `send` to an EOA / to the token itself **reverted** with balances unchanged (atomic with the hook). Other live behavior matching dump `error.rs` / `contract.rs`: - `tax_map` / `rebase` queries: unknown variant; expected list is exactly dump `QueryMsg` (`balance`, `balance_at`, `total_supply_at`, `token_info`, `minter`, `allowance`, `all_allowances`, `all_spender_allowances`, `all_accounts`, `marketing_info`, `download_logo`). - Execute serde list (from `send` to self): `transfer`, `burn`, `send`, `increase_allowance`, `decrease_allowance`, `transfer_from`, `send_from`, `mint`, `update_minter`, `burn_from`, `update_marketing`, `upload_logo`. **No** `receive` / `tax_map` / `rebase`. - Unauthorized mint → `Unauthorized`. - Oversize mint → `Minting cannot exceed the cap`. - Oversize transfer → `Overflow: Cannot Sub with 623456 and 999999999999` (subtracts the **declared** amount; no hidden fee before the check). ### 4. Snapshots are historical only (LocalTerra) `SnapshotMap` EveryBlock + `total_supply_history`: | Query | Result | Meaning | |-------|--------|---------| | `balance_at` test1/test3 at instantiate height **271991** | **0** | changelog stores pre-block value | | `total_supply_at` block **271991** | **1100000000** | history map writes the **new** supply at H | | `balance_at` idle at later height | equals live `balance` (100000000, then 100000777 after `transfer_from`) | idle not rebased | Idle live `balance` did not change across transfer / mint / burn / send / a later block, except when that address was an explicit transfer_from recipient. ### 5. Source that is in the wasm (identity, not byte-hash) The LCD / LocalTerra binary **is** crate `terraport-token` 0.0.0 (`terraport_token::msg::{QueryMsg,ExecuteMsg}`, `classic_terraport::token::InstantiateMsg`, `terraport_token::state::TokenInfo`, `cw_storage_plus::snapshot::ChangeSet<…Uint128>`, keys `balance` / `balance__checkpoints` / `balance__changelog` / `total_supply_history`). Public dump: [Terraport-Finance/Terra-token-contract](https://github.com/Terraport-Finance/Terra-token-contract) `d854a219`. Dump `execute_transfer` / `execute_send` / `*_from` debit and credit the **same** `amount`. LocalTerra execution of the **LCD bytes** now shows that CFG is what the chain runs — not only what the later dump says. No `tax_map`, `cw20_taxed`, `fee_on_transfer`, `rebase`, or `reflection` strings in the wasm. `cw20::receiver::ReceiverExecuteMsg` is present (standard Send hook wrapper). ### 6. Optimizer rebuild — still not `953AD60C…` Reconstructed in `/tmp` from dump `src/` + `classic_terraport` token-only stub (marketing + TerraSwap validate strings) + `cosmwasm/rust-optimizer:0.12.11` linux/amd64. Lockfile generated **inside** rustc 1.66. Direct crates pinned to wasm-known versions (`cosmwasm-std` 1.3.3, `serde` 1.0.188, `serde-json-wasm` 0.5.1, `cw-storage-plus` 0.14.0, `base64` 0.13.1) plus 2023-era transitives so 2026 crates.io does not pull edition-2024 `base64ct` 1.8.3 / `syn` 2.0.119. | Artifact | SHA-256 | Bytes | |----------|---------|------:| | LCD / LocalTerra code 25 | `953AD60CF6D8C9631B99ADC84C3ABF4083815743F86FF81B2A422FDFDF5F95C0` | 327509 | | This rebuild (`stargate` + `requires_terra` stub) | `75BDA9CA2C4E3C090C4229965E4BE209CB56363AD3BC02F9C7F7D479ED759BE3` | 323836 | **−3673 bytes.** Exports match LCD **except** this rebuild also exports `__getrandom_custom` (1.66 + `rand_core/getrandom` needs a wasm shim; LCD has **no** getrandom strings). Type/error/storage strings match the dump. Still not `cmp`-identical. Private `classic_terraport` + original `Cargo.lock` (or a CertiK zip that includes the **optimized wasm**) remain the missing inputs for a hash go. CertiK file SHA vs dump is still a mismatch / not required. ### Checklist - [x] LCD wasm 8266; checksum `953AD60C…F5F95C0` - [x] Dump crate shown inside the wasm (strings / types / serde / errors / keys) - [x] Staging 1:1 `transfer` / `send` / `transfer_from` / `send_from` on **this exact LCD binary** (LocalTerra code 25) - [x] `balance_at` / `total_supply_at` snapshot-only on LocalTerra - [x] Source review: no FoT / tax / rebase on dump **and** on executed LCD bytes - [ ] Canonical tree whose optimizer output equals `953AD60C…` — **open** (3.7 KB short) - [x] CertiK match — not required - [ ] Go / no-go — **NO-GO** for whitelist until hash match (issue acceptance). 1:1 + source identity are no longer the open items. ### Go / no-go **NO-GO** for `AddWhitelistedCodeId 8266` / SpaceUSD `CreatePair`. The live wasm is the dump crate and it is **not** FoT/rebase under LocalTerra execution. The written hash-equal rebuild is still missing. Residual instance risks unchanged: SpaceUSD wasm admin = issuer; mint cap 1e9 human vs 530 circulating; name ≠ peg; Everybody instantiate (LUNC fee accepted as spam control).
PlasticDigits commented 2026-08-22 02:59:09 +00:00 (Migrated from gitlab.com)

mentioned in issue #589

mentioned in issue #589
PlasticDigits commented 2026-08-22 02:59:17 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
PlasticDigits commented 2026-08-22 02:59:29 +00:00 (Migrated from gitlab.com)

marked as related to #589

marked as related to #589
PlasticDigits commented 2026-08-22 02:59:31 +00:00 (Migrated from gitlab.com)

Policy change / gate

#581 is now gated on #589 (generalized CW20 code-id audit harness). Do not close this issue with a whitelist go until #589 ships and cw20-codeid-audits/codeids/8266/REPORT.md exists.

Removed: proving a rust-optimizer rebuild whose SHA-256 equals LCD data_hash 953AD60C…. Old Columbus-5 templates (missing Cargo.lock, private classic_terraport) make hash-equal rebuilds a dead end. The 2026-08-22 /tmp rebuild that did not match is not a no-go by itself.

Still required:

  1. Downloaded LCD wasm SHA-256 equals CodeInfo.data_hash (we have the on-chain binary).
  2. Decompile that binary into the per-code-id folder from #589.
  3. Human audit of the decompiled code against the exploit catalogue.
  4. Automated suite on that wasm covering all DEX invariants that touch CW20 assets, all common CW20 behaviors, all known CW20 exploits + ERC-20 analogues, and DEX exploits that malicious tokens enable.

Optional source / CertiK / rebuild hashes stay an appendix only. Description checklist updated to match. F6 (#582) remains live and is not a substitute for the template audit.

GitLab blocks links are unavailable on this license; treat #589 as the hard blocker from the descriptions.

**Policy change / gate** #581 is now gated on **#589** (generalized CW20 code-id audit harness). Do not close this issue with a whitelist go until #589 ships and `cw20-codeid-audits/codeids/8266/REPORT.md` exists. **Removed:** proving a rust-optimizer rebuild whose SHA-256 equals LCD `data_hash` `953AD60C…`. Old Columbus-5 templates (missing `Cargo.lock`, private `classic_terraport`) make hash-equal rebuilds a dead end. The 2026-08-22 `/tmp` rebuild that did not match is **not** a no-go by itself. **Still required:** 1. Downloaded LCD wasm SHA-256 equals `CodeInfo.data_hash` (we have the on-chain binary). 2. Decompile that binary into the per-code-id folder from #589. 3. Human audit of the decompiled code against the exploit catalogue. 4. Automated suite on **that wasm** covering all DEX invariants that touch CW20 assets, all common CW20 behaviors, all known CW20 exploits + ERC-20 analogues, and DEX exploits that malicious tokens enable. Optional source / CertiK / rebuild hashes stay an appendix only. Description checklist updated to match. F6 (#582) remains live and is not a substitute for the template audit. GitLab `blocks` links are unavailable on this license; treat #589 as the hard blocker from the descriptions.
PlasticDigits commented 2026-08-22 03:00:07 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
PlasticDigits commented 2026-08-22 03:44:11 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1114

mentioned in merge request !1114
PlasticDigits commented 2026-08-22 03:44:23 +00:00 (Migrated from gitlab.com)

#589 harness MR: https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/396

8266 pin 953AD60C… + cw20-codeid-audits/codeids/8266/REPORT.md verdict is NO-GO (Layer A-lcd / B-lt not yet run on that wasm). Optimizer rebuild remains appendix-only. This issue stays open; do not whitelist 8266.

#589 harness MR: https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/396 8266 pin `953AD60C…` + `cw20-codeid-audits/codeids/8266/REPORT.md` verdict is **NO-GO** (Layer A-lcd / B-lt not yet run on that wasm). Optimizer rebuild remains appendix-only. This issue stays open; do not whitelist 8266.
PlasticDigits commented 2026-08-22 06:10:01 +00:00 (Migrated from gitlab.com)

mentioned in commit fa8550f356

mentioned in commit fa8550f35614fdee0b75463b0f9a9ffd2f53166e
PlasticDigits commented 2026-08-22 06:28:43 +00:00 (Migrated from gitlab.com)

Reopened after !1114 merge

!1114 landed the #589 harness and correctly recorded 8266 as NO-GO until Layer A-lcd + Layer B-lt run the pinned LCD wasm (953AD60C…).

GitLab auto-closed this issue at merge time because the MR description contained the substring close #581 (in “Does not close #581”). That was accidental. SpaceUSD/UST1 listing stays blocked.

Do not factory AddWhitelistedCodeId 8266 and do not CreatePair / seed SpaceUSD/UST1 until cw20-codeid-audits/codeids/8266/REPORT.md is GO from those layers — not from make verify-issue-589 green (that path is mutants + docs only).

## Reopened after !1114 merge !1114 landed the #589 harness and **correctly** recorded 8266 as **NO-GO** until Layer A-lcd + Layer B-lt run the pinned LCD wasm (`953AD60C…`). GitLab auto-closed this issue at merge time because the MR description contained the substring `close #581` (in “Does **not** close #581”). That was accidental. **SpaceUSD/UST1 listing stays blocked.** Do **not** factory `AddWhitelistedCodeId 8266` and do **not** `CreatePair` / seed SpaceUSD/UST1 until `cw20-codeid-audits/codeids/8266/REPORT.md` is **GO** from those layers — not from `make verify-issue-589` green (that path is mutants + docs only).
PlasticDigits commented 2026-08-22 06:29:12 +00:00 (Migrated from gitlab.com)

mentioned in issue #590

mentioned in issue #590
PlasticDigits commented 2026-08-22 06:29:14 +00:00 (Migrated from gitlab.com)

marked as related to #590

marked as related to #590
PlasticDigits commented 2026-08-22 06:29:31 +00:00 (Migrated from gitlab.com)

Follow-up tracker: #590. This issue stays the 8266 GO/NO-GO gate.

Follow-up tracker: #590. This issue stays the 8266 GO/NO-GO gate.
PlasticDigits commented 2026-08-22 08:50:03 +00:00 (Migrated from gitlab.com)

#590 LocalTerra A-lcd/B-lt executed the pinned 8266 LCD wasm (1:1 Transfer + CreatePair vs EMBER on a local store id only). Decomp/fingerprint refreshed. REPORT.md stays NO-GO — factory-global Everybody instantiate, issuer wasm-admin / F6, minter residual, incomplete Send/TransferFrom and round-trip swap. Do not AddWhitelistedCodeId 8266 on columbus-5.

#590 LocalTerra A-lcd/B-lt executed the pinned 8266 LCD wasm (1:1 Transfer + CreatePair vs EMBER on a **local** store id only). Decomp/fingerprint refreshed. **REPORT.md stays NO-GO** — factory-global Everybody instantiate, issuer wasm-admin / F6, minter residual, incomplete Send/TransferFrom and round-trip swap. Do **not** `AddWhitelistedCodeId 8266` on columbus-5.
PlasticDigits commented 2026-08-22 08:56:34 +00:00 (Migrated from gitlab.com)
  1. Incomplete suite - Real block, need to complete the full test suite on 8266 before approved
  2. Issuer holding keys - This is no problem & is expected, most quality tokens have issuer with keys. Document this is acceptable and not blocking codeid listing.
  3. "Everybody" instantiate is acceptable, cl8y dex is expected to handle millions of assets. LUNC fee of 100 LUNC is sufficient to prevent excess spam. Document this is acceptable and not blocking codeid whitelisting.
  4. Same with minter - it is acceptable as many quality tokens have minting. Again document as acceptable and not blocking a codeid whitelisting.
1. Incomplete suite - Real block, need to complete the full test suite on 8266 before approved 2. Issuer holding keys - This is no problem & is expected, most quality tokens have issuer with keys. Document this is acceptable and not blocking codeid listing. 3. "Everybody" instantiate is acceptable, cl8y dex is expected to handle millions of assets. LUNC fee of 100 LUNC is sufficient to prevent excess spam. Document this is acceptable and not blocking codeid whitelisting. 4. Same with minter - it is acceptable as many quality tokens have minting. Again document as acceptable and not blocking a codeid whitelisting.
PlasticDigits commented 2026-08-22 09:23:04 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1115

mentioned in merge request !1115
PlasticDigits commented 2026-08-22 09:23:42 +00:00 (Migrated from gitlab.com)

Follow-up to note 3719458992.

1. Incomplete suite — done. Layer A-lcd + B-lt now execute on the pinned LCD wasm (953AD60C…), not Transfer-only:

  • Transfer / TransferFrom 1:1; TransferFrom without allowance rejected
  • Unauthorized mint / burn_from rejected
  • Idle balance + balance_at vs live
  • Factory whitelist of the local store id only (never columbus-5 8266)
  • CreatePair vs EMBER, provide P2, Send round-trip swap B7, limit Send escrow L1, SendFrom swap 1:1

cw20-codeid-audits/codeids/8266/REPORT.md is GO. Re-run: make verify-issue-581.

2–4. Residuals documented, not blocking (as requested):

  • Issuer wasm-admin (A14) — quality CW20s keep issuer keys
  • Everybody instantiate (B13) — 100 LUNC pair-create fee is the spam control
  • Minter cap (B14) — mint is expected on many listed assets

Columbus-5 still needs DEX 2-of-3 AddWhitelistedCodeId 8266. Do not whitelist a LocalTerra store id.

MR: https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/397

Follow-up to note 3719458992. **1. Incomplete suite — done.** Layer A-lcd + B-lt now execute on the pinned LCD wasm (`953AD60C…`), not Transfer-only: - Transfer / TransferFrom 1:1; TransferFrom without allowance rejected - Unauthorized mint / burn_from rejected - Idle balance + `balance_at` vs live - Factory whitelist of the *local* store id only (never columbus-5 8266) - CreatePair vs EMBER, provide **P2**, Send round-trip swap **B7**, limit Send escrow **L1**, SendFrom swap 1:1 `cw20-codeid-audits/codeids/8266/REPORT.md` is **GO**. Re-run: `make verify-issue-581`. **2–4. Residuals documented, not blocking** (as requested): - Issuer wasm-admin (**A14**) — quality CW20s keep issuer keys - Everybody instantiate (**B13**) — 100 LUNC pair-create fee is the spam control - Minter cap (**B14**) — mint is expected on many listed assets Columbus-5 still needs DEX 2-of-3 `AddWhitelistedCodeId 8266`. Do **not** whitelist a LocalTerra store id. MR: https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/397
PlasticDigits commented 2026-08-22 09:36:42 +00:00 (Migrated from gitlab.com)

mentioned in commit 0ad712a282

mentioned in commit 0ad712a28228a94047bd88f37873c2ca30aa4497
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-08-22 09:36:43 +00:00
PlasticDigits commented 2026-08-22 09:37:54 +00:00 (Migrated from gitlab.com)

marked as related to #591

marked as related to #591
PlasticDigits commented 2026-08-22 09:37:55 +00:00 (Migrated from gitlab.com)

mentioned in issue #591

mentioned in issue #591
PlasticDigits commented 2026-08-22 09:38:17 +00:00 (Migrated from gitlab.com)

!1115 merge + acceptance check (no CI wait)

Merged !1115 (feat/581-8266-full-suite @ bd02d880 → merge commit 0ad712a2). GitLab reported mergeable / no conflicts; local merge-tree also clean (fast-forward from 8689a129). Did not enable auto-merge and did not wait for CI.

Acceptance vs this issue

Criterion Result
#589 closed Yes (already closed)
Written go/no-go from codeids/8266/REPORT.md (decomp + suite, not rebuild) GO (template gate)
Issuer wasm-admin / Everybody instantiate / minter not blocking (note 3719458992) Documented in REPORT + cw20-whitelist-policy.md (A14 / B13 / B14)
Layer A-lcd / B-lt on pinned LCD wasm 953AD60C… (Transfer, TransferFrom, Send, P2, B7, L1) Implemented fail-closed in layer-a-lcd.sh / layer-b-lt.sh; JSON flags only written after asserts
Columbus-5 AddWhitelistedCodeId 8266 Not done (correct — this MR is the template GO only; never whitelist a LocalTerra store id)
#558 SpaceUSD/UST1 create+provide Not done — stays on #558

make verify-issue-581 is on main. MR “Closes #581” closed this issue as the template gate. 2-of-3 listing is a separate ops step.

Problems / residuals (not merge blockers)

  1. CI pipeline 2781658699 failed. Job gitleaks (#16045970792) failure_reason=ci_quota_exceeded — the scanner did not run. This is not a gitleaks finding. GitLab only_allow_merge_if_pipeline_succeeds is false.
  2. Catalogue still has pending-lcd rows (D1–D4, D11–D12, D15–D16, D19, D21, E3, G3, …). GO is the executed DEX write path + residual policy, not a fully green catalogue sheet.
  3. Docs drift after GO: launch-checklist.md still says 8266 BLOCK (including a stale “until dump rebuilds” line), docs/testing.md F6 row “8266 still BLOCK”, docs/qa-invariants.md Q7/M590-7, deploy-trace templates. Tracked in #591.
  4. This GO does not approve ALPHA 8654.

Next

DEX 2-of-3 AddWhitelistedCodeId 8266 then SpaceUSD/UST1 create+provide with receiver = CMM → #558 workstream 0/1. Docs leftover → #591.

## !1115 merge + acceptance check (no CI wait) Merged [!1115](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/397) (`feat/581-8266-full-suite` @ `bd02d880` → merge commit `0ad712a2`). GitLab reported **mergeable** / **no conflicts**; local `merge-tree` also clean (fast-forward from `8689a129`). Did **not** enable auto-merge and did **not** wait for CI. ### Acceptance vs this issue | Criterion | Result | |-----------|--------| | [#589](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/589) closed | Yes (already closed) | | Written **go/no-go** from `codeids/8266/REPORT.md` (decomp + suite, not rebuild) | **GO** (template gate) | | Issuer wasm-admin / Everybody instantiate / minter **not blocking** (note 3719458992) | Documented in REPORT + `cw20-whitelist-policy.md` (A14 / B13 / B14) | | Layer A-lcd / B-lt on pinned LCD wasm `953AD60C…` (Transfer, TransferFrom, Send, P2, B7, L1) | Implemented fail-closed in `layer-a-lcd.sh` / `layer-b-lt.sh`; JSON flags only written after asserts | | Columbus-5 `AddWhitelistedCodeId 8266` | **Not done** (correct — this MR is the template GO only; never whitelist a LocalTerra store id) | | #558 SpaceUSD/UST1 create+provide | **Not done** — stays on [#558](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/558) | `make verify-issue-581` is on `main`. MR “Closes #581” closed this issue as the **template gate**. 2-of-3 listing is a separate ops step. ### Problems / residuals (not merge blockers) 1. **CI** pipeline [2781658699](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/pipelines/2781658699) **failed**. Job `gitleaks` (#16045970792) `failure_reason=ci_quota_exceeded` — the scanner **did not run**. This is not a gitleaks finding. GitLab `only_allow_merge_if_pipeline_succeeds` is false. 2. **Catalogue** still has `pending-lcd` rows (D1–D4, D11–D12, D15–D16, D19, D21, E3, G3, …). GO is the executed DEX write path + residual policy, not a fully green catalogue sheet. 3. **Docs drift** after GO: `launch-checklist.md` still says 8266 BLOCK (including a stale “until dump rebuilds” line), `docs/testing.md` F6 row “8266 still BLOCK”, `docs/qa-invariants.md` Q7/M590-7, deploy-trace templates. Tracked in [#591](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/591). 4. This GO does **not** approve ALPHA **8654**. ### Next DEX 2-of-3 `AddWhitelistedCodeId 8266` then SpaceUSD/UST1 create+provide with `receiver` = CMM → [#558](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/558) workstream 0/1. Docs leftover → [#591](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/591).
PlasticDigits commented 2026-08-22 09:42:22 +00:00 (Migrated from gitlab.com)

Static harness review after !1115 (non-blocking)

Post-merge review of A-lcd / B-lt / verify-issue-581 / verify-issue-589 / REPORT.md: no blocking defects. Paths are fail-closed (not stub-PASS); whitelist uses only the LocalTerra store id; C6 clean.

Residual coverage (not a listing veto; not #591 docs copy):

  • make verify-issue-581 can PASS without LocalTerra (pin + REPORT text only) unless VERIFY581_REQUIRE_CHAIN=1.
  • L1 asserts CW20 conservation (user vs pair+treasury), not that an order exists on the book.
  • SendFrom asserts owner debit 1:1 only (no swap-output credit, unlike B7).
  • A16 event amount attr is optional if missing; jq on layer-*-*.json checks a subset of flags (scripts still fail closed before writing JSON).
## Static harness review after !1115 (non-blocking) Post-merge review of A-lcd / B-lt / `verify-issue-581` / `verify-issue-589` / REPORT.md: **no blocking defects**. Paths are fail-closed (not stub-PASS); whitelist uses only the LocalTerra store id; C6 clean. Residual coverage (not a listing veto; not [#591](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/591) docs copy): - `make verify-issue-581` can PASS without LocalTerra (pin + REPORT text only) unless `VERIFY581_REQUIRE_CHAIN=1`. - L1 asserts CW20 conservation (user vs pair+treasury), not that an order exists on the book. - SendFrom asserts owner debit 1:1 only (no swap-output credit, unlike B7). - A16 event `amount` attr is optional if missing; jq on `layer-*-*.json` checks a subset of flags (scripts still fail closed before writing JSON).
PlasticDigits commented 2026-08-22 10:56:49 +00:00 (Migrated from gitlab.com)

Columbus-5 listing landed (ops follow-up; gate stays closed)

Template GO on this issue is unchanged. DEX 2-of-3 has now executed AddWhitelistedCodeId 8266 on factory terra1ejpgvv7g3hj0u6fpcnxhflqp84g0w3cnaskqkg5733ygwlmf963sfchsea.

SpaceUSD/UST1 create+provide remains on #558 workstream 1. ALPHA 8654 stays off the whitelist.

## Columbus-5 listing landed (ops follow-up; gate stays closed) Template **GO** on this issue is unchanged. DEX 2-of-3 has now executed `AddWhitelistedCodeId 8266` on factory `terra1ejpgvv7g3hj0u6fpcnxhflqp84g0w3cnaskqkg5733ygwlmf963sfchsea`. - Height **30060600**, code **0** - Tx [`BA7C9FD05D0FC0BC14713A53325E1F42AAAECF3A11E4EC3BC91368013D8FC5D1`](https://finder.terraclassic.community/columbus-5/tx/BA7C9FD05D0FC0BC14713A53325E1F42AAAECF3A11E4EC3BC91368013D8FC5D1) - `GetWhitelistedCodeIds` = **`[6036, 8266, 10184]`** - `IsCodeIdWhitelisted 8266` = **true** SpaceUSD/UST1 create+provide remains on [#558](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/558) workstream 1. ALPHA **8654** stays off the whitelist.
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#581
No description provided.