-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathLoanOpeningsEvents.sol
56 lines (51 loc) · 1.71 KB
/
LoanOpeningsEvents.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
/**
* 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 Openings 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 openings operations.
* */
contract LoanOpeningsEvents is ModulesCommonEvents {
/// topic0: 0x7bd8cbb7ba34b33004f3deda0fd36c92fc0360acbd97843360037b467a538f90
event Borrow(
address indexed user,
address indexed lender,
bytes32 indexed loanId,
address loanToken,
address collateralToken,
uint256 newPrincipal,
uint256 newCollateral,
uint256 interestRate,
uint256 interestDuration,
uint256 collateralToLoanRate,
uint256 currentMargin
);
/// topic0: 0xf640c1cfe1a912a0b0152b5a542e5c2403142eed75b06cde526cee54b1580e5c
event Trade(
address indexed user,
address indexed lender,
bytes32 indexed loanId,
address collateralToken,
address loanToken,
uint256 positionSize,
uint256 borrowedAmount,
uint256 interestRate,
uint256 settlementDate,
uint256 entryPrice, /// one unit of collateralToken, denominated in loanToken
uint256 entryLeverage,
uint256 currentLeverage
);
/// topic0: 0x0eef4f90457a741c97d76fcf13fa231fefdcc7649bdb3cb49157c37111c98433
event DelegatedManagerSet(
bytes32 indexed loanId,
address indexed delegator,
address indexed delegated,
bool isActive
);
}