OrderbookReserve
cancelEthToTokenOrder
Inputs
| Parameter | Type | Description |
|---|---|---|
| orderId | uint32 |
Outputs
| Type | Description |
|---|---|
| bool |
updateOrderBatch
Inputs
| Parameter | Type | Description |
|---|---|---|
| isEthToToken | bool[] | |
| orderId | uint32[] | |
| newSrcAmount | uint128[] | |
| newDstAmount | uint128[] | |
| hintPrevOrder | uint32[] |
Outputs
| Type | Description |
|---|---|
| bool |
init
Inputs
Outputs
| Type | Description |
|---|---|
| bool |
depositKncForFee
Inputs
| Parameter | Type | Description |
|---|---|---|
| maker | address | |
| amount | uint256 |
Outputs
setMinOrderSizeEth
Inputs
Outputs
| Type | Description |
|---|---|
| bool |
submitTokenToEthOrderWHint
Inputs
| Parameter | Type | Description |
|---|---|---|
| srcAmount | uint128 | |
| dstAmount | uint128 | |
| hintPrevOrder | uint32 |
Outputs
| Type | Description |
|---|---|
| bool |
updateTokenToEthOrder
Inputs
| Parameter | Type | Description |
|---|---|---|
| orderId | uint32 | |
| newSrcAmount | uint128 | |
| newDstAmount | uint128 |
Outputs
| Type | Description |
|---|---|
| bool |
withdrawKncFee
Inputs
| Parameter | Type | Description |
|---|---|---|
| amount | uint256 |
Outputs
updateTokenToEthOrderWHint
Inputs
| Parameter | Type | Description |
|---|---|---|
| orderId | uint32 | |
| newSrcAmount | uint128 | |
| newDstAmount | uint128 | |
| hintPrevOrder | uint32 |
Outputs
| Type | Description |
|---|---|
| bool |
updateEthToTokenOrder
Inputs
| Parameter | Type | Description |
|---|---|---|
| orderId | uint32 | |
| newSrcAmount | uint128 | |
| newDstAmount | uint128 |
Outputs
| Type | Description |
|---|---|
| bool |
setKncPerEthBaseRate
Inputs
Outputs
submitEthToTokenOrder
Inputs
| Parameter | Type | Description |
|---|---|---|
| srcAmount | uint128 | |
| dstAmount | uint128 |
Outputs
| Type | Description |
|---|---|
| bool |
submitTokenToEthOrder
Inputs
| Parameter | Type | Description |
|---|---|---|
| srcAmount | uint128 | |
| dstAmount | uint128 |
Outputs
| Type | Description |
|---|---|
| bool |
cancelTokenToEthOrder
Inputs
| Parameter | Type | Description |
|---|---|---|
| orderId | uint32 |
Outputs
| Type | Description |
|---|---|
| bool |
updateEthToTokenOrderWHint
Inputs
| Parameter | Type | Description |
|---|---|---|
| orderId | uint32 | |
| newSrcAmount | uint128 | |
| newDstAmount | uint128 | |
| hintPrevOrder | uint32 |
Outputs
| Type | Description |
|---|---|
| bool |
addOrderBatch
Inputs
| Parameter | Type | Description |
|---|---|---|
| isEthToToken | bool[] | |
| srcAmount | uint128[] | |
| dstAmount | uint128[] | |
| hintPrevOrder | uint32[] | |
| isAfterPrevOrder | bool[] |
Outputs
| Type | Description |
|---|---|
| bool |
withdrawToken
Inputs
| Parameter | Type | Description |
|---|---|---|
| amount | uint256 |
Outputs
withdrawEther
Inputs
| Parameter | Type | Description |
|---|---|---|
| amount | uint256 |
Outputs
depositToken
Inputs
| Parameter | Type | Description |
|---|---|---|
| maker | address | |
| amount | uint256 |
Outputs
submitEthToTokenOrderWHint
Inputs
| Parameter | Type | Description |
|---|---|---|
| srcAmount | uint128 | |
| dstAmount | uint128 | |
| hintPrevOrder | uint32 |
Outputs
| Type | Description |
|---|---|
| bool |
trade
Inputs
| Parameter | Type | Description |
|---|---|---|
| srcToken | address | |
| srcAmount | uint256 | |
| dstToken | address | |
| dstAddress | address | |
| conversionRate | uint256 | |
| validate | bool |
Outputs
| Type | Description |
|---|---|
| bool |
depositEther
Inputs
| Parameter | Type | Description |
|---|---|---|
| maker | address |
Outputs
getEthToTokenOrderList
Inputs
Outputs
| Type | Description |
|---|---|
| uint32[] |
kncRateBlocksTrade
Inputs
Outputs
| Type | Description |
|---|---|
| bool |
getEthToTokenOrder
Inputs
| Parameter | Type | Description |
|---|---|---|
| orderId | uint32 |
Outputs
| Type | Description |
|---|---|
| address | |
| uint128 | |
| uint128 | |
| uint32 | |
| uint32 |
makerRequiredKncStake
Inputs
| Parameter | Type | Description |
|---|---|---|
| maker | address |
Outputs
| Type | Description |
|---|---|
| uint256 |
getTokenToEthMakerOrderIds
Inputs
| Parameter | Type | Description |
|---|---|---|
| maker | address |
Outputs
| Type | Description |
|---|---|
| uint32[] |
getTokenToEthUpdateOrderHint
Inputs
| Parameter | Type | Description |
|---|---|---|
| orderId | uint32 | |
| srcAmount | uint128 | |
| dstAmount | uint128 |
Outputs
| Type | Description |
|---|---|
| uint32 |
makerUnlockedKnc
Inputs
| Parameter | Type | Description |
|---|---|---|
| maker | address |
Outputs
| Type | Description |
|---|---|
| uint256 |
calcBurnAmount
Inputs
| Parameter | Type | Description |
|---|---|---|
| weiAmount | uint256 |
Outputs
| Type | Description |
|---|---|
| uint256 |
calcKncStake
Inputs
| Parameter | Type | Description |
|---|---|---|
| weiAmount | uint256 |
Outputs
| Type | Description |
|---|---|
| uint256 |
getConversionRate
Inputs
| Parameter | Type | Description |
|---|---|---|
| src | address | |
| dst | address | |
| srcQty | uint256 | |
| blockNumber | uint256 |
Outputs
| Type | Description |
|---|---|
| uint256 |
getTokenToEthOrder
Inputs
| Parameter | Type | Description |
|---|---|---|
| orderId | uint32 |
Outputs
| Type | Description |
|---|---|
| address | |
| uint128 | |
| uint128 | |
| uint32 | |
| uint32 |
getEthToTokenAddOrderHint
Inputs
| Parameter | Type | Description |
|---|---|---|
| srcAmount | uint128 | |
| dstAmount | uint128 |
Outputs
| Type | Description |
|---|---|
| uint32 |
getTokenToEthOrderList
Inputs
Outputs
| Type | Description |
|---|---|
| uint32[] |
getEthToTokenMakerOrderIds
Inputs
| Parameter | Type | Description |
|---|---|---|
| maker | address |
Outputs
| Type | Description |
|---|---|
| uint32[] |
getTokenToEthAddOrderHint
Inputs
| Parameter | Type | Description |
|---|---|---|
| srcAmount | uint128 | |
| dstAmount | uint128 |
Outputs
| Type | Description |
|---|---|
| uint32 |
getEthToTokenUpdateOrderHint
Inputs
| Parameter | Type | Description |
|---|---|---|
| orderId | uint32 | |
| srcAmount | uint128 | |
| dstAmount | uint128 |
Outputs
| Type | Description |
|---|---|
| uint32 |
calcBurnAmountFromFeeBurner
Inputs
| Parameter | Type | Description |
|---|---|---|
| weiAmount | uint256 |
Outputs
| Type | Description |
|---|---|
| uint256 |
OrderbookReserve
Inputs
| Parameter | Type | Description |
|---|---|---|
| knc | address | |
| reserveToken | address | |
| burner | address | |
| network | address | |
| medianizer | address | |
| factory | address | |
| minNewOrderUsd | uint256 | |
| maxOrdersPerTrade | uint256 | |
| burnFeeBps | uint256 |
Outputs
PartialOrderTaken
Inputs
| Parameter | Type | Description |
|---|---|---|
| maker | address | |
| orderId | uint32 | |
| isEthToToken | bool | |
| isRemoved | bool |
Outputs
FullOrderTaken
Inputs
| Parameter | Type | Description |
|---|---|---|
| maker | address | |
| orderId | uint32 | |
| isEthToToken | bool |
Outputs
OrderCanceled
Inputs
| Parameter | Type | Description |
|---|---|---|
| maker | address | |
| isEthToToken | bool | |
| orderId | uint32 | |
| srcAmount | uint128 | |
| dstAmount | uint256 |
Outputs
OrderUpdated
Inputs
| Parameter | Type | Description |
|---|---|---|
| maker | address | |
| isEthToToken | bool | |
| orderId | uint256 | |
| srcAmount | uint128 | |
| dstAmount | uint128 | |
| updatedWithHint | bool |
Outputs
NewLimitOrder
Inputs
| Parameter | Type | Description |
|---|---|---|
| maker | address | |
| orderId | uint32 | |
| isEthToToken | bool | |
| srcAmount | uint128 | |
| dstAmount | uint128 | |
| addedWithHint | bool |
Outputs
KncFeeDeposited
Inputs
| Parameter | Type | Description |
|---|---|---|
| maker | address | |
| amount | uint256 |
Outputs
EtherDeposited
Inputs
| Parameter | Type | Description |
|---|---|---|
| maker | address | |
| amount | uint256 |
Outputs
TokenDeposited
Inputs
| Parameter | Type | Description |
|---|---|---|
| maker | address | |
| amount | uint256 |
Outputs
OrderbookReserveTrade
Inputs
| Parameter | Type | Description |
|---|---|---|
| srcToken | address | |
| dstToken | address | |
| srcAmount | uint256 | |
| dstAmount | uint256 |
Outputs
Utils2
getBalance
Inputs
| Parameter | Type | Description |
|---|---|---|
| token | address | |
| user | address |
Outputs
| Type | Description |
|---|---|
| uint256 |
ethToTokenList
Inputs
Outputs
| Type | Description |
|---|---|
| address |
TAIL_ID
Inputs
Outputs
| Type | Description |
|---|---|
| uint32 |
makerBurnFeeBps
Inputs
Outputs
| Type | Description |
|---|---|
| uint256 |
makerFunds
Inputs
| Parameter | Type | Description |
|---|---|---|
| address | ||
| address |
Outputs
| Type | Description |
|---|---|
| uint256 |
makerTotalOrdersWei
Inputs
| Parameter | Type | Description |
|---|---|---|
| address |
Outputs
| Type | Description |
|---|---|
| uint256 |
HEAD_ID
Inputs
Outputs
| Type | Description |
|---|---|
| uint32 |
limits
Inputs
Outputs
| Type | Description |
|---|---|
| uint256 | |
| uint256 | |
| uint256 | |
| uint256 |
MAX_BURN_FEE_BPS
Inputs
Outputs
| Type | Description |
|---|---|
| uint256 |
contracts
Inputs
Outputs
| Type | Description |
|---|---|
| address | |
| address | |
| address | |
| address | |
| address | |
| address |
tokenToEthList
Inputs
Outputs
| Type | Description |
|---|---|
| address |
MAX_USD_PER_ETH
Inputs
Outputs
| Type | Description |
|---|---|
| uint256 |
makerOrdersEthToToken
Inputs
| Parameter | Type | Description |
|---|---|---|
| address |
Outputs
| Type | Description |
|---|---|
| uint32 | |
| uint256 |
MIN_REMAINING_ORDER_RATIO
Inputs
Outputs
| Type | Description |
|---|---|
| uint256 |
BURN_TO_STAKE_FACTOR
Inputs
Outputs
| Type | Description |
|---|---|
| uint256 |
kncPerEthBaseRatePrecision
Inputs
Outputs
| Type | Description |
|---|---|
| uint256 |
makerOrdersTokenToEth
Inputs
| Parameter | Type | Description |
|---|---|---|
| address |
Outputs
| Type | Description |
|---|---|
| uint32 | |
| uint256 |
makerKnc
Inputs
| Parameter | Type | Description |
|---|---|---|
| address |
Outputs
| Type | Description |
|---|---|
| uint256 |
NUM_ORDERS
Inputs
Outputs
| Type | Description |
|---|---|
| uint256 |