Skip to content
/ hashi Public
forked from gnosis/hashi

An EVM header oracle aggregator

License

Notifications You must be signed in to change notification settings

connext/hashi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github Actions Coverage Status Hardhat License: LGPL-3.0-only

Hashi

Hashi 橋

Hashi is an EVM Header Oracle Aggregator, designed to facilitate a principled approach to cross-chain bridge security. The primary insight being that the vast majority of bridge-related security incidents could have had minimal impact if the systems relying on them had built in some redundancy. In other words, it's much more secure to require messages be validated by multiple independent mechanisms, rather than by just one.

Features

Hashi allows users to:

  • Build custom oracle adapter contracts for any header oracle mechanism they would like to use.
  • Query a header oracle for the block header for a given block on a given chain.
  • Query a set of header oracles the block headers for a given block on a given chain.
  • Query for a unanimously agreed upon block header from a set of oracles for a given block on a given chain.

GiriGiriBashi allows users to:

  • Define a set of oracles for each chainId.
  • Define a threshold of oracles that must agree on a block header for each chain.
  • Query for a unanimously agreed on header from that full set of oracles.
  • Query for a block header agreed upon by a threshold of oracles for a given block on a given chain; the provided oracles must all agree on the header for the given block, must all be enabled as oracles for the given chain, and must exceed the threshold for the chain.

Hashi's additional redundancy obviously comes with a higher gas cost, along with moving only as quickly as the slowest oracle in a given set. However, this trade-off seems well worth it given the scope and frequency of past bridge-related security incidents.

Audits

Hashi is currently unaudited. Proceed with caution, there is probably dragons. 🐲

Security and Liability

All contracts are WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

License

Created under the LGPL-3.0+ license.

About

An EVM header oracle aggregator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 57.8%
  • TypeScript 41.0%
  • Other 1.2%