Skip to content

BuildOnBeam/avs-poc

Repository files navigation

Bringing Oracles To Beam Network


TL;DR!

In this PoC, I set up a custom oracle using Othentic cli stack and eigenlayer. Basically there is a system where 3 Attester nodes fetch the price from a data source like binance and other Validator nodes check that the price is correct. After the check passes, the price is set on chain.

check this tx to see the price on chain of ETH in USD

At the moment this is in amoy testnet. We can Deploy Othentic Contracts on Beam.


Simple Price Oracle AVS Example

This repository demonstrates how to implement a simple price oracle AVS using the Othentic Stack.


Table of Contents

  1. Overview
  2. Project Structure
  3. Architecture
  4. Prerequisites
  5. Installation
  6. Usage

Overview

The Simple Price Oracle AVS Example demonstrates how to deploy a minimal AVS using Othentic Stack.

Features

  • Containerised deployment: Simplifies deployment and scaling.
  • Prometheus and Grafana integration: Enables real-time monitoring and observability.

Project Structure

📂 simple-price-oracle-avs-example
├── Execution_Service  # Implements task execution logic
├── Validation_Service # Implements task validation logic
├── grafana            # Grafana monitoring configuration
├── docker-compose.yml # Docker setup for Operator Nodes (Performer, Attesters, Aggregator), Execution Service, Validation Service, and monitoring tools
└── README.md          # Project documentation

Architecture

Price oracle sample

The Performer node executes tasks using the Task Execution Service and sends the results to the p2p network.

Attester Nodes validate task execution through the Validation Service. Based on the Validation Service's response, attesters sign the tasks. In this AVS:

Task Execution logic:

  • Fetch the ETHUSDT price.
  • Store the result in IPFS.
  • Share the IPFS CID as proof.

Validation Service logic:

  • Retrieve the price from IPFS using the CID.
  • Get the expected ETHUSDT price.
  • Validate by comparing the actual and expected prices within an acceptable margin.

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/Othentic-Labs/simple-price-oracle-avs-example.git
    cd simple-price-oracle-avs-example
  2. Install Othentic CLI:

    npm i -g @othentic/othentic-cli

Usage

Follow the steps in the official documentation's Quickstart Guide for setup and deployment.

Next

Modify the different configurations, tailor the task execution logic as per your use case, and run the AVS.

Happy Building! 🚀

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published