Deep-link CL8Y DEX trade CTAs once dex.cl8y.com honors Swap query params #6

Open
opened 2026-08-31 05:20:24 +00:00 by PlasticDigits · 4 comments
PlasticDigits commented 2026-08-31 05:20:24 +00:00 (Migrated from gitlab.com)

Gate (do not implement until this is true)

Blocked on cl8y-dex-terraclassic !488 (Closes DEX #711).

Do not ship a Swap query string on dex.cl8y.com until that MR is merged and Coolify has deployed it. Today https://dex.cl8y.com ignores Uniswap/Terra aliases, and /swap/?… drops search on redirect to /. A deep-link shipped early would still land on the default retail pair and look broken.

After merge + Coolify: confirm live

https://dex.cl8y.com/?from=uluna&to=terra16wtml2q66g82fdkx66tap0qjkahqwp4lwq3ngtygacg5q0kzycgqvhpax3

selects Pay LUNC and Receive CL8Y. Only then change this repo.

Summary

The marketing site’s primary Terra Classic trade venue is a bare origin (CANONICAL_PRODUCT_URLS.dex = https://dex.cl8y.com). Pancake/TidalDex rows already use ?outputCurrency=<token>. Once DEX #711 is live, CL8Y DEX should do the same: land the visitor on LUNC → CL8Y, not the homepage default pair.

This is a href + docs/skills change in CL8Y-web. No DEX app work.

Current codebase

File Today
src/content/invariants.ts Product origins must stay exact https://dex.cl8y.com — no path, query, userinfo, or trailing slash (CANONICAL_PRODUCT_URLS).
src/data/products.ts Header/hero product CTAs import PRODUCT_URLS / that origin. Keep those origin-only.
src/data/tokenDirectory.ts TRADE_VENUES row cl8y-dex uses href: CANONICAL_PRODUCT_URLS.dex (bare origin). TidalDex/Pancake already append outputCurrency.
skills/cl8y-token-directory/* “CL8Y DEX first” = https://dex.cl8y.com.
skills/cl8y-site-positioning/* Primary product CTAs are exact origins; do not build them from query/hash.
e2e/trade.spec.ts Asserts #token HTML contains https://dex.cl8y.com.

DEX parser (after !488): first-party outbound should mint /?from=&to= with uluna / uusd / checksummed terra1. Uniswap names (inputCurrency / outputCurrency) are inbound-only on the dApp.

Canonical Terra Classic CL8Y CW20 (already in this repo):

terra16wtml2q66g82fdkx66tap0qjkahqwp4lwq3ngtygacg5q0kzycgqvhpax3

Pay side: uluna (display LUNC). Do not put LUNC / CL8Y tickers in first-party execute ids.

  1. Keep CANONICAL_PRODUCT_URLS.dex / header “CL8Y DEX” product tile as https://dex.cl8y.com (positioning invariant: products are origins).
  2. Add a typed constant for the Swap deep-link, e.g. CL8Y_DEX_SWAP_HREF, built with URLSearchParams (from=uluna, to=<TERRA_CLASSIC_CL8Y_ADDRESS>). Never concatenate user input. Host remains dex.cl8y.com; path / or /swap/ (both valid after #711).
  3. Point TRADE_VENUES cl8y-dex.href at that deep-link so directory / “Trade on DEX” matches Pancake-style pair landing.
  4. Update skills/cl8y-token-directory (and tests) so the trade-venue href is documented as the pair URL, while the product origin stays query-free.
  5. Host allowlist stays dex.cl8y.com. Do not add javascript:, protocol-relative, or ?url= redirectors.
  6. Optional: /swap/?from=uluna&to=… is equivalent; prefer /?from=&to= to match DEX first-party helpers (swapDeepLinkPath).

Acceptance criteria

  • Gated: implemented only after DEX !488 is merged (and production Swap honors the query).
  • Directory / Trade-on-DEX CL8Y DEX row lands on Pay LUNC + Receive CL8Y (checksummed CW20), not the default retail pair.
  • CANONICAL_PRODUCT_URLS.dex remains https://dex.cl8y.com with no query (product CTA / positioning).
  • Deep-link is a compile-time constant via URLSearchParams, not window.location / visitor query.
  • e2e/trade.spec.ts still passes (origin substring OK; assert from= / to= on the trade row if useful).
  • Token-directory skill + invariants mention the pair URL vs product origin split.
  • yarn typecheck, yarn lint, yarn build succeed.

Out of scope

  • Changing Bridge or DEX app code (already in !488).
  • Mapping BSC 0x… CL8Y into Terra Swap (wrong chain → DEX ignores).
  • Rewriting every PRODUCT_URLS.dex header CTA to include query (homepage “open the DEX” may stay origin-only).
  • CEX / GameFi copy.
## Gate (do not implement until this is true) **Blocked on** [cl8y-dex-terraclassic !488](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/481) (**Closes** [DEX #711](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/711)). Do **not** ship a Swap query string on `dex.cl8y.com` until that MR is **merged** and Coolify has deployed it. Today `https://dex.cl8y.com` ignores Uniswap/Terra aliases, and `/swap/?…` drops `search` on redirect to `/`. A deep-link shipped early would still land on the default retail pair and look broken. After merge + Coolify: confirm live `https://dex.cl8y.com/?from=uluna&to=terra16wtml2q66g82fdkx66tap0qjkahqwp4lwq3ngtygacg5q0kzycgqvhpax3` selects Pay **LUNC** and Receive **CL8Y**. Only then change this repo. ## Summary The marketing site’s primary Terra Classic trade venue is a bare origin (`CANONICAL_PRODUCT_URLS.dex` = `https://dex.cl8y.com`). Pancake/TidalDex rows already use `?outputCurrency=<token>`. Once DEX #711 is live, CL8Y DEX should do the same: land the visitor on **LUNC → CL8Y**, not the homepage default pair. This is a **href + docs/skills** change in CL8Y-web. No DEX app work. ## Current codebase | File | Today | |------|--------| | `src/content/invariants.ts` | Product origins must stay **exact** `https://dex.cl8y.com` — **no** path, query, userinfo, or trailing slash (`CANONICAL_PRODUCT_URLS`). | | `src/data/products.ts` | Header/hero product CTAs import `PRODUCT_URLS` / that origin. Keep those **origin-only**. | | `src/data/tokenDirectory.ts` | `TRADE_VENUES` row `cl8y-dex` uses `href: CANONICAL_PRODUCT_URLS.dex` (bare origin). TidalDex/Pancake already append `outputCurrency`. | | `skills/cl8y-token-directory/*` | “CL8Y DEX first” = `https://dex.cl8y.com`. | | `skills/cl8y-site-positioning/*` | Primary product CTAs are exact origins; do not build them from query/hash. | | `e2e/trade.spec.ts` | Asserts `#token` HTML contains `https://dex.cl8y.com`. | DEX parser (after !488): first-party outbound should mint `/?from=&to=` with `uluna` / `uusd` / checksummed `terra1`. Uniswap names (`inputCurrency` / `outputCurrency`) are inbound-only on the dApp. Canonical Terra Classic CL8Y CW20 (already in this repo): `terra16wtml2q66g82fdkx66tap0qjkahqwp4lwq3ngtygacg5q0kzycgqvhpax3` Pay side: `uluna` (display LUNC). Do **not** put `LUNC` / `CL8Y` tickers in first-party execute ids. ## Recommended direction 1. **Keep** `CANONICAL_PRODUCT_URLS.dex` / header “CL8Y DEX” product tile as `https://dex.cl8y.com` (positioning invariant: products are origins). 2. **Add** a typed constant for the Swap deep-link, e.g. `CL8Y_DEX_SWAP_HREF`, built with `URLSearchParams` (`from=uluna`, `to=<TERRA_CLASSIC_CL8Y_ADDRESS>`). Never concatenate user input. Host remains `dex.cl8y.com`; path `/` or `/swap/` (both valid after #711). 3. Point **`TRADE_VENUES` `cl8y-dex`.href** at that deep-link so directory / “Trade on DEX” matches Pancake-style pair landing. 4. Update `skills/cl8y-token-directory` (and tests) so the **trade-venue** href is documented as the pair URL, while the **product origin** stays query-free. 5. Host allowlist stays `dex.cl8y.com`. Do not add `javascript:`, protocol-relative, or `?url=` redirectors. 6. Optional: `/swap/?from=uluna&to=…` is equivalent; prefer `/?from=&to=` to match DEX first-party helpers (`swapDeepLinkPath`). ## Acceptance criteria - [ ] **Gated:** implemented only after DEX !488 is merged (and production Swap honors the query). - [ ] Directory / Trade-on-DEX CL8Y DEX row lands on Pay LUNC + Receive CL8Y (checksummed CW20), not the default retail pair. - [ ] `CANONICAL_PRODUCT_URLS.dex` remains `https://dex.cl8y.com` with no query (product CTA / positioning). - [ ] Deep-link is a compile-time constant via `URLSearchParams`, not `window.location` / visitor query. - [ ] `e2e/trade.spec.ts` still passes (origin substring OK; assert `from=` / `to=` on the trade row if useful). - [ ] Token-directory skill + invariants mention the pair URL vs product origin split. - [ ] `yarn typecheck`, `yarn lint`, `yarn build` succeed. ## Out of scope - Changing Bridge or DEX app code (already in !488). - Mapping BSC `0x…` CL8Y into Terra Swap (wrong chain → DEX ignores). - Rewriting every `PRODUCT_URLS.dex` header CTA to include query (homepage “open the DEX” may stay origin-only). - CEX / GameFi copy. ## Cross-links - DEX issue: https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/711 - DEX MR: https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/481 - DEX playbook (after merge): `skills/AGENTS_FRONTEND_SWAP_QUERY_PARAMS.md` (**Q711-1–Q711-8**) - Parent directory work: #2
PlasticDigits commented 2026-08-31 05:20:42 +00:00 (Migrated from gitlab.com)

mentioned in merge request cl8y-dex-terraclassic!488

mentioned in merge request cl8y-dex-terraclassic!488
PlasticDigits commented 2026-08-31 05:36:04 +00:00 (Migrated from gitlab.com)

mentioned in issue cl8y-dex-terraclassic#713

mentioned in issue cl8y-dex-terraclassic#713
PlasticDigits commented 2026-08-31 11:18:41 +00:00 (Migrated from gitlab.com)

mentioned in issue cl8y-dex-terraclassic#714

mentioned in issue cl8y-dex-terraclassic#714
PlasticDigits commented 2026-09-01 07:48:09 +00:00 (Migrated from gitlab.com)

mentioned in issue cl8y-dex-terraclassic#716

mentioned in issue cl8y-dex-terraclassic#716
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-web#6
No description provided.