A command-line application that bridges WBTC between different chains using official bridge contracts, ensuring 1:1 token mapping through canonical bridge paths.
#NOTE: This project is abandoned because it turns out the upside for arbitraging wbtc is low given the logisical difficulties in moving wbtc across chains in a 1-1 way. This is on the assumption is that the actual arbitage will happen using wbtc from aave or other lending protocols and the settlement to happen by using 1-1 bridging across chains based on their native bridge with eth chain.
Bridge path: Optimism → Ethereum → Polygon
- Optimism WBTC:
0x68f180fcce6836688e9084f035309e29bf0a2095
- Ethereum WBTC:
0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599
- Polygon WBTC:
0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6
Estimated time: 1.5-2.5 hours
- Optimism to Ethereum: ~1-2 hours
- Ethereum to Polygon: ~30 minutes
Bridge path: Arbitrum → Ethereum → zkSync
- Arbitrum WBTC:
0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f
- Ethereum WBTC:
0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599
- zkSync WBTC:
0xbbeb516fb02a01611cbbe0453fe3c580d7281011
Estimated time: ~1.5 days
- Arbitrum to Ethereum: ~1 day
- Ethereum to zkSync: ~30 minutes
- Node.js v16 or higher
- yarn or npm
- A wallet with:
- WBTC on source chain
- Native tokens for gas on all chains in the path
- Clone the repository
git clone <repository-url>
cd wbtc_bridge_app
- Install dependencies
npm install
- Configure environment variables
cp .env.example .env
Edit .env
and add your:
- Private key
- RPC endpoints (recommended: use your own Alchemy/Infura endpoints)
To bridge WBTC:
npm run bridge <amount>
Example:
npm run bridge 0.1
This will:
- Check if you have sufficient WBTC balance on the source chain
- Execute the withdrawal to Ethereum
- Bridge from Ethereum to the destination chain
- Monitor and confirm the completion of both transactions
The application will:
- Display transaction hashes for tracking
- Show real-time status updates
- Check balances before and after the bridge
- Wait for confirmation on all networks
You'll need:
- Native tokens on source chain for withdrawal
- ETH on Ethereum for:
- Finalizing L2 withdrawals
- Approving WBTC for destination bridge
- Depositing to destination chain
- Native tokens on destination chain for future transactions
This application uses only official bridge contracts:
-
For Optimism:
- Optimism Bridge for L2→L1
- Polygon PoS Bridge for L1→L2
-
For Arbitrum (Coming Soon):
- Arbitrum Gateway for L2→L1
- zkSync Portal for L1→L2
This ensures that WBTC maintains its canonical form across chains through official bridge paths.
The application includes checks for:
- Insufficient balances
- Failed transactions
- Bridge contract errors
- Network connectivity issues
- Chain-specific verifications (e.g., Polygon checkpoints)
- Keep your private key secure and never share it
- Ensure sufficient gas tokens on all networks
- Double-check all transaction amounts before confirming
- The application automatically monitors and waits for confirmations
- Different bridge paths have different waiting times
ISC