Skip to content
Fabian Schuh edited this page Jun 16, 2016 · 9 revisions

Warning! MakerOTC is undergoing alpha testing: Proceed at your own risk, and use only small amounts of ETH and MKR.

The MakerOTC dapp can be accessed via http://mkr.market/maker-otc/

Please report any issues on https://github.com/MakerDAO/maker-otc/issues

Overview

MakerOTC is a simple on-chain market for all token assets in the Maker registry; MKR, DAI, ETH and more to follow. It aims to handle the backbone of trade and exchange by focusing on being good for large orders, which needs stuff like custom logic and high security, but it can also work as a regular exchange if it has a good GUI that handles the order search and does a human-friendly display of the markets. The "Simple Market" implementation doesn't have a matching engine, but someone could of course write a layer on top of it that provides such an engine.

Network

The MakerOTC dapp can be accessed via http://mkr.market/maker-otc/

You'll need to run a local Ethereum client, such as geth. In the future the dapp can be accessed directly from within Mist, MetaMask and whatever (light) clients Consensys and EthCore will come up with.

The MakerOTC SimpleMarket contract is deployed on both the Ethereum mainnet as well as the "morden" testnet. The Dapp user interface will automatically detect the network that your client is connected to and access the right contract address accordingly.

You can start the geth client as following, to allow MakerOTC to connect to the Ethereum main blockchain:

geth --rpc --rpccorsdomain http://mkr.market

This will open up the JSONRPC interface (on the default port and interface http://localhost:8545/), and allow Cross-Origin Resource Sharing (CORS) by the Dapp to connect to your local Ethereum client. If you don't want to allow this, you could checkout the repository and run the frontend locally instead.

If you want to access the Ethereum "morden" testnet, you should add the --testnet argument to the geth executable call:

geth --rpc --rpccorsdomain http://mkr.market --testnet

Unlocking

By default all accounts will be locked, meaning that you can access the MakerOTC orderbook in a read-only fashion. If you want to be able to make a transaction, then you should ensure that your account(s) is/are unlocked. There are a couple ways to do so; simply from the command line by adding the --unlock 0xYourAccountAddress as commandline argument, obviously replacing 0xYourAccountAddress with your actual address. This will prompt you for a password after which this account is locked and transactions from it can be sent. Alternatively you can connect to the geth process and unlock the account from the Javascript Console

Network status

Once loaded the MakerOTC dapp will check that your blockchain is fully synchronized and the MakerOTC SimpleMarket contract can be found; if not you'll get a warning or error message:

  • no ethereum found - the local Ethereum node couldn't be accessed. Either it is not running, the RPC interface is disabled or the CORS headers aren't properly set. Please review the above instructions.
  • out of sync, waiting for synchronization - your blockchain is not recent, we are connected to your client but it hasn't started synchronizing yet.
  • syncing 50% - the blockchain synchronization is in process, this might take a while; check the percentage indication.
  • ready - you are connected to the network and your blockchain is up to date.

Contract

The MakerOTC SimpleMarket contract is deployed on both the Ethereum mainnet as well as the "morden" testnet. You can click on the contract address to inspect the contract on the EtherScan.io blockchain explorer. Note that you shouldn't send any funds to the contract address directly (they will be rejected). If you want to allow the MakerOTC to access your funds, please read below under Allowance.

Account

The account pulldown contains the Ethereum account(s) that are detected in your Ethereum client. You can switch between them, the relevant balances should update instantly. The actively selected & displayed account will be used to initiate all transactions from. Note that the account might not be unlocked (yet). Read how to unlock an account.

Balance

The balance shows the amount of ETH in your currently selected account. To pay for the gas cost of any transaction, you should have a non-zero amount in your account. If not, buy some ether and send it to this address. Please note that you can't use this amount directly to trade with. To do so you would have to first deposit it into the ETH token contract.

Tokens

MakerOTC can trade any tokens that are 1) following the EIP-20 token standard and are 2) registered in the Maker registry. Currently those are the MKR, ETH and DAI tokens.

Allowance

For the MakerOTC Dapp to be able to access your token funds for buying and/or selling, you need to first grant it access to withdraw from your personal account by setting the allowance. This will specify the maximum that can be withdrawn, and will be reduced with each withdrawal. You can always update the allowance or disable it completely by setting it to 0. This might seem confusing initially, but this token access pattern is common practice for all EIP-20 tokens.

Orderbook

The orderbook shows which are the current open orders. You can click on any to accept the proposed trade, you'll get a confirmation modal outlining the details of the trade. There is no matching engine, so it is up to you to find and accept the best trades!

Buy orders

These list the open buy orders, an other trader wants to buy the amount and currency as specified under BID, which has the approximate price as specified under VALUE and in exchange you will sell the amount and currency as specified under VOLUME.

Sell orders

These list the open sell orders, an other trader wants to sell the amount and currency as specified under ASK, which has the approximate price as specified under VALUE and in exchange you will buy the amount and currency as specified under VOLUME.

My orders

These contain all your open buy and sell orders for the selected account. You can cancel them by clicking on the [X] next to the order line.

New order

To place a new market order you can enter the type (buy/sell), the quote currency, the amount and the requested volume. The total price will be updated automatically. Be aware that an order created this way will NOT match against any open orders in the order book; if you want that you'll have to select them from the orderbook instead of creating a new order.

ETH Tokens

To be able to trade ETH, you first have to deposit it into the EIP-20 standard token compliant ETH Token contract. You can deposit and withdraw from it and your ETH account using this form.