-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathFeeAdminAbstractVault.sol
51 lines (44 loc) · 1.54 KB
/
FeeAdminAbstractVault.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.17;
// Libs
import { AbstractVault } from "../AbstractVault.sol";
/**
* @title Abstract ERC-4626 vault that collects fees.
* @author mStable
* @dev VERSION: 1.0
* DATE: 2022-05-27
*
* The following functions have to be implemented
* - totalAssets()
* - the token functions on `AbstractToken`.
*
* The following functions have to be called by implementing contract.
* - constructor
* - AbstractVault(_asset)
* - VaultManagerRole(_nexus)
* - VaultManagerRole._initialize(_vaultManager)
* - AbstractVault._initialize(_assetToBurn)
* - FeeAdminAbstractVault._initialize(_feeReceiver)
*/
abstract contract FeeAdminAbstractVault is AbstractVault {
/// @notice Account that receives the performance fee as shares.
address public feeReceiver;
event FeeReceiverUpdated(address indexed feeReceiver);
/**
* @param _feeReceiver Account that receives the performance fee as shares.
*/
function _initialize(address _feeReceiver) internal virtual override {
feeReceiver = _feeReceiver;
}
/***************************************
Vault Admin
****************************************/
/**
* @notice Called by the protocol Governor to set the fee receiver address.
* @param _feeReceiver Address that will receive the fees.
*/
function setFeeReceiver(address _feeReceiver) external onlyGovernor {
feeReceiver = _feeReceiver;
emit FeeReceiverUpdated(feeReceiver);
}
}