Skip to content

souradeep-das/finality_index

Repository files navigation

Screenshot 2024-11-15 at 7 34 29 PM

ReliaBlocks: On-chain reliability index for non-finalized blocks in Optimistic Rollups

Built for EthGlobal Bangkok by Souradeep Das, Ethan Lam, Varun Vaidya, Sanjay Amirthraj

An on-chain reliability index for non-finalized blocks in Optimistic Rollups to help non-validators estimate the likelihood of a non-finalized block being finalized. Such an index would provide valuable information to users without having to trust a specific entity or a validator for the information. A dynamic score, instead of a binary final/non-final answer - also helps put a number/weight to the reliability of what multiple agents are thinking about the finality of a specific block. An on-chain reliability index for non-finalized blocks in Optimistic Rollups would greatly enhance user experience by reducing uncertainty and improving risk assessment for transactions.

Components

  • Layer AVS WASMI component (layer-avs/)
  • Eigen Layer AVS component (root)
  • Eigen Layer Solidity smart contracts that work with the AVS component (contracts/)
  • UI dashboard illustrating the reliability score and a derived interest rate for further utilization. (frontend/)
Screenshot 2024-11-15 at 6 09 20 PM 2

Test Locally

  1. Install deps using
   npm install
  1. Start a test network using
npm run start:anvil  
  1. To build the project, deploy contracts and run the operator
npm run build
npm run deploy:core
npm run deploy:finality_index
npm run extract:abis
npm run start:operator
  1. Once, the operator is running -
npm run start:traffic
  1. To build up the UI
cd frontend
npm i
npm run dev

Running Layer's WASI component

  1. After deploying Verifier, Operator contracts on Layer, to test the wasi interface, run:
 avs-toolkit-cli wasmatic run \                                              (base) 
         --wasm-source ./target/wasm32-wasip1/release/finality_index.wasm  \
         --envs "API_KEY=<your infura API key>" --input '{"x": <optimism-block-number>}'

About

On-chain reliability index for non-finalized blocks in Optimistic Rollups

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •