-
Notifications
You must be signed in to change notification settings - Fork 14
/
IVault.sol
97 lines (63 loc) · 2.52 KB
/
IVault.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// SPDX-License-Identifier: GPL-3.0
// Docgen-SOLC: 0.8.15
pragma solidity ^0.8.15;
import {IERC4626, IERC20} from "./IERC4626.sol";
// Fees are set in 1e18 for 100% (1 BPS = 1e14)
struct VaultFees {
uint64 deposit;
uint64 withdrawal;
uint64 management;
uint64 performance;
}
/// @notice Init data for a Vault
struct VaultInitParams {
/// @Notice Address of the deposit asset
IERC20 asset;
/// @Notice Address of the adapter used by the vault
IERC4626 adapter;
/// @Notice Fees used by the vault
VaultFees fees;
/// @Notice Address of the recipient of the fees
address feeRecipient;
/// @Notice Owner of the vault (Usually the submitter)
address owner;
}
interface IVault is IERC4626 {
// FEE VIEWS
function accruedManagementFee() external view returns (uint256);
function accruedPerformanceFee() external view returns (uint256);
function highWaterMark() external view returns (uint256);
function assetsCheckpoint() external view returns (uint256);
function feesUpdatedAt() external view returns (uint256);
function feeRecipient() external view returns (address);
// USER INTERACTIONS
function deposit(uint256 assets) external returns (uint256);
function mint(uint256 shares) external returns (uint256);
function withdraw(uint256 assets) external returns (uint256);
function redeem(uint256 shares) external returns (uint256);
function takeManagementAndPerformanceFees() external;
// MANAGEMENT FUNCTIONS - STRATEGY
function adapter() external view returns (address);
function proposedAdapter() external view returns (address);
function proposedAdapterTime() external view returns (uint256);
function proposeAdapter(IERC4626 newAdapter) external;
function changeAdapter() external;
// MANAGEMENT FUNCTIONS - FEES
function fees() external view returns (VaultFees memory);
function proposedFees() external view returns (VaultFees memory);
function proposedFeeTime() external view returns (uint256);
function proposeFees(VaultFees memory) external;
function changeFees() external;
function setFeeRecipient(address feeRecipient) external;
// MANAGEMENT FUNCTIONS - OTHER
function quitPeriod() external view returns (uint256);
function setQuitPeriod(uint256 _quitPeriod) external;
// INITIALIZE
function initialize(
IERC20 asset_,
IERC4626 adapter_,
VaultFees memory fees_,
address feeRecipient_,
address owner
) external;
}