Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

ERC-3664

ERC-3664 is an Ethereum standard that enables tokens, primarily NFTs, to fetch their metadata and other data from multiple on-chain and off-chain sources, creating dynamic and interoperable digital assets.
Chainscore © 2026
definition
ETHEREUM STANDARD

What is ERC-3664?

ERC-3664 is an Ethereum standard that enables on-chain data storage for NFTs by using a modular, gas-efficient system of off-chain data attestations.

ERC-3664, also known as the CCIP Read standard, is an Ethereum Request for Comments that defines a protocol for storing and retrieving NFT metadata and other data in a hybrid on-chain/off-chain manner. Its primary innovation is the IERC3664 interface, which allows smart contracts to store a minimal on-chain reference—such as a URI or a commitment hash—that points to more extensive data stored off-chain. This design provides the immutable on-chain proof of an NFT's properties while enabling flexible, cost-effective storage of complex data like high-resolution images, videos, or dynamic attributes, solving the gas cost and blockchain bloat problems of storing all data directly on-chain.

The standard operates through a system of modular attestations. Instead of a single metadata URI, an NFT contract implementing ERC-3664 can manage multiple data attributes (e.g., image, strength, background), each with its own off-chain source and on-chain identifier. A core mechanism is the resolve function, which a client (like a wallet or marketplace) calls to fetch the data. This function reads the on-chain pointer and then performs a CCIP Read operation: it calls a designated off-chain gateway (like an HTTP server or IPFS node), which returns the verified data. This process allows for gas-efficient updates to NFT traits without modifying the core contract, enabling dynamic and evolving NFTs.

Key technical components include the TextResolver and AddrResolver interfaces for resolving text-based data (URIs) and Ethereum addresses, respectively. A major advantage is data integrity: the off-chain response must include a proof, often a cryptographic signature from a trusted attester, which the client verifies against the on-chain commitment. This prevents tampering and ensures the off-chain data is authoritative. Furthermore, ERC-3664 supports composability, allowing different attributes to be sourced from different providers, fostering a decentralized ecosystem of specialized data attestation services.

Practically, ERC-3664 is foundational for Soulbound Tokens (SBTs), verifiable credentials, and complex gaming or metaverse assets where properties change frequently. For example, a game character NFT could have a static on-chain token ID, while its evolving level, equipment, and appearance are stored as efficiently updatable off-chain attributes resolved via ERC-3664. It is a critical piece of infrastructure for the modular blockchain stack, separating the consensus and execution layer (Ethereum) from the data availability and retrieval layer, paving the way for more scalable and feature-rich NFT applications.

etymology
STANDARDIZATION

Etymology and Origin

The naming and development of ERC-3664, a standard for on-chain data retrieval.

The term ERC-3664 follows the established Ethereum Improvement Proposal (EIP) numbering convention, where 'ERC' stands for Ethereum Request for Comments and '3664' is its unique identifier assigned by the EIP editors. This nomenclature places it within the broader family of Ethereum standards, specifically those focused on token interfaces (ERC-20, ERC-721) and application-layer protocols. The number itself is sequential and carries no inherent technical meaning, serving primarily as a unique reference.

The proposal was authored by Nick Johnson and Qiao Wang and was formally introduced as EIP-3664 in April 2021. Its origin lies in addressing a critical limitation of the Ethereum Virtual Machine (EVM): the high cost and technical complexity of storing and retrieving large or complex data on-chain. The standard was conceived to enable gas-efficient and flexible data retrieval without requiring changes to the core protocol, building upon concepts from earlier standards like ERC-1155 and the idea of composable attributes.

The core innovation, CCIP Read, is etymologically derived from Cross-Chain Interoperability Protocol Read, though its application within ERC-3664 is generalized for any off-chain data source. This mechanism allows a smart contract to defer data resolution to an off-chain gateway, responding to queries with a payload that instructs the client (e.g., a wallet or dApp interface) where to fetch the real data. This decouples data storage from data availability, a pattern inspired by the need for scalability and richer metadata in applications like advanced NFTs and decentralized identity.

