IFeeVault
Last updated
Last updated
Interface for vaults that support fees but don't have multiple depositors
Set the fee recipient
function setFeeRecipient(address newFeeRecipient) external;
Parameters
newFeeRecipient
address
The new fee recipient address
Claim accrued fees for msg.sender
Automatically claims any earned protocol fees for the protocol
function claimFees() external returns (uint256 feeRecipientFees, uint256 protocolFees);
Returns
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
Claim accrued protocol fees
function claimProtocolFees() external returns (uint256 protocolFees);
Returns
protocolFees
uint256
The amount of protocol fees to be claimed by the protocol
Set the fee calculator
newFeeCalculator can be zero, which has the effect as disabling the fee calculator
function setFeeCalculator(IFeeCalculator newFeeCalculator) external;
Parameters
newFeeCalculator
IFeeCalculator
The new fee calculator
Get the fee calculator
function feeCalculator() external view returns (IFeeCalculator);
Returns
<none>
IFeeCalculator
The current fee calculator contract
Get the fee token
function FEE_TOKEN() external view returns (IERC20);
Returns
<none>
IERC20
The token used for fee payments
Emitted when fees are claimed by the fee recipient
event FeesClaimed(address indexed feeRecipient, uint256 fees);
Parameters
feeRecipient
address
The address claiming the fees
fees
uint256
The amount of fees claimed
Emitted when protocol fees are claimed
event ProtocolFeesClaimed(address indexed protocolFeeRecipient, uint256 protocolEarnedFees);
Parameters
protocolFeeRecipient
address
The address claiming the protocol fees
protocolEarnedFees
uint256
The amount of protocol fees claimed
Emitted when the fee recipient is updated
event FeeRecipientUpdated(address indexed newFeeRecipient);
Parameters
newFeeRecipient
address
The new fee recipient address
Emitted when the fee calculator is updated
event FeeCalculatorUpdated(address indexed newFeeCalculator);
Parameters
newFeeCalculator
address
The new fee calculator address
error Aera__ZeroAddressFeeCalculator();
error Aera__ZeroAddressFeeToken();
error Aera__ZeroAddressFeeRecipient();
error Aera__NoFeesToClaim();
error Aera__CallerIsNotFeeRecipient();
error Aera__CallerIsNotProtocolFeeRecipient();