An optimistic hash bridge for Ethereum and Gnosis which fallsback on the security of the Gnosis Hashi bridge aggregator. Optimistic hash claims are accepted as long as the on-chain censorship oracle test passes!
This project is two-in-one:
an on-chain censorship oracle
& an optimistic hash bridging protocol we call O-Hashi build ontop of Gnosis' Hashi using our censorship oracle
The censorship oracle is based on an eth research forum post made last month by Ed Felten, the chief scientist at Arbitrum. In the post (https://ethresear.ch/t/reducing-challenge-times-in-rollups/14997), Ed proposes a statistical test to determine censorship using on-chain information in block headers alone. The test is based on ethereum consensus mechanisms, and as Ed suggests, can speed up optimistic systems.
We implement Ed's spec and create an optimistic hash bridge called O-Hashi integrating our censorship oracle and Gnosis' Hashi bridge to resolve disputes. Here's how O-Hashi works,
Anyone can make a claim about a hash by leaving a deposit, and automatically starting a censorship test in the censorship oracle.
a) Anyone can challenge the claim by leaving a deposit. We call the Gnosis Hashi bridge to resolve the challenge bridging the true hash securely. If Hashi never responds, we refund both the claimant and the challenger, and no hash is validated.
OR
b) After the challenge period elapses, the claim can be optimistically accepted if the censorship test passes. If the censorship test fails, Hashi is called to validate the hash.
This project is built on:
Uniquely, for a web3 project atleast, this project involves high precision off-chain calculations requiring hundreds of digits of numerical precision implemented in python to calculate the censorship oracle test parameters. You will need Jupyter notebooks to open the .ipynb files.
The censorship oracle solidity contracts are deployed with test parameters pre-calculated as constants.
The graph is used to implement block handlers to calculate statistics about missing blocks over slot ranges.
React is used for a clean dashboard front-end which display missing block information for both Gnosis and Ethereum.
The O-Hashi Bridge is implemented as contracts alone, while the front-end only displays information about the censorship oracle.