Design System

Safety-First Blockchain UX

Blockchain Primitives, Standards & Protocols

Compare how different chains model ownership, transactions, and safety guarantees. Every pattern enforces one rule: the app NEVER touches private keys.

Why This Exists

A wallet notification about a "Genesis token" silently deleted an active seed phrase. No balance detection, no warning. Funds permanently inaccessible.

These patterns prevent such disasters across every chain we support.

Supported Chains

Chain Comparison

DimensionSolanaSuiEVM
Data ModelAccount-based (data + lamports)Object-centric (typed ownership)Account-based (global state tree)
OwnershipRuntime check (program verifies)Compile-time (Move type system)Runtime check (msg.sender)
TransactionsSingle instruction focusPTBs batch 1024 ops atomicallySingle call + internal calls
Smart ContractsRust programs (stateless)Move modules (object-native)Solidity contracts (stateful)
Wallet UXBrowser extensions requiredExtensions OR zkLogin (OAuth)Extensions OR WalletConnect
Safety SimulationTransaction simulation APIDry-run with full object diffeth_call + Tenderly/Blowfish
Token StandardSPL Token / Token-2022Coin<T> (generic typed coin)ERC-20 / ERC-721 / ERC-1155
Finality~400ms (optimistic)~390ms (fast path)~12s (slot) + 2 epochs

Primitives & Standards

Solana

Primitives

  • Accounts (data + lamports)
  • Programs (stateless executables)
  • PDAs (program-derived addresses)
  • SPL Tokens (fungible + NFTs)

Standards

SPL TokenMetaplexToken-2022Anchor IDL

Key Protocols

Jupiter (swap)Marinade (staking)Tensor (NFT)
8 components5 patterns

Sui

Primitives

  • Objects (owned, shared, immutable)
  • Modules (Move packages)
  • PTBs (programmable tx blocks)
  • Coins (typed fungibles)

Standards

Coin<T>KioskDisplay<T>SuiNS

Key Protocols

DeepBook (orderbook)Walrus (storage)Seal (encryption)
17 components5 patterns

EVM (Ethereum)

Primitives

  • Accounts (EOA + contracts)
  • Storage slots (key-value)
  • Events (indexed logs)
  • ERC tokens (20, 721, 1155)

Standards

ERC-20ERC-721ERC-1155EIP-712

Key Protocols

Uniswap (AMM)Aave (lending)Chainlink (oracles)
0 components0 patterns

Core Safety Rules (All Chains)

K

App never sees private keys

Wallet adapters handle all signing. We only know public keys.

B

Balance check before destruction

Block actions that would strand funds or destroy valuable objects.

N

Nuclear warnings for one-way ops

Multi-step confirmation with typed phrase for irreversible actions.

A

Asset ops are not key ops

NFT transfers and coin operations never modify seed phrases.

Safety Pattern Categories

Connection Patterns

Safe wallet connection without key exposure. Disconnect flows. zkLogin for frictionless onboarding.

Safe Connect (Solana)Wallet Connect + zkLogin (Sui)ConnectionGuard (Sui)SponsoredSession (Sui)

Transaction Safety

Simulate transactions before signing. Show users exactly what changes in their wallet.

TransactionSimulator (Solana)PTB Inspector (Sui)ObjectDiffPreview (Sui)GasEstimate (Sui)BalanceChangePreview (Solana)

Destructive Operations

Nuclear warnings with multi-step confirmation for irreversible actions. Chain-agnostic primitives.

NuclearWarningDialog (Common)TypedConfirmationInput (Common)CountdownButton (Common)DestructiveOpGate (Sui)BalanceAwareGuard (Solana)

Asset Handling

Correct patterns for token/NFT/object operations. Asset ops NEVER trigger key lifecycle changes.

SafeGenesisView (Solana)SafeNftTransfer (Solana)ObjectTransfer (Sui)CoinSplitMerge (Sui)CooldownTransfer (Sui)KioskIntegration (Sui)

Object Audit

Portfolio visibility: what you own, what it is worth, what is at risk before any operation.

OwnedObjectsAudit (Sui)ValueAtRisk (Sui)PreDestructionInventory (Sui)

Chain-Agnostic Components

These components work across all chains. Import from @stackmates/ui-onchain/common

NuclearWarningDialog

Multi-gate confirmation dialog for destructive operations. Typed phrase + countdown.

TypedConfirmationInput

Input that requires typing an exact phrase to enable a destructive action.

CountdownButton

Button with a timer gate. Action only available after countdown completes.

The Safety Mindset

Blockchain transactions are irreversible. Lost funds are lost forever. This fundamentally changes how we design interfaces.

Prevention over recovery — There is no undo button.

Friction is a feature — Dangerous actions should feel dangerous.

Show, don't tell — Simulate the outcome before execution.

Never surprise — Users must understand exactly what will happen.

Architecture

UI Components: libs/app-client/ui-onchain/ — React components (common, solana, sui)

Move Contracts: libs/blockchain/sui/move/ — DePIN, identity, loyalty, governance

TS Clients: libs/infrastructure/blockchain/ — Sui/Solana clients, indexer, multi-chain registry

Solidity Contracts: libs/blockchain/evm/ — Chainlink, DePIN, StackmatesToken (planned)