BZxLoanMaintenance
/contracts/modules/BZxLoanMaintenance.sol

constructor

BZxLoanMaintenance

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

changeCollateral 09c5a317

Allows the trader to change the collateral token being used for a loan.This function will transfer in the initial margin requirement of the new token and the old token will be refunded to the trader.

inputs0bytes32loanOrderHash

A unique hash representing the loan order

inputs1addresscollateralTokenFilled

The address of the collateral token used.

outputs0bool
function

changeLenderOwnership 7465577a

Allows the lender to transfer ownership of the underlying assets in a position to another user.

inputs0bytes32loanOrderHash

A unique hash representing the loan order

inputs1addressnewOwner

The address receiving the transfer

outputs0bool
function

changeTraderOwnership b71a86ce

Allows the trader to transfer ownership of the underlying assets in a position to another user.

inputs0bytes32loanOrderHash

A unique hash representing the loan order

inputs1addressnewOwner

The address receiving the transfer

outputs0bool
function

depositCollateral 52cccdb3

Allows the trader to increase the collateral for a loan.

inputs0bytes32loanOrderHash

A unique hash representing the loan order

inputs1addresscollateralTokenFilled

The address of the collateral token used.

inputs2uint256depositAmount
outputs0bool
function, constant

getProfitOrLoss b195bdf3

Get the current profit/loss data of a position

inputs0bytes32loanOrderHash

A unique hash representing the loan order

inputs1addresstrader

The trader of the position

outputs0boolisProfit

False it there's a loss, True otherwiseprofitOrLoss The amount of profit or amount of loss (denominated in positionToken)positionTokenAddress The position token current filled, which could be the same as the loanToken

outputs1uint256profitOrLoss
outputs2addresspositionTokenAddress
function

increaseLoanableAmount 6db23a71

Allows a lender to increase the amount of token they will loan out for an orderThe order must already be on chain and have been partially filledEnsures the lender has enough balance and allowance

inputs0bytes32loanOrderHash

A unique hash representing the loan order

inputs1uint256loanTokenAmountToAdd

The amount to increase the loan token

outputs0bool
function

initialize c4d66de8

inputs0address_target
function, constant

interestPaid 8d067193

inputs0bytes32
inputs1uint256
function, constant

interestPaidDate 19ce64e4

inputs0bytes32
inputs1uint256
function, constant

interestTotal 833381ce

inputs0bytes32
inputs1uint256
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, 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

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

function

withdrawExcessCollateral 60056cf9

Allows the trader to withdraw excess collateral for a loan.Excess collateral is any amount above the initial margin.

inputs0bytes32loanOrderHash

A unique hash representing the loan order

inputs1addresscollateralTokenFilled

The address of the collateral token used.

inputs2uint256withdrawAmount
outputs0uint256excessCollateral
function

withdrawProfit 92a9fe8b

Allows the trader to withdraw their profits, if any.Profits are paid out from the current positionToken.

inputs0bytes32loanOrderHash

A unique hash representing the loan order

outputs0uint256profitAmount

The amount of profit withdrawn denominated in positionToken