Deposit

Before distributing rewards to the Operators, its essential to deposit Rewards funds in the AVS Treasury contracts.

Othentic CLI enables depositing rewards into the AVS treasury. It supports both ERC-20 tokens and native ETH, ensuring an automated approval check before initiating the deposit process.

Read More

You can choose one of these options:

1. Using CLI

Prerequisites

For Eigen Rewards v2, the calc-eigen-rewards-params command in Distribute Rewards Guide outputs the total reward amount required for your AVS across all reward batches. Use this value to determine how much you need to deposit before proceeding with reward distribution.

Run the following command:

othentic-cli network rewards deposit --l1-chain <chain> --amount <amount>

Follow these steps when prompted:

1

Provide the private key of the multi-sig address.

Make sure to input the raw 32-byte private key that controls the Operator Account, without leading 0x.

2

Enter the Attestation Center contract address.

3

Enter the AVS Governance Center contract address


2. Using Contracts

You can directly deposit rewards into the L1/L2 AVS Treasury using contract methods.

1

Get Reward Token Address

Retrieve the Reward Token address, set during the AVS contracts deployment.

2

Approve Token Transfer (ERC20)

In case the Rewards token is ERC20, approve the token transfer to the AVS Treasury contract.

const approveTx = await rewardTokenSmartContract.approve(
      avsTreasuryContractAddress,
      amount
    ); 
3

Deposit Rewards

Execute depositNative or depositERC20 on the AVS Treasury contract, with the desired amount.

const depositTx = await avsTreasuryContract.depositERC20(senderAddress, amount); 

// For ETH deposits 
const depositTx = await avsTreasuryContract.depositNative({ value: amount }) 
depositERC20 and depositNative

Once the transaction is confirmed, the deposit is complete.

Last updated