Key Features
- Secure Cross-Chain Bridging: Bridges tokens across multiple EVM-compatible chains using Vincent Wallets
- Native and ERC-20 Token Support: Supports both native tokens (ETH, MATIC, etc.) and ERC-20 tokens
- Automatic Quote Fetching: Retrieves real-time quotes from deBridge API for accurate fee estimation
- Multi-Chain Support: Works across Ethereum, Base, Arbitrum, Optimism, Polygon, BSC, and Avalanche
How It Works
The deBridge Ability is built using the Vincent Ability SDK and operates in two phases:1
Precheck Phase
Validates all prerequisites for the bridge operation:
- Validates source and destination chain IDs and token addresses
- Ensures source and destination chains are different
- Verifies the user has sufficient balance of the source token
- Checks token allowance for ERC-20 tokens (if needed)
- Fetches quote from deBridge API with estimated fees and execution time
- Returns bridge details including estimated destination amount and fees
2
Execution Phase
Executes the cross-chain bridge transaction:
- Verifies token allowance for ERC-20 tokens (if needed)
- Retrieves transaction data from deBridge API
- Signs and submits the bridge transaction to the source chain
- Returns transaction hash, bridge information, and order ID for tracking
Getting Started
Depending on your role in the Vincent Ecosystem, you’ll be interacting with this Ability in different ways. Click on the link below that matches your role to see how to get started:- Vincent App Developers: If you’re building a Vincent App that needs to bridge tokens across chains, go here.
- Vincent App Delegatees: If you’re executing this ability on behalf of Vincent App Users, go here.
Adding the Ability to your Vincent App
If you want to enable your App Delegatees to bridge tokens across chains on behalf of your Vincent App Users, you can add this Ability to your App. Adding Abilities to your Vincent App is done using the Vincent App Dashboard. Visit the Create Vincent App guide to learn more about how to add Abilities to your App during creation, or check out the Updating Your App guide to learn how to add Abilities to an existing App.Executing the Ability as a Vincent App Delegatee
Before executing deBridge operations, the following conditions must be met. You can use the Ability’sprecheck
function to check if these conditions are met, or you can check them manually.
- Native/ERC20 Token Balance: The Vincent App User’s Vincent Wallet must have sufficient balance of the source token to cover the bridge amount plus any protocol fees.
- Gas Balance: The Vincent Wallet must have sufficient native tokens on the source chain to pay for the bridge transaction gas fees.
- ERC-20 Token Approval: For ERC-20 token transfers, the Vincent App User’s Vincent Wallet must have approved the deBridge contract to spend the source token.
To learn more about executing Vincent Abilities, see the Executing Abilities guide.
If your Vincent App has enabled the ERC20 Approval Ability, you can use it to handle submitting the approval transaction using the Vincent Wallet.
Executing the precheck
Function
This Ability’s precheck
function validates all prerequisites for executing a cross-chain bridge operation and provides quote information.
- Parameters
- Implementation
- Response
Before executing the
precheck
function, you’ll need to provide the following parameters for the bridge operation:Executing the execute
Function
This Ability’s execute
function performs the actual cross-chain bridge transaction.
- Parameters
- Implementation
- Response
The
execute
function expects the same parameters as the precheck
function:Supported Networks
The deBridge Ability supports bridging between the following networks:Network | Chain ID |
---|---|
Ethereum | 1 |
Base | 8453 |
Arbitrum | 42161 |
Optimism | 10 |
Polygon | 137 |
BSC | 56 |
Avalanche | 43114 |
Important Considerations
Native Token Addresses
Native Token Addresses
When bridging native tokens (ETH, MATIC, etc.), use the zero address:
0x0000000000000000000000000000000000000000
Amount Format
Amount Format
The
amount
parameter must be specified in the token’s smallest unit:- For ETH: Use wei (
1
ETH =1000000000000000000
wei) - For USDC: Use micro-units (
1
USDC =1000000
micro-USDC) - For tokens with 18 decimals: Multiply by
10^18
Cross-Chain Execution Time
Cross-Chain Execution Time
Bridge operations are not instantaneous. The
estimatedExecutionTime
from the precheck provides an estimate, but actual times can vary based on network congestion and the specific token pair.Order Tracking
Order Tracking
The
orderId
returned from successful executions can be used to track the bridge status through deBridge’s tracking interface or API.Fees
Fees
Bridge operations include protocol fees that are automatically deducted from the source amount. The precheck response provides fee estimates, but final fees may vary slightly.
Error Handling
Common Failure Scenarios
Common Failure Scenarios
- Invalid Chain IDs: Source or destination chain not supported by deBridge
- Insufficient Balance: The Vincent App User’s Vincent Wallet doesn’t have enough source tokens
- Missing Approval: For ERC-20 tokens, insufficient allowance for deBridge contract
- Same Chain: Source and destination chains cannot be the same
- API Issues: deBridge API temporarily unavailable or returning errors
- Gas Issues: Insufficient native tokens for transaction gas fees