weroos32

Cross-Chain Swap Finality: When to Credit the Destination

Credit a cross-chain swap only after you have verified the destination transaction at the finality level your application requires. A source-chain confirmation shows that the transfer started; it does not prove the destination asset has arrived.

Model the transfer as two independent legs

A cross-chain swap has a source leg and a destination leg, and your integration should track each separately. The source transaction may lock or burn an asset, while a later operation releases or mints the destination asset; the exact mechanism depends on the route.

Say a treasury needs to move 2,500 USDC from Ethereum to Arbitrum. First, record the source transaction identifier, network, asset contract, and amount in the smallest unit. Then track the route’s destination transaction separately, checking its network, receiving address, token contract, and actual amount received.

Use explicit states such as submitted, source confirmed, destination pending, complete, and failed. The distinction between “source confirmed” and “complete” prevents your ledger from treating an in-flight transfer as available funds.

Set a finality rule for each chain

Your credit rule should require a successful destination transaction and a chain-appropriate finality threshold. “Finality” means the point at which a transaction is considered settled enough that a reorganization is no longer an ordinary expectation; chains expose different signals and confidence levels.

For example, Solana RPC distinguishes processed, confirmed, and finalized; processed data can still be rolled back. Ethereum proof-of-stake uses finalized checkpoints, while an L2 may expose its own confirmation state and separate withdrawal settlement rules. Choose the state that matches your risk: a low-value preview can show an earlier status, but treasury crediting should use the configured settlement threshold.

Your chain registry should map each network to its own finality policy; Biswap supported networks describes the network scope relevant to Biswap, while your policy determines when an observed transfer is mature enough to credit. For a workflow involving Biswap, treat its role as moving and swapping assets across chains; keep the finality decision and accounting record in your integration.

Make crediting idempotent and reconcile exceptions

Make destination crediting idempotent: processing the same event twice must create one ledger credit, not two. A practical key is the destination chain identifier plus transaction hash and log or instruction index; store it with the credited amount and the source transfer identifier.

Consider the edge case where the source succeeds but the destination transaction is delayed or fails. Keep the transfer pending, poll or consume chain events with backoff, and raise an operational exception after your route-specific timeout. Do not resend the source transfer merely because the destination has not appeared: first reconcile whether the original route is still executing.

Before credit, verify the destination asset by contract or mint address, not ticker alone, and use the actual received amount rather than the source amount. Swapping can change the quantity, and two tokens can share a symbol. If an event is missing, inconsistent, or below the required finality state, hold the credit for reconciliation instead of guessing.

In short, treat source confirmation as evidence of progress and destination finality as the credit gate. Per-chain thresholds, identity checks, and idempotent ledger writes let your integration show progress without booking funds that may still change.