BZxLoanHealth
LogChangeLenderOwnership
6b828d62
inputs | 0 | bytes32 | loanOrderHash | |
1 | address | oldOwner | ||
2 | address | newOwner |
LogChangeTraderOwnership
5b0dd3a6
inputs | 0 | bytes32 | loanOrderHash | |
1 | address | oldOwner | ||
2 | address | newOwner |
LogIncreasedLoanableAmount
f10dbd67
inputs | 0 | bytes32 | loanOrderHash | |
1 | address | lender | ||
2 | uint256 | loanTokenAmountAdded | ||
3 | uint256 | loanTokenAmountFillable |
LogLoanAdded
887264fe
inputs | 0 | bytes32 | loanOrderHash | |
1 | address | adder | ||
2 | address | maker | ||
3 | address | feeRecipientAddress | ||
4 | uint256 | lenderRelayFee | ||
5 | uint256 | traderRelayFee | ||
6 | uint256 | maxDuration | ||
7 | uint256 | makerRole |
LogLoanCancelled
207f8e7e
inputs | 0 | address | maker | |
1 | uint256 | cancelLoanTokenAmount | ||
2 | uint256 | remainingLoanTokenAmount | ||
3 | bytes32 | loanOrderHash |
LogLoanClosed
915548cd
inputs | 0 | address | lender | |
1 | address | trader | ||
2 | address | loanCloser | ||
3 | bool | isLiquidation | ||
4 | bytes32 | loanOrderHash | ||
5 | uint256 | positionId |
LogLoanTaken
8acacb5e
inputs | 0 | address | lender | |
1 | address | trader | ||
2 | address | loanTokenAddress | ||
3 | address | collateralTokenAddress | ||
4 | uint256 | loanTokenAmount | ||
5 | uint256 | collateralTokenAmount | ||
6 | uint256 | loanEndUnixTimestampSec | ||
7 | bool | firstFill | ||
8 | bytes32 | loanOrderHash | ||
9 | uint256 | positionId |
LogMarginLevels
a3a0bd89
inputs | 0 | bytes32 | loanOrderHash | |
1 | address | trader | ||
2 | uint256 | initialMarginAmount | ||
3 | uint256 | maintenanceMarginAmount | ||
4 | uint256 | currentMarginAmount | ||
5 | uint256 | positionId |
LogPayInterestForOrder
8b61f94b
inputs | 0 | bytes32 | loanOrderHash | |
1 | address | lender | ||
2 | uint256 | amountPaid | ||
3 | uint256 | totalAccrued | ||
4 | uint256 | loanCount |
LogPayInterestForPosition
c80b11b7
inputs | 0 | bytes32 | loanOrderHash | |
1 | address | lender | ||
2 | address | trader | ||
3 | uint256 | amountPaid | ||
4 | uint256 | totalAccrued | ||
5 | uint256 | positionId |
LogPositionTraded
7368309f
inputs | 0 | bytes32 | loanOrderHash | |
1 | address | trader | ||
2 | address | sourceTokenAddress | ||
3 | address | destTokenAddress | ||
4 | uint256 | sourceTokenAmount | ||
5 | uint256 | destTokenAmount | ||
6 | uint256 | positionId |
LogWithdrawProfit
688cd9c9
inputs | 0 | bytes32 | loanOrderHash | |
1 | address | trader | ||
2 | uint256 | profitWithdrawn | ||
3 | uint256 | remainingPosition | ||
4 | uint256 | positionId |
OwnershipRenounced
f8df3114
inputs | 0 | address | previousOwner |
OwnershipTransferred
8be0079c
inputs | 0 | address | previousOwner | |
1 | address | newOwner |
DEBUG_MODE
8638aa65
allowedValidators
7b8e3514
inputs | 0 | address | ||
1 | address |
bZRxTokenContract
779dec5b
bZxTo0xContract
b7a025f9
bZxTo0xV2Contract
9ae6b186
closeLoan
f4ff7d2d
Called by the trader to close their loan early.
inputs | 0 | bytes32 | loanOrderHash | A unique hash representing the loan order |
outputs | 0 | bool |
forceCloanLoan
6e46c9bb
inputs | 0 | bytes32 | loanOrderHash | |
1 | address | trader |
getInterest
60068e2d
Gets current interest data for the loan
inputs | 0 | bytes32 | loanOrderHash | A unique hash representing the loan order |
1 | address | trader | The trader of the position | |
outputs | 0 | address | lender | The lender in this loaninterestTokenAddress The interset token used in this loaninterestTotalAccrued The total amount of interest that has been earned so farinterestPaidSoFar The amount of earned interest that has been withdrawninterestLastPaidDate The date of the last interest pay out, or 0 if no interest has been withdrawn yet |
1 | address | interestTokenAddress | ||
2 | uint256 | interestTotalAccrued | ||
3 | uint256 | interestPaidSoFar | ||
4 | uint256 | interestLastPaidDate |
getMarginLevels
db4d0ae0
Gets current margin data for the loan
inputs | 0 | bytes32 | loanOrderHash | A unique hash representing the loan order |
1 | address | trader | The trader of the position | |
outputs | 0 | uint256 | ||
1 | uint256 | |||
2 | uint256 |
initialize
c4d66de8
inputs | 0 | address | _target |
interestPaid
8d067193
inputs | 0 | bytes32 | ||
1 | uint256 |
interestPaidDate
19ce64e4
inputs | 0 | bytes32 | ||
1 | uint256 |
interestTotal
833381ce
inputs | 0 | bytes32 | ||
1 | uint256 |
liquidatePosition
e75a4a2c
Checks that a position meets the conditions for liquidation, then closes the position and loan.
inputs | 0 | bytes32 | loanOrderHash | A unique hash representing the loan order |
1 | address | trader | The trader of the position | |
outputs | 0 | bool |
loanPositions
9e312dac
inputs | 0 | uint256 |
loanPositionsIds
86042ec6
inputs | 0 | bytes32 | ||
1 | address |
oracleAddresses
71eb125e
inputs | 0 | address |
oracleRegistryContract
de3f26eb
orderAux
a72480ae
inputs | 0 | bytes32 |
orderCancelledAmounts
d9fd7341
inputs | 0 | bytes32 |
orderFilledAmounts
cce37f3e
inputs | 0 | bytes32 |
orderLender
093983bd
inputs | 0 | bytes32 |
orderList
f4fb9b2f
inputs | 0 | address | ||
1 | uint256 |
orderListIndex
42ad3526
inputs | 0 | bytes32 | ||
1 | address |
orderPositionList
9437d0ea
inputs | 0 | bytes32 | ||
1 | uint256 |
orders
9c3f1e90
inputs | 0 | bytes32 |
owner
8da5cb5b
payInterest
e7246aa3
Pays the lender of a loan the total amount of interest accrued for a loan.Note that this function can be safely called by anyone.
inputs | 0 | bytes32 | loanOrderHash | A unique hash representing the loan order |
1 | address | trader | The address of the trader/borrower of a loan. | |
outputs | 0 | uint256 |
payInterestForOrder
dd28b20b
Pays the lender the total amount of interest accrued from all loans for a given order.This function can potentially run out of gas before finishing if there are two many loans assigned toan order. If this occurs, interest owed can be paid out using the payInterest function. Payouts areautomatic as positions close, as well.Note that this function can be safely called by anyone.
inputs | 0 | bytes32 | loanOrderHash | A unique hash representing the loan order |
outputs | 0 | uint256 |
positionList
7955f60f
inputs | 0 | uint256 |
positionListIndex
4a7c3d50
inputs | 0 | uint256 |
preSigned
82c174d0
inputs | 0 | bytes32 | ||
1 | address |
renounceOwnership
715018a6
Renouncing to ownership will leave the contract without an owner. It will not be possible to call the functions with the onlyOwner
modifier anymore.
Allows the current owner to relinquish control of the contract.
shouldLiquidate
ee73722f
Checks the conditions for liquidation with the oracle
inputs | 0 | bytes32 | loanOrderHash | A unique hash representing the loan order |
1 | address | trader | The trader of the position | |
outputs | 0 | bool |
targetIsPaused
2035d73b
inputs | 0 | bytes4 |
targets
16a6bff6
inputs | 0 | bytes4 |
transferOwnership
f2fde38b
Allows the current owner to transfer control of the contract to a newOwner.
inputs | 0 | address | _newOwner | The address to transfer ownership to. |
vaultContract
2274346b