design: IBC USDC as other-DEX routing intermediate (not USTC/LUNC) #691
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#691
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Follow-up / analysis-only until the parent ships. Decide whether IBC USDC on Terra Classic can become a common intermediate for other-DEX v2 hops in the CL8Y route solver (sibling of LUNC / USTC). Do not implement USDC intermediates on the parent ticket.
Parent: #690 — external DEX routing + 3% CMM fee + max-1 foreign hop.
Current codebase
AssetInfo::NativeTokenin router ops isNativeTokenNotSupported. Wrap-mapper mapsuluna↔ cLUNC and **uusd↔ cUSTConly** ([NATIVE_TOKEN_WRAPPING.md](NATIVE_TOKEN_WRAPPING.md), [#516](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/516)). There is **no** USDC wrap CW20 in [tokenlist/tokenlist.json`](tokenlist/tokenlist.json).docs/route-solver.md). Nativeuluna/uusdare not routable except via wrap CW20s. Unknown natives /ibc/…display as raw denoms (#630 N630-5).vfdusd) (#515, #580). No USDC oracle. Hub USD is cUSTC / LUNC / UST1 / USTR (#556). Do not treat CEX FDUSD or vFDUSD as USDC.code_id. IBC denoms have nocode_id. Parent admission rule “both tokens on a whitelisted code_id” does not apply as-is to a USDC native leg.AssetInfo::NativeTokenincludingibc/[A-F0-9]{64}(docs/classic-terraswap-upstream-source.mdIBC_REX). Native IBC typically 0 Terra burn tax on send (Terraswapis_ibc_token()).ibc/B3504E092456BA618CC28AC671A71FB08C6CA0FD0BE7C8A5B5A3E2DD933CC9E4(verify columbus-5, not phoenix-1). Noblechannel-113native USDC is a different IBC denom. Axelar vs Noble vs wormhole-style assets must not be collapsed into one “USDC” node.Why this is needed
Many other-DEX pools are TOKEN / USDC rather than TOKEN / USTC or TOKEN / LUNC. Until USDC is an allowed intermediate, those pools stay out of the solver even when they are the deepest honest v2 LP. Shipping USDC on the parent ticket without denom identity, oracle USD, wrap policy, and burn-tax / hop-shape analysis would either mis-price $1k TVL, mix Axelar and Noble USDC, or break CW20-only router invariants.
Constraints / guardrails
uusdcand Noble USDC as fungible. A second denom = a new issue or an explicit multi-denom table with no implicit 1:1.$1hardcode, not vFDUSD, not UST1 peg.code_idif it is CW20. TOKEN/USDC where TOKEN is unlisted wasm stays ineligible.ibc/…bank sends (expect 0). Router must not route IBC through a path that applies USTC 1.5% tax by mistake (denom mix-up).ibc/…for anything else (N630-5). Do not show “USDC” for vFDUSD / UST1.Relevant files
NATIVE_TOKEN_WRAPPING.md· wrap-mapper config (uluna/uusd only)tokenlist/tokenlist.jsonindexer/src/indexer/asset_resolver.rs(ibc/…labels)skills/AGENTS_INDEXER_EXTERNAL_ORACLE.md(#515)docs/classic-terraswap-upstream-source.md(IBC native)docs/terraport.mdRecommended direction (analysis deliverable)
Produce a short design note (issue comment or
docs/) that answers, with LCD evidence:asset_infoscontainibc/…and metadata symbol USDC).Acceptance criteria
$1, not vFDUSD).Test plan (analysis / later impl)
Analysis (this issue):
pairspages; collectnative_token.denommatchingibc/[A-F0-9]{64}; resolve denom traces; sample reserve TVL.confighas no USDC mapping.If implementation is approved later:
Test plan (attack, hack, abuse)
ibc/…)code_id; not the IBC intermediate.$1.minimum_receive/ delta only on declared denom (parent XDex-5).Verification criteria
Close analysis when the go/no-go comment has LCD tables and U1–U8 answers.
Close implementation (if split later) when parent verify target is extended with USDC hop fixtures and oracle fail-closed tests.
Out of scope: wrapping USDC in ustr-cmm; CL8Y factory USDC pairs; IBC transfer UI; treating all stables as one hub.
marked as related to #690
mentioned in issue #690