/** * 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 swapExcess(bool shouldRefund, uint256 amount, uint256 amountInRbtc, uint256 threshold); }