feat: secondary UST1 AMM pair (or product waiver) + seed liquidity #508
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#508
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
Create and seed at least one secondary AMM pair for UST1 price discovery on the live CL8Y factory — preferred UST1/vFDUSD and/or UST1/cUSTC — or record an explicit product waiver on #502 / this issue if secondary liquidity is deferred.
Parent track: #502 (Phase 4).
Oracle mint/redeem remains primary via ust1-window (
/ust1); AMM must never be presented as the mint/redeem path.Known mainnet anchors
terra1ejpgvv7g3hj0u6fpcnxhflqp84g0w3cnaskqkg5733ygwlmf963sfchseaterra1e7s0h9ftxakwca5gxspyt4haeuaqxds6swr08ul3tsepq7el924sprrsrwterra1wcczsdk7jwj99n3my6wx8wr4ee0hn6yaapgd792lgx5elrdtrn2scfneczterra1f0eqgy9w7e5e7up97vjudqwx38tesf8ylx75x2lv3nwm0clry0pqmgfy72terra1mnl9azefrqpmu888ar2u6zrcwr80hxlt3avf4300r576cw5ar7esvxsvj3terra1nap4dxh9tv35v0ynd9m4k6zt6c0dq6weszc4j5m564kjls56hu7qcr56chCurrent codebase
mainnet-soft-launch-defaults.sh); no UST1 pairscreate_pair(≥ pair creation fee); UI/create(CreatePairPage); docsdeployment-guide.md§6pair_discovery.rsauto-discovers factory-provenance pairs; upserts assetsWindow mint/redeem is independent; this issue is only the optional/secondary liquidity venue.
Why this is needed
Oracle window sets the primary peg venue; a secondary AMM pair gives Trade/Swap users price discovery and inventory exit/entry without bridging through Venus for every edge trade. #502 acceptance explicitly requires either a live seeded pair or a recorded waiver so Phase 4 can close without silent scope creep. Indexer/frontend already support new factory pairs once created — the gap is ops/governance create + seed + asset metadata, not greenfield AMM code.
Constraints / guardrails
/ust1remains primary.cw20-whitelist-policy.md).uusd.set_discount_registryon new pairs if fee tiers apply.Relevant files
Ops / docs
docs/deployment-guide.md§ pair creationdocs/runbooks/cw20-whitelist-policy.mddocs/runbooks/mainnet-soft-launch.md(post-SL catalog note)scripts/lib/mainnet-soft-launch-defaults.sh(reference only — do not silently fold UST1 into soft-launch defaults)docs/CG_CMC_COMPLIANCE.md(listing/logo review if public markets)Indexer / frontend (verify after create)
indexer/src/indexer/pair_discovery.rs, asset upsert pathsdex.cl8y.com/ust1+ wrap issues)On-chain
Recommended direction
Path A — create + seed (preferred)
create_pairon production factory; record pair address + tx.set_discount_registry; link from/ust1copy as “secondary market”.Path B — product waiver
Acceptance criteria
dex.cl8y.com(Trade/Swap/Charts as applicable) + indexer./ust1oracle mint/redeem.Test plan (happy / functional paths)
token_info+ whitelist code id 10184; factory fee balance for creator.create_pairsucceeds; LCD/factory query lists pair.Test plan (attack / hack / abuse vectors)
/ust1remains primaryuusd/ulunaas pair assetverify_factory_provenancerejectsVerification criteria
Related
/ust1UI; mainnet wrap env + Swap UXmarked as related to #502
mentioned in issue #502
mentioned in commit
fd91ae6964mentioned in commit
ebe7a615bamentioned in merge request !1046
Implementation update (MR
feat/508-ust1-secondary-amm)Path B — interim product waiver (AC)
Recorded in
deployments/ust1-secondary-pair/PRODUCT_WAIVER.md:total_supply=0on columbus-5; soft-launch deployer holds 0 UST1/vFDUSD/cUSTC. Creating an empty/dust market would violate seed/honesty guardrails.create_pair+ seed + indexer/UI smoke on production../scripts/add-ust1-secondary-pair.shand replace this waiver with Path A txs.Same waiver applies to parent #502 secondary-pair AC until Path A lands.
Path A readiness shipped in-repo
scripts/add-ust1-secondary-pair.sh,scripts/seed-ust1-secondary-pair-local.sh,scripts/lib/ust1-secondary-pair-defaults.shdocs/runbooks/ust1-secondary-amm-pair.mdskills/AGENTS_UST1_SECONDARY_AMM.mdmake verify-issue-508(+VERIFY508_LOCAL=1LocalTerra seeded stand-in pair)Acceptance criteria checkoff
PRODUCT_WAIVER.md); Path A tooling ready/ust1mint/redeemmentioned in commit
a1e97c2980mentioned in issue #506
Merge sanity check (MR !1046 → main)
Verdict: #508 Path B (interim product waiver) + Path A tooling are complete enough to merge.
make verify-issue-508PASS;DRY_RUN=1 ./scripts/add-ust1-secondary-pair.shconfirms inventory block (UST1/vFDUSD balances 0).Remaining problems / open items
create_pair+ seed deferred per waiver. When inventory exists: run./scripts/add-ust1-secondary-pair.sh, filldeploy-trace.md,VERIFY508_MAINNET=1 make verify-issue-508, then lift waiver on #508/#502.UST1_SECONDARY_MARKET_BLURB/ Trade-Swap helpers are unit-tested and CreatePair notice ships, but/ust1secondary-market CTAs are not wired yet (depends on #506 landing).feat/508-ust1-secondary-amm→main.test-frontendred with pre-existing unrelated failures (same class asmain); not introduced by this ops/docs/helpers MR.mentioned in commit
7d43b49356mentioned in commit
2bc31e4522MR !1046 merged to
main(2bc31e4) after integrating !1044/!1045. Issue auto-closed via Path B waiver + Path A tooling (Closes #508).Still open for Path A: inventory →
./scripts/add-ust1-secondary-pair.sh→ record pair/txs → lift waiver on #502. Update waiver blob links from feature branch →mainwhen convenient.mentioned in issue #503
mentioned in merge request !1048
mentioned in issue #521
marked as related to #521
Path A seed inventory — approved sizes
Full table + wrap/window notes: https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/521#note_3690052724
Approved (replaces the 1.0-per-side smoke default):
Price model: UST1 = $1;
P_cUSTC = 1.0 × P_USTC;P_USTR = 2.5 × P_USTC;P_USTCfrom indexer/api/v1/oracle/price/ustc.Example at $0.00489550 USTC (2026-08-15): 204,269.226841 cUSTC (6 dp, raw
204269226841) and 81,707.690736390562761720 USTR (18 dp, raw81707690736390562761720). Re-query oracle at mint time.Do not seed 1,000 cUSTC / 400 USTR (that is the $1-USTC identity only). Live USTC is ~½¢; that ratio would donate the UST1 side.
mentioned in issue #522
marked as related to #522
mentioned in merge request !1055
mentioned in issue #524
marked as related to #524
mentioned in issue #542
marked as related to #542
mentioned in issue #543
mentioned in merge request !1071
mentioned in issue #556
mentioned in issue #558
mentioned in issue #559
mentioned in issue #574
marked as related to #574
mentioned in issue #575
marked as related to #575
mentioned in issue #678
marked as related to #678
mentioned in issue #680
mentioned in issue #711
marked as related to #711
mentioned in issue #715