19 KiB
19 KiB
UI/UX Specification: ISO-20022 Combo Builder v2
Overview
This document specifies the user interface and user experience for the Combo Builder v2, which enables users to compose multi-step financial workflows combining DeFi protocols and traditional banking rails (ISO-20022). The UI is inspired by Furucombo's Create page but extends it with compliance overlays, hybrid adapter support, and optional simulation.
Design Principles
- Composability: Drag-and-drop interface for building complex financial workflows
- Transparency: Clear display of compliance status, fees, and execution risks
- Flexibility: Support for both DeFi and fiat/DTL adapters with selection control
- User Control: Optional simulation for advanced users, mandatory compliance checks
- Accessibility: Intuitive for non-developers while providing advanced features
1. Main Builder Canvas
Layout Structure
┌─────────────────────────────────────────────────────────────────┐
│ Header: [Combo Builder] [User Identity] [Wallet] [Settings] │
├─────────────┬─────────────────────────────────────────────────────────┤
│ │ │
│ Adapter │ Canvas (Drop Zone) │
│ Palette │ ┌─────────────────────┐ │
│ │ │ Step 1: Borrow │ │
│ [DeFi] │ │ 💰 CBDC_USD: 100k │ │
│ - Swap │ └─────────────────────┘ │
│ - Borrow │ ┌─────────────────────┐ │
│ - Deposit │ │ Step 2: Swap │ │
│ - Bridge │ │ 🔄 USD → EUR │ │
│ │ └─────────────────────┘ │
│ [Fiat] │ ┌─────────────────────┐ │
│ - Pay │ │ Step 3: Pay │ │
│ - Repay │ │ 📤 EUR to IBAN │ │
│ - Transfer │ └─────────────────────┘ │
│ │ │
│ [Compliance]│ │
│ ✓ LEI │ │
│ ✓ KYC │ │
│ ✓ AML │ │
└─────────────┴─────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────┐
│ Summary Panel: │
│ Initial Funds: 100,000 CBDC_USD │
│ You will receive: ~78,000 EUR │
│ Fees: 0.2% (200 USD) | Compliance: ✓ | Simulation: [Toggle] │
│ [Review & Sign] [Simulate] [Save Draft] │
└─────────────────────────────────────────────────────────────────┘
Key Components
A. Adapter Palette (Left Sidebar)
- DeFi Section: Swappable protocols (Uniswap, Aave, Compound, etc.)
- Fiat/DTL Section: Banking rails (ISO-20022 pay, SWIFT, SEPA, etc.)
- Compliance Badge: Shows current user compliance status (LEI/DID/KYC/AML)
- Filter Toggle: "Show All" / "Show Whitelisted Only" / "Show DeFi Only" / "Show Fiat Only"
B. Canvas (Center)
- Drop Zone: Visual area where users place workflow steps
- Step Cards: Each step shows:
- Step number (1, 2, 3...)
- Icon (💰, 🔄, 💳, 📤)
- Step type and summary
- Compliance badge (if applicable)
- Drag handle (⋮⋮) for reordering
- Edit/Remove buttons
C. Summary Panel (Bottom)
- Initial Funds: What user must supply (from wallet or borrow)
- You will receive: Expected output at workflow end
- Fee Display: "Included 0.2% fee" (if applicable)
- Compliance Status: Visual indicators (✓ LEI, ✓ KYC, ✓ AML, ✓ DID)
- Simulation Toggle: Optional checkbox for advanced users
- Action Buttons: Review & Sign, Simulate (optional), Save Draft
2. Step Configuration Drawer
Layout
┌────────────────────────────────────────────────────────┐
│ Configure Step: Swap [X] │
├────────────────────────────────────────────────────────┤
│ │
│ From Token: [CBDC_USD ▼] │
│ Amount: [100,000] │
│ │
│ To Token: [CBDC_EUR ▼] │
│ Min Receive: [90,000] (auto-calculated) │
│ │
│ Slippage: [0.5%] (default) │
│ │
│ ────────────────────────────────────────────────────── │
│ │
│ Compliance Requirements: │
│ ☑ LEI Required: [5493000IBP32UQZ0KL24] │
│ ☑ KYC Status: ✓ Verified │
│ ☑ AML Check: ✓ Passed │
│ │
│ [Save] [Cancel] │
└────────────────────────────────────────────────────────┘
Features
- Token/Asset Selection: Dropdown with supported tokens (DeFi) or currencies (Fiat)
- Amount Input: Numeric input with validation
- Compliance Fields: Auto-populated from user session (LEI, KYC, AML status)
- Dependency Visualization: Shows which previous steps feed into this step
- Validation Feedback: Real-time error messages (insufficient balance, invalid IBAN, etc.)
3. Simulation Results Panel (Optional)
Layout
┌────────────────────────────────────────────────────────┐
│ Simulation Results [Close] │
├────────────────────────────────────────────────────────┤
│ Status: ✓ Simulation Successful │
│ │
│ Execution Summary: │
│ • Step 1 (Borrow): ✓ 100,000 CBDC_USD │
│ • Step 2 (Swap): ✓ 90,000 CBDC_EUR (estimated) │
│ • Step 3 (Pay): ✓ 78,000 EUR to beneficiary │
│ │
│ Gas Estimate: 450,000 gas │
│ Estimated Cost: $25.50 (at 50 gwei) │
│ │
│ Slippage Risk: Low (0.2% expected) │
│ Liquidity Check: ✓ Sufficient │
│ │
│ Compliance: ✓ All checks passed │
│ │
│ [Run Simulation Again] [Proceed to Sign] │
└────────────────────────────────────────────────────────┘
Features
- Step-by-Step Results: Shows success/failure for each step
- Gas Estimation: Calculated gas cost for entire workflow
- Slippage Analysis: Expected slippage for swaps
- Liquidity Checks: Verifies sufficient liquidity for trades
- Compliance Status: Confirms all compliance requirements met
- Error Warnings: Highlights any potential failure points
4. Compliance Status Dashboard Overlay
Layout
┌────────────────────────────────────────────────────────┐
│ Compliance Status [Dismiss] │
├────────────────────────────────────────────────────────┤
│ │
│ Identity Verification: │
│ ✓ LEI: 5493000IBP32UQZ0KL24 │
│ ✓ DID: did:web:example.com:user:123 │
│ ✓ KYC: Level 2 Verified (Expires: 2026-12-31) │
│ ✓ AML: Passed (Last check: 2025-01-15) │
│ │
│ Current Workflow Compliance: │
│ • All steps require LEI: ✓ Provided │
│ • KYC Level Required: 2 ✓ Met │
│ • AML Screening: ✓ Passed │
│ │
│ Missing Requirements: None │
│ │
│ [Update Identity] [View Compliance Details] │
└────────────────────────────────────────────────────────┘
Features
- Always Visible Badge: Small indicator in header showing compliance status
- Detailed View: Expandable overlay with full compliance details
- Workflow-Specific Checks: Validates compliance for current workflow
- Expiration Warnings: Alerts if KYC/AML checks are expiring soon
- Update Actions: Quick links to update identity or run new checks
5. Adapter Selection Modal
Layout
┌────────────────────────────────────────────────────────┐
│ Select Adapter Type [X] │
├────────────────────────────────────────────────────────┤
│ │
│ Filter: [All] [DeFi] [Fiat/DTL] [Whitelisted Only] │
│ │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ DeFi Protocols │ │ Fiat/DTL Rails │ │
│ ├──────────────────┤ ├──────────────────┤ │
│ │ 🔄 Uniswap V3 │ │ 📤 ISO-20022 Pay │ │
│ │ 💰 Aave │ │ 💳 SWIFT MT │ │
│ │ 📊 Compound │ │ 🌐 SEPA │ │
│ │ 🌉 Bridge │ │ 🏦 FedNow │ │
│ │ │ │ │ │
│ └──────────────────┘ └──────────────────┘ │
│ │
│ Selected: ISO-20022 Pay │
│ │
│ [Add to Palette] [Cancel] │
└────────────────────────────────────────────────────────┘
Features
- Category Filtering: Separate DeFi and Fiat/DTL adapters
- Whitelist Toggle: Show only approved/whitelisted adapters
- Adapter Status: Visual indicators (✓ Approved, ⚠ Deprecated, 🔒 Restricted)
- Search: Quick search for specific adapters
- Version Info: Shows adapter version and last updated date
6. User Flows
Flow 1: Building a Simple Combo (DeFi Only)
- User opens Builder page
- User drags "Borrow" from DeFi palette → Canvas
- Configures borrow step (asset, amount, collateral)
- Drags "Swap" from palette → Canvas (after borrow step)
- Configures swap step (from/to tokens, amount)
- Summary panel updates automatically
- User clicks "Review & Sign" (compliance auto-checked)
- Redirected to preview/sign page
Flow 2: Building Hybrid Combo (DeFi + Fiat)
- User opens Builder page
- Compliance badge shows: ✓ LEI, ✓ KYC, ✓ AML
- User drags "Borrow" (DeFi) → Canvas
- User drags "Swap" (DeFi) → Canvas
- User drags "Pay" (Fiat/DTL) → Canvas
- Configures pay step (IBAN, amount, beneficiary)
- Compliance overlay appears: "Fiat step requires LEI"
- LEI auto-populated from user session
- User optionally enables simulation toggle
- Clicks "Simulate" → sees results
- Clicks "Review & Sign" → proceeds
Flow 3: Advanced User with Simulation
- User enables "Simulation" toggle in summary panel
- Builds workflow as normal
- Before signing, clicks "Simulate" button
- Simulation results panel shows:
- Gas estimate
- Slippage analysis
- Liquidity checks
- Failure predictions
- User reviews results, adjusts workflow if needed
- Clicks "Proceed to Sign" after simulation passes
Flow 4: Compliance Validation Failure
- User builds workflow with fiat step requiring LEI
- User has not provided LEI in settings
- Compliance badge shows: ⚠ LEI Missing
- User attempts to sign
- Error modal: "LEI required for this workflow. Please update your identity in Settings."
- User redirected to Settings page to add LEI
- Returns to Builder, workflow auto-validated
7. Responsive Design
Desktop (≥1024px)
- Full layout with sidebar palette, canvas, and summary panel
- All features visible simultaneously
Tablet (768px - 1023px)
- Collapsible sidebar palette
- Canvas takes full width when palette collapsed
- Summary panel remains at bottom
Mobile (<768px)
- Palette accessible via bottom sheet/modal
- Canvas scrollable vertically
- Step cards stack vertically
- Summary panel sticky at bottom
8. Accessibility Requirements
- Keyboard Navigation: Full keyboard support for drag-and-drop (arrow keys, space/enter)
- Screen Reader Support: ARIA labels for all interactive elements
- Color Contrast: WCAG AA compliance for all text and UI elements
- Focus Indicators: Clear focus states for all interactive elements
- Error Messages: Clear, actionable error messages for all validation failures
9. Performance Requirements
- Initial Load: < 2 seconds for Builder page
- Step Addition: < 500ms for drag-and-drop response
- Summary Calculation: Real-time updates < 200ms
- Simulation: < 5 seconds for full workflow simulation
- Compliance Check: < 1 second for status validation
10. Integration Points
Frontend → Backend API
POST /api/plans- Create execution planGET /api/plans/:id/simulate- Run simulation (optional)GET /api/compliance/status- Fetch compliance statusGET /api/adapters- List available adapters (filtered by type/whitelist)
Frontend → Smart Contracts
- Wallet connection via Wagmi
- Plan signing via wallet signature
- Transaction submission via handler contract
11. Visual Design System
Color Palette
- Primary: Black (#000000) for actions
- Secondary: Blue (#3B82F6) for compliance/info
- Success: Green (#10B981) for valid states
- Warning: Yellow (#F59E0B) for warnings
- Error: Red (#EF4444) for errors
- Background: White (#FFFFFF) for cards, Gray-50 (#F9FAFB) for canvas
Typography
- Headings: Inter, 24px/32px (h1), 18px/24px (h2)
- Body: Inter, 14px/20px
- Code/Monospace: Fira Code, 12px/16px for addresses/IDs
Icons
- Emoji icons for step types (💰, 🔄, 💳, 📤)
- Lucide React icons for UI elements (Edit, Remove, Drag, etc.)
12. Error States & Edge Cases
Insufficient Balance
- Red warning badge on step card
- Error message: "Insufficient balance. You need 100,000 CBDC_USD but have 50,000."
Invalid Workflow
- Step dependency error: "Step 2 requires output from Step 1. Please reorder steps."
- Visual connection lines between dependent steps
Compliance Failure
- Modal overlay: "This workflow requires LEI verification. Please update your identity in Settings."
- Link to Settings page
Simulation Failure
- Results panel shows: "⚠ Simulation Failed"
- Detailed error: "Step 2 (Swap) would fail due to insufficient liquidity."
Network/Chain Mismatch
- Warning: "Selected adapter (Uniswap) is on Ethereum, but you're connected to Polygon."
- Option to switch network or select different adapter
13. Future Enhancements (Out of Scope for v2)
- Workflow Templates: Pre-built combo templates for common strategies
- Workflow Sharing: Share workflows with other users (with compliance validation)
- Multi-user Workflows: Collaborative workflow building
- Advanced Analytics: Historical performance tracking for workflows
- Mobile App: Native mobile app for workflow building
Acceptance Criteria
- ✅ User can drag adapters from palette to canvas
- ✅ User can reorder steps by dragging
- ✅ User can configure each step via drawer
- ✅ Compliance status is always visible and validated
- ✅ Optional simulation works for advanced users
- ✅ Summary panel updates in real-time
- ✅ Hybrid adapters (DeFi + Fiat) are selectable
- ✅ Error states are clearly communicated
- ✅ Responsive design works on mobile/tablet/desktop
- ✅ Accessibility requirements are met
Document Version: 1.0
Last Updated: 2025-01-15
Author: Engineering Team