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

function claimProtocolFees() external returns (uint256 protocolFees);

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

function setFeeCalculator(IFeeCalculator newFeeCalculator) external;

Parameters

Name
Type
Description

newFeeCalculator

IFeeCalculator

The new fee calculator

feeCalculator

Get the fee calculator

function feeCalculator() external view returns (IFeeCalculator);

Returns

Name
Type
Description

<none>

IFeeCalculator

The current fee calculator contract

FEE_TOKEN

Get the fee token

function FEE_TOKEN() external view returns (IERC20);

Returns

Name
Type
Description

<none>

IERC20

The token used for fee payments

Events

FeesClaimed

Emitted when fees are claimed by the fee recipient

event FeesClaimed(address indexed feeRecipient, uint256 fees);

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

event ProtocolFeesClaimed(address indexed protocolFeeRecipient, uint256 protocolEarnedFees);

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

event FeeRecipientUpdated(address indexed newFeeRecipient);

Parameters

Name
Type
Description

newFeeRecipient

address

The new fee recipient address

FeeCalculatorUpdated

Emitted when the fee calculator is updated

event FeeCalculatorUpdated(address indexed newFeeCalculator);

Parameters

Name
Type
Description

newFeeCalculator

address

The new fee calculator address

Errors

Aera__ZeroAddressFeeCalculator

error Aera__ZeroAddressFeeCalculator();

Aera__ZeroAddressFeeToken

error Aera__ZeroAddressFeeToken();

Aera__ZeroAddressFeeRecipient

error Aera__ZeroAddressFeeRecipient();

Aera__NoFeesToClaim

error Aera__NoFeesToClaim();

Aera__CallerIsNotFeeRecipient

error Aera__CallerIsNotFeeRecipient();

Aera__CallerIsNotProtocolFeeRecipient

error Aera__CallerIsNotProtocolFeeRecipient();

Last updated