Exchange Information

Overview

Dolomite makes use of several smart contracts in its operation to give traders control of their assets and to securely settle trades.

Basics

Smart contracts are pieces of code that run on the Ethereum blockchain. Once deployed to the blockchain, this code is unchanging and publicly accessible. This code is viewable by anyone and as such can be audited to make sure it's only performing the task that users expect. This code is run in a similar way to how transactions are processed on the Ethereum blockchain. This code can be interacted with by using one or more Ethereum wallets, and can hold tokens on behalf of those wallets, as well as perform transfers on behalf of those wallets. This is the base structure on which decentralized exchanges are built. Smart contracts hold onto the traders' assets, and those assets can only be withdrawn by the trader themselves or exchanged for another asset at a rate approved by the trader. As a result there's no worry of an exchange running off with traders' funds or being hacked, funds are just as secure in a smart contract as they are in your own personal wallet.

Dolomite Smart Contracts

The following are the smart contracts utilized in one way or another by Dolomite.

Loopring Settlement Contract

This is used to settle our rings which materialize the matches into transfers.

Contract address: 0xC0b569Ff46EEA7BfbB130bd6d7af0a0A7f513C6F

file_copy

ABI:
[{"constant":true,"inputs":[],"name":"orderBrokerRegistryAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"wethTokenAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tradeHistoryAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ringIndex","outputs":[{"name":"","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lrcTokenAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"delegateAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"orderBookAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"orderRegistryAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"data","type":"bytes"}],"name":"submitRings","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"FEE_PERCENTAGE_BASE","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"burnRateTableAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"feeHolderAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_lrcTokenAddress","type":"address"},{"name":"_wethTokenAddress","type":"address"},{"name":"_delegateAddress","type":"address"},{"name":"_tradeHistoryAddress","type":"address"},{"name":"_orderBrokerRegistryAddress","type":"address"},{"name":"_orderRegistryAddress","type":"address"},{"name":"_feeHolderAddress","type":"address"},{"name":"_orderBookAddress","type":"address"},{"name":"_burnRateTableAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_ringIndex","type":"uint256"},{"indexed":true,"name":"_ringHash","type":"bytes32"},{"indexed":true,"name":"_feeRecipient","type":"address"},{"indexed":false,"name":"_fills","type":"bytes"}],"name":"RingMined","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_ringHash","type":"bytes32"}],"name":"InvalidRing","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_ringHash","type":"bytes32"},{"indexed":true,"name":"_orderHash","type":"bytes32"},{"indexed":false,"name":"_feeToken","type":"address"},{"indexed":false,"name":"_feeAmount","type":"uint256"}],"name":"DistributeFeeRebate","type":"event"}]

Loopring Trade Delegate

This is used to execute the transfers and it's what you set as the spender (as the end user) when allocating your allowance.

Contract address: 0xE2466deB9536A69BF8131Ecd0c267EE41dd1cdA0

ABI:
[{"constant":false,"inputs":[],"name":"resume","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"trustedSubmitters","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"submitter","type":"address"}],"name":"isTrustedSubmitter","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"submitter","type":"address"}],"name":"addTrustedSubmitter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"kill","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"}],"name":"authorizeAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"claimOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"broker","type":"address"},{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"brokerTransfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"suspended","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"components":[{"name":"owner","type":"address"},{"name":"orderHash","type":"bytes32"},{"name":"fillAmountB","type":"uint256"},{"name":"requestedAmountS","type":"uint256"},{"name":"requestedFeeAmount","type":"uint256"},{"name":"tokenRecipient","type":"address"},{"name":"extraData","type":"bytes"}],"name":"orders","type":"tuple[]"},{"name":"tokenS","type":"address"},{"name":"tokenB","type":"address"},{"name":"feeToken","type":"address"},{"name":"totalFillAmountB","type":"uint256"},{"name":"totalRequestedAmountS","type":"uint256"},{"name":"totalRequestedFeeAmount","type":"uint256"}],"name":"request","type":"tuple"},{"name":"broker","type":"address"}],"name":"proxyBrokerRequestAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"isAddressAuthorized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"suspend","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"}],"name":"deauthorizeAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"batch","type":"bytes32[]"}],"name":"batchTransfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"submitter","type":"address"}],"name":"removeTrustedSubmitter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"addr","type":"address"}],"name":"AddressAuthorized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"addr","type":"address"}],"name":"AddressDeauthorized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

