Skip to main content
Crypto Readout

Crypto markets, protocols and policy

What Should a Dapp Check Before Cross-Chain Deposits?

A checklist for adding cross-chain deposits to a dapp: verify routes, token decimals, destination amounts, failure handling and confirmation thresholds before launch.

By Crypto Readout Editorial4 min read#cd6182

What Should a Dapp Check Before Cross-Chain Deposits?

Before adding cross-chain deposits to a dapp, verify each route, the destination amount, failure handling and the confirmation rule before crediting a user. A deposit starts on a source chain, moves through a bridge, then arrives as an asset on the destination chain. The dapp must recognize that arrival and decide when it is safe to update the user’s balance.

cBridge supports transfers between networks through pooled liquidity or token mappings, so the route affects how an asset arrives. For more on how cBridge routes transfers and what happens during one, see cbridge explained.

What belongs on the pre-launch checklist?

A useful pre-launch checklist covers five things: supported routes, token contracts and decimals, received amount, failure and refund handling, and finality threshold. Record the expected values and behavior for every route the dapp will accept.

  • Supported routes: List every source-to-destination pair the dapp will accept, such as Ethereum to Polygon, and name the supported asset on each path. Routes can use different bridge mechanisms, including pooled liquidity, xLiquidity or token mappings. A route is ready when the dapp can identify its source, destination and asset and can reject a pair it has not configured.
  • Token contracts and decimals: Pin the exact token contract address on each chain, then record its decimals. A familiar ticker is not enough to identify an asset across networks. The decimals determine how the raw integer amount in an event becomes a displayed token amount. Test that conversion for every token the dapp accepts.
  • Received amount: Read the amount from the destination-side event and scale it using that destination token’s decimals. Credit that received amount after the dapp’s confirmation threshold, never the source amount. Fees and slippage can make the two amounts differ. For instance, if a user sends 100 units and the destination event reports 98.7 units, the credited deposit is 98.7.
  • Failure and refund handling: Give the user a pending state while the transfer is in progress. If it fails, show the transfer status and point the user to the bridge’s refund flow. A source-side transaction can succeed while the destination transfer still needs attention, so keep those stages distinct in the interface.
  • Finality threshold: Set the number of destination-chain confirmations the dapp requires before changing the available balance. Apply the same rule consistently to the route and asset, then test that the balance stays pending until the threshold is met. The user should see when the deposit is pending and when it becomes available.

How should the dapp credit a bridged deposit?

The dapp should credit a deposit from the destination event only after its own confirmation threshold is met. First, track the transfer while it is pending. Then read the destination event, match its token contract to the configured asset, convert the raw amount using that token’s decimals, and wait for the required confirmations. Finally, update the user’s balance with the amount received.

cBridge exposes quotes and transfer status through its SDK and API, which can help the dapp present route pricing and progress. Keep the quote separate from accounting: the quote describes an expected transfer, while the destination event records what arrived. MessageBus lets a contract on one chain trigger a call on another chain; when using it, keep that cross-chain call’s result tied to the same destination-side checks before crediting funds.

Should a dapp use a bridge widget or build its own integration?

A dapp should use a widget when it needs a ready-made transfer interface and its supported routes fit the widget’s options. Build an integration when the dapp needs its own route selection, status display or deposit accounting flow. In either case, keep the same checks: recognized routes and token contracts, destination-reported amounts, a visible pending state, and a defined confirmation threshold.

How can cross-chain deposits be tested on testnets?

Test each configured source-to-destination pair on testnets before launch. Confirm that the dapp recognizes the destination token contract, scales the event amount correctly, and leaves the balance pending until the chosen confirmation count is reached. Also exercise a failed transfer and verify that the interface shows its status and directs the user to the bridge refund flow. The checklist is ready to run when the expected route, event amount, status, refund path and balance change can each be checked for every accepted pair.