- The importance of confirmations
- How confirmations are shown in Circle’s API platform
- What to consider when balancing transaction settlement speed with the risk of a reorganization
Importance of confirmations
Each time a new block is validated in a blockchain network, it indicates a confirmation. Without confirmations, transactions are vulnerable to alteration or reversal through reorgs. A reorg is a rewriting of transaction history which invalidates recently generated blocks. With each additional block confirmation, however, it becomes more difficult for an attacker to invalidate previous blocks.Confirmation number
The confirmation number is the number of times a block must be confirmed before all transactions included in that block are considered final. This allows the block to reach finality and ensures that all transactions included in that block cannot be altered or reversed. The confirmation number varies across different blockchain networks. On Circle’s API platform, a transaction state isCOMPLETED when the confirmation number
has been reached for the specific blockchain network. In your application, you
can choose to use a CONFIRMED state to consider a transaction as valid, though
this means taking on some risk.
Transaction state
On Circle’s API platform, when a transaction is added to a block, it starts in aCONFIRMED state and the wallet balance is updated. The meaning of this varies
for Solana and EVM L2s such as Arbitrum:
- For Solana,
CONFIRMEDmeans that the transaction is included in a block that has been voted on by a supermajority (> 2/3) of the network’s stake. This is known as optimistic confirmation. To this date, a block that has been optimistically confirmed has never been rolled back nor failed to finalize. - For EVM L2s,
CONFIRMEDmeans that the transaction has been processed by the sequencer. This is known as soft finality. Your acceptance of finality completely depends on trusting the sequencer of the L2 chain.
POST request to the /transactions/{id}
endpoint.
Once the confirmation number is reached, the transaction state transitions to
COMPLETED. If subscribed, you will receive a webhook notification of the new
state.
Confirmation numbers for supported chains
Taking into consideration historical performance, the potential for reorgs, and overall network architecture, Circle’s API platform uses specific confirmation numbers for each of its supported chains. This means that all transactions start in aCONFIRMED state and when the confirmation number is reached for a
specific chain, transitions to a COMPLETED state.
The following table showcases the confirmation numbers used by Circle’s API
platform for each supported chain.
These confirmation numbers are based on Circle’s considerations and do not
necessarily reflect the inherent requirements or limits of the blockchain
networks.
| Chain | Confirmation number | Approximate time |
|---|---|---|
| Arbitrum (USDC) | 12 ETH blocks | ~3 minutes |
| Avalanche (USDC, EURC) | 1 | ~2 seconds |
| Base (USDC, EURC) | 12 ETH blocks | ~3 minutes |
| Ethereum (USDC, EURC) | 12 | ~3 minutes |
| Optimism (USDC) | 12 ETH blocks | ~4 minutes |
| Polygon PoS (USDC) | 2 | ~5 seconds |
| Solana (USDC, EURC) | 33 | ~13 seconds |
| Unichain (USDC) | 300 | ~3 minutes |
| Aptos (USDC) | 1 | ~500 ms |
COMPLETED. This process generally takes
around 2 minutes. The chosen confirmation number represents three times the
number of confirmations needed for sufficient transaction finality, based on the
largest reorg observed thus far.
Balancing risk and transaction processing speed
Waiting for multiple confirmed blocks mitigates the risk of a reorg but increases the transaction settlement time. As a developer, you decide how to balance the two in your application. When a transaction state isCONFIRMED on Circle’s API platform, the wallet
balance is updated. You can display this to your user as a pending transaction,
similar to how banks display inbound deposits. Here are a few ways you could
choose to handle transactions in different states:
- Wait for the transaction state to transition to
COMPLETED, which ensures the confirmation number is reached, before allowing your user to withdraw from their wallet balance. There is no risk if you choose to implement this option. - Allow your user to withdraw funds when the transaction state is
CONFIRMED. The trust associated with this option varies by chain:- Solana:
CONFIRMEDmeans that you are trusting the blockchain’s optimistic confirmation prior toCOMPLETED. - EVM L2s:
CONFIRMEDmeans that you are trusting the L2’s sequencer prior to achieving finality on Ethereum, which is indicated byCOMPLETED. - Avalanche: Transactions immediately transition from
CONFIRMEDtoCOMPLETEDas Avalanche supports 1 block finality. - Other EVM L1s: Risks may vary. Ensure you research the blockchain.
- Solana:
COMPLETED. By understanding blockchain confirmations
and the risk of reorgs, you can enhance the security and reliability of your
applications.