BZxLoanMaintenance
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
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.
inputs | 0 | bytes32 | loanOrderHash | A unique hash representing the loan order |
1 | address | collateralTokenFilled | The address of the collateral token used. | |
outputs | 0 | bool |
changeLenderOwnership
7465577a
Allows the lender to transfer ownership of the underlying assets in a position to another user.
inputs | 0 | bytes32 | loanOrderHash | A unique hash representing the loan order |
1 | address | newOwner | The address receiving the transfer | |
outputs | 0 | bool |
changeTraderOwnership
b71a86ce
Allows the trader to transfer ownership of the underlying assets in a position to another user.
inputs | 0 | bytes32 | loanOrderHash | A unique hash representing the loan order |
1 | address | newOwner | The address receiving the transfer | |
outputs | 0 | bool |
depositCollateral
52cccdb3
Allows the trader to increase the collateral for a loan.
inputs | 0 | bytes32 | loanOrderHash | A unique hash representing the loan order |
1 | address | collateralTokenFilled | The address of the collateral token used. | |
2 | uint256 | depositAmount | ||
outputs | 0 | bool |
getProfitOrLoss
b195bdf3
Get the current profit/loss data of a position
inputs | 0 | bytes32 | loanOrderHash | A unique hash representing the loan order |
1 | address | trader | The trader of the position | |
outputs | 0 | bool | isProfit | 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 |
1 | uint256 | profitOrLoss | ||
2 | address | positionTokenAddress |
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
inputs | 0 | bytes32 | loanOrderHash | A unique hash representing the loan order |
1 | uint256 | loanTokenAmountToAdd | The amount to increase the loan token | |
outputs | 0 | bool |
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 |
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
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.
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
withdrawExcessCollateral
60056cf9
Allows the trader to withdraw excess collateral for a loan.Excess collateral is any amount above the initial margin.
inputs | 0 | bytes32 | loanOrderHash | A unique hash representing the loan order |
1 | address | collateralTokenFilled | The address of the collateral token used. | |
2 | uint256 | withdrawAmount | ||
outputs | 0 | uint256 | excessCollateral |
withdrawProfit
92a9fe8b
Allows the trader to withdraw their profits, if any.Profits are paid out from the current positionToken.
inputs | 0 | bytes32 | loanOrderHash | A unique hash representing the loan order |
outputs | 0 | uint256 | profitAmount | The amount of profit withdrawn denominated in positionToken |