Quick Start

Instructions for installing the Othentic CLI and deploy a demo AVS.

Prerequisites

Install the Othentic CLI

Installing Othentic CLI with npm:

npm i -g @othentic/othentic-cli

Verify installation by the command:

othentic-cli -h

The outcome should be similar to:

Usage: main [options] [command]

Options:
  -v, --version     show othentic-cli version
  -h, --help        display help for command

Commands:
  node <type>       run an AVS node
  network <action>  deploy and manage your AVS network
  ...

✅ CLI installation is completed.


Demo AVS

Configure, deploy, and run a demo AVS.

Prerequisites

For the purposes of the demo AVS, you need to register 3 self-deploy Operators with 0.01 stETH.

  • Deployer account:

  • Operator account x 3 (Script):

    • At least 0.02 holETH on Holesky

  • ERC-20 token address

Othentic CLI

First, update the Othentic CLI:

npm i -g @othentic/othentic-cli

It’s recommended to keep your Othentic CLI up-to-date as new features and fixes are released frequently.

Prepare Simple Price Oracle Example


Download the Simple Price Oracle Example repository:

git clone git@github.com:Othentic-Labs/simple-price-oracle-avs-example.git
cd simple-price-oracle-avs-example
rm -rf .git

From here onward, we assume all commands run from the root of the Simple Price Oracle Example directory.

Github repo - https://github.com/Othentic-Labs/simple-price-oracle-avs-example

Environment file

For the deployment, we need to set the Deployer account’s private key in the .env file:

PRIVATE_KEY=...

Make sure the Deployer account has at least ~1.5 holETH

Contracts deployment


To deploy the AVS’s on-chain components, run the following command:

othentic-cli network deploy \
    --erc20 0x6B5817E7091BC0C747741E96820b0199388245EA \
    --l1-initial-deposit 1000000000000000000 \
    --l2-initial-deposit 2000000000000000000 \
    --name test-avs-name

By default, Othentic CLI deploys your contracts on Holesky and Amoy. To deploy on different chains, you’d need to configure specific environment variables. Consult the Othentic team for more information.

Find the Contracts Deployment for more information.

Operators Architecture Overview


Othentic does not run any network on its own. The Othentic CLI helps you build your own AVS on top of the Othentic Stack.

Operators Setup


For the purposes of the demo, you need to register 3 internal Operators with 0.01 stETH.

In order to run the AVS Operators, it is required to setup their corresponding Ethereum accounts with the necessary metadata and shares on EigenLayer, and register as an AVS-specific Operator using auto-generated BLS key.

Utility script for creating an account [Optional]

If you do not have existing accounts to use as Operators, you can use this script to create & fund an account on Holesky:

source .env

RPC=https://rpc.ankr.com/eth_holesky/80921f6657bf5ad15fb4577b369c28c4f84a652625322575f085fceaa7e47653
ACCOUNT=$(openssl rand -hex 32)
ADDRESS=$(cast wallet address --private-key $ACCOUNT)

echo "Transferring 0.02 ETH on Holesky..."

cast send \
    --rpc-url $RPC \
    --private-key $PRIVATE_KEY \
    --value 0.02ether \
    $ADDRESS

echo "Private key: $ACCOUNT"
echo "Address: $ADDRESS"
echo "Balance: $(cast balance --rpc-url $RPC $ADDRESS)"

You can either run the script using sh <script-path> or make the script executable with chmod a+x <script-path> then run it with ./<script-path>

Register as an operator for both EigenLayer and the AVS

othentic-cli operator register

Convert ETH into stETH [Optional]

If you lack the funds in stETH, use the following command instead. This command converts 0.012 ETH into stETH before depositing it into EigenLayer pool:

othentic-cli operator deposit --strategy stETH --shares 0.01 --convert 0.012

Activate your Operator by depositing into EigenLayer

Deposit 0.01 stETH into EigenLayer pool.

othentic-cli operator deposit --strategy stETH --shares 0.01

✅ Your internal Operators are now ready to opt-in to your AVS.

Running an AVS

Let's run the demo AVS inside the simple-price-oracle-avs-example directory.

Configuration

First, configure additional environment variables by running the following command to print your contract addresses in .env format:

othentic-cli network contracts

Fill in your .env file with the following variables:

AVS_GOVERNANCE_ADDRESS=
ATTESTATION_CENTER_ADDRESS=

PRIVATE_KEY_PERFORMER=
PRIVATE_KEY_AGGREGATOR=
PRIVATE_KEY_ATTESTER1=
PRIVATE_KEY_ATTESTER2=
PRIVATE_KEY_ATTESTER3=
PRIVATE_KEY_SYNCER=
PRIVATE_KEY_DEPLOYER=

PINATA_API_KEY=7824585a98fe36414d68
PINATA_SECRET_API_KEY=41a53a837879721969e73008d91180df30dbc66097c7f75f08cd5489176b43ea
IPFS_HOST=https://othentic.mypinata.cloud/ipfs/

OTHENTIC_BOOTSTRAP_ID=12D3KooWBNFG1QjuF3UKAKvqhdXcxh9iBmj88cM5eU2EK5Pa91KB
OTHENTIC_BOOTSTRAP_SEED=97a64de0fb18532d4ce56fb35b730aedec993032b533f783b04c9175d465d9bf

For the demo AVS purpose, it is recommended that attesters’ private keys be used as values for performer and aggregator private keys.

If you've deployed your contracts on chains other than the defaults, make sure to set the corresponding environment variables.

Running the Network

The docker-compose configuration sets up the following:

  • Aggregator node

  • 3 Attester nodes

  • Validation service endpoint

  • Execution service endpoint

  • Sync shares service

docker-compose up --build

If you wish to rebuild existing images, update the Othentic CLI inside the docker images:

docker-compose build --no-cache

Executing a task

To execute a task we send a POST request to the Task Performer service:

curl -X POST http://localhost:4003/task/execute

✅ Your demo AVS is completed.

Last updated