Chainlink rolls out OCR system upgrade, reducing gas costs tenfold
The Off-Chain Reporting upgrade changes how oracles aggregate data, easing the burden on the blockchains.
Chainlink has launched a major upgrade for its oracle network, dubbed Off-Chain Reporting, or OCR. The upgrade was announced on Wednesday, though the implementation has been live for some time already.
OCR changes how data across multiple sources is joined together by the oracle network. Previously, the process of aggregating different readings of the same desired input — for example, a token’s price — was done on-chain. Chainlink nodes would submit their individual readings of the data, which would be verified by a smart contract on Ethereum and other blockchains. This approach, while guaranteeing the reliability of the data, was inefficient in terms of gas costs, as each node would need to spend resources to publish the data.
The new architecture replaces on-chain aggregation with an off-chain consensus round. The aggregated data is then passed on to the blockchain, where a smart contract verifies that a quorum of nodes agreed on this version of the data.
Sergey Nazarov, founder of Chainlink, told Cointelegraph that the team has been working on the protocol since 2017. “We’ve started to put the best minds behind [it] over the last year and a half and have done substantial multiple audits on it,” he added.
The most immediate effect of the upgrade is reduced gas costs and load on the Ethereum network. According to the team, the upgrade will result in a tenfold increase in the amount of real-world data that could be available on the blockchain. As Nazarov explained, this increase is “partially related” to the gas limitations of the Ethereum blockchain:
“I think the nuance here is that we want to do this in a scalable way, basically, and we want to do it in a scalable way that works for Ethereum and various other chains. What this means is that, in times of congestion, the system should be able to continue to deliver these amounts of data because when you architect a system like this, you don’t architect for the best case.”
Chainlink nodes thus could have chosen to publish more data with the previous system, though the gas costs would have made that significantly difficult. “Our system needs to be able to function even in extreme situations, which so far it has been, better than all other oracles,” continued Nazarov. “So that’s the standard we need to meet. And if we suddenly increase 10x the amount of data on the current system — yeah, it could work in some good conditions and it would be costly, and it would actually raise everybody’s costs, which is not something we believe in.”
But beyond the immediate effects, Nazarov believes that this upgrade will have more important effects in the future. “Really what you’re seeing here now is the Chainlink network growing into something that is going to do more and more off-chain computation.”
While that does not mean Chainlink will transition to building rollups and layer-two solutions, Nazarov said there are three distinct services that the Chainlink network will soon provide. This includes verifiable randomness — a feature that has already been launched and that allows DApps to have a trusted source of random numbers, which could be particularly useful for gambling platforms and prediction markets. The other services, enabled by OCR, include keeper functions and fair sequencing, both solutions to very practical problems affecting decentralized finance.
Keepers are a type of maintainers necessary in smart contract environments. For example, some contracts require conducting periodic actions, which are normally triggered by the team or someone in the community, and formalizing this behavior is what projects like Keep3r and Fetch.ai are trying to do.
Fair sequencing is a proposed service that aims to fix front-running and miner extractable value in DeFi. The issue arises when a blockchain operator can freely rearrange transactions to their or someone else’s benefit. For example, when they see a multimillion-dolla swap about to be confirmed on Uniswap, they can quickly place their transaction to benefit from a better price.
The OCR system enables more freedom in how computations are performed on the Chainlink network, enabling new kinds of services centered around computing data instead of publishing it. Nazarov said that these ideas come from very practical needs that are unaddressed in the current market. “We generally do not want to build the pieces of the stack that we do not have to build,” he said. “We want to be the maximally positive-enabling force for smart contracts, closing all the gaps in the stack that aren’t closed.”