Treasury

Overview

The AVS Treasury contract manages the reward funds for an AVS. It supports both ETH and ERC20-based treasuries, enforces protocol-level fees, handles secure deposits and withdrawals.

  • Depending on which chain rewards are configured, either L1AvsTreasury or L2AvsTreasury contract is deployed.

Write Methods

queueTokenReplacement

Schedules an update to the rewards token address. The actual replacement will only be allowed after the tokenReplacementModificationDelay period has passed.

Parameter
Type
Description

_newToken

address

New rewards token address

completeTokenReplacement

Finalizes the token replacement previously scheduled via queueTokenReplacement.

setTokenReplacementModificationDelay

Sets the delay period (in seconds) required before a token replacement modification can be executed. This delay acts as a safeguard window between queuing a token replacement and its final application.

Parameter
Type
Description

_tokenReplacementModificationDelay

uint32

Delay duration in seconds

depositNative

Deposits Native Eth rewards into the AVS Treasury.

Parameter
Type
Description

amount

uint256

The total ETH amount being deposited.

depositERC20

Deposits ERC20 rewards into the AVS Treasury.

Parameter
Type
Description

address

address

ERC20 token address

amount

uint256

The total token amount being deposited.

Last updated