The development of ERC-3664 was directly influenced by the growing demands of the Non-Fungible Token (NFT) ecosystem for dynamic, upgradable, and gas-efficient metadata. Prior to its introduction, projects had to choose between expensive on-chain storage or fully centralized off-chain solutions. ERC-3664 provided a standardized, cryptographically verifiable middle path, enabling traits, images, and other attributes to be stored on decentralized networks like IPFS or Arweave while maintaining a lightweight on-chain footprint.

In practice, ERC-3664's origin as a generic data retrieval primitive has led to its adoption beyond its initial NFT use case. It serves as a foundational layer for L2 resolution protocols, decentralized domain name systems (like ENS's off-chain metadata), and any application requiring trust-minimized access to external data. Its design reflects a broader trend in Ethereum's evolution: creating standards that extend the chain's capabilities through secure off-chain computation and verification, rather than through constant and costly on-chain expansion.

how-it-works
MECHANISM

How ERC-3664 Works

ERC-3664, also known as the 'CCIP Read' standard, is an Ethereum Improvement Proposal that enables smart contracts to securely fetch off-chain data without relying on centralized oracles.

ERC-3664 defines a standardized interface for off-chain lookup, allowing a smart contract to request data from an external source. When a contract needs information not stored on-chain, it can revert the transaction with a special error containing a gateway URL and call data. This triggers a client, like a wallet or a node, to perform a CCIP Read (Cross-Chain Interoperability Protocol Read) by sending an HTTP POST request to the specified gateway. The gateway, which acts as a stateless data provider, returns the required data, which the client then submits in a new transaction to complete the original contract call. This mechanism decouples data retrieval from on-chain execution.

The core innovation is the secure and verifiable nature of the data fetch. The gateway's response must include a cryptographic proof, such as a Merkle proof, which the receiving smart contract can validate on-chain. This ensures the data's integrity and authenticity before it is used. The standard supports multiple proof types and data formats, making it flexible for various use cases like fetching verifiable random numbers (VRF), decentralized identity (DID) attestations, or price feeds. By placing the burden of the HTTP call on the client, it eliminates gas costs for data retrieval and avoids the single point of failure associated with traditional oracle networks.

A primary application of ERC-3664 is enhancing the Ethereum Name Service (ENS). It allows ENS resolvers to store only a lightweight hash on-chain while delegating the task of fetching the actual record (like an IPFS hash or cryptocurrency address) to an off-chain gateway. This drastically reduces gas costs for record updates. Developers implement the standard by having their contracts inherit from or interface with the IERC3664 functions, primarily resolve and callback. Prominent projects utilizing this pattern include ENS's off-chain resolvers and various Layer 2 scaling solutions that need to bridge data from their own networks back to Ethereum mainnet.

key-features
CROSS-CHAIN RESOLUTION

Key Features of ERC-3664

ERC-3664 is an Ethereum standard that enables smart contracts to resolve data, tokens, or other assets from external, non-EVM blockchains without requiring wrapped assets or trusted bridges.

01

On-Chain Resolution Protocol

ERC-3664 defines a standard interface for on-chain resolution. A smart contract (the resolver) can make a request, which triggers an off-chain gateway to fetch data from an external chain (e.g., Bitcoin, Solana) and submit a cryptographic proof back on-chain for verification and execution.

02

Stateless Verification via CCIP-Read

The standard builds upon CCIP-Read (EIP-3664), which allows contracts to request off-chain data. ERC-3664 extends this by specifying how to request and verify proofs of state from other blockchains, enabling stateless clients to trustlessly confirm the validity of cross-chain information.

03

Support for Any Asset Type

While often associated with tokens, the protocol is asset-agnostic. It can resolve:

  • Native assets (e.g., real BTC on Ethereum)
  • Arbitrary data (oracle feeds, NFT metadata)
  • Cross-chain messages for arbitrary contract logic This avoids the liquidity fragmentation and custodial risk of traditional wrapped assets.
04

Decentralized Gateway Network

Resolution is performed by a permissionless network of gateways. These off-chain services:

  • Monitor the state of specified external chains.
  • Generate cryptographic proofs (e.g., Merkle proofs) of the requested data.
  • Submit the proof and result to the on-chain verifier. Competing gateways ensure liveness and correctness.
