cBridge Limit Parameters

There are certain rules limiting on source and destination chains for security purposes. When transferring assets through cBridge, it's essential to check these limit parameters beforehand.

Source Chain

1. minSend/maxSend

The sending amount range is (minSend, maxSend], for Pool-based transfer, you can get the minSendarrow-up-right/minMaxarrow-up-right on source chain Bridge contractarrow-up-right, the address is the token address on source chain.

The screenshot is an example to get the USDC minSend Value on Ethereum.

Example of getting the USDC minSend Value on Ethereum

Note if the transfer token is ETH, use the WETH token address as the query key.

2. pool cap

The pool cap signifies the maximum volume allowed in this pool. Once the pool cap of the source chain is reached, transfers of the token from this chain are temporarily suspended until the volume decreases below the cap.

The sending amount should be matched the rule of sending amount + current volume <= pool cap

To check pool cap by handling the error in estimateAmt api when you quote the transfer.

The error code

Error Message:

You can transfer up to {remainning_amount} {token_symbol} at this moment. You may reduce your transfer amount. the remainning_amount = pool - current volume

circle-info

(Aside) The pool cap limit value can be read from the inbound_lmt field in the configurationarrow-up-right file.

Destination Chain

1. Big amount delay

If the sending amount is greater than an on-chain threshold, the transaction might be delayed for a while due to security reasons. You can retrieve these parameters from the destination chain.

delayThresholds: https://github.com/celer-network/sgn-v2-contracts/blob/4d742f6c337f06777947a73accd9f78239de92ee/contracts/safeguard/DelayedTransfer.sol#L15C40-L15C55arrow-up-right

delayPeriod: https://github.com/celer-network/sgn-v2-contracts/blob/4d742f6c337f06777947a73accd9f78239de92ee/contracts/safeguard/DelayedTransfer.sol#L16C20-L16C31arrow-up-right indicates the transaction delay time in second.

2. Epoch volume cap

The epoch volume cap restricts the amount of volume that can be transferred on the destination chain within a specific time frame.

Example code of calculating the accumulated volume

You can obtain the epochVolumeCaps , lastOpTimestamps, epochLength and corresponding token epochVolumes from the VolumeControlarrow-up-right Contract, which has been implemented by the Bridge Contract. The accumulated volume in this period must be lower than the value specified by the "epochVolumeCaps".

Example of getting epochVolumeCaps from Ethereum pool.

Last updated