forked from Synthetixio/synthetix
-
Notifications
You must be signed in to change notification settings - Fork 2
/
ILiquidator.sol
54 lines (36 loc) · 1.71 KB
/
ILiquidator.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
pragma solidity >=0.4.24;
interface ILiquidator {
// Views
function issuanceRatio() external view returns (uint);
function liquidationDelay() external view returns (uint);
function liquidationRatio() external view returns (uint);
function liquidationEscrowDuration() external view returns (uint);
function liquidationPenalty() external view returns (uint);
function selfLiquidationPenalty() external view returns (uint);
function liquidateReward() external view returns (uint);
function flagReward() external view returns (uint);
function liquidationCollateralRatio() external view returns (uint);
function getLiquidationDeadlineForAccount(address account) external view returns (uint);
function getLiquidationCallerForAccount(address account) external view returns (address);
function isLiquidationOpen(address account, bool isSelfLiquidation) external view returns (bool);
function isLiquidationDeadlinePassed(address account) external view returns (bool);
function calculateAmountToFixCollateral(
uint debtBalance,
uint collateral,
uint penalty
) external view returns (uint);
function liquidationAmounts(address account, bool isSelfLiquidation)
external
view
returns (
uint totalRedeemed,
uint debtToRemove,
uint escrowToLiquidate,
uint initialDebtBalance
);
// Mutative Functions
function flagAccountForLiquidation(address account) external;
// Restricted: used internally to Synthetix contracts
function removeAccountInLiquidation(address account) external;
function checkAndRemoveAccountInLiquidation(address account) external;
}