generated from AngleProtocol/boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 14
/
IManager.sol
27 lines (22 loc) · 1.16 KB
/
IManager.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
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.5.0;
/// @title IManager
/// @author Angle Labs, Inc.
interface IManager {
/// @notice Returns the amount of collateral managed by the Manager
/// @return balances Balances of all the subCollaterals handled by the manager
/// @dev MUST NOT revert
function totalAssets() external view returns (uint256[] memory balances, uint256 totalValue);
/// @notice Hook to invest `amount` of `collateral`
/// @dev MUST revert if the manager cannot accept these funds
/// @dev MUST have received the funds beforehand
function invest(uint256 amount) external;
/// @notice Sends `amount` of `collateral` to the `to` address
/// @dev Called when `agToken` are burnt and during redemptions
// @dev MUST revert if there are not funds enough available
/// @dev MUST be callable only by the transmuter
function release(address asset, address to, uint256 amount) external;
/// @notice Gives the maximum amount of collateral immediately available for a transfer
/// @dev Useful for integrators using `quoteIn` and `quoteOut`
function maxAvailable() external view returns (uint256);
}