Admin
function
ownerSetGlobalOperator
nonpayable
Restricted (onlyOwner, nonReentrant)
Inputs
| Parameter | Type | Description | 
|---|---|---|
| operator | address | |
| approved | bool | 
Outputs
(void)
function
ownerSetIsClosing
nonpayable
Restricted (onlyOwner, nonReentrant)
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | |
| isClosing | bool | 
Outputs
(void)
function
ownerSetPriceOracle
nonpayable
Restricted (onlyOwner, nonReentrant)
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | |
| priceOracle | address | 
Outputs
(void)
function
ownerSetMarginRatio
nonpayable
Restricted (onlyOwner, nonReentrant)
Inputs
| Parameter | Type | Description | 
|---|---|---|
| ratio | tuple | 
Outputs
(void)
function
ownerAddMarket
nonpayable
Restricted (onlyOwner, nonReentrant)
Inputs
| Parameter | Type | Description | 
|---|---|---|
| token | address | |
| priceOracle | address | |
| interestSetter | address | |
| marginPremium | tuple | |
| spreadPremium | tuple | 
Outputs
(void)
function
ownerWithdrawExcessTokens
nonpayable
Restricted (onlyOwner, nonReentrant)
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | |
| recipient | address | 
Outputs
| Type | Description | 
|---|---|
| uint256 | 
function
ownerSetMarginPremium
nonpayable
Restricted (onlyOwner, nonReentrant)
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | |
| marginPremium | tuple | 
Outputs
(void)
function
ownerSetEarningsRate
nonpayable
Restricted (onlyOwner, nonReentrant)
Inputs
| Parameter | Type | Description | 
|---|---|---|
| earningsRate | tuple | 
Outputs
(void)
function
ownerSetLiquidationSpread
nonpayable
Restricted (onlyOwner, nonReentrant)
Inputs
| Parameter | Type | Description | 
|---|---|---|
| spread | tuple | 
Outputs
(void)
function
ownerSetMinBorrowedValue
nonpayable
Restricted (onlyOwner, nonReentrant)
Inputs
| Parameter | Type | Description | 
|---|---|---|
| minBorrowedValue | tuple | 
Outputs
(void)
function
ownerWithdrawUnsupportedTokens
nonpayable
Restricted (onlyOwner, nonReentrant)
Inputs
| Parameter | Type | Description | 
|---|---|---|
| token | address | |
| recipient | address | 
Outputs
| Type | Description | 
|---|---|
| uint256 | 
function
ownerSetInterestSetter
nonpayable
Restricted (onlyOwner, nonReentrant)
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | |
| interestSetter | address | 
Outputs
(void)
function
ownerSetSpreadPremium
nonpayable
Restricted (onlyOwner, nonReentrant)
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | |
| spreadPremium | tuple | 
Outputs
(void)
Getters
function
getMarketInterestRate
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | 
Outputs
| Type | Description | 
|---|---|
| tuple | 
function
getMarketMarginPremium
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | 
Outputs
| Type | Description | 
|---|---|
| tuple | 
function
getAdjustedAccountValues
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| account | tuple | 
Outputs
| Type | Description | 
|---|---|
| tuple | |
| tuple | 
function
getMarket
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | 
Outputs
| Type | Description | 
|---|---|
| tuple | 
function
getRiskLimits
view
Inputs
(void)
Outputs
| Type | Description | 
|---|---|
| tuple | 
function
getEarningsRate
view
Inputs
(void)
Outputs
| Type | Description | 
|---|---|
| tuple | 
function
getAccountStatus
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| account | tuple | 
Outputs
| Type | Description | 
|---|---|
| uint8 | 
function
getMarketCachedIndex
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | 
Outputs
| Type | Description | 
|---|---|
| tuple | 
function
getNumExcessTokens
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | 
Outputs
| Type | Description | 
|---|---|
| tuple | 
function
getLiquidationSpreadForPair
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| heldMarketId | uint256 | |
| owedMarketId | uint256 | 
Outputs
| Type | Description | 
|---|---|
| tuple | 
function
getMarketTotalPar
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | 
Outputs
| Type | Description | 
|---|---|
| tuple | 
function
getAccountWei
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| account | tuple | |
| marketId | uint256 | 
Outputs
| Type | Description | 
|---|---|
| tuple | 
function
getLiquidationSpread
view
Inputs
(void)
Outputs
| Type | Description | 
|---|---|
| tuple | 
function
getMarketWithInfo
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | 
Outputs
| Type | Description | 
|---|---|
| tuple | |
| tuple | |
| tuple | |
| tuple | 
function
getMarketPrice
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | 
Outputs
| Type | Description | 
|---|---|
| tuple | 
function
getMinBorrowedValue
view
Inputs
(void)
Outputs
| Type | Description | 
|---|---|
| tuple | 
function
getAccountBalances
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| account | tuple | 
Outputs
| Type | Description | 
|---|---|
| address[] | |
| tuple[] | |
| tuple[] | 
function
getRiskParams
view
Inputs
(void)
Outputs
| Type | Description | 
|---|---|
| tuple | 
function
getMarketIsClosing
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | 
Outputs
| Type | Description | 
|---|---|
| bool | 
function
getMarketCurrentIndex
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | 
Outputs
| Type | Description | 
|---|---|
| tuple | 
function
getMarginRatio
view
Inputs
(void)
Outputs
| Type | Description | 
|---|---|
| tuple | 
function
getAccountPar
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| account | tuple | |
| marketId | uint256 | 
Outputs
| Type | Description | 
|---|---|
| tuple | 
function
getIsLocalOperator
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| owner | address | |
| operator | address | 
Outputs
| Type | Description | 
|---|---|
| bool | 
function
getNumMarkets
view
Inputs
(void)
Outputs
| Type | Description | 
|---|---|
| uint256 | 
function
getMarketSpreadPremium
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | 
Outputs
| Type | Description | 
|---|---|
| tuple | 
function
getMarketInterestSetter
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | 
Outputs
| Type | Description | 
|---|---|
| address | 
function
getMarketPriceOracle
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | 
Outputs
| Type | Description | 
|---|---|
| address | 
function
getAccountValues
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| account | tuple | 
Outputs
| Type | Description | 
|---|---|
| tuple | |
| tuple | 
function
getMarketTokenAddress
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| marketId | uint256 | 
Outputs
| Type | Description | 
|---|---|
| address | 
function
getIsGlobalOperator
view
Inputs
| Parameter | Type | Description | 
|---|---|---|
| operator | address | 
Outputs
| Type | Description | 
|---|---|
| bool | 
Operation
function
operate
nonpayable
Restricted (nonReentrant)
Inputs
| Parameter | Type | Description | 
|---|---|---|
| accounts | tuple[] | |
| actions | tuple[] | 
Outputs
(void)
Ownable
function
transferOwnership
nonpayable
Restricted (onlyOwner)
Inputs
| Parameter | Type | Description | 
|---|---|---|
| newOwner | address | 
Outputs
(void)
function
renounceOwnership
nonpayable
Restricted (onlyOwner)
Inputs
(void)
Outputs
(void)
function
isOwner
view
Inputs
(void)
Outputs
| Type | Description | 
|---|---|
| bool | 
function
owner
view
Inputs
(void)
Outputs
| Type | Description | 
|---|---|
| address | 
event
OwnershipTransferred
Inputs
| Parameter | Type | Description | 
|---|---|---|
| previousOwner | address | |
| newOwner | address | 
Outputs
(void)
Permission
function
setOperators
nonpayable
Inputs
| Parameter | Type | Description | 
|---|---|---|
| args | tuple[] | 
Outputs
(void)
event
LogOperatorSet
Inputs
| Parameter | Type | Description | 
|---|---|---|
| owner | address | |
| operator | address | |
| trusted | bool | 
Outputs
(void)
constructor
nonpayable
Inputs
| Parameter | Type | Description | 
|---|---|---|
| riskParams | tuple | |
| riskLimits | tuple | 
Outputs
(void)