zerokn0wledge

Chainlink CCIP: oracle problem, architecture and ARM network

Post1,498 words

Explains the oracle problem and why interoperability protocols matter, then details CCIP: router, decentralized oracle networks committing Merkle roots, the Active Risk Management network, on and off ramps, token pools and rate limits.

Key claims
CCIP uses an Active Risk Management network to verify Merkle roots committed by DONs
Tokens are locked or burned on source and unlocked or minted on destination
Built-in transfer rate limits
CCIP by @chainlink - The Future of Interoperability? The Oracle Problem The contemporary web3 landscape resembles a myriad of both L1 blockchains and L2 scaling solutions. While all these networks have distinct advantages and methodologies, particularly in terms of scalability, security, and decentralized verifiability, there remain limitations. These primarily revolves around the isolated nature of blockchains. They, by default, function as siloed systems, unable to natively interact with other blockchains or traditional data systems, hindering interoperability and giving rise to the oracle problem. As already hinted at above, blockchains inherently possess a significant limitation: their inability to naturally interact with external systems. This makes them isolated entities, comparable to a computer devoid of an internet connection. The inherent isolation is what gives blockchains their hallmark security and reliability. They achieve consensus by answering a specific set of binary questions based on data within their ledger. Typical questions are about transaction validation, fund sufficiency in a public address, and the legitimacy of a transaction within a given smart contract. Due to this narrow consensus focus, smart contracts execute with unparalleled consistency, making them deterministic, thus more reliable than conventional systems. However, for a fuller realization of smart contracts—covering over 90% of potential applications—they need to connect with the external environment. Examples include financial smart contracts requiring market data for settlements, insurance contracts needing IoT or web data for policy payouts, trade finance contracts relying on documents and digital signatures for payment releases, and numerous contracts wanting to transact in traditional currencies. These requisite data points and services are not natively present or directly accessible in the blockchain. To bridge this gap between the blockchain's on-chain environment and the external off-chain world, an essential piece of infrastructure emerges: the oracle. Blockchain Oracles A blockchain oracle is essentially a secured middleware that acts as a bridge between blockchains and various off-chain systems, which could include data providers, web APIs, enterprise systems, cloud services, IoT devices, electronic signatures, payment gateways, other blockchains, and more. The principal functions of oracles encompass: 🔹 Listen: Keeping an active watch over the blockchain network for any incoming data requests from users or smart contracts. 🔹 Extract: Procuring data from one or several external systems, like APIs located on third-party servers. 🔹 Format: Translating the data fetched from external sources into a format comprehensible by the blockchain, and vice versa. 🔹 Validate: Creating a cryptographic proof vouching for the integrity and accuracy of an oracle service, achieved through methods like data signing, blockchain transaction signatures, TLS signatures, Trusted Execution Environment (TEE) attestations, or zero-knowledge proofs. 🔹 Compute: Executing secure off-chain computations for the smart contract, such as deducing a median from various oracle inputs or generating a verifiable random number for gaming applications. 🔹 Broadcast: Authoring and transmitting a transaction on the blockchain to deliver data and any related proof on-chain, for the smart contract to utilize. 🔹 Output (Optional): Propagating data to an external system post the execution of a smart contract, which could be actions like conveying payment directives to traditional payment gateways or instigating actions in cyber-physical systems. Implementing these functions mandates the oracle system to function both on-chain and off-chain. On-chain activities involve establishing blockchain connections, data broadcasting, proof transmission, and potential on-blockchain computations. In contrast, off-chain responsibilities revolve around request handling, data extraction and formatting from external systems, sending data to these systems, and performing off-chain computations to enhance scalability, security, privacy, and other attributes of smart contracts. A pioneer in doing this, is @chainlink. The Need for Blockchain Interoperability Protocols To holistically address the oracle problem and overcome frictions between blockchains, interoperability protocols are essential solutions. These protocols act as the key connectors, effectively breaking down the communication silos that have traditionally existed between various blockchain networks. And oracles could very well play a primary role in solving these interoperability challenges. The significance of such protocols can be underscored especially from the following perspectives: 🔹 Asset and Information Mobility: Interoperability protocols enable the free flow of digital assets and essential information across diverse blockchain ecosystems. 🔹 Enhanced Developer Flexibility: By leveraging these protocols, developers are equipped to craft applications that draw from the strengths of multiple blockchains, hopefully leading the way to more optimized and robust decentralized solutions. 🔹 Promotion of Collaborative Ecosystems: Through these solutions, a collaborative developer ecosystem gets fostered. It encourages developers from various blockchains to collaboratively create applications that are more expansive and innovative, spanning multiple networks. Interoperability protocols further act as blockchain abstraction layers. Such layers play a pivotal role in streamlining cross-chain communication, making it feasible for both traditional systems and decentralized applications (dApps) to interact with any blockchain through a single unified protocol. Without these tools, the integration process would be much more complex, needing unique configurations for each chain interaction (heavily fragmenting UX). Deep Dive into Chainlink's CCIP Among the leading solutions in this domain, @chainlink's Cross-Chain Interoperability Protocol, abbreviated as CCIP, stands out. In many ways similar to LayerZero, CCIP establishes a robust framework for inter-chain communication. Its core design involves the integration of on-chain smart contracts deployed on the connected blockchains. These contracts are dedicated to defining the exchange logic of how to work with the transmitted data, while off-chain nodes, or rather oracles, handle the pivotal task of message passing across chains. The figure below outlines the different components involved in a cross-chain transaction: 🔹 Cross-Chain dApps are user-specific. A smart contract or an EOA (Externally Owned Account) interacts with the CCIP Router to send arbitrary data and/or transfer tokens cross-chain. 🔹 The contracts in dark blue are the CCIP interface. To use CCIP, users need only to understand how to interact with the router; they don't need to understand the whole CCIP architecture. 🔹 The contracts in light blue are internal to the CCIP protocol and subject to change. Oracle and Security Infrastructure: 🔹 Leveraging Decentralized Oracle Networks (DONs): A pivotal feature of CCIP is its strategic alignment with Chainlink’s Decentralized Oracle Networks. Entrusted with the task of securely transmitting off-chain data to on-chain systems, DONs within the CCIP environment have an expanded role, overseeing the transmission of messages and value across different chains. They also engage in compiling transactions into Merkle roots, which are then verified by the Active Risk Management (ARM) network. 🔹 The Vigilant ARM Network: This autonomous layer, composed of off-chain nodes, ccontinuously monitors for any malicious activity, ensuring the integrity of the committed Merkle roots by DONs, adding an additional security layer to the system. Some Other Integral Components of CCIP: 🔹 The OnRamp and OffRamp Mechanism: While the OnRamp, located on the source blockchain, manages the locking or burning of tokens, the OffRamp on the destination chain verifies incoming messages. Upon validation, it coordinates with the token pool to either unlock or mint the tokens. 🔹 Role of Token Pools: These pools serve as dedicated reservoirs for each token type, harmonizing operations between the OnRamps and OffRamps. Functionality of CCIP: CCIP’s capabilities are extensive. From simple message communication and token transfers to more sophisticated programmable token movements, it offers a wide range. Tokens do not physically move across chains though. Instead, they are transformed, which means they are locked or burned on one chain and then unlocked or minted on another. For enhanced security, there are built-in transfer rate limits, ensuring transfervolumes remain within predefined thresholds. Operational Efficiency Metrics: CCIP's design focuses on security, but its operational speed is influenced by the finality of the source blockchain. For instance, an Ethereum-originated transaction, with its block finality of around 15 minutes, would set the pace for a CCIP transaction. Faster networks can reduce transaction times, with Avalanche for example reaching finality within a single second. Use Cases: Chainlink CCIP enables a variety of use cases: 🔹 Cross-chain Lending Platforms: Seamless borrowing and lending of diverse crypto assets regardless of their native chains. 🔹 Economical Transaction Computations: Offloading computation to chains with better cost metrics. 🔹 Optimized Yield Strategies: Moving assets to promising DeFi platforms for optimized yields. 🔹 Revolutionary dApp Innovations: Exploiting chain-specific features while utilizing computational and storage capacities from others. The concept of 'Hybrid Smart Contracts' underpins these use cases, bridging the gap between on-chain and off-chain contracts, in conjunction with cross-chain execution. Concluding Thoughts: Overall, @chainlink's CCIP definitely is some great interoperability tech that will help us shape the interoperable multi-chain world we're building towards. In many ways the solution resembles the approach LayerZero is taking. However there are added layers of security on top and having two DONs work in parallel rather than an oracle and a potentially centralized relayer might make it the preferable option. Also we shouldn’t forget what a track record the Chainlink team has in the space building out the largest Oracle network with hundreds of DONs and being a key enabler of many (especially DeFi) use cases. This could get them into a good position to reach traction and many integrations quickly, which could in turn make network effects work in favour of Chainlink’s CCIP.
First image of the post

3 more images on X

Open on X

What came next · since 27 Sep 2023

Since then

Zero has written 2 more pieces on Chainlink since this one.

zerokn0wledge avatar
Working together

Research, advisory and builds for deep-tech teams.