Cross-Chain Bridging

Bridge USDC across different chains

By using the Cross-chain bridging endpoint, you can seamlessly bridge user's USDC across chains.

Core Concept

  • Three Contract Interactions:
    Bridging USDC requires three smart contract interactions. The first two are initiated by the source wallet on the source chain, while the final interaction is completed by the destination wallet on the destination chain.

  • Transaction Fees:
    There are three transaction fees incurred throughout the bridging process.

  • Settlement Time:
    Settlement times vary depending on the blockchain networks involved.

  • Bridging Rate:
    The USDC bridging rate is always 1:1, ensuring no loss in value during the transfer.

Available Chains

  • Ethereum Mainnet
  • Polygon Mainnet

Please reach out to support if you need additional access

Implementations

Example: Bridging from Ethereum to Polygon

Request

curl --request POST \
     --url https://sandbox.hifibridge.com/v2/wallets/bridges \
     --header 'accept: application/json' \
     --header 'authorization: Bearer zpka_123456' \
     --header 'content-type: application/json' \
     --data '
{
  "source": {
    "chain": "POLYGON",
    "currency": "usdc",
    "userId": "a3ba4ca9-632b-4142-8441-7a8bcd3641b8"
  },
  "destination": {
    "chain": "ETHEREUM",
    "currency": "usdc",
    "userId": "aa3b48e8-f659-4970-9313-a70cded5fcce"
  },
  "requestId": "7c016912-e7a9-46fe-aba3-2569c0f0e93e",
  "amount": 100
}
'

Response

{
  "transferType": "BRIDGE_ASSET",
  "transferDetails": {
    "id": "5e87372e-b5dc-4735-9bc3-b4fde3a0a398",
    "requestId": "7c016912-e7a9-46fe-aba3-2569c0f0e93e",
    "sourceUserId": "a3ba4ca9-632b-4142-8441-7a8bcd3641b8",
    "destinationUserId": "aa3b48e8-f659-4970-9313-a70cded5fcce",
    "sourceChain": "POLYGON_MAINNET",
    "destinationChain": "ETHEREUM_MAINNET",
    "sourceWalletAddress": "0xb1ec8f89efd7363a1b939bfe545d2fca01bb7381",
    "destinationWalletAddress": "0x0865F3F871FbB227D52abEFdBEa9Af549Def664d",
    "amount": 100,
    "currency": "usdc",
    "status": "CREATED",
    "createdAt": "2024-10-15T19:51:11.295724+00:00",
    "updatedAt": "2024-10-15T19:55:32.448+00:00",
    "transactionHash": {},
    "failedReason": null
  }
}

Transaction Hash

After the full bridging process is complete, you can expect to see the following three transaction hashes under transactionHash:

  • APPROVE_TO_TOKEN_MESSENGER
  • BURN_USDC_ON_SOURCE_CHAIN
  • RECEIVE_MESSAGE_AND_MINT