forked from euler-xyz/euler-encode-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIWorkshopVault.sol
29 lines (23 loc) · 1.31 KB
/
IWorkshopVault.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
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.19;
import "evc/interfaces/IVault.sol";
interface IWorkshopVault is IVault {
// [ASSIGNMENT]: add borrowing functionality by implementing the following functions:
function borrow(uint256 assets, address receiver) external;
function repay(uint256 assets, address receiver) external;
function pullDebt(address from, uint256 assets) external returns (bool);
function liquidate(address violator, address collateral) external;
// [ASSIGNMENT]: don't forget that the following functions must be overridden in order to support borrowing:
// [ASSIGNMENT]: - disableController()
// [ASSIGNMENT]: - checkAccountStatus()
// [ASSIGNMENT]: - maxWithdraw()
// [ASSIGNMENT]: - maxRedeem()
// [ASSIGNMENT]: - _convertToShares()
// [ASSIGNMENT]: - _convertToAssets()
// [ASSIGNMENT]: don't forget about implementing and using modified version of the _msgSender() function for the
// borrowing purposes
// [ASSIGNMENT] optional: add interest accrual
// [ASSIGNMENT] optional: integrate with an oracle of choice in checkAccountStatus() and liquidate()
// [ASSIGNMENT] optional: implement a circuit breaker in checkVaultStatus(), may be EIP-7265 inspired
// [ASSIGNMENT] optional: add EIP-7540 compatibility for RWAs
}