Othentic
  • Introduction
    • Introducing Othentic Stack
    • Use Cases
  • AVS Framework
    • Abstract
    • Quick Start
    • Othentic CLI
      • Key Management
      • Contracts Deployment
      • Operator Registration
      • AVS Logic Implementation
      • Operator Deposit
      • Node Operators
      • Rewards Distribution
      • P2P Config
        • Custom P2P Messaging
        • P2P Auth Layer
        • Metrics and Monitoring
        • Logging
        • Persistent storage
        • Latency
      • CLI Command Reference
    • Smart Contracts
      • AVS Governance
      • Attestation Center
      • Hooks
        • Task Logic
        • Operator Management
        • Rewards Fee Calculator
      • OBLS
      • Othentic Registry
      • Message Handlers
    • Othentic Consensus
      • Abstract
      • Task & Task Definitions
      • Leader Election
      • Proof of Task
      • Execution Service
      • Validation Service
      • Voting Power
      • Rewards and Penalties
      • Internal Tasks
    • FAQ
    • Supported Networks
    • Explainers
      • Networking
      • Multichain
      • Production Guidelines
      • Operator Allowlisting
      • Governance Multisig
  • External
    • AVS Examples
  • GitHub
  • Othentic Hub
Powered by GitBook
On this page
  • Overview
  • Deploy AVS Contracts
  • Configuration
  • Using CLI
  • View AVS Deployed Addresses
  • Deployment Command Examples
  • Contract Addresses Environment Variables
  • Managing AVS Flows: Pause/Unpause
  • Pause Flow
  • Un-pause Flow
  • Usage
  • List of flows
  • Set Staking Contracts
  • Usage
  • Configure a New Staking Strategy
  • Set Minimum Stake for a Staking Contract
  • Usage
  • Set Minimum Voting Power
  • Usage
  • Register
  • Usage
  • Staking Contracts Multiplier
  1. AVS Framework
  2. Othentic CLI

Contracts Deployment

Creating a new AVS requires deploying contracts on-chain.

PreviousKey ManagementNextOperator Registration

Last updated 3 days ago

Overview

Othentic CLI streamlines the deployment of contracts and allows users to configure various operations.

Layer 1 contracts

The following contracts are deployed:

  1. for managing operators and governance policies.

  2. endpoint for broadcasting messages to L2 contracts.

  3. L1AvsTreasury contract for managing rewards and handling protocol fee.

Layer 2 contracts

The following contracts are deployed:

  1. for task verification and historical footprint.

  2. implements Multisig operations and handles BLS signature aggregation.

  3. complementary to l1MessageHandler , used for communicating with L1 components

  4. L2AvsTreasury contract for managing rewards and handling protocol fee.

  5. InternalTaskHandler contract for managing and handling .

To minimize costs and availability associated with running your AVS, AvsGovernance and AttestationCenter are being deployed on L1 and L2 (respectively). The Othentic Stack utilizes to exchange messages between the layers. interacts directly with AvsGovernance and interacts directly with AttestationCenter.


Deploy AVS Contracts

Configuration

Othentic CLI uses .env files for configuration. For the deployment, you need following variables in your .env file:

PRIVATE_KEY_DEPLOYER=...
L1_CHAIN=holesky # Holesky
L2_CHAIN=amoy # Polygon Amoy
PRIVATE_KEY_DEPLOYER=...
L1_CHAIN=mainnet # Ethereum Mainnet
L2_CHAIN=base # Base Mainnet
PRIVATE_KEY_DEPLOYER=...
L1_CHAIN=holesky # Holesky
L2_CHAIN=amoy,base-sepolia # Polygon Amoy, Base Sepolia
PRIVATE_KEY_DEPLOYER=...
L1_CHAIN=mainnet # Ethereum Mainnet
L2_CHAIN=polygon,base # Polygon PoS, Base Mainnet
  • The private key should be a 64-character hex string without the "0x" prefix.

  • Specify L2_CHAIN and L1_CHAIN in the .env file to avoid needing to add --l2-chain to every command. The configuration follows this priority:

    • If both --l1-chain (command) and L1_CHAIN (.env) are set, the command flag will override the .env value.

    • If neither is provided, the default values of holesky (or amoy as a single L2) are applied.

  • You can use holesky-l2 or mainnet-l2 as L2 chains if you want to deploy both L1 and L2 contracts on the same chain.

