DEX Market Maker Tutorial: bits and btsbots

in #bitshares3 years ago (edited)

Royal Scyths

DEX Market Maker Tutorial: bits & bots


BitShares Decentralized Exchange (DEX) BitShares 2.0 is an industrial-grade decentralized platform built for high-performance financial smart contracts. The decentralized exchange that allows for trading of arbitrary pairs without counterparty risk facilitates only one out of many available features. Market-pegged assets, such as the bitUSD, are crypto tokens that come with all the advantages of traditional cryptocurrencies like bitcoin but trade for at least the value of their underlying asset, e.g. $1. Furthermore, BitShares represents the world's first decentralized autonomous company/organization (DAC/DAO) that lets its shareholders decide on its future direction and products. Just as the tech and governance is decentralized so is the markets with English and Mandarin (Chinese) communities equally balanced with several other markets quickly gaining momentum in Turkish, Russian and French portals that all use the same DEX blockchain for every trading market. This tutorial assumes you’ve already created an account in the DEX. 

If you still need to create a DEX account then click here --Using BTSBots requires the wallet model account.

bitUSD --Better than fiat, tether & other non-backed IOU’s 

SmartCoin (bitAsset) issuance and market cap on the internal BitShares network continues to rise with the main SmartCoins (bitUSD, bitCNY, bitEUR, bitBTC, bitGold and bitSilver) reaching a market cap over 1.4 Million USD equivalent in April of 2017. This is a promising sign for the BitShares ecosystem strength and growth as the issuance of these assets are backed by a minimum of 175% in BitShares core token BTS. At the time of referenced analysis @steempower calculated the value backing these assets was greater than 5 Million USD worth of BTS. As this trend continues further stability will occur because the BTS is bonded [locked] to the network via a smart contract allowing these SmartCoins to maintain their face value without any counter party risk!

smartcoin growth_1680x8400.png
You can follow markets on for bitUSD and bitCNY

Borrow USD, CNY, BTC with 0% Interest Charged

In order to increase your exposure to BTS and offer liquidity to SmartCoins (bitAsset), such as USD, CNY, GOLD, etc., you can borrow this bitAsset from the network and sell it short or pay for goods/services via BlockPay’s global merchant POS platform. We will briefly describe the process for creating bitUSD. This works especially well if you want to buy an asset that you think will gain value over the smartcoin you borrow. 

Borrowing from the DEX 

The BitShares network is capable of issuing any amount of any BitAsset (SmartCoin) and lend it out to participants given enough collateral (Recommend at least 250-300% BTS collateral).

DEX bitKapital_1680x8400bitUSDCurrent bitUSD Settings

- Maintenance collateral ratio: 1750 (175%) - Maximum short squeeze ratio: 1100 (110%) - Minimum feeds: 7 - Force settlement delay: 24 hours - Force settlement offset: 1% - Max force settle vol: 0.5% - Short backing asset: BTS

2 deposit maid or borrow usd

  • Settlement price: The price for 1 BTS as it is traded on external exchanges.
  • Maintenance collateral ratio (MCR): A ratio defined by the witnesses as minimum required collateral ratio.
  • Maximum short squeeze ratio (MSQR): A ratio defined by the witnesses as to how far shorts are protected against short squeezes.
  • Short squeeze protection (SQP): Defines the most a margin position will ever be forced to pay to cover settlement.
  • Call price (CP): The price at which short/borrow positions are margin called.

borrow USD.png

For detailed information go to BitShares 2.0 Guides: SHORT SELLING BITASSETS and MARGIN CALL MECHANICS

Here is a video tutorial published by a BitShares community member How to create BitUSD

Market Making Bots on the DEX


leonArdo has been designed as a visual trading front-end for different markets. However, rather than simply mimic market websites, leonArdo provides a host of additional features that; significantly improve your trading experience. leonArdo currently supports Poloniex, Bittrex, BTC-e, Bitstamp, Bitfinex, OKCoin and OKCoin CNY, but new market plugins are in the pipeline and if rumors are true then the addition of BitShares Decentralized Exchange is imminent.


