One-click swap, bridge & stake across EVM chains via U2U.
A cross-chain bridge enabling seamless token swaps between U2U Solaris Mainnet and Sepolia Testnet, built for the VietBUIDL Hackathon on HackQuest Demo.
Pocket Protocol is a cross-chain bridge application that enables users to swap tokens between U2U Solaris Mainnet and Sepolia Testnet. The application provides a user-friendly interface for cross-chain token transfers with real-time transaction tracking and automated relayer processing.
Native Token: U2U
Explorer: https://u2uscan.xyz
Bridge Contract: 0x20c452438968C942729D70035fF2dD86481F6EaB
Native Token: ETH
Explorer: https://sepolia.etherscan.io
Bridge Contract: 0xe564df234366234b279c9a5d547c94AA4a5C08F3
WETH Contract: 0x3BfA22D8b5fD0f63E96425717BC58910F4F7DD6D
User sends U2U to relayer address on U2U Solaris
Relayer receives U2U on U2U Solaris Mainnet
Relayer sends equivalent ETH to user on Sepolia Testnet
User receives ETH in their Sepolia wallet
User sends ETH to relayer address on Sepolia
Relayer receives ETH on Sepolia Testnet
Relayer sends equivalent U2U to user on U2U Solaris
User receives U2U in their U2U wallet
ETH locked in Sepolia bridge contract
Relayer mints WETH on U2U Solaris
User receives WETH in their U2U wallet
Swap Card: Main interface for cross-chain token swaps
Bridge Card: Interface for ETH to WETH bridging
Transaction Modal: Clean, modal-based progress tracking
Relayer Liquidity: Real-time relayer balance monitoring
U2UBridge.sol: Bridge contract deployed on U2U Solaris
SepoliaBridge.sol: Bridge contract deployed on Sepolia
WETH.sol: Wrapped ETH token contract on U2U Solaris
Relayer API: Processes cross-chain transactions
Price API: Provides swap quotes and exchange rates
Status API: Monitors relayer health and liquidity
The relayer operates as a private-key-controlled liquidity hub that:
Maintains balances on both chains
Processes cross-chain transfers automatically
Handles transaction verification and confirmation
Provides real-time status updates
Node.js 18+
MetaMask or compatible wallet
Testnet tokens (U2U for U2U Solaris, ETH for Sepolia)
# Clone the repository
git clone https://github.com/manovHacksaw/pocket-protocol
cd pocket-protocol
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env.local
# Add your configuration to .env.local
# Start development server
npm run dev
Connect Wallet: Connect your MetaMask wallet
Select Network: Switch to U2U Solaris or Sepolia
Choose Operation:
Use Swap Card for U2U ↔ ETH swaps
Use Bridge Card for ETH → WETH bridging
Enter Amount: Specify the amount to transfer
Confirm Transaction: Sign the transaction in your wallet
Track Progress: Monitor transaction progress in the modal
Receive Tokens: Tokens will appear in your target wallet
Clean Modal Interface: Real-time transaction progress tracking
Chain Validation: Automatic network switching prompts
Liquidity Checking: Warns if relayer has insufficient funds
Transaction Verification: Waits for blockchain confirmation
Explorer Links: Direct links to view transactions on block explorers
Wagmi Integration: Web3 wallet connection and transaction handling
Viem: Low-level blockchain interaction
Next.js 15: Modern React framework with App Router
TypeScript: Type-safe development
Tailwind CSS: Modern UI styling
U2U Solaris: This is a mainnet network
Sepolia: This is a testnet network
Do not use real funds for this project unless officially provided by U2U for testing
This is a hackathon demo - funds are not protected
The relayer is centralized for demonstration purposes
Not production-ready - use at your own risk
Single relayer wallet (centralized)
No multi-signature protection
Limited to testnet operations
No insurance or fund protection
Multi-signature Relayer: Implement multi-sig wallet for enhanced security
Decentralized Relayer Network: Multiple relayer nodes for redundancy
On-chain Liquidity Pools: Replace single-key relayer with decentralized pools
Real Mainnet Support: Support for real ETH and U2U transfers once audited
Additional Chains: Expand to more blockchain networks
Wrapped Token Support: Support for additional wrapped tokens
Smart Contract Audits: Professional security audits
Time-locked Operations: Implement time delays for large transfers
Rate Limiting: Prevent abuse and ensure fair usage
Emergency Pause: Circuit breakers for emergency situations
Next.js 15 with App Router
TypeScript for type safety
Tailwind CSS for styling
Wagmi for Web3 integration
Viem for blockchain interactions
Solidity for contract development
Hardhat for development and testing
OpenZeppelin for security standards
Node.js API server
Express.js for API endpoints
Web3.js for blockchain interactions
Contract | Network | Address | Explorer |
---|---|---|---|
U2UBridge | U2U Solaris |
| |
SepoliaBridge | Sepolia |
| |
WETH | U2U Solaris |
|
We welcome contributions! Please:
Fork the repository
Create a feature branch
Make your changes
Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Hackathon: VietBUIDL Hackathon on HackQuest Demo
Project: Pocket Protocol Cross-Chain Bridge
Built with ❤️ for the U2U and Ethereum communities
⚠️ Disclaimer: This is a hackathon demonstration project. Do not use real funds unless officially provided for testing. The relayer system is centralized and not suitable for production use.
None