Contracts Deployment
Creating a new AVS requires deploying contracts on-chain.
Last updated
Creating a new AVS requires deploying contracts on-chain.
Last updated
Othentic CLI streamlines the deployment of contracts and allows users to configure various operations.
The following contracts are deployed:
for managing operators and governance policies.
endpoint for broadcasting messages to L2 contracts.
L1AvsTreasury contract for managing rewards and handling protocol fee.
The following contracts are deployed:
for task verification and historical footprint.
implements Multisig operations and handles BLS signature aggregation.
complementary to l1MessageHandler
, used for communicating with L1 components
L2AvsTreasury contract for managing rewards and handling protocol fee.
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
.
Othentic CLI uses .env
files for configuration. For the deployment, you need following variables in your .env file:
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 value of 17000/holesky
(or 80002/amoy
for L2) is applied.
Define the following command options:
--rewards-token
Defines the token used to reward Operators. Values can be eth
or the address of an ERC-20 token.
--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.
--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.
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.
Using ERC-20 token for rewards distribution:
Using native ETH for rewards distribution:
Using rewards on L2 instead of L1:
After execution, the deployment details including all the contract addresses will be stored in the following file:
Use this command to display the deployed addresses associated with the AVS:
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.
This command pauses specific AVS operations. It lists all available flows, allowing you to select and pause a specific flow.
This command resumes previously paused AVS operations. It lists all available flows, allowing you to select and un-pause a specific 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
Operator Registration: Pausing prevents new operators from registering on the AVS.
Operator Updating Receiver: Pausing disables the ability to update the operator's reward receiver.
Update AVS Strategies: Pausing prevents any updates to the AVS strategies.
EigenLayer Payments: Pausing halts EigenLayer Rewards distribution.
Batch Payments: Pausing disables Batch payments to operators.
Update AVS Logic: Pausing prevents changes to the AVS logic.
Create AVS Task Definition: Pausing disables the creation of new Task Definitions.
Task Submission: Pausing prevents on-chain task submissions.
Follow these steps when prompted:
Provide the private key of the multi-sig address.
Enter the AVS governance address
A list of supported staking contracts will be displayed. Select one or more from the list and confirm your selection.
Use the --staking-contracts-address
flag (or -sca
) to specify staking contract addresses, separated by commas.
If you need to deploy a new strategy through a shared security provider (e.g., EigenLayer), follow these steps:
Ensure the newly deployed strategy is whitelisted.
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.
Follow these steps when prompted:
Provide the private key of the multi-sig address.
Enter the AVS governance address
A list of supported staking contracts will be displayed, select a staking contract.
Enter the minimum share value in Wei units. It must be a positive number.
At the end, the CLI will display the transaction hash.
Follow these steps when prompted:
Provide the private key of the multi-sig address.
Enter the AVS governance address
Enter the minimum voting power value.
At the end, the CLI will display the transaction hash.
For mainnet, Add --l1-chain mainnet
Follow these steps when prompted:
Provide the private key of the multi-sig address.
Enter the AVS governance address
Select the shared security provider
Enter all the details such as AVS Name, Description, Website, Logo URL, etc.
The CLI will display the transaction hash.
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.
Follow these steps when prompted:
Provide the private key of the multi-sig address.
Enter the AVS governance address
Enter Staking Contract address and multiplier
The CLI will display the transaction hash.
For , specify chainIds 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.