What’s New in V2
Version 2 of the EVM CCTP Contracts introduces significant enhancements to the Cross-Chain Transfer Protocol while maintaining backward compatibility in the core message transmission architecture. V2 focuses on fee mechanisms, security features, and execution flexibility.Key Improvements Over V1
Fee Mechanism
Support for destination domain fees with configurable minimum fees and fee recipients
Finality Thresholds
Messages can specify minimum finality requirements (500, 1000, or 2000) for flexible security/speed tradeoffs
Hook Execution
Optional
hookData parameter enables custom logic execution on the destination domainDenylist Support
Protocol-level denylist functionality to prevent malicious actors from using the system
Architectural Changes
Contract Structure
V2 introduces a modular architecture with base contracts:Proxy Pattern
V2 contracts use the proxy pattern for upgradeability:- Implementation Contracts: Contain all business logic
- Proxy Contracts: Deployed via CREATE2 for deterministic addresses across chains
- Create2Factory: Deploys all proxies to ensure consistent addresses
src/v2/Create2Factory.sol
New Message Format
V2 introduces an enhanced burn message format that includes:- maxFee: Maximum fee willing to pay on destination domain
- hookData: Optional data for hook execution
- expirationBlock: Message expiration (optional)
src/messages/v2/BurnMessageV2.sol
Fee Mechanism
How Fees Work
- Source Domain: User specifies
maxFeeindepositForBurn() - Minimum Fee Validation: Contract validates
maxFee >= minFeeAmount - Destination Domain: Actual fee is determined by relayer/broadcaster
- Fee Collection: Fees are minted to the
feeRecipientaddress - Recipient Amount: User receives
amount - fee
Fee Calculation
MIN_FEE_MULTIPLIER = 10,000,000(enables 1/1000 basis point precision)minFeeis configurable by theminFeeController
minFee = 5000 (0.05%):
src/v2/BaseTokenMessenger.sol:314-319
Finality Thresholds
V2 introduces three levels of finality:Finalized (2000)
Finalized (2000)
Maximum Security: Messages attested at finalized threshold provide the highest security guarantees. No fees are charged for finalized messages.
- Use for high-value transfers
- Longer attestation wait time
- Zero fee requirement
Confirmed (1000)
Confirmed (1000)
Balanced: Confirmed finality provides good security with moderate wait times.
- Suitable for most transfers
- Moderate attestation time
- Fees apply
Minimum (500)
Minimum (500)
Fast Execution: TokenMessenger accepts minimum finality of 500 for fastest execution.
- Use for low-value or time-sensitive transfers
- Fastest attestation time
- Fees apply
- Lower security guarantees
src/v2/FinalityThresholds.sol
Hook Execution
V2 enables custom logic on the destination domain through thehookData parameter:
Hook Use Cases
- Automated Swaps: Hook data triggers DEX swap on destination
- NFT Claims: Hook data specifies NFT to mint after transfer
- Conditional Transfers: Hook data defines conditions for fund release
- Multi-Step Workflows: Hook data orchestrates complex operations
Hook data is application-specific and must be interpreted by the recipient contract or relayer on the destination domain.
Denylist Functionality
V2 introduces protocol-level denylist support:- Denylister Role: Authorized address can add/remove denylisted addresses
- Caller Protection: Denylisted addresses cannot call
depositForBurnordepositForBurnWithHook - Transparent: Denylist is stored on-chain and publicly verifiable
src/roles/v2/Denylistable.sol
New Roles in V2
V2 introduces additional administrative roles:| Role | Responsibilities | V1 Equivalent |
|---|---|---|
| feeRecipient | Receives collected fees | N/A (new) |
| denylister | Manages protocol denylist | N/A (new) |
| minFeeController | Sets minimum fee requirements | N/A (new) |
| owner | General administration | Same |
| rescuer | Emergency token recovery | Same |
| pauser | Emergency pause | Same |
| attesterManager | Manages attesters | Same |
| tokenController | Manages token pairs | Same |
When to Use V2 vs V1
Use V2 When:
- ✅ You need fee collection capabilities
- ✅ You want flexible finality requirements
- ✅ You need hook execution for custom logic
- ✅ You require denylist functionality
- ✅ You want deterministic cross-chain addresses (CREATE2)
- ✅ You need upgradeability through proxy pattern
Use V1 When:
- ✅ You need simple burn-and-mint without fees
- ✅ You don’t require hook execution
- ✅ You prefer non-upgradeable contracts
- ✅ You’re integrating with existing V1 deployments
Backward Compatibility
V2 maintains compatibility with V1 in the following ways:- Message Format: V1 and V2 use different message body versions
- Message Transmitters: V1 MessageTransmitters cannot process V2 messages
- Token Minter: V2 extends V1 TokenMinter with dual-recipient mint capability
- Separate Deployments: V1 and V2 can coexist on the same chain
Next Steps
What's New
Detailed feature breakdown and technical changes
Migration Guide
Step-by-step guide for migrating from V1 to V2
Deployment
Deploy V2 contracts to your network
API Reference
Complete V2 contract API documentation