05

Modular Security & Verification

Security is not one-size-fits-all. The standard allows developers to choose or implement their own verification module. This module contains the logic to validate the cryptographic proof from the source chain (e.g., verifying a Bitcoin SPV proof or a Cosmos IBC packet).

06

Use Case: Omnichain Fungible Tokens

A primary application is Omnichain Fungible Tokens (OFTs), popularized by LayerZero. An OFT on Chain A can be burned, with a proof of that burn sent via ERC-3664 to mint the same token on Chain B. This enables canonical, non-wrapped asset movement across chains.

examples
ERC-3664

Examples and Use Cases

ERC-3664 (CCIP Read) enables smart contracts to securely fetch data from off-chain sources. Its primary use cases involve enhancing NFTs, DeFi, and identity systems with dynamic, verifiable external information.

02

DeFi Oracle Abstraction

Enables decentralized applications to retrieve price data or yield rates without being locked into a single oracle provider. A lending protocol can define a standard off-chain lookup that allows users to provide signed data from their preferred oracle (e.g., Chainlink, Pyth). This reduces gas costs and increases data-source flexibility.

03

Cross-Chain & Layer-2 State Proofs

Facilitates lightweight verification of state from another blockchain. A contract on Ethereum can request and verify a Merkle proof that a transaction occurred on an L2 or another chain, without requiring a full bridge. This is used for cross-chain messaging and asset transfers where only proof of an event is needed.

04

Decentralized Identity & Attestations

Allows smart contracts to verify credentials stored off-chain. A DAO governance system can check if a wallet holds a valid, non-expired credential (like a proof-of-humanity attestation) by having the user's client fetch and present a signed claim from a decentralized identifier (DID) service.

05

Gas-Efficient Token Gating

Enables access control based on off-chain lists or computations without storing the list on-chain. For a token-gated event, the contract can offload the check of whether a user holds a specific NFT to an off-chain service, which returns a simple signed yes/no answer, saving significant storage and computation gas.

ecosystem-usage
ERC-3664

Ecosystem Usage

ERC-3664, or CCIP Read, is a standard for secure, gasless, off-chain data retrieval. It enables smart contracts to trustlessly query data from any external source, powering a new generation of decentralized applications.

05

Decentralized Data Feeds (Price Oracles)

While not replacing on-chain oracles, CCIP Read can be used for low-frequency or auxiliary data verification. A contract can request a signed data packet from a known oracle node URL. The contract verifies the node's signature on-chain, allowing it to incorporate off-chain calculated data (like a TWAP or custom index) in a trust-minimized way.

06

Technical Flow: The CCIP Read Request

The standard defines a specific execution flow:

  • A client (e.g., a wallet) calls a function on a smart contract.
  • Instead of a direct result, the contract reverts with OffchainLookup error, containing a URL, call data, and callback function.
  • The client calls the URL (an off-chain gateway) with the call data.
  • The gateway returns a signed response.
  • The client calls back into the original contract, providing the result and proof.
  • The contract verifies the signature and uses the data.
ON-CHAIN VS. OFF-CHAIN

Comparison with Other Metadata Standards

A technical comparison of ERC-3664 (CCIP-Read) with other common approaches for associating metadata with on-chain tokens.

FeatureERC-3664 (CCIP-Read)Centralized APITraditional On-Chain Storage (e.g., ERC-721)

Data Location

Off-chain, decentralized (e.g., IPFS, Arweave)

Off-chain, centralized server

On-chain (contract storage)

Data Mutability

Gas Cost for Update

Low (update off-chain URI)

Low (update server data)

Very High (store data in calldata/storage)

Decentralization

Client-Side Resolution

Data Verifiability

High (cryptographically verifiable via gateway)

None (trusted provider)

Maximum (on-chain state)

Implementation Complexity

Medium

Low

Low to High (depending on data size)

Typical Use Case

Dynamic, rich metadata (games, identity)

Prototypes, private data

Small, immutable data (simple collectibles)

security-considerations
ERC-3664

Security Considerations

ERC-3664, or CCIP Read, introduces a secure pattern for fetching off-chain data. Its security model hinges on the integrity of the data provider and the cryptographic proofs they supply.

