FeeVault
Last updated
Last updated
Inherits: IFeeVault, BaseVault
This contract extends BaseVault with fee capabilities for vaults that have a single logical owner of all assets. The vault relies on an external contract called the fee calculator which is shared across multiple vaults The fee calculator is responsible for calculating the TVL and performance fees for the vault, but the vault has control over those fees. Fee claims are initiated via the vault, which consults and updates the fee calculator upon successful claims
Address of the fee token
IERC20 public immutable FEE_TOKEN;
Address of the fee calculator contract
IFeeCalculator public feeCalculator;
Address of the fee recipient
address public feeRecipient;
Modifier to check that the caller is the fee recipient
modifier onlyFeeRecipient();
constructor() BaseVault();
Set the fee calculator
newFeeCalculator can be zero, which has the effect as disabling the fee calculator
function setFeeCalculator(IFeeCalculator newFeeCalculator) external requiresAuth;
Parameters
newFeeCalculator
IFeeCalculator
The new fee calculator
Set the fee recipient
function setFeeRecipient(address newFeeRecipient) external requiresAuth;
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 onlyFeeRecipient 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