-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathLoanClosingsEvents.sol
72 lines (65 loc) · 2.17 KB
/
LoanClosingsEvents.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
/**
* Copyright 2017-2021, bZeroX, LLC. All Rights Reserved.
* Licensed under the Apache License, Version 2.0.
*/
pragma solidity 0.5.17;
import "./ModulesCommonEvents.sol";
/**
* @title The Loan Closing Events contract.
* @notice This contract code comes from bZx. bZx is a protocol for tokenized
* margin trading and lending https://bzx.network similar to the dYdX protocol.
*
* This contract contains the events for loan closing operations.
* */
contract LoanClosingsEvents is ModulesCommonEvents {
/// topic0: 0x6349c1a02ec126f7f4fc6e6837e1859006e90e9901635c442d29271e77b96fb6
event CloseWithDeposit(
address indexed user,
address indexed lender,
bytes32 indexed loanId,
address closer,
address loanToken,
address collateralToken,
uint256 repayAmount,
uint256 collateralWithdrawAmount,
uint256 collateralToLoanRate,
uint256 currentMargin
);
/// topic0: 0x2ed7b29b4ca95cf3bb9a44f703872a66e6aa5e8f07b675fa9a5c124a1e5d7352
event CloseWithSwap(
address indexed user,
address indexed lender,
bytes32 indexed loanId,
address collateralToken,
address loanToken,
address closer,
uint256 positionCloseSize,
uint256 loanCloseAmount,
uint256 exitPrice, // one unit of collateralToken, denominated in loanToken
uint256 currentLeverage
);
/// topic0: 0x46fa03303782eb2f686515f6c0100f9a62dabe587b0d3f5a4fc0c822d6e532d3
event Liquidate(
address indexed user,
address indexed liquidator,
bytes32 indexed loanId,
address lender,
address loanToken,
address collateralToken,
uint256 repayAmount,
uint256 collateralWithdrawAmount,
uint256 collateralToLoanRate,
uint256 currentMargin
);
event Rollover(
address indexed user,
address indexed lender,
bytes32 indexed loanId,
uint256 principal,
uint256 collateral,
uint256 endTimestamp,
address rewardReceiver,
uint256 reward
);
event swapExcess(bool shouldRefund, uint256 amount, uint256 amountInRbtc, uint256 threshold);
}