Hello Nu community,
The one week of the initial beta phase is over. Up to 17 keys were connected at some days and the frequent server crashes might have discouraged some, but in total I am very happy with the general performance and in particular about the feedback I got. I will probably also prepare some visual data when I find to the time.
Many issues were reported and partly fixed on the fly, however, some problem required deeper changes. Today I would like to start a second beta run, which uses an improved client / server architecture and many new features.
Variable interest
This is the major feature which comes with this release and which I would like to test during the beta run. For every key in the users.dat
you need to specify two additional numbers which correspond to the minimal interest rate you are willing to get for your liquidity in percent, for the buy and ask side respectively.
So each line in the users.dat
now looks like this
payout-nubits-address btc exchange api-key api-secret bid-interest ask-interest
Example:
BQRKF4X8gFLyHGVeym8tuff57PcJczYPVg btc poloniex 85BQTQG1-N3D3PFKX-YUNIHIO1-WQCWTRER 1234abc 0.8 1.2
In the example I am asking for 0.8% on the buy liquidity that I am providing, and 1.2% on the sell liquidity
Please connect your client to the new server (note that I changed the port again to 2022):
./client.py 104.245.36.10:2022
During the second phase of the beta I am paying up to 5% per day for a target liquidity up to 20.0 NBT for each side of the market. The reason for the small target values is to see as much competition as possible, because the variable interest rate rule only goes into action if the liquidity provided is above the target value.
Interest calculation
This section is only for the people who are interested - you don’t have to take any action to improve the interest you get. The server will always pay you the maximal possible interest rate. My goal is to ensure these two points:
- Increasing your minimal interest will never increase your payout, decreasing it will never decrease your payout
- Increasing your funds used will never decrease your payout, decreasing it will never increase your payout
This is ensured on server side by sorting all orders by their minimal interest and then to pick the next higher interest seen in the order list for each user.
UPDATE: In order to ensure (1) a different server behavior had to be implemented. The server now calculates the total amount of coins above the target and compensates them as described above (up to the limit). The remaining liquidity is paid with the pool’s maximum interest. See the updated examples below to see how the effect of this change.
Example
Let’s consider some examples to clarify what this means. Here the server now provides 5% maximal interest up to a target limit of 20 NBT, as used in the second beta run.
Two users, Alice and Bob, are providing liquidity in our example and Alice asks for a minimal interest rate of 2% and Bob asks for a minimal interest rate of 3%. We further assume a single market side on one market (e.g. sell side on Poloniex).
-
Alice and Bob both provide 10 NBT
Payout: Both will get 5% * 10 NBT
Reason: Their combined liquidity is 20.0 NBT which is within the target.
-
Alice provides 10 NBT and Bob provides 15 NBT
Payout: Alice will get 5 NBT * 3% + 5 NBT * 5% and Bob will get 5 NBT * 0% + 10 NBT * 5%
Reason: The total amount is above the target and clients are in competition for the 5 NBT which was provided in addition to the target value. Bob is not willing to provide NBT for less than 3%, but Alice is, so the system will grant these 5 NBT to Alice at the best possible interest rate for Alice (3% - epsilon = 3%). The remaining target will be filled with remaining 5 NBT of Alice first, end then finally with 10 NBT of Bob’s liquidity at the pool’s maximal interest rate.
2.1 Alice decreases her minimal interest rate to 1%
Payout: The same, since she will still get Bob’s 3%.
2.2 Bob decreases his minimal interest rate to 2.5%
Payout: Alice’s payout interest rate on her 5 NBT will reduce to 2.5%.
2.3 Alice increases her funds by 5 NBT (i.e. from 10 NBT to 15 NBT)
Payout: Alice will get 10 NBT * 3% + 5 NBT * 5%, Bob will get 5 NBT * 5%
Reason: The amount of liquidity above the target increased from 5 to 10 NBT. Alice still has the best offer, so her 10 NBT will be compensated first.
2.4 Willy joins the pool as third participant with 4% minimal interest
Payout: 10 Bob’s payout interest rate reduces to 4%, willy won’t get any payout
2.5 Joe joins the pool as third participant with 1% minimal interest and 15 NBT
Payout: Joe will get 2% * 15 NBT, Alice will get 3% * 5 NBT, Bob will get nothing
Important: Clients will remove orders which give 0% interest. So from now on you might find some funds on your exchange account which are not in orders. If you are not planning to decrease your minimal interest rate, then you should remove some of those funds from the exchange in order to reduce your risk.
I hope these examples help to understand the basic idea and I further hope that there isn’t some major flaw in the concept I do not see. So would be nice if our economy experts would give it a thought.
Oh you will like what @woolly_sammoth is currently finalizing. It will be a high class platform independent GUI which brings a lot of fun into the whole process, and of course makes it also very easy to configure.
EDIT: One more thing for the shareholders: The interest rate will be passed over to the final liquidity fee. Every minute (where the pool credits payouts), the server updates this page: http://104.245.36.10:2022/exchanges
I know its horrible to read for humans, but it allows to verify at any point in time which interest rates the server payed to the customers. In order to check if the server tricks the data, you can run a simple bot that places small orders, sends them to the server and checks the payout obtained. I am very open for discussions about the problem of proving interest rates to the shareholders - this solution is the best I got so far but I am willing to spend serious development effort to make this verifiable for the shareholders if the current method is not sufficient.