01

Trust in the Data Provider

The core security assumption of ERC-3664 is that the designated off-chain data provider is honest and available. The contract does not verify the correctness of the data itself, only the cryptographic signature or proof from the authorized sender. This shifts trust from the blockchain's consensus to the reputation and security of the external service.

02

Signature Verification & Replay Attacks

Contracts must implement robust signature verification. This includes:

  • Validating the signer is the authorized off-chain oracle.
  • Using a nonce or blockhash to prevent signature replay across different transactions or blocks.
  • Ensuring the signed data (the message) corresponds exactly to the on-chain function call parameters to prevent manipulation.
03

Gateway & URL Manipulation

The gateway and url parameters in the OffchainLookup error are provided by the untrusted caller. A malicious contract could return a lookup to a compromised gateway. Client libraries (like ethers.js) must be configured to use a allowlist of trusted gateways and should validate HTTPS endpoints to prevent phishing or MITM attacks during the off-chain call.

04

Callback Execution Context

The callback function specified in the off-chain lookup is executed with msg.sender set to the contract itself, not the original user. Developers must ensure the callback logic does not make unsafe assumptions about the caller's identity or state that should be tied to the original msg.sender. Proper access control within the callback is critical.

05

Gas & Execution Limits

Failed off-chain lookups can cause transactions to revert, costing gas. Malicious actors could spam contracts with calls designed to trigger lookups to unresponsive gateways, causing denial-of-service for legitimate users. Contracts should implement rate-limiting or require a stake to mitigate spam, and gateways must be highly available.

06

Client-Side Security

Security is now partially delegated to the client (e.g., a wallet or dApp interface). The client must:

  • Correctly catch the OffchainLookup error.
  • Perform the HTTP(S) request to the specified gateway.
  • Submit the secondary transaction with the proof. A malicious or buggy client could fail to complete the process or be tricked into submitting incorrect data.
ERC-3664

Technical Details

ERC-3664, also known as the CCIP Read standard, is an Ethereum standard that enables smart contracts to securely fetch data from off-chain sources without requiring a trusted third party.

ERC-3664, or CCIP Read, is an Ethereum standard that allows smart contracts to securely retrieve data from off-chain sources using a decentralized oracle network. It works by having the contract revert with a special error containing a URL and data payload. An off-chain client, like a wallet or a decentralized application's frontend, catches this error, fetches the data from the specified endpoint, and submits a new transaction with the proof and result back to the contract. The contract then verifies the proof, often using a commitment stored on-chain, before accepting and using the data. This mechanism enables trust-minimized access to price feeds, identity data, and complex computations without bloating the blockchain.

ERC-3664

Common Misconceptions

ERC-3664, or CCIP Read, is a standard for secure off-chain data retrieval, often misunderstood as a data storage or oracle solution. This section clarifies its true purpose and technical boundaries.

No, ERC-3664 is not an oracle or a data storage solution; it is a standardized communication protocol. It defines a secure, generalized method for a smart contract to request and receive data from an off-chain source (a gateway) via a callback. The standard does not specify where the data comes from, how it is stored, or how its integrity is verified—those responsibilities belong to the off-chain service implementing the gateway. Its primary innovation is enabling trust-minimized off-chain lookups without requiring a new, custom security model for each application, unlike many oracle designs which bundle data sourcing, attestation, and delivery.

ERC-3664

Frequently Asked Questions (FAQ)

ERC-3664, or CCIP Read, is a standard for secure, off-chain data retrieval on Ethereum. These questions address its core purpose, mechanics, and practical applications.

ERC-3664, also known as CCIP Read, is an Ethereum standard that enables smart contracts to securely retrieve data from off-chain sources. It works by having a contract return a special error that instructs a client (like a wallet or dApp interface) to fetch the required data from a specified off-chain gateway using a standard HTTP request. The client then submits a new transaction with the verified data, allowing the on-chain logic to proceed. This mechanism decouples data availability and verification from blockchain execution, enabling gas-efficient access to rich, real-world data like price feeds, identity proofs, or decentralized storage metadata without requiring a centralized oracle to push data on-chain.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team