DEV Community

David
David

Posted on

How to trace cBridge end to end: pool or mapped token?

cBridge follows the model assigned to your token-and-chain route. You send tokens on the source chain. On a pool route, they enter a source-chain liquidity pool and you receive a payout from a destination-chain pool. On a mapped route, a vault locks the original tokens and a destination contract mints pegged copies. The transfer has worked when the expected token arrives at your destination address.

What decides whether a route uses a pool or token mapping?

The token-and-chain route determines whether the Celer bridge uses xLiquidity, its pool model, or xAsset, its token mapping model. xLiquidity serves routes with liquidity pools for the token on both chains. xAsset serves routes where an original token is represented on another chain by a pegged token. Celer describes these arrangements in its bridging models.

The model belongs to the route, not to a choice you make after sending. The same ticker can use a pool between one pair of chains and lock-and-mint mapping between another pair. Direction matters too: a mapped token moving back to its original chain follows a burn-and-release path.

Consider an illustrative token called T. A transfer from chain A to chain B could draw T from a pool on B, while A to chain C could mint pegged T against originals locked on A. Both wallets might display “T,” but the destination token contracts and the way each token arrived differ. A ticker alone cannot identify the route.

A same-chain swap changes an asset within one network. When you need to move a supported asset across networks and determine whether its destination form comes from a pool or a mapping, the Celer bridge's cBridge handles that cross-chain transfer.

How does an xLiquidity pool transfer work end to end?

An xLiquidity transfer deposits your tokens into a source-chain pool and pays you from a destination-chain pool. The tokens credited to your wallet come from liquidity already available on the destination chain.

  1. You send the token into the liquidity pool on the source chain. Your wallet balance there falls, and the pool receives the deposit.
  2. The State Guardian Network, or SGN, observes the source transaction and signs the transfer. That signature authorizes the corresponding payout on the destination chain.
  3. The destination pool releases tokens to your destination address. The amount reflects the route's bridge rate and fees.

In an illustrative A-to-B transfer of T, you held T in your wallet on A before sending. After settlement, your deposited T sits in the A pool and your wallet holds T paid out of the B pool. No new pegged T needs to be minted for that payout. If the destination pool lacks enough available liquidity, the intended payout may not complete and a refund process may be needed.

How does an xAsset mapped transfer work end to end?

An xAsset transfer locks the original token on its original chain and mints a pegged version on the destination chain. “Pegged” means the new token is mapped to the locked original at a 1:1 rate before fees.

  1. You deposit the original token into OriginalTokenVault, the source-chain contract that holds it while the mapped copy exists.
  2. The State Guardian Network observes the deposit and signs an authorization for the destination action.
  3. PeggedTokenBridge uses that authorization to mint the pegged token and send it to your destination address.

Say T originates on chain A and has a mapped version on chain C; this is illustrative. Before sending, your wallet holds original T on A. After settlement, OriginalTokenVault holds that T and your wallet holds pegged T on C. Your claim on the original is represented by the pegged token. The original has not travelled to C, and the C token was not taken from a liquidity pool.

What token and amount will arrive?

The route tells you both the kind of token you will receive and what can change its amount. A pool route pays the destination chain's available token from its pool. Its bridge rate can move with pool balances, so slippage can change the payout; fees also affect the net amount. Some pool routes use a fixed 1:1 bridge rate, but their fees still matter. Celer explains the rate distinction in its bridge FAQ.

A mapping route delivers a pegged token minted against the locked original. Its mapping is 1:1 before fees, without pool-balance slippage. The token address is the practical difference to inspect: a matching ticker can hide a different contract and a different claim on the original asset.

That distinction matters when you plan to use the token after bridging. An exchange or app may accept one destination token contract but not another bearing the same ticker. Sending a pegged copy to a deposit address that expects a different contract is the wrong move the shared name can invite. Identify the expected destination contract before treating the two tokens as interchangeable.

How do I identify the route and return a pegged token?

A pegged token returns to its original chain by being burned through the mapping route, which releases the original from OriginalTokenVault. You submit the pegged token to PeggedTokenBridge on its chain; the contract burns it, the SGN signs the withdrawal, and the vault releases the original to your address on its chain. Burning changes the outstanding pegged supply while unlocking the corresponding original.

For any planned transfer, identify the source chain, destination chain, source token contract and expected destination token contract. A pool payout points to xLiquidity; an original locked in a vault with a pegged token minted points to xAsset. After sending, use the source and destination transactions to confirm the deposit or lock and the eventual payout or mint. Before committing funds, identify that exact route and destination token so you know what you will own afterward.

What else should I know before sending?

Is cBridge safe to use?

No bridge is risk-free. This one depends on its contracts, the State Guardian Network and the security of the connected chains. Celer documents audits and other safeguards in its security description. Confirm the route and token contracts, and consider a small first transfer when using an unfamiliar asset.

How long does a transfer take?

A transfer usually takes minutes, but source-chain confirmation, SGN processing, destination settlement, congestion and security rate limits can extend the wait. A confirmed source transaction means the first leg succeeded; it does not mean the destination payout or mint has finished. Follow the transfer status and transaction records on both chains.

What fees does the Celer bridge charge?

Costs depend on the route and amount. They can include source-chain gas and bridge fees; a pool route's rate can also change the amount received through slippage. Review the estimated destination amount for the exact route before sending, because the fee alone does not describe the full pool payout.

Can I cancel a transfer after sending?

Once the source transaction is confirmed, you cannot simply cancel that on-chain deposit or lock. A pool transfer that cannot complete may enter a separate refund process, as Celer's refund documentation describes. Confirm whether the source transaction succeeded and what status the transfer reached before taking another action.

Top comments (0)