BZxLoanHealth
/contracts/modules/BZxLoanHealth.sol

constructor

BZxLoanHealth

event

LogChangeLenderOwnership 6b828d62

inputs0bytes32loanOrderHash
inputs1addressoldOwner
inputs2addressnewOwner
event

LogChangeTraderOwnership 5b0dd3a6

inputs0bytes32loanOrderHash
inputs1addressoldOwner
inputs2addressnewOwner
event

LogIncreasedLoanableAmount f10dbd67

inputs0bytes32loanOrderHash
inputs1addresslender
inputs2uint256loanTokenAmountAdded
inputs3uint256loanTokenAmountFillable
event

LogLoanAdded 887264fe

inputs0bytes32loanOrderHash
inputs1addressadder
inputs2addressmaker
inputs3addressfeeRecipientAddress
inputs4uint256lenderRelayFee
inputs5uint256traderRelayFee
inputs6uint256maxDuration
inputs7uint256makerRole
event

LogLoanCancelled 207f8e7e

inputs0addressmaker
inputs1uint256cancelLoanTokenAmount
inputs2uint256remainingLoanTokenAmount
inputs3bytes32loanOrderHash
event

LogLoanClosed 915548cd

inputs0addresslender
inputs1addresstrader
inputs2addressloanCloser
inputs3boolisLiquidation
inputs4bytes32loanOrderHash
inputs5uint256positionId
event

LogLoanTaken 8acacb5e

inputs0addresslender
inputs1addresstrader
inputs2addressloanTokenAddress
inputs3addresscollateralTokenAddress
inputs4uint256loanTokenAmount
inputs5uint256collateralTokenAmount
inputs6uint256loanEndUnixTimestampSec
inputs7boolfirstFill
inputs8bytes32loanOrderHash
inputs9uint256positionId
event

LogMarginLevels a3a0bd89

inputs0bytes32loanOrderHash
inputs1addresstrader
inputs2uint256initialMarginAmount
inputs3uint256maintenanceMarginAmount
inputs4uint256currentMarginAmount
inputs5uint256positionId
event

LogPayInterestForOrder 8b61f94b

inputs0bytes32loanOrderHash
inputs1addresslender
inputs2uint256amountPaid
inputs3uint256totalAccrued
inputs4uint256loanCount
event

LogPayInterestForPosition c80b11b7

inputs0bytes32loanOrderHash
inputs1addresslender
inputs2addresstrader
inputs3uint256amountPaid
inputs4uint256totalAccrued
inputs5uint256positionId
event

LogPositionTraded 7368309f

inputs0bytes32loanOrderHash
inputs1addresstrader
inputs2addresssourceTokenAddress
inputs3addressdestTokenAddress
inputs4uint256sourceTokenAmount
inputs5uint256destTokenAmount
inputs6uint256positionId
event

LogWithdrawProfit 688cd9c9

inputs0bytes32loanOrderHash
inputs1addresstrader
inputs2uint256profitWithdrawn
inputs3uint256remainingPosition
inputs4uint256positionId
event

OwnershipRenounced f8df3114

inputs0addresspreviousOwner
event

OwnershipTransferred 8be0079c

inputs0addresspreviousOwner
inputs1addressnewOwner
function, constant

DEBUG_MODE 8638aa65

function, constant

allowedValidators 7b8e3514

inputs0address
inputs1address
function, constant

bZRxTokenContract 779dec5b

function, constant

bZxTo0xContract b7a025f9

function, constant

bZxTo0xV2Contract 9ae6b186

function

closeLoan f4ff7d2d

Called by the trader to close their loan early.

inputs0bytes32loanOrderHash

A unique hash representing the loan order

outputs0bool
function

forceCloanLoan 6e46c9bb

inputs0bytes32loanOrderHash
inputs1addresstrader
function, constant

getInterest 60068e2d

Gets current interest data for the loan

inputs0bytes32loanOrderHash

A unique hash representing the loan order

inputs1addresstrader

The trader of the position

outputs0addresslender

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

outputs1addressinterestTokenAddress
outputs2uint256interestTotalAccrued
outputs3uint256interestPaidSoFar
outputs4uint256interestLastPaidDate
function, constant

getMarginLevels db4d0ae0

Gets current margin data for the loan

inputs0bytes32loanOrderHash

A unique hash representing the loan order

inputs1addresstrader

The trader of the position

outputs0uint256
outputs1uint256
outputs2uint256
function

initialize c4d66de8

inputs0address_target
function, constant

interestPaid 8d067193

inputs0bytes32
inputs1uint256
function, constant

interestPaidDate 19ce64e4

inputs0bytes32
inputs1uint256
function, constant

interestTotal 833381ce

inputs0bytes32
inputs1uint256
function

liquidatePosition e75a4a2c

Checks that a position meets the conditions for liquidation, then closes the position and loan.

inputs0bytes32loanOrderHash

A unique hash representing the loan order

inputs1addresstrader

The trader of the position

outputs0bool
function, constant

loanPositions 9e312dac

inputs0uint256
function, constant

loanPositionsIds 86042ec6

inputs0bytes32
inputs1address
function, constant

oracleAddresses 71eb125e

inputs0address
function, constant

oracleRegistryContract de3f26eb

function, constant

orderAux a72480ae

inputs0bytes32
function, constant

orderCancelledAmounts d9fd7341

inputs0bytes32
function, constant

orderFilledAmounts cce37f3e

inputs0bytes32
function, constant

orderLender 093983bd

inputs0bytes32
function, constant

orderList f4fb9b2f

inputs0address
inputs1uint256
function, constant

orderListIndex 42ad3526

inputs0bytes32
inputs1address
function, constant

orderPositionList 9437d0ea

inputs0bytes32
inputs1uint256
function, constant

orders 9c3f1e90

inputs0bytes32
function, constant

owner 8da5cb5b

function

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.

inputs0bytes32loanOrderHash

A unique hash representing the loan order

inputs1addresstrader

The address of the trader/borrower of a loan.

outputs0uint256
function

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.

inputs0bytes32loanOrderHash

A unique hash representing the loan order

outputs0uint256
function, constant

positionList 7955f60f

inputs0uint256
function, constant

positionListIndex 4a7c3d50

inputs0uint256
function, constant

preSigned 82c174d0

inputs0bytes32
inputs1address
function

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.

function, constant

shouldLiquidate ee73722f

Checks the conditions for liquidation with the oracle

inputs0bytes32loanOrderHash

A unique hash representing the loan order

inputs1addresstrader

The trader of the position

outputs0bool
function, constant

targetIsPaused 2035d73b

inputs0bytes4
function, constant

targets 16a6bff6

inputs0bytes4
function

transferOwnership f2fde38b

Allows the current owner to transfer control of the contract to a newOwner.

inputs0address_newOwner

The address to transfer ownership to.

function, constant

vaultContract 2274346b