Blockchain technology continues to evolve, addressing challenges and optimizing performance across different layers. One significant development in the Oracle space is ScribeOptimistic, a solution designed to enhance data verification on Layer 1 blockchains where computational costs can be prohibitively high. This article delves into the mechanics of ScribeOptimistic, exploring how it leverages optimistic verification to reduce gas costs while maintaining data integrity. We'll examine its key components, including the opPoke()
and opChallenge()
functions, and discuss how ScribeOptimistic incentivizes network participants to monitor and validate data.
Through a real-world example, we'll see how ScribeOptimistic performs under actual conditions, demonstrating its effectiveness in maintaining system security and resilience. Whether you're a blockchain developer, researcher, or web3 enthusiast, this exploration of ScribeOptimistic offers valuable insights into the future of scalable and secure Oracle infrastructure.
How does ScribeOptimistic work?
ScribeOptimistic is a contract that builds upon Scribe, Chronicle’s novel Schnorr Oracle, providing additional optimistic poke functionality. It is designed for Layer 1 blockchains where computation is relatively expensive, such as Ethereum Mainnet. On these chains, signature aggregation, a vital process for Oracle networks, is a gas-intensive process, making on-chain verification of Schnorr signatures costly. To address this issue, ScribeOptimistic introduces an additional function called opPoke()
, which enables off-chain verification of Schnorr signatures.
With ScribeOptimistic all values optimistically proposed by the Oracle network validators are put into a public “buffer” and get automatically accepted after the challenge period.
During the challenge period, anyone can verify the signature offchain. If you find a signature to be invalid, you can additionally call opChallenge() to collect an ETH reward by having the Oracle verify the signature onchain. OpChallenge() can be called at any time but only successful challenges will procure the reward.
Upon a successful challenge, the challenger will receive a reward in ETH, the optimistic answer gets dropped, and the validator responsible for the answer will be removed.
The opPoke() function: Learn about the additional function provided by Scribe Optimistic
The opPoke()
function is a crucial part of Scribe Optimistic. It allows a validator to sign a (value, age) tuple and a corresponding Schnorr signature offchain, using ECDSA. Here, the value represents the data that the validators reached consensus on as the next data for the Oracle to deliver, and the age is the timestamp of this value.
Here's a step-by-step breakdown of how opPoke()
works:
- A validator signs a (value, age) tuple and a corresponding Schnorr signature offchain, using ECDSA.
- The signed data is then sent to the
opPoke()
function. - The
opPoke()
function binds the validator to the signed data. A public callableopChallenge()
function can be called to challenge the data. - The validator is now associated with the signed data, and the data is considered "poked" after the challenge period ends.
The opChallenge() function: Understand how the opChallenge() function verifies data and finalizes or deletes it
The opChallenge()
function is a public callable function that can be called at any time. Its purpose is to verify the current optimistically poked data to remove any potential invalid opPokes and remove the validator that submitted the invalid opPoke()
.
Here's a step-by-step breakdown of how opChallenge()
works:
- The
opChallenge()
function is called, which triggers a verification process. - The function performs the Schnorr signature verification of the currently opPoked data.
- If the verification succeeds, the data is finalized.
- If the verification fails, the validator bound to the data is removed, the data is deleted, and the challenger gets the ETH reward.
Incentivizing optimistic pokes: using ETH rewards to incentivize monitoring and challenging optimistic pokes
Scribe Optimistic provides a mechanism for incentivizing monitoring and challenging optimistic pokes. This is done through an ETH reward which is sent directly inside the opChallenge()
transaction to the challenger if the opPoke is invalid. In other words, in the unlikely event a malicious value is reported, Chronicle Protocol will pay you to challenge the invalid data.
For checking the current challenge period, you can check the opChallengePeriod’s value using opChallengePeriod()
which returns a value in seconds. Similarly, you can check the reward for successfully challenging the opPoke using the challengeReward()
.
OpChallenge() in Action
On the 1st of August 2024, Chronicle Protocol experienced its first in-production test of opChallenge. An optimistic poke transaction was successfully challenged for the MOG/USD Oracle on Ethereum Mainnet. Out of Chronicle’s 6 challenger instances, all 6 of them detected the invalid poke. Examples of attempts to challenge it can be found here and here. Even though six transactions initiated by Chronicle aimed to challenge the invalid opPoke()
, the challenge reward incentivized an MEV searcher to frontrun those transactions and earn the reward. Due to this searcher, the optimistic update was challenged even faster, with the transaction included in the next block, proving the financial incentive led to an efficient challenge period.
This sequence of events demonstrates that the Optimistic Chronicle implementation functioned as designed, effectively confirming the system's resilience when confronted with an invalid data submission. The successful detection, removal, and reward distribution underscore the robustness of the protocol's security measures and incentive structures.
Conclusion
In conclusion, ScribeOptimistic represents a significant advancement in data verification for blockchain environments where computation is expensive. By leveraging off-chain Schnorr signature verification and incentivizing active monitoring and challenging, ScribeOptimistic ensures that data remains accurate and validators are held accountable. The successful implementation of the opChallenge()
function, as demonstrated by real-world examples, underscores the robustness of this system. With these mechanisms in place, ScribeOptimistic provides a secure and efficient solution for managing computationally expensive operations, ensuring the integrity and reliability of the data it processes. At Chronicle, we’re committed to raising the standard for blockchain Oracles, we hope this success is one of many more to come.
About Chronicle Protocol
Chronicle, the original oracle on Ethereum, is a novel, blockchain-agnostic Oracle solution that has exclusively secured up to $22B in assets for MakerDAO and its ecosystem since 2017. Chronicle’s mission is to deliver on DeFi’s vision of transparency and decentralization. To solve the tradeoffs between security, decentralization, and cost, Chronicle spearheaded a breakthrough in Oracle network architecture by developing Scribe, an extremely gas-efficient Oracle based on aggregated Schnorr signatures. In doing so, Chronicle is raising the industry standard for Oracles by delivering more security, more transparency, and more resilience, at a lower cost.