IFeeVault

Interface for vaults that support fees but don't have multiple depositors

Functions

setFeeRecipient

Set the fee recipient

function setFeeRecipient(address newFeeRecipient) external;

Parameters

Name
Type
Description

newFeeRecipient

address

The new fee recipient address

claimFees

Claim accrued fees for msg.sender

Automatically claims any earned protocol fees for the protocol

function claimFees() external returns (uint256 feeRecipientFees, uint256 protocolFees);

Returns

Name
Type
Description

feeRecipientFees

uint256

The amount of fees to be claimed by the fee recipient

protocolFees

uint256

The amount of protocol fees to be claimed by the protocol

claimProtocolFees

Claim accrued protocol fees

Returns

Name
Type
Description

protocolFees

uint256

The amount of protocol fees to be claimed by the protocol

setFeeCalculator

Set the fee calculator

newFeeCalculator can be zero, which has the effect as disabling the fee calculator

Parameters

Name
Type
Description

newFeeCalculator

IFeeCalculator

The new fee calculator

feeCalculator

Get the fee calculator

Returns

Name
Type
Description

<none>

IFeeCalculator

The current fee calculator contract

FEE_TOKEN

Get the fee token

Returns

Name
Type
Description

<none>

IERC20

The token used for fee payments

Events

FeesClaimed

Emitted when fees are claimed by the fee recipient

Parameters

Name
Type
Description

feeRecipient

address

The address claiming the fees

fees

uint256

The amount of fees claimed

ProtocolFeesClaimed

Emitted when protocol fees are claimed

Parameters

Name
Type
Description

protocolFeeRecipient

address

The address claiming the protocol fees

protocolEarnedFees

uint256

The amount of protocol fees claimed

FeeRecipientUpdated

Emitted when the fee recipient is updated

Parameters

Name
Type
Description

newFeeRecipient

address

The new fee recipient address

FeeCalculatorUpdated

Emitted when the fee calculator is updated

Parameters

Name
Type
Description

newFeeCalculator

address

The new fee calculator address

Errors

Aera__ZeroAddressFeeCalculator

Aera__ZeroAddressFeeToken

Aera__ZeroAddressFeeRecipient

Aera__NoFeesToClaim

Aera__CallerIsNotFeeRecipient

Aera__CallerIsNotProtocolFeeRecipient

Last updated