Using CLI

othentic-cli network deploy [options]

Define the following command options:

Chains

--l1-chain holesky
--l2-chain base-sepolia,amoy # If deploying to multiple L2s
# or:
--l2-chain base-sepolia # If deploying to a single L2

AVS Rewards Token

--rewards-token Defines the token used to reward Operators. Values can be eth or the address of an ERC-20 token.

--rewards-token eth # For native ETH
--rewards-token 0x94373a4919B3240D86eA41593D5eBa789FEF3848 # ERC20 WETH Contract

Initial Deposit

--l1-initial-deposit and --l2-initial-deposit Defines the initial deposit amounts for cross-chain messaging costs between L1 <> L2s (in wei)

Note: In the case of Multichain deployment, the amount passed to the `--l2-initial-deposit` flag will be deposited separately to all L2 chains.

--l1-initial-deposit 1000000000000000000
--l2-initial-deposit 2000000000000000000

AVS Governance Multisig Owner

--avs-governance-multisig-owner Defines the address of the AVS Governance Multisig role. If not specified, the deployer address is set as the default owner.

--avs-governance-multisig-owner 0xAbC1234567890DefABC1234567890defABC12345

L2 rewards [Optional]

Specifying the --l2-rewards flag enables reward distribution to operators on L2 instead of L1. If not specified, rewards will be distributed on L1 by default.

Note: When specifying this flag for an AVS which has multiple L2 deployments, each deployment manages its own accounting and reward flows separately.

--l2-rewards

View AVS Deployed Addresses

After execution, the deployment details including all the contract addresses will be stored in the following file:

cat .othentic/state.output.json
Example JSON Output
{
  "L1": {
    "L1MessageHandler": "0x38baC39513Fff9CDB772FdfF44Ca5131FF25710B",
    "L1AvsTreasury": "0x1ee46B2c097ca5bA7736eC5DfD057fad89EDc0bf",
    "AvsGovernance": "0xabcFd42F4D3E7C4F0E6F367E61D0596415ec8207",
    "RewardsToken": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
  },
  "L2s": [
    {
      "chainId": 80002,
      "OBLS": "0x37dd8Ef4762Dd463eBcA4928d44C555A41348f06",
      "L2MessageHandler": "0x263Aa236589ca5eA2E710eC62D35eA85744bE2c0",
      "AttestationCenter": "0x8200217555aae02f74e4Bf21b7D415bA6820441A",
      "L2AvsTreasury": "0xd67f7D78c5D2f4b19fc925D5101bA42483351C0E",
      "RewardsToken": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
      "l2Rewards": false,
      "InternalTaskHandler": "0xcFe9dC7c678E15fD929d5f9A58F2B3D2bD906f29"
    },
    {
      "chainId": 84532,
      "OBLS": "0xc579E55c2AF1Cd167fF6Be7759278c1dFf64654d",
      "L2MessageHandler": "0xa7345689C51778eeB2D73Ae3863cE9ccC0846D0B",
      "AttestationCenter": "0xEc77867928da1dF7515c9c89366C21CB689304fb",
      "L2AvsTreasury": "0x26b2111E9ff81193B28312f33C2c9427576E64f4",
      "RewardsToken": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
      "l2Rewards": false,
      "InternalTaskHandler": "0x90965833b586dAAE7B566eE776915A3aE60aB7B0"
    }
  ],
  "timestamp": "2025-04-20T07:39:00.205Z"
}

Deployment Command Examples

Using ERC-20 token contract address for rewards distribution:

