deviant/design
walerikus a71841fc29 feat(crosschain): SafeERC20 refund fix + robustness suite + naming model
Hardening pass on the USDt→τUSDt wrap (builds on 0170's end-to-end validation).

Security fix — found via robustness testing:
- UsdtLockNile used require(token.transfer(...)) assuming a bool return; real
  Tether-style USDt returns nothing → the refund path reverted, which would
  STRAND the locker's funds. Fixed with SafeERC20 handling (no-data or true) on
  both transfer/transferFrom; redeployed to Nile (TVahBUBqUDLqVjDn77Yav…Vnn2o).
- scripts/tron-wrap-robustness.cjs: R2 (too-early) and R3 (consumed) revert for
  the right reason (decoded on-chain revert). R1 (self-refund) validated against
  a clean standard token — contracts/tron/MockUsdt.sol + tron-refund-validate.cjs
  — since the Nile faucet USDT has a non-standard transfer that reverts for
  contract senders.

Naming model (revises the prefix-primary stance):
- identity = CashToken category; human name = USDt + a network badge (the "BIC");
  the ε/τ prefix is a text-only fallback. Applied to the mockup (ASM·Multichain:
  name+badge, prefix in button/stepper, synced selectors, new source-chain
  dropdown Ethereum/Tron→ε/τ) and to ASM-Multichain.md / README.md, plus the
  cross-chain-redemption non-goal (per-chain IOUs + AMM swap, not a universal IOU).

Design record:
- Parameters/ASM DEX/cross-chain-asm-concept-and-state.md — concept, the
  trustless-vs-authority analysis, oracle vs light-client vs zk, the VM wall, the
  reference hacks, the trust ladder, and the 48-hour build state.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 23:05:48 +02:00
..
mockups feat(crosschain): SafeERC20 refund fix + robustness suite + naming model 2026-06-23 23:05:48 +02:00
CAPACITOR_HANDOFF.md design: refresh CosmoGenesis mockups + splash typography 2026-06-13 16:53:58 +02:00
cosmo-genesis.css design: refresh CosmoGenesis mockups + splash typography 2026-06-13 16:53:58 +02:00
index.html design: CosmoGenesis wallet UI system + four-tab mockups + glossary 2026-06-07 00:36:45 +02:00
README.md design: refresh CosmoGenesis mockups + splash typography 2026-06-13 16:53:58 +02:00
starfield.ts design: refresh CosmoGenesis mockups + splash typography 2026-06-13 16:53:58 +02:00

CosmoGenesis — Deviant design system

The project's own named visual language (v0.1), extracted from the project website (Knowledgebase/08_historical_drafts/deviant_website.html) and extended with the wallet's verification-state semantics.

Files

File What it is
cosmo-genesis.css Design tokens (CSS custom properties) + glow utilities + starfield styles + base type. Import once at the shell root.
starfield.ts The starfield dot generator (ported verbatim from the website). Call generateStars(el) on the .stars container.

The system in one screen

  • Sky — dark layered-gradient background (--sky-deep #050810 → --sky-mid → --sky-rim) with faint spectral-aurora colour tints, fixed attachment. White twinkling starfield over it, with optional mouse parallax — call enableParallax(starsEl) from starfield.ts (respects prefers-reduced-motion).
  • Acid — lime #d6ff3d with three glow tiers (--acid-glow / -halo / -dim). It is the signature accent and is reserved for VERIFIED / ASM / primary actions so the glow never implies safety where there is none.
  • Type — Fraunces (serif) for display/headings/balances; JetBrains Mono for all numeric and technical data (sats, BCH, PNV, addresses, token IDs, labels). Use the .mono / .data / .amount / .address classes — they enable tabular figures.
  • Glow utilities — .glow-text, .glow-box, .accent-bar, .acid-dot.

Verification-state colors (spec §7)

Token State Use
--state-verified (acid) DEA/PLA/MCA/MTA-Verified, ASM/Orbital the only place acid glow appears
--state-unverified (amber) MBA-Unverified (D-1 fail) suppress PNV, disable Orbital
--state-warning (red) Warning — Underbacked (D-2 fail) per-UTXO peg-deficit
--state-neutral (muted) Tier B Unverified definition user-rooted trust

Fonts

Load in the shell <head>:

<link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">

Mockups (mockups/)

Navigable CosmoGenesis mockups — shared bottom bar (Main · Assets · △ Artemision · Apps)

  • central FAB across screens. Class detail sheets render the code as acid-coloured initial capitals (Permissionless Token Unlimited → PTU). Taxonomy per ADR-0027 / ADR-0028.
File Screen
main-tab.html Main — BCH fuel card, portfolio donut (BCH / MBA / NBA), activity feed
assets-tab.html Assets hub — MBA | NBA × My/Orbital · My/Market · automated risk scale
artemision-tab.html Artemision — eight-class matrix + clickable per-class & family detail sheets
artemision-wizard.html Create asset — full 6-step wizard + type-CREATE review wall
apps-tab.html Apps — Connected | Discover, WalletConnect + CashConnect, network switcher
send-flow.html Send / Receive / Scan (FAB) — D-4/D-5 raw-BCH co-display, ADR-0013 friction ladder
swap-flow.html Orbital swap — builder → quote → result, persistent path indicator (ASM)
settings.html Settings — security (friction thresholds), Privacy/CashFusion, network, empty-default registries (ADR-0008)
asset-detail.html Spectrum asset pane — 7 regions, PNV + raw-BCH, action row, rate & backing
elevation.html Elevation B→A — pre-flight integrity panel (T-002 poisoning guard)
activity.html Activity — filterable list + underbacked-receipt (T-001 victim) detail
onboarding.html Onboarding — Welcome → BCH-fuel concept → seed → network (no tab bar)

Provenance

Naming/copy that pairs with these tokens lives in ../wiki/glossary.md. The information architecture these styles dress lives in ../wiki/wallet-ui-design.md.