Loopring Fee Holder

This contract is responsible for the collection of trading/gas fees that are paid by traders. All negative maker fees are also accumulated in this contract.

Contract address: 0x4d869def870AdB3B73BDb35f4a3C4d76C6E22975

ABI:
[{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"feeBalances","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"batch","type":"bytes32[]"}],"name":"batchAddFeeBalances","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"delegateAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"value","type":"uint256"}],"name":"withdrawBurned","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"value","type":"uint256"}],"name":"withdrawToken","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_delegateAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"token","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"TokenWithdrawn","type":"event"}]

Dolomite Margin Trading

This contract connects dYdX to the Loopring Protocol to allow us to open/close margin trades.

Contract address: 0x7f49ac8fDb38D24B686130E22579C7Efe69b19c0

ABI:
[{"inputs":[{"internalType":"address","name":"dydxProtocol","type":"address"},{"internalType":"address payable","name":"loopringProtocol","type":"address"},{"internalType":"address","name":"dydxExpiry","type":"address"},{"internalType":"address","name":"depositContractRegistry","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"constant":true,"inputs":[],"name":"DEPOSIT_COLLATERAL_TYPE_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DEPOSIT_CONTRACT_REGISTRY","outputs":[{"internalType":"contract IDepositContractRegistry","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DYDX_EXPIRY_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DYDX_PROTOCOL","outputs":[{"internalType":"contract IDyDxProtocol","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"LOOPRING_PROTOCOL","outputs":[{"internalType":"contract IRingSubmitter","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"TRADE_DELEGATE","outputs":[{"internalType":"contract ILoopringTradeDelegate","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"WITHDRAW_COLLATERAL_TYPE_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"token","type":"address"}],"name":"brokerBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"bytes32","name":"orderHash","type":"bytes32"},{"internalType":"uint256","name":"fillAmountB","type":"uint256"},{"internalType":"uint256","name":"requestedAmountS","type":"uint256"},{"internalType":"uint256","name":"requestedFeeAmount","type":"uint256"},{"internalType":"address","name":"tokenRecipient","type":"address"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct BrokerData.BrokerOrder[]","name":"orders","type":"tuple[]"},{"internalType":"address","name":"tokenS","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"address","name":"feeToken","type":"address"},{"internalType":"uint256","name":"totalFillAmountB","type":"uint256"},{"internalType":"uint256","name":"totalRequestedAmountS","type":"uint256"},{"internalType":"uint256","name":"totalRequestedFeeAmount","type":"uint256"}],"internalType":"struct BrokerData.BrokerApprovalRequest","name":"request","type":"tuple"}],"name":"brokerRequestAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"number","type":"uint256"}],"internalType":"struct DydxPosition.Info","name":"accountInfo","type":"tuple"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"callFunction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"positionId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"depositCollateral","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256","name":"positionId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"address","name":"feeRecipient","type":"address"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"depositCollateralViaGaslessRequest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"domainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"enableToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address[]","name":"tokenAddresses","type":"address[]"}],"name":"enableTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"tradeOriginator","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"makerToken","type":"address"},{"internalType":"address","name":"takerToken","type":"address"},{"internalType":"uint256","name":"requestedFillAmount","type":"uint256"},{"internalType":"bytes","name":"orderData","type":"bytes"}],"name":"exchange","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"nonceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"broker","type":"address"},{"internalType":"bytes32","name":"orderHash","type":"bytes32"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"address","name":"tokenS","type":"address"},{"internalType":"address","name":"feeToken","type":"address"},{"internalType":"uint256","name":"fillAmountB","type":"uint256"},{"internalType":"uint256","name":"spentAmountS","type":"uint256"},{"internalType":"uint256","name":"spentFeeAmount","type":"uint256"},{"internalType":"address","name":"tokenRecipient","type":"address"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct BrokerData.BrokerInterceptorReport","name":"fillReport","type":"tuple"}],"name":"onOrderFillReport","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes","name":"ringData","type":"bytes"},{"components":[{"internalType":"uint256[]","name":"relevantOrderIndices","type":"uint256[]"},{"internalType":"uint256[]","name":"relevantMarketIds","type":"uint256[]"},{"components":[{"internalType":"enum Activity.Type","name":"activityType","type":"uint8"},{"internalType":"bytes","name":"encodedFields","type":"bytes"}],"internalType":"struct Activity.ActivityArg[]","name":"activityArgs","type":"tuple[]"},{"internalType":"address","name":"dustCollector","type":"address"}],"internalType":"struct DolomiteMarginProtocol.RelayParams","name":"params","type":"tuple"}],"name":"submitRingsThroughDyDx","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"positionId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawCollateral","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256","name":"positionId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"address","name":"feeRecipient","type":"address"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"withdrawCollateralViaGaslessRequest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"withdrawDust","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

Dolomite Direct Smart Wallet

This is the version of Dolomite Direct that manages the user's smart wallet for managed accounts.

Contract address: 0xcfB6CCa370c48418040Fa1b76c8ef303E029110B

ABI:
[{"inputs":[{"internalType":"address","name":"_depositContractRegistry","type":"address"},{"internalType":"address","name":"_loopringDelegate","type":"address"},{"internalType":"address","name":"_dolomiteMarginProtocol","type":"address"},{"internalType":"address","name":"_dydxProtocolAddress","type":"address"},{"internalType":"address","name":"_wethTokenAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"token","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"brokerBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"bytes","name":"orderData","type":"bytes"}],"name":"brokerMarginGetTrader","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"brokerMarginRequestApproval","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"components":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"bytes32","name":"orderHash","type":"bytes32"},{"internalType":"uint256","name":"fillAmountB","type":"uint256"},{"internalType":"uint256","name":"requestedAmountS","type":"uint256"},{"internalType":"uint256","name":"requestedFeeAmount","type":"uint256"},{"internalType":"address","name":"tokenRecipient","type":"address"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct BrokerData.BrokerOrder[]","name":"orders","type":"tuple[]"},{"internalType":"address","name":"tokenS","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"address","name":"feeToken","type":"address"},{"internalType":"uint256","name":"totalFillAmountB","type":"uint256"},{"internalType":"uint256","name":"totalRequestedAmountS","type":"uint256"},{"internalType":"uint256","name":"totalRequestedFeeAmount","type":"uint256"}],"internalType":"struct BrokerData.BrokerApprovalRequest","name":"request","type":"tuple"}],"name":"brokerRequestAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"dolomiteMarginProtocolAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dydxProtocolAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"enableTrading","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"enableTrading","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"loopringDelegate","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"broker","type":"address"},{"internalType":"bytes32","name":"orderHash","type":"bytes32"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"address","name":"tokenS","type":"address"},{"internalType":"address","name":"feeToken","type":"address"},{"internalType":"uint256","name":"fillAmountB","type":"uint256"},{"internalType":"uint256","name":"spentAmountS","type":"uint256"},{"internalType":"uint256","name":"spentFeeAmount","type":"uint256"},{"internalType":"address","name":"tokenRecipient","type":"address"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct BrokerData.BrokerInterceptorReport","name":"fillReport","type":"tuple"}],"name":"onOrderFillReport","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"registry","outputs":[{"internalType":"contract IDepositContractRegistry","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"target","type":"address"},{"internalType":"enum Types.RequestType","name":"requestType","type":"uint8"},{"internalType":"bytes","name":"payload","type":"bytes"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"components":[{"internalType":"address","name":"feeRecipient","type":"address"},{"internalType":"address","name":"feeToken","type":"address"},{"internalType":"uint256","name":"feeAmount","type":"uint256"}],"internalType":"struct Types.RequestFee","name":"fee","type":"tuple"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct Types.RequestSignature","name":"signature","type":"tuple"}],"internalType":"struct Types.Request","name":"request","type":"tuple"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address payable","name":"depositAddress","type":"address"},{"internalType":"address","name":"oldVersion","type":"address"},{"internalType":"bytes","name":"additionalData","type":"bytes"}],"name":"versionBeginUsage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address payable","name":"depositAddress","type":"address"},{"internalType":"address","name":"newVersion","type":"address"},{"internalType":"bytes","name":"additionalData","type":"bytes"}],"name":"versionEndUsage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"wethTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]

Dolomite Direct Contract Registry

This contract is responsible for managing the creation/upgrades for individual deposit contracts for each user Dolomite Direct (managed account) user.

Contract address: 0xcA8EFCC93bca0BD89aD9bfffD050483dD80fdf07

ABI:
[{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"registry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"owner","type":"address"},{"name":"target","type":"address"},{"name":"requestType","type":"uint8"},{"name":"payload","type":"bytes"},{"name":"nonce","type":"uint256"},{"components":[{"name":"feeRecipient","type":"address"},{"name":"feeToken","type":"address"},{"name":"feeAmount","type":"uint256"}],"name":"fee","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"signature","type":"tuple"}],"name":"request","type":"tuple"}],"name":"createDepositContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"versionOf","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"wethTokenAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"operator","type":"address"}],"name":"operatorOf","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"versions","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"owner","type":"address"},{"name":"target","type":"address"},{"name":"requestType","type":"uint8"},{"name":"payload","type":"bytes"},{"name":"nonce","type":"uint256"},{"components":[{"name":"feeRecipient","type":"address"},{"name":"feeToken","type":"address"},{"name":"feeAmount","type":"uint256"}],"name":"fee","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"signature","type":"tuple"}],"name":"request","type":"tuple"}],"name":"perform","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"owner","type":"address"},{"name":"target","type":"address"},{"name":"requestType","type":"uint8"},{"name":"payload","type":"bytes"},{"name":"nonce","type":"uint256"},{"components":[{"name":"feeRecipient","type":"address"},{"name":"feeToken","type":"address"},{"name":"feeAmount","type":"uint256"}],"name":"fee","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"signature","type":"tuple"}],"name":"request","type":"tuple"}],"name":"upgradeVersion","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"owner","type":"address"},{"name":"target","type":"address"},{"name":"requestType","type":"uint8"},{"name":"payload","type":"bytes"},{"name":"nonce","type":"uint256"},{"components":[{"name":"feeRecipient","type":"address"},{"name":"feeToken","type":"address"},{"name":"feeAmount","type":"uint256"}],"name":"fee","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"signature","type":"tuple"}],"name":"request","type":"tuple"}],"name":"setOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"isDepositContractCreatedFor","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DEPOSIT_CONTRACT_BYTECODE","outputs":[{"name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"depositAddressOf","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"nonceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"token","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_wethTokenAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"depositAddress","type":"address"}],"name":"CreatedDepositContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"depositAddress","type":"address"},{"indexed":false,"name":"newVersion","type":"address"}],"name":"UpgradedVersion","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"operator","type":"address"},{"indexed":false,"name":"canOperate","type":"bool"}],"name":"SetOperator","type":"event"}]