othentic-cli network deploy \
    --l1-chain holesky \
    --l2-chain base-sepolia,amoy \
    --rewards-token 0x94373a4919B3240D86eA41593D5eBa789FEF3848 \
    --l1-initial-deposit 1000000000000000000 \
    --l2-initial-deposit 1000000000000000000 \
    --avs-governance-multisig-owner <$OWNER_ADDRESS> \
    --name test-avs-name

Using native ETH for rewards distribution:

othentic-cli network deploy \
    --l1-chain holesky \
    --l2-chain base-sepolia,amoy \
    --rewards-token eth \
    --l1-initial-deposit 1000000000000000000 \
    --l2-initial-deposit 1000000000000000000 \
    --avs-governance-multisig-owner <$OWNER_ADDRESS> \
    --name test-avs-name

Using rewards on L2 instead of L1:

othentic-cli network deploy \
    --l1-chain holesky \
    --l2-chain base-sepolia,amoy \
    --reward-token eth \
    --l1-initial-deposit 1000000000000000000 \
    --l2-initial-deposit 1000000000000000000 \
    --avs-governance-multisig-owner <$OWNER_ADDRESS> \
    --name test-avs-name 
    --l2-rewards

Both L1 and L2 contracts on the same L1 chain:

othentic-cli network deploy \
    --l1-chain holesky \
    --l2-chain holesky-l2 \
    --rewards-token eth \
    --l1-initial-deposit 1000000000000000000 \
    --l2-initial-deposit 1000000000000000000 \
    --avs-governance-multisig-owner <$OWNER_ADDRESS> \
    --name test-avs-name

Contract Addresses Environment Variables

Use this command to print out the environment variables in the format used by the CLI:

othentic-cli network contracts

The output is formatted for an easy copy-paste operation into your .env file:

AVS_GOVERNANCE_ADDRESS=0xabcFd42F4D3E7C4F0E6F367E61D0596415ec8207
ATTESTATION_CENTER_ADDRESS=80002@0x8200217555aae02f74e4Bf21b7D415bA6820441A,84532@0xEc77867928da1dF7515c9c89366C21CB689304fb

Note: For L1_CHAIN and L2_CHAIN environment variables and --l1-chain , --l2-chain flags, values should be name of network in english, i.e holesky.

However, the ATTESTATION_CENTER_ADDRESS environment variable should be formatted as seen above:

ATTESTATION_CENTER_ADDRESS=<CHAIN_ID>@<ATTESTATION_CENTER_1_ADDRESS>,<CHAIN_ID>@<ATTESTATION_CENTER_2_ADDRESS>

Managing AVS Flows: Pause/Unpause

The Othentic CLI allows managing AVS network flows through pause-flow and unpause-flow commands. These commands enable AVS governance multi-sig to halt or resume specific flows across Layer 1 and Layer 2.

By default all the flows are unpaused, except the Payments and Batch Payments.

Pause Flow

This command pauses specific AVS operations. It lists all available flows, allowing you to select and pause a specific flow.

othentic-cli network pause-flow

Un-pause Flow

This command resumes previously paused AVS operations. It lists all available flows, allowing you to select and un-pause a specific flow.

othentic-cli network unpause-flow

Usage

othentic-cli network pause-flow

When prompted, enter the private key of the AVS governance multi-sig address and select the flow.

If the selected flow is already paused, the system throws: Error: Selected Flow is already paused

List of flows

Network
Flow
Description
L1

Operator Registration

Pausing prevents new operators from registering on the AVS.

L1

Operator Updating Receiver

Pausing disables the ability to update the operator's reward receiver.

L1

Update AVS Strategies

Pausing prevents any updates to the AVS strategies.

L2

EigenLayer Payments

Pausing halts EigenLayer Rewards distribution.

L2

Batch Payments

Pausing disables Batch payments to operators.

L2

Update AVS Logic

Pausing prevents changes to the AVS logic.

L2

Create AVS Task Definition

Pausing disables the creation of new Task Definitions.

L2

Task Submission

Pausing prevents on-chain task submissions.


Set Staking Contracts

