289
« on: March 17, 2015, 01:12:12 am »
My preference would be something like the following:
BitUSD : BTS [flip] Call price Last price Spread Total BitUSD Supply Total BTS Supply
100 BTS/BitUSD 105 BTS/BitUSD 0.905% 433,000.00 BitUSD 2,503,706,843 BTS
------------- -----------
| Orderbook | | History |
| --------- | | |
----------------------------------------------------------------------------------------------------------------------------------
| |
| | [Orderbook Chart]
| |
| | Show quantity in: (*) BitUSD ( ) BTS
| |
| | Bids Asks
| | ---------------------------------------------------------- ----------------------------------------------------------
| l | | Type | Quantity (BitUSD) | Price (BTS/BitUSD) | | Price (BTS/BitUSD) | Quantity (BitUSD) | Type |
| e | ------------------------------------------------------------ ------------------------------------------------------------
| f | | Margin Call | 12,000.00 | 111.1111 |^| | 112.0000 | 1,215.00 | Short Sell |^|
| t | | Buy BitAsset | 600.00 | 101.2500 ||| | 120.0000 | 750.00 | Sell BitAsset |||
| | | Expired Cover | 1,601.32 | 100.0000 ||| | 120.0000 | 5,000.00 | Short Sell |||
| c | | Buy BitAsset | 512.34 | 99.9091 | | | | | |||
| o | | Buy BitAsset | 200.00 | 99.0000 |v| | | | |v|
| l | ------------------------------------------------------------ ------------------------------------------------------------
| u |
| m | [*] Display detailed short information
| n | ------------------------------------------------------------------------------------------------------------------
| |
| | Margin Call Orders
| | ---------------------------------------------------------------------------------------------------------------
| | | Call Price (BTS/BitUSD) ^2 | Interest Rate (APR) -- | Owed (BitUSD) -- | Expiration ^3 | Condition v1 |
| | -----------------------------------------------------------------------------------------------------------------
| | | 110.0000 | 0.00 | 12,000.00 | 6 Days | Margin Called |^|
| | | 130.0000 | 2.00 | 1,501.32 | 2 Days Ago | Expired |||
| | | 135.0000 | 0.00 | 100.00 | 1 Day Ago | Expired |||
| | | 130.0000 | 0.00 | 10,000.00 | 10/25/2015 9:18 AM | Active |||
| | | 165.0000 | 1.10 | 3,000.00 | 30 Days | Active |v|
| | -----------------------------------------------------------------------------------------------------------------
| |
| | Short Sell Orders
| | -------------------------------------------------------------------------------
| | | Price Limit (BTS/BitUSD) ^1 | Interest Rate (APR) v2 | Quantity (BitUSD) -- |
| | ---------------------------------------------------------------------------------
| | | 112.0000 | 1.00 | 1,100.00 |^|
| | | 112.0000 | 0.50 | 115.00 |||
| | | 120.0000 | 0.00 | 5,000.00 |||
| | | | | |||
| | | | | |v|
| | ---------------------------------------------------------------------------------
| |
| | ------------------------------------------------------------------------------------------------------------------
| |
----------------------------------------------------------------------------------------------------------------------------------
The left column under the "Orderbook" tab would be similar to what you have in the left column in your layout (the box with tabs to Buy, Sell, and Short and the respective open orders tables underneath), however there would be an addition Cover tab which would include the "Open Margin Orders" table (renamed "Open Margin Call Orders"). Later I can imagine the Cover tab supporting functionality like partial covers and adding collateral. Also the BitUSD balances and BTS balances would be shown in the left column (on top of the buy/sell/short box) and not in the right column (because they are user-specific information not market-specific).
There are two main tabs in my proposed interface: "Orderbook" and "History". The "History" would show the price history chart and the "Blockchain Orders History" table underneath it in the right column, and it would put the "Account Orders History" table into the left column. The "Orderbook" tab looks as I have laid out in ASCII above. I will explain it in more shortly. Despite this tabbed interface, if the screen is large enough, I think it makes sense to instead pull out the history tab contents and put it on the right side next to the orderbook tab contents. In this case I think the "Account Orders History" table should not be in a column by itself but rather underneath the "Blockchain Orders History" table. So the layout for large screens would be a three column layout in which the left column is the same as the left column described above, the middle column is the contents of the right column in the mockup above, and the right column is the price history chart followed by the "Blockchain Orders History" table followed by the "Account Orders History" table.
The tables have removed the two quantities (Quantity and Total) and kept only one. The asset that is used to display the quantity is the one that is selected in the "Show quantity in:" option box. The user change that selection at any time and it will update the Quantity columns of all of the tables appropriately. The market can be flipped as usual using the [flip] button. If the [flip] button is pressed in a "BitUSD : BTS" market, it will replace it with a "BTS : BitUSD" market and make appropriate changes in the rest of the interface. In general, the market is "Quote : Base". The prices will be given in Quote/Base. So if the market was flipped to "BTS : BitUSD" all the prices in BTS/BitUSD would be replaced with prices in BitUSD/BTS (also the ascending/descending sort of a price column would be flipped). By default the quantity to show is selected as the Quote asset, but of course it can be changed with the "Show quantity in:" option box.
The "Display detailed short information" checkbox toggles whether the "Margin Call Orders" table and "Short Sell Orders" table will appear underneath it. By default this checkbox can be unchecked (meaning not showing the tables).
When looking at a "Quote : Base" market in which neither Quote nor Base is BTS or alternatively one of Quote or Base is BTS and the other is not a BitAsset, the layout would look the same except there would be no "Display detailed short information" checkbox (and no "Margin Call Orders" table or "Short Sell Orders" table), and the Type columns from the "Bids" and "Asks" table would be removed.
When looking at a "Quote : Base" market in which Base is BTS and Quote is a BitAsset, the "Margin Call" type and "Expired Cover" type would be under the "Bids" table and the "Short Sell" type would be under the "Asks" table (as demonstrated in the example above). On the other hand, when looking at a "Quote : Base" market in which Quote is BTS and Base is a BitAsset, the "Margin Call" type and "Expired Cover" type would be under the "Asks" table and the "Short Sell" type would be under the "Bids" table.
The orderbook chart should always show the order types that fall into the "Asks" table on the right side and show the order types that fall into the "Bids" table on the left side. They should also be color coded to match the color of the titles of the "Asks" and "Bids" tables appropriately. The orderbook chart should allow one to zoom in/out and define the domain to be smaller than [lowest bid price, highest ask price]. Also the quantity shown in the orderbook chart should be of the asset selected from the "Show quantity in:" option box. The orderbook chart should of course visualize the feed price as a line as it currently does.
As can be seen by my mockup, the short sell orders are combined with the sell orders into one table. The "Short Sell Orders" table would include detailed information about the short sell orders that are not included in the combined table (such as interest rate offered), but would also differ from the combined order in that the price limit column would be the price limit set by the short (even if it is less, in BTS/BitAsset price, than the current price feed). The number shown for short sell orders in the price column of the combined table is instead max(price limit in BTS/BitAsset, feed price in BTS/BitAsset) if the Base asset is BTS or min(price limit in BitAsset/BTS, feed price in BitAsset/BTS) if the Quote asset is BTS. Also, short sell orders and sell orders at the same price are not coalesced together in the combined table to show that there are two different types of orders offered at the same price (my hope is that the market engine would actually match sell orders before short sell orders at the same price so that this visual distinction actually has important meaning, but until then it is just an aesthetic choice). However, multiple short sells orders at the same price are coalesced together and multiple sell orders at the same price are coalesced together. Similarly, expired cover orders, margin call orders, and buy orders are not coalesced together in a way that mixes types in the combined table (again it would be nice if the market engine guaranteed that given three orders of different types at the exact same price, the margin call order was matched before the expired cover order which was matched before the BitAsset buy order). However, orders of the same type and at the same price are coalesced together.
The collateral column is removed from the tables because it is redundant information (it can be calculated from the given columns and knowledge about the initial collateral requirements, margin call requirements, and expiration period of the BitAsset system). However, this information and any other detailed information (such as the precise time that a short position expires or the principal BitAsset owed not counting the interest) can be included in tooltips when hovering over a specific order in any of the "Margin Call Orders", "Short Sell Orders", "Blockchain Orders History", "Account Orders History", and "Open * Orders" tables. The tooltip over orders in the "Bids" and "Asks" tables could not provide the same level of information because in general orders can be coalesced together in those tables. However, the tooltip could still provide a calculation of the Quantity in units of the other asset type that is not already displayed as a column in the table.
The "Bids" and "Asks" tables should highlight orders for which one of the user's orders are coalesced into. Also, orders exactly at the price feed should also be highlighted in a different color.
The "Margin Call Orders" table adds a Condition column to show whether the short position is Active, Expired, or Margin Called. The expiration column also shows the expiration date even if the short position has already expired ("1 Day Ago" to "30 Days Ago" to a timestamp if older than 30 days). An "Expired" short position can become "Margin Called" but a "Margin Called" position can never become "Expired". The Expired and Margin Called items in this table are not removed until their BitAsset debt with interest (which is the Owed column) is fully paid off. Margin Called orders might have a Call Price larger than the current feed price, as shown in the mockup example. This can happen since the Margin Call would have been triggered when the call price was lower, but partially covering the short through the margin call could increase the call price. For example, if the short in that example originally owed 15,000 BitUSD and had a call price of 99 BTS/BitUSD, then the price feed updating to 100 BTS/BitUSD would trigger a margin call on that short which would cause it to purchase asks up to a price of 111.1111 BTS/BitUSD. Let us pretend there was only one ask order below that price: a short sell order for 3,000 BitUSD at 0% interest and a price limit at 110 BTS/BitUSD. Then the margin call would match against that order (fully matching the short sell order), pay 330,000 BTS from its collateral of 2,970,000 BTS, and reduce its debt owed from 15,000 BitUSD to 12,000 BitUSD. Thus the new collateral would be 2,640,000 BTS and the new debt owed would be 12,000 BTS, which correspond to a call price of 110 BTS/BitUSD. But just because the new call price is higher than the feed price doesn't mean the order is no longer margin called; the margin call order stays (and in fact moves with the price feed maintaining its 10% difference) until the remaining 12,000 BitUSD is fully matched.
Finally, the ^N and vN indicators on the "Margin Call Orders" and "Short Sell Orders" table indicate table sorting rules. The arrow direction indicates whether the column is sort in ascending or descending order. The number is a priority in sorting. The items in the table are sorted according to the column that has the first priority in sorting order, then any items with the same value are sorted according to the column that has the second priority in sorting order, and so on. Clicking on the sorting indicator toggles between ascending, descending, and neutral. Whenever a sorting indicator that had priority N is toggled to neutral, any existing columns with non-neutral sorting indicators that have priority greater than N in the table have their sorting priority decremented by one automatically. Whenever a sorting indicator that was neutral is toggled to a non-neutral setting, it gets a sorting priority that is one larger than the current largest sorting indicator priority of the table.