dYdX: Solo Margin

The main contract used by dYdX to offer margin lending.

Contract address: 0x02C57952e2E406A9a9af2dFF2C280c59DF9A8b8B

ABI:
[{"constant":false,"inputs":[{"name":"marketId","type":"uint256"},{"components":[{"name":"value","type":"uint256"}],"name":"spreadPremium","type":"tuple"}],"name":"ownerSetSpreadPremium","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"operator","type":"address"}],"name":"getIsGlobalOperator","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"marketId","type":"uint256"}],"name":"getMarketTokenAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"marketId","type":"uint256"},{"name":"interestSetter","type":"address"}],"name":"ownerSetInterestSetter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"components":[{"name":"owner","type":"address"},{"name":"number","type":"uint256"}],"name":"account","type":"tuple"}],"name":"getAccountValues","outputs":[{"components":[{"name":"value","type":"uint256"}],"name":"","type":"tuple"},{"components":[{"name":"value","type":"uint256"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"marketId","type":"uint256"}],"name":"getMarketPriceOracle","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"marketId","type":"uint256"}],"name":"getMarketInterestSetter","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"marketId","type":"uint256"}],"name":"getMarketSpreadPremium","outputs":[{"components":[{"name":"value","type":"uint256"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getNumMarkets","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"recipient","type":"address"}],"name":"ownerWithdrawUnsupportedTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"value","type":"uint256"}],"name":"minBorrowedValue","type":"tuple"}],"name":"ownerSetMinBorrowedValue","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"value","type":"uint256"}],"name":"spread","type":"tuple"}],"name":"ownerSetLiquidationSpread","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"value","type":"uint256"}],"name":"earningsRate","type":"tuple"}],"name":"ownerSetEarningsRate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"operator","type":"address"}],"name":"getIsLocalOperator","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"components":[{"name":"owner","type":"address"},{"name":"number","type":"uint256"}],"name":"account","type":"tuple"},{"name":"marketId","type":"uint256"}],"name":"getAccountPar","outputs":[{"components":[{"name":"sign","type":"bool"},{"name":"value","type":"uint128"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"marketId","type":"uint256"},{"components":[{"name":"value","type":"uint256"}],"name":"marginPremium","type":"tuple"}],"name":"ownerSetMarginPremium","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getMarginRatio","outputs":[{"components":[{"name":"value","type":"uint256"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"marketId","type":"uint256"}],"name":"getMarketCurrentIndex","outputs":[{"components":[{"name":"borrow","type":"uint96"},{"name":"supply","type":"uint96"},{"name":"lastUpdate","type":"uint32"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"marketId","type":"uint256"}],"name":"getMarketIsClosing","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getRiskParams","outputs":[{"components":[{"components":[{"name":"value","type":"uint256"}],"name":"marginRatio","type":"tuple"},{"components":[{"name":"value","type":"uint256"}],"name":"liquidationSpread","type":"tuple"},{"components":[{"name":"value","type":"uint256"}],"name":"earningsRate","type":"tuple"},{"components":[{"name":"value","type":"uint256"}],"name":"minBorrowedValue","type":"tuple"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"components":[{"name":"owner","type":"address"},{"name":"number","type":"uint256"}],"name":"account","type":"tuple"}],"name":"getAccountBalances","outputs":[{"name":"","type":"address[]"},{"components":[{"name":"sign","type":"bool"},{"name":"value","type":"uint128"}],"name":"","type":"tuple[]"},{"components":[{"name":"sign","type":"bool"},{"name":"value","type":"uint256"}],"name":"","type":"tuple[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getMinBorrowedValue","outputs":[{"components":[{"name":"value","type":"uint256"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"operator","type":"address"},{"name":"trusted","type":"bool"}],"name":"args","type":"tuple[]"}],"name":"setOperators","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"marketId","type":"uint256"}],"name":"getMarketPrice","outputs":[{"components":[{"name":"value","type":"uint256"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"marketId","type":"uint256"},{"name":"recipient","type":"address"}],"name":"ownerWithdrawExcessTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"owner","type":"address"},{"name":"number","type":"uint256"}],"name":"accounts","type":"tuple[]"},{"components":[{"name":"actionType","type":"uint8"},{"name":"accountId","type":"uint256"},{"components":[{"name":"sign","type":"bool"},{"name":"denomination","type":"uint8"},{"name":"ref","type":"uint8"},{"name":"value","type":"uint256"}],"name":"amount","type":"tuple"},{"name":"primaryMarketId","type":"uint256"},{"name":"secondaryMarketId","type":"uint256"},{"name":"otherAddress","type":"address"},{"name":"otherAccountId","type":"uint256"},{"name":"data","type":"bytes"}],"name":"actions","type":"tuple[]"}],"name":"operate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"marketId","type":"uint256"}],"name":"getMarketWithInfo","outputs":[{"components":[{"name":"token","type":"address"},{"components":[{"name":"borrow","type":"uint128"},{"name":"supply","type":"uint128"}],"name":"totalPar","type":"tuple"},{"components":[{"name":"borrow","type":"uint96"},{"name":"supply","type":"uint96"},{"name":"lastUpdate","type":"uint32"}],"name":"index","type":"tuple"},{"name":"priceOracle","type":"address"},{"name":"interestSetter","type":"address"},{"components":[{"name":"value","type":"uint256"}],"name":"marginPremium","type":"tuple"},{"components":[{"name":"value","type":"uint256"}],"name":"spreadPremium","type":"tuple"},{"name":"isClosing","type":"bool"}],"name":"","type":"tuple"},{"components":[{"name":"borrow","type":"uint96"},{"name":"supply","type":"uint96"},{"name":"lastUpdate","type":"uint32"}],"name":"","type":"tuple"},{"components":[{"name":"value","type":"uint256"}],"name":"","type":"tuple"},{"components":[{"name":"value","type":"uint256"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"value","type":"uint256"}],"name":"ratio","type":"tuple"}],"name":"ownerSetMarginRatio","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getLiquidationSpread","outputs":[{"components":[{"name":"value","type":"uint256"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"components":[{"name":"owner","type":"address"},{"name":"number","type":"uint256"}],"name":"account","type":"tuple"},{"name":"marketId","type":"uint256"}],"name":"getAccountWei","outputs":[{"components":[{"name":"sign","type":"bool"},{"name":"value","type":"uint256"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"marketId","type":"uint256"}],"name":"getMarketTotalPar","outputs":[{"components":[{"name":"borrow","type":"uint128"},{"name":"supply","type":"uint128"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"heldMarketId","type":"uint256"},{"name":"owedMarketId","type":"uint256"}],"name":"getLiquidationSpreadForPair","outputs":[{"components":[{"name":"value","type":"uint256"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"marketId","type":"uint256"}],"name":"getNumExcessTokens","outputs":[{"components":[{"name":"sign","type":"bool"},{"name":"value","type":"uint256"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"marketId","type":"uint256"}],"name":"getMarketCachedIndex","outputs":[{"components":[{"name":"borrow","type":"uint96"},{"name":"supply","type":"uint96"},{"name":"lastUpdate","type":"uint32"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"components":[{"name":"owner","type":"address"},{"name":"number","type":"uint256"}],"name":"account","type":"tuple"}],"name":"getAccountStatus","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getEarningsRate","outputs":[{"components":[{"name":"value","type":"uint256"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"marketId","type":"uint256"},{"name":"priceOracle","type":"address"}],"name":"ownerSetPriceOracle","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getRiskLimits","outputs":[{"components":[{"name":"marginRatioMax","type":"uint64"},{"name":"liquidationSpreadMax","type":"uint64"},{"name":"earningsRateMax","type":"uint64"},{"name":"marginPremiumMax","type":"uint64"},{"name":"spreadPremiumMax","type":"uint64"},{"name":"minBorrowedValueMax","type":"uint128"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"marketId","type":"uint256"}],"name":"getMarket","outputs":[{"components":[{"name":"token","type":"address"},{"components":[{"name":"borrow","type":"uint128"},{"name":"supply","type":"uint128"}],"name":"totalPar","type":"tuple"},{"components":[{"name":"borrow","type":"uint96"},{"name":"supply","type":"uint96"},{"name":"lastUpdate","type":"uint32"}],"name":"index","type":"tuple"},{"name":"priceOracle","type":"address"},{"name":"interestSetter","type":"address"},{"components":[{"name":"value","type":"uint256"}],"name":"marginPremium","type":"tuple"},{"components":[{"name":"value","type":"uint256"}],"name":"spreadPremium","type":"tuple"},{"name":"isClosing","type":"bool"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"marketId","type":"uint256"},{"name":"isClosing","type":"bool"}],"name":"ownerSetIsClosing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"priceOracle","type":"address"},{"name":"interestSetter","type":"address"},{"components":[{"name":"value","type":"uint256"}],"name":"marginPremium","type":"tuple"},{"components":[{"name":"value","type":"uint256"}],"name":"spreadPremium","type":"tuple"},{"name":"isClosing","type":"bool"}],"name":"ownerAddMarket","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"operator","type":"address"},{"name":"approved","type":"bool"}],"name":"ownerSetGlobalOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"components":[{"name":"owner","type":"address"},{"name":"number","type":"uint256"}],"name":"account","type":"tuple"}],"name":"getAdjustedAccountValues","outputs":[{"components":[{"name":"value","type":"uint256"}],"name":"","type":"tuple"},{"components":[{"name":"value","type":"uint256"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"marketId","type":"uint256"}],"name":"getMarketMarginPremium","outputs":[{"components":[{"name":"value","type":"uint256"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"marketId","type":"uint256"}],"name":"getMarketInterestRate","outputs":[{"components":[{"name":"value","type":"uint256"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"components":[{"name":"value","type":"uint256"}],"name":"marginRatio","type":"tuple"},{"components":[{"name":"value","type":"uint256"}],"name":"liquidationSpread","type":"tuple"},{"components":[{"name":"value","type":"uint256"}],"name":"earningsRate","type":"tuple"},{"components":[{"name":"value","type":"uint256"}],"name":"minBorrowedValue","type":"tuple"}],"name":"riskParams","type":"tuple"},{"components":[{"name":"marginRatioMax","type":"uint64"},{"name":"liquidationSpreadMax","type":"uint64"},{"name":"earningsRateMax","type":"uint64"},{"name":"marginPremiumMax","type":"uint64"},{"name":"spreadPremiumMax","type":"uint64"},{"name":"minBorrowedValueMax","type":"uint128"}],"name":"riskLimits","type":"tuple"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"operator","type":"address"},{"indexed":false,"name":"trusted","type":"bool"}],"name":"LogOperatorSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]