Overview
The Deposit Address system enables users to initiate cross-chain transfers by simply sending tokens to a deterministic address. This is particularly powerful for CEX withdrawals and wallet transfers where users cannot interact with smart contracts directly.Users only need to complete two steps: get a deposit address and send tokens. Everything else happens automatically.
How It Works
User Flow
Timeline
- Deposit detection: ~30-60 seconds (backend polling)
- Contract deployment: ~15 seconds (first time only)
- Intent creation: ~15 seconds
- Solver fulfillment: ~30-120 seconds
- Total: ~2-4 minutes end-to-end
Architecture
Factory Pattern
EachDepositFactory represents a specific bridge route with hardcoded parameters:
Deterministic Addresses (CREATE2)
Deposit addresses are computed deterministically using CREATE2:- Address is computed before deployment
- Same inputs always produce the same address
- Users can send funds before contract deployment
- Deployment happens lazily on first use
BaseDepositAddress Contract
All deposit address implementations inherit fromBaseDepositAddress:
Example: USDC to Solana
TheDepositAddress_USDCTransfer_Solana contract shows how deposit addresses work for Solana destinations:
Backend Orchestration
The backend system monitors deposit addresses and triggers contract operations:Detection Loop
Handling Deposits
Key Features
CEX Compatible
Users can withdraw directly from centralized exchanges without:- Installing wallet extensions
- Approving transactions
- Paying gas fees
- Understanding blockchain complexity
Permissionless
Anyone can trigger deployment and intent creation:Gas Efficient
- Minimal proxy pattern: Each deposit address is a lightweight proxy (~200 gas)
- Lazy deployment: Contracts only deployed when first used
- CREATE2: No storage of addresses, computed on-demand
Cross-VM Support
Deposit addresses work for any destination chain:Security Considerations
Reentrancy Protection
Refund Mechanism
If an intent cannot be fulfilled, funds are refunded to thedepositor:
What happens if I send the wrong token?
What happens if I send the wrong token?
The backend only monitors for the configured source token (e.g., USDC). If you send a different token:
- No intent will be created automatically
- Funds remain in the deposit address
- You can manually recover them by interacting with the contract
Can I reuse the same deposit address?
Can I reuse the same deposit address?
Yes! The same deposit address can be used multiple times. Each deposit triggers a new intent creation. The backend monitors for balance increases and creates intents accordingly.
What if the contract isn't deployed yet?
What if the contract isn't deployed yet?
You can still send funds! The address is deterministic via CREATE2, so:
- Send funds to the predicted address
- Backend detects the balance increase
- Backend deploys the contract (if not already deployed)
- Backend calls
createIntent()to process the funds
How long does it take?
How long does it take?
Typical timeline:
- Deposit detection: 30-60 seconds (polling interval)
- Contract deployment: 15 seconds (first time only)
- Intent creation: 15 seconds
- Solver fulfillment: 30-120 seconds
- Total: 2-4 minutes end-to-end
Next Steps
Cross-VM Support
Learn how address conversion works across different VMs
Security Model
Understand vault security and executor safety checks