BZxOrderTakingOnChain
/contracts/modules/BZxOrderTakingOnChain.sol

constructor

BZxOrderTakingOnChain

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, constant

getInitialCollateralRequired 8823d53c

Calculates the initial collateral required to open the loan.

inputs0addressloanTokenAddress
inputs1addresscollateralTokenAddress

The collateral token used by the trader.

inputs2addressoracleAddress

The oracle address specified in the loan order.

inputs3uint256loanTokenAmountFilled

The amount of loan token borrowed.

inputs4uint256initialMarginAmount

The initial margin percentage amount (i.e. 50 == 50%)

outputs0uint256collateralTokenAmount
function, constant

getLoanOrderHash 53609b03

Calculates Keccak-256 hash of order with specified parameters.

inputs0address[6]orderAddresses

Array of order's makerAddress, loanTokenAddress, interestTokenAddress, collateralTokenAddress, feeRecipientAddress, oracleAddress.

inputs1uint256[10]orderValues

Array of order's loanTokenAmount, interestAmount, initialMarginAmount, maintenanceMarginAmount, lenderRelayFee, traderRelayFee, maxDurationUnixTimestampSec, expirationUnixTimestampSec, makerRole (0=lender, 1=trader), and salt.

outputs0bytes32
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

isValidSignature 238a4d1e

Verifies that an order signature is valid.

inputs0addresssigner

address of signer.

inputs1bytes32hash

Signed Keccak-256 hash.

inputs2bytessignature

ECDSA signature in raw bytes (rsv) + signatureType.

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, constant

positionList 7955f60f

inputs0uint256
function, constant

positionListIndex 4a7c3d50

inputs0uint256
function

preSign 0995f488

Approves a hash on-chain using any valid signature type. After presigning a hash, the preSign signature type will become valid for that hash and signer.

inputs0addresssigner

Address that should have signed the hash generated by the loanOrder parameters given.

inputs1address[6]orderAddresses

Array of order's makerAddress, loanTokenAddress, interestTokenAddress, collateralTokenAddress, feeRecipientAddress, oracleAddress.

inputs2uint256[10]orderValues

Array of order's loanTokenAmount, interestAmount, initialMarginAmount, maintenanceMarginAmount, lenderRelayFee, traderRelayFee, maxDurationUnixTimestampSec, expirationUnixTimestampSec, makerRole (0=lender, 1=trader), and salt.

inputs3bytessignature

Proof that the hash has been signed by signer.

function

preSignWithHash 57ad67b1

Approves a hash on-chain using any valid signature type. After presigning a hash, the preSign signature type will become valid for that hash and signer.

inputs0addresssigner

Address that should have signed the given hash.

inputs1bytes32hash

Signed Keccak-256 hash.

inputs2bytessignature

Proof that the hash has been signed by signer.

function, constant

preSigned 82c174d0

inputs0bytes32
inputs1address
function

pushLoanOrderOnChain 2e02a716

Pushes an order on chain

inputs0address[6]orderAddresses

Array of order's makerAddress, loanTokenAddress, interestTokenAddress, collateralTokenAddress, feeRecipientAddress, oracleAddress.

inputs1uint256[10]orderValues

Array of order's loanTokenAmount, interestAmount, initialMarginAmount, maintenanceMarginAmount, lenderRelayFee, traderRelayFee, maxDurationUnixTimestampSec, expirationUnixTimestampSec, makerRole (0=lender, 1=trader), and salt.

inputs2bytessignature

ECDSA signature in raw bytes (rsv).

outputs0bytes32
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

takeLoanOrderOnChainAsLender d6cc0c14

Takes the order as lender that's already pushed on chainLenders have to fill the entire desired amount the trader wants to borrow.This makes loanTokenAmountFilled = loanOrder.loanTokenAmount.

inputs0bytes32loanOrderHash

A unique hash representing the loan order.

outputs0uint256
function

takeLoanOrderOnChainAsTrader 60e2fbe3

Takes the order as trader that's already pushed on chainTraders can take a portion of the total coin being lended (loanTokenAmountFilled).Traders also specify the token that will fill the margin requirement if they are taking the order.

inputs0bytes32loanOrderHash

A unique hash representing the loan order.

inputs1addresscollateralTokenFilled
inputs2uint256loanTokenAmountFilled
outputs0uint256
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