LeonArdo was included because of Bittrex's integration of bitCNY. After the DEX is added users will be able to leverage the bitCNY:BTC trading pair to take advantage of any arbitrage between markets like MAID, BTS, bitCNY, LTC, ETH, DASH. Users of Tether know the inconsistencies associated with running on the Bitcoin blockchain, which BitShares SmartCoins are the solution. Plus adding in the counterparty risks proven recently with Tether markets further diminishes the value of non-collateralized fiat pegged IOU's. bitCNY (bitUSD) and its BitShares Graphene Blockchain has a transaction confirmation time of 3 seconds or less and has been proven to handle a minimum of 3,300 Tx/second. After this most recent USD pegged asset [Tether] falter; hopefully exchanges such as Poloniex who used to list bitUSD will return to it for the security and safety of their customers.

BTSBots is third party market making bot software from a trusted BitShares community member Alt. This software is available at or from the android play store. The APP allows no page to be left open feature.

app front page.jpg

The fees for trading on the DEX are already low for crypto trading, but to further reduce fees by 80% (plus other benefits) that these little bots can create you should consider upgrading your BitShares account to a Lifetime Member (LTM). Using BTSBots requires users to share their active permission private key so we recommend creating a second account, for a nominal fee of ~7 BTS, specifically for bot trading (still gets the discounted fees if created with your LTM

bot liquidity.png

Using BTSBots

btsbots home.png

Here is a video tutorial published by a BitShares community member: btsbots app demo

1. Create an BTSBots account. Go to and follow the instructions. To use your existing bitshares account, you need to import its active private key from DEX account. Use a different unique password than DEX account.

btsbots add account.png

bitshares permissions private key.png

Remember it is the "Active Permissions" key in an account you have created specifically for bot trading since the private key will be shared with btsbots (encrypted with a unique password in registration process). Click on the Blue Hyperlink next to the key icon. Then you will get this screen

bitshares permissions private key access.png

2. To view your account, select it from a drop down list with user icon at top-right. The account overview page shows account balance, 1 day trade volume, 28 days trade volume and 28 days balance change for each asset, their equivalent values in CNY and total value for all assets in CNY. A number at the top of the right column (trade balance(28 day)) shows you how your trading is performing. If it is positive, you are doing good. To add a new account to favorite list, type its url, e.g.


3. Left column shows you a list of favorite pairs. To add a pair, type its url (see below) and click a little heart icon at top-right. You can invert base vs counter asset by typing url or clicking the price hyperlink. You can trade all asset if you can get the reference price. For some asset lack of trade history, no reference price from You can set a custom price in the bots's config page

All current reference price sources from script btsprice which used by delegate.baozi

  • All MPA's issued by committee

"KRW", "BTC", "SILVER", "GOLD", "TRY",
 "SGD", "HKD", "RUB", "SEK", "NZD", "CNY",
 "MXN", "CAD", "CHF", "AUD", "GBP", "JPY",
 "EUR", "USD", "TCNY", "TUSD", "ARS"

  • UIA issued by trusty gateway:

   "EUR": ["OPEN.EUR"], "CNY": ["OPEN.CNY"], "RUB": ["RUBLE"], "GRC": ["OPEN.GRC"]

  • exchange price feeds
  • special SYMBOL can used in bots config page

All other asset prices are from DEX's trade history with simple algorithm, you'd be better to set a custom price for these assets. Also, no price feeds from some assets, because they lack enough trade history.

Here are several markets with excellent liquidity:

Click a little heart icon at top-right. Now you can select exchange. btsbots from the favorite list. To remove account from favorites, select it and unclick the heart icon.

btsbots bot setup.png

4. Once you selected a market, you can start trading.

a. You can place an order manually by pressing "buy" or "sell" buttons

b. You can set up a bot to make trading for you by pressing "bot" button.

  • First, you set up a spread relative to feed price. A number in the"Spread" field on the left means that you are buying at feed_price/(1+X/100). A number in the "Spread"field on the right means that you are selling at feed_price*(1+X/100). X may be positive, negative or zero.
  • Next, you need to set the amount to trade denominated in CNY (why not just the amount of traded asset?).

    Please be aware of your local laws. A lot of the software discussed is experimental. Use at your own risk. This is not investment advice.

    Download Original Layout and Design PDF Version


    Wow, very thorough, very nice!
    UPVOTED :)

    There's also OPEN.GRC which you can trade on BTSBOTS, I would really appreciate additional market makers. I'm running a 10% spread on several trading pairs, this is great! :D

    Okay I have updated the document and also joined those markets. Thanks for the feedback.

    customminer CM tweeted @ 28 Apr 2017 - 12:03 UTC

    Want to learn how to setup #gridcoin trade bots?… /
    $GRC #BOINC #Liquidity

    Disclaimer: I am just a bot trying to be helpful.

    Excellent post! I like your work My friend

    Ooo, a really nice guide with a lot of info in one place, thanks! Do you mind if we translate it into Russian?

    Russian would be awesome! I wrote this with the goal to further increase the awareness of the DEX. More languages the better.

    Thank you! Thank you! Thankyou!

    Now I have the definitive place to send people for a quick overview. Well done.


    I bought BTS bitshares after reading well done thank you.

    Join us here where we talk DOPEcoin and Bitshares mostly

    @scythian I have a question about what is said here:

    Using BTSBots requires users to share their active permission private key so we recommend creating a second account

    The bitshares "multiple accounts per wallet" configuration has always confused me. It would be useful if there were steps to show how to create multiple accounts. I believe this is confusing due to namespacing and particularly this paragraph in the Bitshares documentation.

    Wallet: Since users can (if they have a lifetime membership) register multiple accounts in parallel, all of them are stored in a single wallet. Hence, a wallet can carry many accounts. Furthermore, users can create multiple wallets to organize their accounts properly.

    So a wallet can have many accounts, but a wallet can have multiple wallets? My head is spinning. Basically, I have a lifetime account, or is it a wallet (since a wallet has-many accounts?) and would prefer to use separate credentials for BTSBots but would like to utilize the low fees of my lifetime account, very unclear where to begin.

    Aside: Is there a flow chart or diagram that illustrates Bitshares account/wallet hierarchy?

    So after writing that, I saw the huge "CREATE ACCOUNT" button at the bottom of the account page. However, it never completes, throwing a series of javascript errors.

    Screen Shot 2017-04-30 at 12.52.39 AM.png

    Screen Shot 2017-04-30 at 12.50.52 AM.png

    This problem occurs with @openledger wallet

    The old one, didn't know about the new one. TBH, Bitshares is acting weird right now.

    The only odd thing in Bitshares is that its valuation is less than 1 billion

    Accounts and Wallets are used interchangeably in BitShares; there are multiple permissions/private-public keys (Owner, Active, Memo) with each account.

    Do you have BTS in your account that is open when you click the "Create Account"? Also remember to back up the *.bin file/password and since password managers are recommended it may be a good idea to save your private keys as well.

    Also note the different between basic account name structure word-word versus more expensive premium naming: word.

    Thanks for the reply, moving away from using OpenLedger and using the better maintained wallet on solved my confusion.

    I backup religiously, thanks for the reminder :)

    pls chk your BTS account READMEMO message awaiting...

    Are You sure that MCR and MSQR ratio are defined by Witnesses?
    I thought it was the role of the committee or the one who created that MPA.

    Good question, this link is similar to where I referenced the text:

    Congratulations @scythian! You have received a personal award!

    1 Year on Steemit
    Click on the badge to view your own Board of Honor on SteemitBoard.

    Upvote this notificationto to help all Steemit users. Learn why here!

    Congratulations @scythian! You received a personal award!

    Happy Birthday! - You are on the Steem blockchain for 2 years!

    You can view your badges on your Steem Board and compare to others on the Steem Ranking

    Vote for @Steemitboard as a witness to get one more award and increased upvotes!