
Integrating Chainlink Price Feeds To Power the zkSync 2.0 DeFi Ecosystem
Layer 2 scalability solutions play an increasingly important role in expanding transaction throughput and lowering the barrier to entry for the Ethereum ecosystem. In support of this goal, Matter Labs is building zkSync 2.0, a Layer 2 zkRollup network that supports Solidity-based smart contracts through the zkEVM. Full support of the Web3 API along with the zkEVM ensures that Solidity smart contracts and frontends can be easily ported over from the Ethereum mainnet with minimal changes.
One of the most important pieces of infrastructure for Ethereum developers is decentralized oracle networks, which provide smart contracts with secure and reliable access to the off-chain resources. It’s why we are excited to announce zkSync is actively integrating with the industry-leading Chainlink Price Feeds in the zkSync 2.0 network.
As the first and recommended price oracle solution for DeFi projects building on zkSync 2.0, developers will have access to a high-quality source of market data that reflects full market coverage, is historically reliable during market volatility, and is provably secure against data manipulation attacks like flash loans. With this integration, a wide range of scalable, external connected DeFi applications become possible on zkSync, including lending protocols, derivatives platforms, prediction markets, algorithmic stablecoins, automated trading strategies, and much more.
Additionally, zkSync 2.0 will be able to handle orders of magnitude more Chainlink Price Feed updates since only the state difference of each block is published on-chain. For example, 100,000 ETH/USD price feed updates within the same block will only need to pay the price for one oracle update! This allows for a more robust oracle mechanism and a greater variety of decentralized applications that can be built on zkSync, as well as drives increased usage of Chainlink Price Feeds.
The first set of Chainlink Price Feeds being integrated into the zkSync 2.0 network will be for common assets such as BTC and ETH, with additional feeds continually coming online to support user demand. One of the important features of the integration is its native support, meaning Chainlink oracles on zkSync will have no dependencies on any other blockchain. This will allow oracle updates to occur at the native speeds and costs of the zkSync network. By combining Chainlink’s high quality data and zkSync’s low-cost and secure network, developers will be able to build advanced decentralized applications that scale to a global level.
Bringing Scalability to the Ethereum Ecosystem with zkSync
The Ethereum blockchain has seen significant adoption in recent times. While the increased adoption validates the utility of smart contracts, it also prices out many users who cannot afford the layer 1 gas costs. To overcome this limitation, we are creating zkSync — a layer 2 scalability solution based on zkRollup technology, which routes computation and storage functions off-chain while storing assets on-chain. zkRollups use compact zero-knowledge proofs (ZKPs) to cryptographically prove state transitions are valid, and the data required for withdrawals is stored entirely on-chain.
The first implementation of zkSync (v1) has been live on mainnet since June 2020, serving as a trustless protocol for scalable, low-cost payments. However, with the recent zkSync upgrade (v1.x), users can now also swap ERC20 tokens, mint/transfer/swap NFTs, and withdraw their NFTs to the layer 1 blockchain.
The latest version of the zkSync protocol (v2), which is currently live on testnet, provides support for generalized smart contracts written in Solidity via the zkEVM and offers an off-chain data availability solution called zkPorter. Through zkEVM and zkPorter, existing smart contracts on Ethereum will be able to port into the zkSync layer 2 environment with minimal code changes.
Similar to all other blockchains, the zkSync 2.0 network is unable to natively connect to external data sources on its own. Overcoming this limitation requires an additional piece of infrastructure known as an “oracle” to bridge on-chain and off-chain environments. With many smart contract use cases requiring oracles to operate, providing support for a highly secure and time-tested oracle solution is a key requirement to support the growing zkSync DeFi ecosystem.
Supporting the zkSync Ecosystem With Chainlink Price Feeds
After accessing user demand and platform security, it was clear that Chainlink was the most important oracle solution to bring into the zkSync DeFi ecosystem. Chainlink oracles already help secure tens of billions in value across DeFi and CeFi ecosystems through the provisioning of high-quality data and robust oracle infrastructure. The Chainlink Network is also based on cutting-edge academic research from industry leaders and experienced academics, aligning with our approach of not compromising on long-term infrastructure security.
Chainlink Price Feeds will provide a wide range of advantages to developers within the zkSync ecosystem including:
- High-Quality Data — Chainlink Price Feeds source data from numerous premium data aggregators, leading to price data that’s aggregated from hundreds of exchanges, weighted by volume, and cleaned from outliers and suspicious volumes. Chainlink’s data aggregation model generates more precise global market prices that are resistant to API downtime, flash crash outliers, and data manipulation attacks like flash loans.
- Secure Node Operators — Chainlink Price Feeds are secured by independent, security-reviewed, and Sybil-resistant oracle nodes run by leading blockchain DevOps teams, data providers, and traditional enterprises with a strong track record for reliability, even during high gas prices and extreme network congestion.
- Decentralized Network — Chainlink Price Feeds are decentralized at the data source, oracle node, and oracle network levels, generating strong protections against downtime and tampering by either the data provider or the oracle network.
- Economy of Scale — Chainlink Price Feeds benefit from an economy of scale effect, where increasing adoption allows multiple projects to collectively use and fund shared oracle networks to fetch commonly required datasets (e.g. ETH/USD). This allows DeFi projects to get premium data quality and robust oracle security for a fraction of the total cost.
Support from Chainlink Price Feeds will empower projects to seamlessly port their existing Chainlinked applications from the Ethereum network to zkSync 2.0 for increased scalability without sacrificing security. We look forward to bringing this integration into production to help alleviate the Ethereum network’s congestion and enable the next evolution in Ethereum dApps that meet the scaling requirements needed to support mass adoption.
“Integrating Chainlink Price Feeds with the zkSync ecosystem is crucial to provide developers with the infrastructure they require for a smooth plug-and-play experience to migrate from Ethereum mainnet,” stated Matter Labs Co-Founder and CEO Alex Gluchowski. “Access to the most popular price oracle solution makes it even more seamless for DeFi applications to deploy their code onto zkSync and immediately begin benefiting from higher-transaction throughputs.”
“We’re excited to be working with the Matter Labs team on the integration of Chainlink Price Feeds into the zkSync 2.0 network, helping bootstrap and secure a growing ecosystem of DeFi applications,” stated Head of Blockchain Partnerships at Chainlink Labs Niki Ariyasinghe. “With Chainlink oracles running natively on zkSync, developers will have access to high-frequency oracle updates while still retaining a high level of tamper-resistance and data quality, ultimately empowering the creation of more advanced decentralized applications.”
About Chainlink
Chainlink is the industry standard for building, accessing, and selling oracle services needed to power hybrid smart contracts on any blockchain. Chainlink oracle networks provide smart contracts with a way to reliably connect to any external API and leverage secure off-chain computations for enabling feature-rich applications. Chainlink currently secures tens of billions of dollars across DeFi, insurance, gaming, and other major industries, and offers global enterprises and leading data providers a universal gateway to all blockchains.
Learn more about Chainlink by visiting chain.link or read the documentation at docs.chain.link. To discuss an integration, reach out to an expert.
About zkSync
zkSync is a ZK rollup, a Layer-2 scaling solution that preserves the security properties of the underlying blockchain by leveraging the latest generation of succinct zero-knowledge proofs.
zkSync v1 is a ZK rollup for payments, live on Ethereum mainnet since July 2020. It was adopted by many protocols, wallets, and dapps, and has powered over 4M transactions.
zkSync v2 is a ZK rollup for generic smart contracts that preserves EVM-compatibility and composability. The upcoming testnet currently has more than 150 registrations from projects across DeFi, NFT, Games, DAOs, Exchanges, On-Ramps, Wallets, Developer Tools, Data Analytics.
Learn more and keep up to date by visiting zkSync’s Medium Blog and Twitter.
About Matter Labs
Matter Labs is an engineering company focusing on complex problems in the blockchain and cryptography space involving zero-knowledge proofs and scalability. The company is rooted in the belief that cryptography and blockchain are essential technologies for protecting and fostering freedom in the world. These technologies enable mutually distrusting parties to collaborate without relying on authorities or third parties. Blockchains enabled by zero-knowledge proofs promise a fairer and more efficient world without scalability limits today. Matter Labs uses the power of zero-knowledge proofs to scale blockchains without compromising on security and decentralization, with the mission of enabling the mainstream adoption of public blockchains.
Matter Labs, a remote-first organization, is actively hiring.