Usage

othentic-cli network set-staking-contracts

Follow these steps when prompted:

  1. Provide the private key of the multi-sig address.

  2. Enter the AVS governance address

  3. A list of supported staking contracts will be displayed. Select one or more from the list and confirm your selection.

Set Custom Staking contract

othentic-cli network set-staking-contracts --staking-contracts-address <address1>,<address2> 

Use the --staking-contracts-address flag (or -sca) to specify staking contract addresses, separated by commas.

Configure a New Staking Strategy

If you need to deploy a new strategy through a shared security provider (e.g., EigenLayer), follow these steps:

  1. Ensure the newly deployed strategy is whitelisted.

  2. Once whitelisted, run the othentic-cli network set-staking-contracts command to set the new strategy to your AVS.

At the end, the CLI will display the transaction hash.


Set Minimum Stake for a Staking Contract

Usage

othentic-cli network set-min-shares

Follow these steps when prompted:

  1. Provide the private key of the multi-sig address.

  2. Enter the AVS governance address

  3. A list of supported staking contracts will be displayed, select a staking contract.

  4. Enter the minimum share value in Wei units. It must be a positive number.

At the end, the CLI will display the transaction hash.


Set Minimum Voting Power

Usage

othentic-cli network set-min-voting-power

Follow these steps when prompted:

  1. Provide the private key of the multi-sig address.

  2. Enter the AVS governance address

  3. Enter the minimum voting power value.

At the end, the CLI will display the transaction hash.


Register

Usage

othentic-cli network register

For mainnet, Add --l1-chain mainnet

Follow these steps when prompted:

  1. Provide the private key of the multi-sig address.

  2. Enter the AVS governance address

  3. Select the shared security provider

  4. Enter all the details such as AVS Name, Description, Website, Logo URL, etc.

  5. The CLI will display the transaction hash.


Staking Contracts Multiplier

A staking multiplier is a configurable weight assigned to a specific staking contract. It determines how much voting power stakers receive per token in that contract and can be adjusted based on trust, risk, or strategic considerations.

The multiplier must be a positive, non-zero number.

Set Staking Contract Multiplier

Usage

othentic-cli network set-staking-contract-multiplier

Follow these steps when prompted:

  1. Provide the private key of the multi-sig address.

  2. Enter the AVS governance address

  3. Enter Staking Contract address and multiplier

  4. The CLI will display the transaction hash.

For , specify network names separated by commas.

The contract cloning process uses SSH to clone a private github repository. Make sure your SSH keys are on Github before running the deployment process.

--l1-chain and --l2-chain define the L1/L2 chains for AVS contracts deployment. For , you can specify multi L2 networks, separating each chain name with a comma.

For a complete list of supported networks, refer to the page.

The Othentic CLI enables you to configure staking contracts for an AVS. It internally calls `setSupportedStakingContracts` method on contract.

Use the shared security provider's method to deploy the strategy for an ERC20 token.

Othentic CLI enables you to configure minimum stake for a staking contract. It internally calls method on the AVS governance contract.

Othentic CLI enables you to set minimum voting power for an AVS. This ensures that only operators with sufficient voting power can influence the consensus. It internally calls method on the AVS governance contract. By default, the minimum voting power is set to 0.

Othentic CLI enables you register your AVS to Eigen layer. It internally calls registerAvsToEigenLayer method on the AVS governance contract. The registration details should follow the format specified in the .

Learn more about staking multipliers and their influence in voting power .

Othentic CLI enables you set voting power multiplier for staking contracts. It internally calls method on the AVS governance contract.

multichain deployment
configured properly
multi-L2 deployment
Supported Networks
AVSGovernance
deployNewStrategy
setMinSharesForStrategy
setMinVotingPower
Onboard AVS Dashboard Metadata URI
AvsGovernance
L1MessageHandler
AttestationCenter
OBLS
L2MessageHandler
Internal Tasks
DVN
L1MessageHandler
L2MessageHandler
setStakingContractMultiplier
here