In this post I propose how the NuBot short/mid term roadmap can be modified for dealing with new evolving requests. There are a couple of changes that will not only affect the way the bot it is developed, but also liquidity provision.
Tier 2 Proposal :
Tier 2 currently sits on the exchange in the balance of the custodian but not on order. It is used to quickly fill the tier 1 poll when the active order gets executed. Tier2 funds are at risk of exchange default and thefts, therefore we have to make good use of them. I believe there is a better way to put tier2 at work while serving the purpose of quickly refilling tier1.
I propose to offer tier2 liquidity in the market at premium price, and distributing it according to the liquidity distribution models we have been discussing in other threads.
http://imgur.com/s6LtdXT
When the green tier1 wall is consumed, the bot will replenish it after a N seconds delay or at the following price shift, with N becoming function of market activity in the future. This will allow to have a continued offer of liquidity on both sides. It will require little change in the code (the liquidity distribution is being tested as I type). It will allow large sellers/buyers to have their market orders filled immediately if they need to , and as a side effect, will make a profit to the custodian.
This affects the tier definition :
Tier1 : Amount of liquidity offered at the best possible price (1$+fee+spread)
Tier2 : Amount of liquidity offered at premium price
Tier3 : Amount of liquidity off-the-exchange, hot wallet
Note: In the future we can also have a new tier layer that stays on the exchange (in a different account to spread risk) , not on order, which is used to rebalance buy and sell by filling an order, with no need to wait for BTC confirmation time . More on this in the future, back to the short/mid term development roadmap.
Tier3 Proposal
Development will spitted in three incremental releases.
###0.2.1
In the immediate release (0.2.1) the whole nubot team will work on building the base blocks to allow tier3 liquidity management.
While I will focus on liquidity distribution (tier1 and 2) ,@benjyz will work on NuRPCCoinClient : an Implementation of a Java RPC Client to communicate via RPC with crypto/client and expose the following methods
- void initClient (cointype, ip,port, rpcuser, rpcpassword, encryptionPassphrase)
- boolean isOnline ()
- boolean isEncrypted ()
- double getBalance ()
- boolean isAddressValid(address)
- send(destinationAddress)
@woolly_sammoth will work on NuStringEncrypt, a stand alone easy-to-use encryption tool written in Java that takes a list of unencrypted strings and encrypts them. It should also expose the following methods via an Interface:
- String[] encrypt(String[] inputStrings, String passphrase)
- String[] decrypt(String[] encryptedStrings, String passphrase)
- String decrypt(String encryptedString, String passphrase)
After testing this version will be released to custodians.
###0.2.2
This version will contain the initial Integration of with NuBot : i.e, the bot will be coupled with hotwallets.
-feature 1: It will read from JSON configuration file that specifies an array of clients. Sensitive data have to be encrypted before being passed to the bot .
{
"coupled-wallets": [
{
"coincode": "",
"ip": "",
"port": "",
"rpcuser" : "",
"rpcpassword" : "",
"walletPassphrase" : "",
},
{
"coincode": "",
"ip": "",
"port": "",
"rpcuser" : "",
"rpcpassword" : "",
"walletPassphrase" : "",
},
…
]
}
- feature 2: on startup the user will be prompted for one encryption password that allows decryption of obfuscated configuration parameters.
- feature 3: apikeys will be also accepted in an encrypted format.
###0.2.3
- if a certain config parameter is set to true, activate semi-automated management of tier 3 liquidity : implement the logic that allows NuBot to request deposits from the coupled hotwallets. Custodian needs to withdraw funds from exchange to hotwallet when required (from tier 2 to tier 3).
- this release will also include an User Interface for generating configuration JSON files.
That’s all. If Jordan believes that the proposed changes makes sense, below is a revisited overall read
Resulted roadmap updated :
-
0.1.5 :
-
Simple implementation that allows multiple custodians to operate on the same non-USD market ;
-
Basic tier 2 implementation .
-
0.2.1 :
-
First implementation of (tier2) liquidity distribution model [@desrever] ;
-
NuRPCCoinClient implementation [@benjyz];
-
NuStringEncrypt implementation [@woolly_sammoth] ;
-
init porting to Gradle ;
-
0.2.2 :
-
Integration of NuRPCCoinClient and NuBot ;
-
Integration of NuStringEncrypt and NuBot;
-
API keys protection system ;
-
0.2.3 :
-
Automated management of tier3 liquidity ;
-
UI to generate configuration parameters ;
-
complete migration to gradle ;
-
0.3.1 :
-
Price-feed streaming service implementation
-
0.3.2 :
-
Consume price-feeds via web-sockets (instant shift, synchronised)
-
0.3.3 :
-
Parametric liquidity distribution models (configurable)
-
Market-aware tier2>tier1 movements
-
0.4.1 :
-
Market-aware liquidity distribution models ( adaptive )
-
0.4.2 :
-
50% code coverage
-
0.4.4 :
-
NuBot toolkit release ( trade history, balance history, price-peg execution bot, encrypt/decrypt tool, config generator )
-
0.5.3 :
-
60% code coverage
-
0.6.1 :
-
Futures markets integration
-
0.7.1 :
-
Liquidity balancing across markets
-
0.7.2 :
-
80% code coverage
-
0.8.1 :
-
Real-time reports
-
0.8.2 :
-
API functional tests
-
0.9.1 :
-
Redundancy bots
-
0.9.2 :
-
Continuous integration
-
0.9.3 :
-
String externalisation and translations models
-
1.0.0 :
-
Bot manager GUI