|
Bridging assets between Ethereum and Stacks has traditionally been:
|
We've built the bridge experience users deserve:
|
Click to expand
🔥 See All Features
| Feature | Description |
|---|---|
| 🔄 Bi-Directional Bridge | Deposit USDC → USDCx and Withdraw USDCx → USDC |
| ⚡ One-Click Flow | Approval + bridge combined into single transaction |
| 📍 Custom Recipients | Bridge directly to any valid Stacks/Ethereum address |
| 💵 Fee Calculator | Real-time fee estimation with gas price tracking |
| 📊 Progress Timeline | Visual step-by-step bridge progress indicator |
| 🔔 Notifications | Toast alerts for every transaction state change |
| Feature | Description |
|---|---|
| 💰 Dual Balance View | USDC + USDCx displayed simultaneously |
| 📈 Portfolio Charts | Historical balance visualization with Recharts |
| 🔄 Live Sync | Real-time balance updates across both chains |
| 📋 Transaction History | Complete bridge history with status tracking |
| 🔗 Explorer Links | One-click access to Etherscan & Hiro Explorer |
| Feature | Description |
|---|---|
| 🎓 Guided Onboarding | Interactive tour for first-time users |
| 💾 Preference Persistence | Remembers your last bridge direction & amount |
| ⌨️ Keyboard Shortcuts | Power user shortcuts for common actions |
| ♿ Accessibility | WCAG 2.1 AA compliant with screen reader support |
| 🎨 Reduced Motion | Respects user motion preferences |
| 🌙 Dark Mode | Beautiful dark theme (light mode coming soon) |
| Feature | Description |
|---|---|
| 🛡️ Error Boundaries | Graceful error handling and recovery |
| 📍 Address Validation | Real-time validation for all addresses |
| 🔄 Auto-Refresh | Balances and statuses update automatically |
| 📱 PWA Ready | Installable as a Progressive Web App |
| 🚀 Optimized Build | Code splitting and lazy loading for fast loads |
|
|
# 1️⃣ Clone the repository
git clone https://github.com/emmanuelist/anchor-x.git
# 2️⃣ Navigate to frontend
cd anchor-x/frontend
# 3️⃣ Install dependencies
bun install # or npm install
# 4️⃣ Start development server
bun run dev # or npm run dev🎉 Open http://localhost:8080 and start bridging!
Create a .env file:
# Required
VITE_WALLETCONNECT_PROJECT_ID=your_walletconnect_project_id
# Optional (uses defaults if not provided)
VITE_ETHEREUM_RPC_URL=https://sepolia.infura.io/v3/YOUR_KEY
VITE_STACKS_API_URL=https://api.testnet.hiro.so|
Sepolia ETH |
Sepolia USDC |
Testnet STX |
flowchart TB
subgraph User["👤 User"]
Browser["🌐 Browser"]
end
subgraph Frontend["⚓ AnchorX Frontend"]
direction TB
UI["🎨 React UI Layer"]
State["📦 State Management"]
Hooks["🪝 Custom Hooks"]
Services["⚙️ Bridge Services"]
end
subgraph Wallets["👛 Wallet Providers"]
direction LR
ETHWallet["🦊 MetaMask / WalletConnect"]
STXWallet["👝 Leather / Xverse"]
end
subgraph Ethereum["⟠ Ethereum Network"]
USDC["💵 USDC Token"]
xReserve["🔐 xReserve Contract"]
end
subgraph Circle["🔵 Circle Infrastructure"]
Attestation["📜 Attestation Service"]
end
subgraph Stacks["🟣 Stacks Network"]
USDCx["💎 USDCx Token"]
StacksAttest["✅ Stacks Attestation"]
end
Browser --> UI
UI --> State
State --> Hooks
Hooks --> Services
Services --> ETHWallet
Services --> STXWallet
ETHWallet --> USDC
ETHWallet --> xReserve
STXWallet --> USDCx
xReserve -->|"1. Lock USDC"| Attestation
Attestation -->|"2. Verify"| StacksAttest
StacksAttest -->|"3. Mint USDCx"| USDCx
style Frontend fill:#6366F1,color:#fff
style Circle fill:#00D632,color:#fff
style Ethereum fill:#627EEA,color:#fff
style Stacks fill:#5546FF,color:#fff
┌─────────────────────────────────────────────────────────────────────────┐
│ App.tsx │
│ ┌───────────────────────────────────────────────────────────────────┐ │
│ │ 🛡️ ErrorBoundary │ │
│ │ ┌─────────────────────────────────────────────────────────────┐ │ │
│ │ │ 🔗 AppKitProvider (Web3 Modal) │ │ │
│ │ │ ┌───────────────────────────────────────────────────────┐ │ │ │
│ │ │ │ 📊 QueryClientProvider (TanStack Query) │ │ │ │
│ │ │ │ ┌─────────────────────────────────────────────────┐ │ │ │ │
│ │ │ │ │ 👛 WalletProvider (Custom Context) │ │ │ │ │
│ │ │ │ │ ┌───────────────────────────────────────────┐ │ │ │ │ │
│ │ │ │ │ │ 💬 TooltipProvider + Toasters │ │ │ │ │ │
│ │ │ │ │ │ ┌─────────────────────────────────────┐ │ │ │ │ │ │
│ │ │ │ │ │ │ 🧭 BrowserRouter │ │ │ │ │ │ │
│ │ │ │ │ │ │ ┌───────────────────────────────┐ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ 🎓 OnboardingProvider │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ ┌─────────────────────────┐ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ 📄 Routes │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ├── 🏠 Index │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ├── 🌉 Bridge │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ├── 📊 Dashboard │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ├── 📜 Transactions │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ├── 💸 Transfer │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ├── 📖 HowItWorks │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ └── ❓ FAQ │ │ │ │ │ │ │ │ │
└──┴──┴──┴──┴──┴──┴──┴──┴───────────────────────────────┴──┴──┴──┴──┴──┴──┘
sequenceDiagram
autonumber
participant U as 👤 User
participant A as ⚓ AnchorX
participant E as ⟠ Ethereum
participant X as 🔐 xReserve
participant C as 🔵 Circle
participant S as 🟣 Stacks
U->>A: Enter amount & confirm
A->>E: Check USDC allowance
alt Needs Approval
A->>E: Request USDC approval
E-->>U: Sign approval tx
E-->>A: Approval confirmed
end
A->>X: Call depositToRemote()
X->>E: Lock USDC in contract
E-->>A: Deposit confirmed
Note over X,C: ~5-10 minute attestation window
X->>C: Request attestation
C->>C: Verify deposit
C->>S: Submit attestation
S->>S: Mint USDCx
S-->>A: Mint confirmed
A-->>U: 🎉 Bridge complete!
sequenceDiagram
autonumber
participant U as 👤 User
participant A as ⚓ AnchorX
participant S as 🟣 Stacks
participant C as 🔵 Circle
participant X as 🔐 xReserve
participant E as ⟠ Ethereum
U->>A: Enter amount & confirm
A->>S: Call burn function
S->>S: Burn USDCx tokens
S-->>A: Burn confirmed
Note over S,C: ~5-10 minute attestation window
S->>C: Request withdrawal attestation
C->>C: Verify burn
C->>X: Submit attestation
X->>E: Release USDC
E-->>A: Release confirmed
A-->>U: 🎉 Withdrawal complete!
DEPOSIT PROGRESS
═══════════════════════════════════════════════════════════════
● INITIATED Transaction submitted
│ └─ Tx Hash: 0x1234...abcd
│
● CONFIRMING Waiting for confirmations
│ └─ ████████████░░░░░░░░ 12/20 blocks
│
◐ ATTESTING Circle verification in progress
│ └─ Estimated: ~5 minutes remaining
│
○ MINTING Awaiting USDCx mint on Stacks
│
○ COMPLETE Bridge successful! ✨
═══════════════════════════════════════════════════════════════
Premium hero with live transaction ticker and network status
One-click bridging with transparent fees and real-time progress
|
Dual-chain portfolio view
|
Complete bridge history
|
|
Fully responsive design
|
Multi-wallet support
|
|
Industry-leading attestation protocol by Circle, the issuer of USDC |
Your keys, your crypto. We never have access to your private keys |
Smart contracts audited by leading security firms |
Fully transparent codebase — verify everything yourself |
✅ All wallet connections use WalletConnect v2 / direct provider injection
✅ Transaction simulation before execution
✅ Address validation with checksum verification
✅ Rate limiting and request throttling
✅ No sensitive data stored in local storage
✅ HTTPS only — all API calls are encrypted
✅ Content Security Policy headers
| Contract | Network | Address | Explorer |
|---|---|---|---|
| 🔐 xReserve | Ethereum Sepolia | 0x008888878f94C0d87defdf0B07f46B93C1934442 |
↗ |
| 💵 USDC | Ethereum Sepolia | 0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238 |
↗ |
| 💎 USDCx | Stacks Testnet | ST1F7QA2MDF17S807EPA36TSS8AMEFY4KA9TVGWXT.usdcx |
↗ |
| 🔄 USDCx-v1 | Stacks Testnet | ST1F7QA2MDF17S807EPA36TSS8AMEFY4KA9TVGWXT.usdcx-v1 |
↗ |
| Contract | Network | Address | Explorer |
|---|---|---|---|
| 💵 USDC | Ethereum | 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
↗ |
| 💎 USDCx | Stacks | SP3Y2ZSH8P7D50B0VBTSX11S7XSG24M1VB9YFQA4K.usdcx |
↗ |
const ANCHORX_PROTOCOL = {
// Circle xReserve Configuration
STACKS_DOMAIN_ID: 10003, // Circle domain identifier for Stacks
// Token Configuration
USDC_DECIMALS: 6, // USDC uses 6 decimal places
USDCX_DECIMALS: 6, // USDCx maintains same precision
// Bridge Limits
MIN_BRIDGE_AMOUNT: "1.00", // Minimum 1 USDC per transaction
MAX_BRIDGE_AMOUNT: "1000000.00", // Maximum 1M USDC per transaction
// Timing Estimates
DEPOSIT_TIME_MINUTES: 15, // Average deposit completion
WITHDRAW_TIME_MINUTES: 20, // Average withdrawal completion
// Fee Structure
BRIDGE_FEE_PERCENT: 0.1, // 0.1% bridge fee
MIN_FEE_USD: 0.01, // Minimum fee floor
} as const;|
React 18 |
TypeScript |
Vite 5 |
Tailwind |
Framer Motion |
TanStack Query |
React Hook Form |
|
wagmi Ethereum Hooks |
viem Ethereum Client |
Reown AppKit Wallet Modal |
@stacks/connect Stacks SDK |
Zod Validation |
📦 Full Dependency List
{
"dependencies": {
"@hookform/resolvers": "^3.10.0",
"@radix-ui/react-*": "^1.x",
"@reown/appkit": "^1.8.16",
"@reown/appkit-adapter-wagmi": "^1.8.16",
"@stacks/connect": "^8.2.4",
"@stacks/network": "^7.3.1",
"@stacks/transactions": "^7.3.1",
"@tanstack/react-query": "^5.83.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"date-fns": "^3.6.0",
"framer-motion": "^11.18.2",
"lucide-react": "^0.462.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.61.1",
"react-router-dom": "^6.30.1",
"recharts": "^2.15.4",
"sonner": "^1.7.4",
"tailwind-merge": "^2.6.0",
"viem": "^2.44.4",
"wagmi": "^2.19.5",
"zod": "^3.25.76"
}
}frontend/
├── 📂 public/ # Static assets
│ ├── robots.txt # SEO configuration
│ └── site.webmanifest # PWA manifest
│
├── 📂 src/
│ ├── 📂 assets/ # Images, fonts, icons
│ │
│ ├── 📂 components/
│ │ ├── 📂 layout/ # App shell components
│ │ │ ├── Header.tsx # Navigation header
│ │ │ ├── Footer.tsx # Site footer
│ │ │ └── Layout.tsx # Page wrapper
│ │ │
│ │ ├── 📂 ui/ # 70+ reusable components
│ │ │ ├── GlowCard.tsx # Glowing card effect
│ │ │ ├── BridgeTimeline.tsx # Progress indicator
│ │ │ ├── ChainIcon.tsx # Chain logo display
│ │ │ ├── ParticleField.tsx # Background particles
│ │ │ ├── AnimatedCounter.tsx # Number animations
│ │ │ ├── PreviewModal.tsx # Bridge preview
│ │ │ ├── SuccessModal.tsx # Success celebration
│ │ │ └── ... # + many more
│ │ │
│ │ ├── ErrorBoundary.tsx # Error handling
│ │ ├── NavLink.tsx # Active navigation
│ │ └── OnboardingProvider.tsx # Guided tour
│ │
│ ├── 📂 contexts/
│ │ └── WalletContext.tsx # Dual-chain wallet state
│ │
│ ├── 📂 hooks/
│ │ ├── useBridge.ts # Bridge operations
│ │ ├── useOnboarding.ts # Tour management
│ │ ├── usePreferences.ts # User settings
│ │ ├── usePageMeta.ts # SEO management
│ │ └── useReducedMotion.ts # Accessibility
│ │
│ ├── 📂 lib/
│ │ ├── 📂 appkit/ # Web3 modal config
│ │ │
│ │ ├── 📂 bridge/ # Bridge service layer
│ │ │ ├── deposit.ts # USDC → USDCx
│ │ │ ├── withdraw.ts # USDCx → USDC
│ │ │ ├── encoding.ts # Address encoding
│ │ │ ├── transactionStatus.ts
│ │ │ └── index.ts # Exports
│ │ │
│ │ ├── 📂 constants/ # Config & ABIs
│ │ ├── 📂 ethereum/ # ETH wallet service
│ │ ├── 📂 stacks/ # STX wallet service
│ │ ├── 📂 services/ # External APIs
│ │ └── 📂 utils/ # Helper functions
│ │
│ ├── 📂 pages/
│ │ ├── Index.tsx # 🏠 Landing page
│ │ ├── Bridge.tsx # 🌉 Bridge interface
│ │ ├── Dashboard.tsx # 📊 Portfolio view
│ │ ├── Transactions.tsx # 📜 History
│ │ ├── Transfer.tsx # 💸 Direct send
│ │ ├── HowItWorks.tsx # 📖 Education
│ │ ├── FAQ.tsx # ❓ Support
│ │ └── NotFound.tsx # 404 page
│ │
│ ├── App.tsx # Root component
│ ├── App.css # Global styles
│ ├── index.css # Tailwind imports
│ └── main.tsx # Entry point
│
├── 📄 index.html # HTML template
├── 📄 package.json # Dependencies
├── 📄 tailwind.config.ts # Tailwind config
├── 📄 tsconfig.json # TypeScript config
├── 📄 vite.config.ts # Vite config
└── 📄 README.md # You are here! 📍
|
MetaMask ✅ Full Support |
WalletConnect ✅ 100+ Wallets |
Coinbase ✅ Full Support |
Rainbow ✅ Full Support |
Trust Wallet ✅ Via WC |
|
Leather ✅ Full Support |
Xverse ✅ Full Support |
Other SIP-010 ✅ Compatible |
| Shortcut | Action |
|---|---|
| Ctrl + K | Open command palette |
| Ctrl + B | Go to Bridge page |
| Ctrl + D | Go to Dashboard |
| Ctrl + T | Go to Transactions |
| Esc | Close modals |
| Enter | Confirm actions |
# Run unit tests
bun run test
# Run tests with coverage
bun run test:coverage
# Run e2e tests
bun run test:e2eBridge Flow
- Connect Ethereum wallet
- Connect Stacks wallet
- Check USDC balance displays correctly
- Enter bridge amount
- Verify fee calculation
- Complete approval transaction
- Complete deposit transaction
- Verify progress timeline updates
- Confirm USDCx received on Stacks
Withdraw Flow
- Check USDCx balance displays correctly
- Enter withdrawal amount
- Verify fee calculation
- Complete burn transaction
- Verify progress timeline updates
- Confirm USDC received on Ethereum
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel --prodVITE_WALLETCONNECT_PROJECT_ID=your_production_project_id
|
|
|
We 💜 contributions!
- 🍴 Fork the repository
- 🌿 Create a feature branch
git checkout -b feat/amazing-feature
- 💻 Code your changes
- ✅ Test thoroughly
- 📝 Commit with conventional commits
git commit -m 'feat: add amazing feature' - 🚀 Push to your fork
git push origin feat/amazing-feature
- 🔃 Open a Pull Request
| Type | Description |
|---|---|
feat: |
New features |
fix: |
Bug fixes |
docs: |
Documentation |
style: |
Code style (no logic change) |
refactor: |
Refactoring |
perf: |
Performance |
test: |
Tests |
chore: |
Maintenance |
How long does bridging take?
Deposits typically complete in ~15 minutes. Withdrawals take ~20 minutes. Times may vary based on network congestion.
What are the fees?
AnchorX charges a 0.1% bridge fee (minimum $0.01). You also pay network gas fees on the source chain (ETH for deposits, STX for withdrawals).
Is it safe?
Yes! AnchorX uses Circle's xReserve protocol — the same infrastructure trusted by major institutions. We never have custody of your funds.
What wallets are supported?
Ethereum: MetaMask, WalletConnect (100+ wallets), Coinbase Wallet, Rainbow Stacks: Leather, Xverse, and other SIP-010 compatible wallets
Can I bridge to a different address?
Yes! Toggle "Custom Recipient" in the bridge interface to send USDCx to any valid Stacks address.
What if my transaction is stuck?
Bridge transactions can take up to 30 minutes during high congestion. Check the Transaction History page for real-time status. If stuck longer, reach out on Discord.
This project is licensed under the MIT License — see the LICENSE file for details.
MIT License
Copyright (c) 2026 AnchorX
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software...
|
📚 Documentation |
🛠️ Tools |
💬 Community |
🚰 Faucets |




