Version 2 (V2)
V2 represents a major upgrade to the CCTP protocol with significant new features and enhancements.Major Features
Fee Support
Fee Support
V2 introduces a flexible fee system for cross-chain transfers:
- Protocol fees configurable via
minFeeparameter - Fees paid in the same token being transferred
- Separate
feeRecipientrole receives collected fees minFeeControllerrole for managing fee structure- Dynamic fee calculation based on transfer amount
- Fee validation during deposit operations
getMinFeeAmount(amount): Calculate minimum required feesetMinFee(newMinFee): Update minimum fee percentagesetFeeRecipient(newFeeRecipient): Update fee recipient
Hook Execution
Hook Execution
Execute custom logic on the destination chain after minting:
depositForBurnWithHook()function withhookDataparameter- Enables complex cross-chain workflows
- Hook data passed through message and executed after mint
- Support for DeFi integrations, automatic swaps, and more
- Flexible hook data encoding for custom use cases
- Automatic token swaps after receiving USDC
- Depositing into lending protocols
- Multi-step cross-chain operations
- Integration with existing DeFi strategies
Finality Thresholds
Finality Thresholds
Configurable finality levels for different security/speed trade-offs:
- Finalized (2000+): Full block finality, highest security
- Confirmed (1000-1999): Strong confirmation, balanced approach
- Unfinalized (500-999): Faster execution, requires fees
minFinalityThreshold: Sender’s requested finality levelfinalityThresholdExecuted: Actual finality at attestation time
- Faster transfers for time-sensitive applications
- Flexibility to choose security vs. speed
- Fee incentives for accepting lower finality
Denylist
Denylist
Address denylist functionality for regulatory compliance:
Denylistablecontract with denylist management- Separate
denylisterrole for operational flexibility - Checks both
msg.senderandtx.origin - Prevents denylisted addresses from initiating transfers
denylist(account): Add address to denylistunDenylist(account): Remove address from denylistisDenylisted(account): Check denylist statusupdateDenylister(newDenylister): Update denylister role
Denylisted(address indexed account)UnDenylisted(address indexed account)DenylisterChanged(address indexed oldDenylister, address indexed newDenylister)
CREATE2 Deployment
CREATE2 Deployment
Deterministic contract addresses across chains:
Create2Factoryfor deterministic deployments- Same contract addresses on all chains
- Simplified integration and configuration
- Predictable address calculation before deployment
- Create2Factory contract with owner controls
- Implementation contracts deployed via CREATE2
- Proxy contracts with deterministic addresses
- Salt-based addressing scheme
- Easier multi-chain integration
- Reduced configuration complexity
- Single address for all chains
- Advance address reservation
Enhanced Message Format
V2 uses an updated message format (version 1) with additional fields: New fields:destinationCaller: Authorized caller on destination (V1 had separate function)minFinalityThreshold: Requested finality levelfinalityThresholdExecuted: Actual finality at executionmaxFee: Maximum fee sender willing to payfeeExecuted: Actual fee chargedexpirationBlock: Optional message expirationhookData: Optional data for hook execution
Interface Changes
TokenMessengerV2
TokenMessengerV2
New/Modified functions:
depositForBurn(): AddeddestinationCaller,maxFee,minFinalityThresholdparametersdepositForBurnWithHook(): New function withhookDataparameterhandleReceiveUnfinalizedMessage(): New handler for unfinalized messageshandleReceiveFinalizedMessage(): Separate handler for finalized messagesgetMinFeeAmount(): Calculate minimum fee for an amount
depositForBurnWithCaller(): Unified intodepositForBurnwithdestinationCallerparam
MessageTransmitterV2
MessageTransmitterV2
New/Modified functions:
sendMessage(): AddeddestinationCallerandminFinalityThresholdparameters- Message format version changed from 0 to 1
- Destination caller validation
- Finality threshold checks
- Message version validation
TokenMinterV2
TokenMinterV2
Fee-aware minting:
mint(): Now handles fee deduction- Separate minting for recipient and fee recipient
- Fee validation and calculation
Deployment Process
V2 introduces a multi-step deployment process:- Deploy Create2Factory: One-time factory deployment
- Deploy Implementation Contracts: MessageTransmitterV2, TokenMessengerV2, TokenMinterV2
- Deploy Proxy Contracts: Using CREATE2 for deterministic addresses
- Setup Remote Resources: Configure cross-chain connections
- Key Rotation (Mainnet only): Transfer ownership to production keys
Migration Considerations
Key differences:- Different message versions (0 vs 1)
- Incompatible message formats
- Different function signatures
- Additional parameters required
- Both versions can coexist on the same chain
- Plan phased migration for existing integrations
- Update client code to support V2 message format
- Test thoroughly on testnets before production migration
Version 1 (V1)
Initial Release Features
Core Burn-and-Mint Functionality
Core Burn-and-Mint Functionality
V1 established the foundational CCTP protocol:
TokenMessenger: Manages deposits and mintingMessageTransmitter: Handles cross-chain message passingTokenMinter: Controls token minting and burning- Burn tokens on source chain
- Attestation service signing
- Mint tokens on destination chain
Message Format Version 0
Message Format Version 0
Initial message format with essential fields:
Role-Based Access Control
Role-Based Access Control
Secure administrative role system:
- Owner: Full administrative control with two-step transfer
- Pauser: Emergency pause/unpause capability
- Rescuer: Rescue accidentally sent tokens
- Attester Manager: Manage attesters and signature threshold
- Token Controller: Manage token minting permissions
Multi-Signature Attestation
Multi-Signature Attestation
Decentralized attestation mechanism:
- Multiple attester nodes operated by Circle
- Threshold signature requirement (e.g., 2-of-3)
- Attester enable/disable functionality
- Configurable signature threshold
- Replay protection via nonce tracking
Pausability
Pausability
Emergency stop mechanism:
- Pauser role can pause contract operations
- Protects against attacks or bugs
- Affects all state-changing functions
- View functions remain operational
- Quick resume capability via unpause
Token Rescue
Token Rescue
Protect user funds:
- Rescuer role can withdraw accidentally sent tokens
- Prevents permanent loss of funds
- Separate from owner role for security
- Cannot rescue USDC (only accidentally sent tokens)
V1 Functions
TokenMessenger:depositForBurn(): Basic burn and transferdepositForBurnWithCaller(): Burn with restricted destination callerhandleReceiveMessage(): Process incoming messages and mintaddRemoteTokenMessenger(): Register remote chainremoveRemoteTokenMessenger(): Unregister remote chain
sendMessage(): Send cross-chain messagereceiveMessage(): Receive and validate messageenableAttester(): Add new attesterdisableAttester(): Remove attestersetSignatureThreshold(): Update signature requirement
mint(): Mint tokens to recipientburn(): Burn tokens from addressaddLocalTokenMessenger(): Register local messengersetMaxBurnAmountPerMessage(): Set burn limits
Upgrade Path
For projects looking to upgrade from V1 to V2:- Assess V2 features: Determine which V2 features benefit your use case
- Test on testnets: Thoroughly test V2 integration on testnets
- Update contracts: Modify integration contracts for V2 message format
- Update client code: Update frontend/backend to use V2 functions
- Deploy to mainnet: Deploy V2 integration after thorough testing
- Gradual migration: Consider supporting both V1 and V2 during transition
Both V1 and V2 contracts can operate simultaneously on the same chain, allowing for gradual migration strategies.
Additional Resources
Deployment Guide
Deploy V1 or V2 contracts
FAQ
Version comparison and feature questions