-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathIVaultDelegate.sol
More file actions
132 lines (113 loc) · 3.14 KB
/
IVaultDelegate.sol
File metadata and controls
132 lines (113 loc) · 3.14 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
// Neptune Mutual Protocol (https://neptunemutual.com)
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "./IMember.sol";
import "./IVault.sol";
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-solidity/contracts/interfaces/IERC3156FlashLender.sol";
interface IVaultDelegate is IMember {
function preAddLiquidity(
address caller,
bytes32 coverKey,
uint256 amount,
uint256 npmStake
) external returns (uint256 podsToMint, uint256 previousNpmStake);
function postAddLiquidity(
address caller,
bytes32 coverKey,
uint256 amount,
uint256 npmStake
) external;
function accrueInterestImplementation(address caller, bytes32 coverKey) external;
function preRemoveLiquidity(
address caller,
bytes32 coverKey,
uint256 amount,
uint256 npmStake,
bool exit
) external returns (address stablecoin, uint256 stableCoinToRelease);
function postRemoveLiquidity(
address caller,
bytes32 coverKey,
uint256 amount,
uint256 npmStake,
bool exit
) external;
function preTransferGovernance(
address caller,
bytes32 coverKey,
address to,
uint256 amount
) external returns (address stablecoin);
function postTransferGovernance(
address caller,
bytes32 coverKey,
address to,
uint256 amount
) external;
function preTransferToStrategy(
address caller,
IERC20 token,
bytes32 coverKey,
bytes32 strategyName,
uint256 amount
) external;
function postTransferToStrategy(
address caller,
IERC20 token,
bytes32 coverKey,
bytes32 strategyName,
uint256 amount
) external;
function preReceiveFromStrategy(
address caller,
IERC20 token,
bytes32 coverKey,
bytes32 strategyName,
uint256 amount
) external;
function postReceiveFromStrategy(
address caller,
IERC20 token,
bytes32 coverKey,
bytes32 strategyName,
uint256 amount
) external returns (uint256 income, uint256 loss);
function preFlashLoan(
address caller,
bytes32 coverKey,
IERC3156FlashBorrower receiver,
address token,
uint256 amount,
bytes calldata data
)
external
returns (
IERC20 stablecoin,
uint256 fee,
uint256 protocolFee
);
function postFlashLoan(
address caller,
bytes32 coverKey,
IERC3156FlashBorrower receiver,
address token,
uint256 amount,
bytes calldata data
) external;
function calculatePodsImplementation(bytes32 coverKey, uint256 forStablecoinUnits) external view returns (uint256);
function calculateLiquidityImplementation(bytes32 coverKey, uint256 podsToBurn) external view returns (uint256);
function getInfoImplementation(bytes32 coverKey, address forAccount) external view returns (IVault.VaultInfoType memory);
function getStablecoinBalanceOfImplementation(bytes32 coverKey) external view returns (uint256);
function getFlashFee(
address caller,
bytes32 coverKey,
address token,
uint256 amount
) external view returns (uint256);
function getMaxFlashLoan(
address caller,
bytes32 coverKey,
address token
) external view returns (uint256);
}