AVS Register and Deploy
Participation in the AVS ecosystem requires providers to undergo a registration process. The AVS register currently accommodates two methodologies: the module approach based on precompile and the smart contract approach.
Module-Based Approach
For the module-based approach, the registration process encompasses the following procedural steps:
To register an AVS using the module-based approach, one can execute an EVM transaction via precompile, sending it directly to the exocore chain. This registration process utilizes the
RegisterAVS
method, which is provided by the AVS module within the exocore chain networks.RegisterAVS
, registers the AVS. The following parameters need to be supplied:AvsName
: String representing of the AVS nameAvsAddress
: Hexadecimal address of the AVSMinStakeAmount
: Minimum stake (uint64) required for task validityTaskAddr
: Hexadecimal address of the task contractSlashContractAddr
: Hexadecimal address of the slash contractRewardContractAddr
: Hexadecimal address of the reward contractAvsOwnerAddress
: Array of bech32 addresses for AVS ownersAssetID
: Array of permitted asset IDs for the AVSParams
: Array of string parametersUnbondingPeriod
: Duration (uint64) of the unbonding periodMinSelfDelegation
: Minimum self-delegation amount (uint64)EpochIdentifier
: String identifier for the epochMinOptInOperators
: Minimum number (uint64) of opt-in operatorsMinTotalStakeAmount
: Minimum total stake amount (uint64)CallerAddress
: Bech32 address of the precompile callerChainID
: String identifier for the chainAvsReward
: Reward amount (uint64) for the AVSAvsSlash
: Slash amount (uint64) for the AVSAction
: Action identifier (uint64)
Upon successful registration through this method, the AVS will be added to the system. Users can subsequently perform various actions to query and interact with the registered AVS, including:
updateAVS
: Modifies existing AVS parametersderegisterAVS
: Removes an AVS from the systemregisterOperatorToAVS
: Adds a new operator to an AVSderegisterOperatorFromAVS
: Removes an operator from an AVScreateTask
: Initiates a new task within an AVSsubmitProof
: Provides proof of task completionregisterBLSPublicKey
: Registers a BLS public key for an operatorchallenge
: Initiates a challenge against an operator or task
Smart-Contract-Based Approach
For the smart-contract-based approach, the registration process involves the following steps:
The AVS owner develops the customized AVS contract utilizing the Exocore-AVS-SDK repo. This contract encompasses crucial elements such as AVS information, task specifications, verification and more.
The AVS owner commences the registration procedure by executing the
registerAVS
function within the AVS contracts. This function necessitates specific parameters, which are comprehensively outlined in the subsequent table.ParameterTypeExampleDescriptionavsName
string
avs01
Unique identifier for the AVS
assetIDs
string
["0x3e108c058e8066DA635321Dc3018294cA82ddEdf","0x3e108c058e8066DA635321Dc3018294cA82ddEdf"]
List of asset IDs accepted by the AVS
minStakeAmount
uint64
1000
Minimum stake required to initiate a task
taskAddr
address
0x1234567890abcdef1234567890abcdef12345678
Hexadecimal address of the task contract
slashAddr
address
0xabcdef1234567890abcdef1234567890abcdef12
Hexadecimal address of the slashing contract
rewardAddr
address
0x7890abcdef1234567890abcdef1234567890abcd
Hexadecimal address of the reward contract
avsOwnerAddress
string[]
["exo1uhmndjuatwcqkdtwpccf8l9pq92p3jftc4s6ef", "exo1uhmndjuatwcqkdtwpccf8l9pq92p3jftc4s6ef"]
Bech32 addresses of AVS owners
avsUnbondingPeriod
uint64
10
Number of epochs for operator unbonding
minSelfDelegation
uint64
500
Minimum self-delegation required for operator participation
epochIdentifier
string
epoch_01
Identifier from the epochs module
params
uint64[]
[5, 5, 5, 6]
Array of 4 elements defining task creation parameters (see table below)
ParameterNameTypeExampleDescriptionparam1
min_opt_in_operators
uint64
5
Minimum number of operators required for task execution
param2
min_total_stake_amount
uint64
5
Minimum aggregate stake amount necessary for task initiation
param3
avs_reward
uint64
5
Proportion of reward allocated to the AVS
param4
avs_slash
uint64
6
Proportion of penalty applied in case of non-compliance
AVS Contract Deploy
Deploy contracts using remix or other third-party libraries
Smart Contract Example
Type
Address
avs service contract
0xDF907c29719154eb9872f021d21CAE6E5025d7aB
avs owner
exo1uhmndjuatwcqkdtwpccf8l9pq92p3jftc4s6ef
operator
exo1uhmndjuatwcqkdtwpccf8l9pq92p3jftc4s6ef
Operator and AVS Binding Relationship
Two methods are available for establishing an operator-AVS binding:
Smart Contract Utilization: Operators can utilize the
registerOperatorToAVS
function within the AVS contract to initiate the binding process. This approach leverages the AVS smart contract to establish the connection.Command Line Interface (CLI) Utilization: Alternatively, operators may use the Exocore CLI to facilitate the opt-in procedure. This method involves executing a designated command to register the operator with the specified AVS.
Example:
Parameters:
[avs-address]: Hexadecimal string representing the AVS address
[public-key-in-JSON-format]: Optional JSON-formatted public key of the operator
The Example Result:
Both approaches are supported for establishing an operator-AVS binding. These methods ensure a secure and efficient connection between operators and their respective AVSs.
Last updated