EigenLayer
The following is the onboarding guide for Borrowers (referred to as agents or operators in EigenLayer contracts) using EigenLayer. The process is fully automated by the Cap system via the EigenAgentManager contract.
1. Submit AgentConfig information to the Cap team
This is the only action a Borrower needs to take. The rest of the process is handled on behalf of the Borrower.
struct AgentConfig {
address agent; // Your agent/borrower address
address strategy; // EigenLayer strategy address (e.g., wstETH)
address restaker; // Address of the Underwriter who will delegate to you
string avsMetadata; // AVS metadata URI (can be empty string)
string operatorMetadata; // Operator metadata URI (can be empty string)
uint256 ltv; // Loan-to-Value ratio (e.g., 5e26 for 50%)
uint256 liquidationThreshold; // Liquidation threshold (e.g., 8e26 for 80%)
uint256 delegationRate; // Underwriting premium for rewards (e.g., 2e25 for 2%)
}The Borrower must use a new address for each new Underwriter. The Borrower cannot delegate to other AVSs.
2. Agent Registration
Cap's Admin registers the Agent to both EigenLayer and Cap via the addEigenAgent function.
Specifically, the function performs the following:
Registers Agent to Cap via addAgent function in the Delegation contract
Deploys EigenOperator beacon proxy which handles
Registering to EigenLayer's DelegationManager
Creating and registering to a new Operator Set in EigenLayer's AllocationManager
Setting Operator AVS reward split 0%
Allowlisting TOTP digest for Underwriters (valid for 28 days)
Once registered, you will have an EigenOperator proxy address and an Operator Set ID for the Cap AVS.
3. Allocation
After registration, there is a 17.5 day delay of the allocation configuration for EigenLayer. In this time, Underwriters cannot delegate to the EigenOperator and as such, Borrowers cannot participate in loan activities. This is because allocation magnitude cannot be updated prior to this allocation configuration delay period.
After the delay period, Borrowers can allocate delegated collateral to Cap so that it counts as effective coverage, via the permissionless allocate function. Adding and withdrawing collateral after this time is now instant.
Once coverage is live, Borrowers can now borrow against delegated collateral.
4. Verifying Information
Agent Registration:
IDelegation(delegation).agentData(agent).network should return EigenServiceManager's address
Agent Config:
IDelegation(delegation).agentData(agent)
EigenOperator Deployment:
IEigenServiceManager(eigenServiceManager).getEigenOperator(agent)
Operator address:
IEigenOperator(eigenOperator).operator()
Underwriter address:
IEigenOperator(eigenOperator).restaker()
Current Coverage:
IEigenServiceManager(eigenServiceManager).coverage(agent)
TOTP expiry:
IEigenOperator(eigenOperator).getCurrentTotpExpiryTimestamp()
5. Updating Metadata
Borrowers can update operator metadata at any time via the updateOperatorMetadataURI. Please reach out to the Cap team if you are unable to host the metadata.
Last updated