ERC-3668, also known as CCIP Read, is a finalized Ethereum standard that enables smart contracts to securely fetch external data from offchain sources while maintaining cryptographic verification and trust. Originally developed by Nick Johnson, this protocol addresses the challenge of high storage costs on Ethereum by allowing contracts to store data offchain while retaining the ability to validate and utilize that data when needed.
How ERC-3668 CCIP Read Works: Three-Step Process
The CCIP Read mechanism operates through a sophisticated three-step process designed to ensure data integrity and security. When a smart contract needs external data, it first reverts with a special OffchainLookup
error that specifies where the required data can be found. The client then queries the designated gateway server using the provided URL and call data. Finally, the client calls back to the original contract with the gateway's response, allowing the contract to validate and process the external data.
This approach proves particularly valuable for cross-chain infrastructure, where protocols need to efficiently access and verify data across multiple blockchain networks without incurring excessive gas costs. The standard enables contracts to maintain security while dramatically reducing onchain storage requirements.
Real-World Applications and Layer 2 Integration
Linea became the first zkEVM Layer 2 to implement ERC-3668 in production, demonstrating the standard's practical value for scaling blockchain applications. The implementation allows ENS domains to be managed on Layer 2 while remaining fully resolvable on Ethereum mainnet, significantly reducing gas costs and improving user experience.
ERC-3668 provides a foundation for efficiently accessing and validating external data sources that inform transaction routing and liquidity optimization across multiple networks.
Benefits for Smart Contract Development
ERC-3668 offers several key advantages for modern blockchain applications. It enables cost-effective data storage by moving large datasets offchain while preserving verification capabilities. The standard supports seamless integration with Layer 2 solutions, allowing data delegation without requiring clients to understand the specifics of each L2 implementation.
Most importantly, CCIP Read maintains the security guarantees that make blockchain applications trustworthy, as contracts must implement proper validation mechanisms to ensure the integrity of offchain data. This makes it particularly suitable for intent-based systems that need to access external liquidity and pricing information while maintaining user trust and system reliability.