Supply, Reserves, and Equilibrium (superseded by automation)

Calculation changelog
v0.5 20160303 add Jordan Lee’s NBT holdings https://discuss.nubits.com/t/nsr-buyback-calculations/3347/90; modify Jordan Lee’s BTC holdings https://discuss.nubits.com/t/nsr-buyback-calculations/3347/92; add URL to displayed btc and nbt addresses; add url error handling

Output
As of Sat Mar 5 01:59:00 UTC 2016
"blocks" : 773994,
Total NBT = 1273828.2321

FSRT multisig
Balance of BhCnQrYrA5LZm871dtMQEXeU93gmqbhdrC is 0 NBT
FSRT singlesig
Balance of BFTnCyMX1nsTNp6X7Bcm1qVocvShdbwtMi is 151500 NBT
JordanLee singlesig
Balance of B5Zi5XJ1sgS6mWGu7bWJqGVnuXwiMXi7qj is 150000 NBT
JordanLee singlesig from liquidity ops
Balance of BT9AWq9r1i6kghZc6LtrvNb2wRFh7JLCdP is 34539.155 NBT
FLOT 3-of-5 multisig
Balance of BqyRzFtWXDmjxrYpyJD42MLE5xc8FrB4js is 148563.3816 NBT

Total NBT in circulation is 789225.695500 NBT.
Required 15% reserve is 118383.854325 NBT

Tier 4 Funds

Tier 4 buy side funds controlled by FLOT
FLOT 5-of-8 multisig old
Balance of 3QDWJ2yqJ5iTUg6cSpAwxx95ba3NG97hzG is 0 BTC
FLOT 5-of-8 multisig new
Balance of 3HikFkS2Zinab1TJq7dqp6wSPyLu7i7bhe is 192.77846541 BTC
Tier 4 buy side funds controlled by JordanLee 138.0 BTC
NuSafe has $30000 for T4

bitfinex mid price is 406.34 USD
Tier 4 buy side funds total 330.778465 BTC and $30000.000000, valued $164408.521635 (404.608263 BTC)

118383.854325 NBT excluded from the share buyback calculation equals 291.341867 BTC.
404.608263 - 291.341867 = 113.266396 BTC sits in the share buyback pool.
10 percent of this 11.326640 BTC will be used for share buyback next week.
That is equivalent to approximately $4602.466731.

Code

# Nushare buyback calculation v0.5
# mhps 2016
# change log
# v0.5 20160303 add Jordan Lee's NBT holdings https://discuss.nubits.com/t/nsr-buyback-calculations/3347/90; modify Jordan Lee's BTC holdings https://discuss.nubits.com/t/nsr-buyback-calculations/3347/92; add URL to displayed btc and nbt addresses; add url error handling
# v0.4.1 update Jordan Lee's T4 BTC holdings
# v0.4 update Jordan Lee's T4 BTC holdings; comment out gateways; add NuSafe
# v0.3 https://discuss.nubits.com/t/nsr-buyback-calculations/3347/56

# replace this to how nud is run locally
NUD=./daemon/nd

echo As of `date --utc`

$NUD --unit=B getinfo | grep 'blocks'
totalNBT=`$NUD --unit=B getinfo | awk '$1 ~ /moneysupply/{print $3}' | tr -d ,`
#totalNBT=1273828.2321
echo Total NBT = $totalNBT
echo $totalNBT > templist
echo

function nbtBalance { tempval=`curl -s http://blockexplorer.nu/api/addressInfo/$1 | awk 'BEGIN{RS=",\"";FS=":"}{print $1,$2}' | grep  totalBalanceInt | awk '{print $2}'`;if [[ $tempval == "" ]]; then echo Block explorer is down; exit; else echo Balance of [$1]\(http://blockexplorer.nu/address/$1\) is $tempval NBT; fi }

function btcBalance  { tempval=`curl -s http://btc.blockr.io/api/v1/address/info/$1 | awk 'BEGIN{RS=",\"";FS=":"}{print $1,$2}' | grep  balance\" | awk '{print $2}'`;if [[ $tempval == "" ]]; then echo Block explorer is down; exit; else echo Balance of [$1]\(http://btc.blockr.io/address/info/$1\) is $tempval BTC; fi }

function btcPrice { tempval=`curl -s https://api.bitfinex.com/v1/pubticker/btcusd | awk 'BEGIN{RS=",\"";FS=":"}{print $1,$2}' | grep mid | awk '{print $2}'| tr -d \"`;if [[ $tempval == "" ]]; then echo bitfinex BTC price source is down; exit; else echo bitfinex mid price is $tempval USD; fi }

echo FSRT multisig
nbtBalance BhCnQrYrA5LZm871dtMQEXeU93gmqbhdrC
echo $tempval >> templist

echo FSRT singlesig
nbtBalance BFTnCyMX1nsTNp6X7Bcm1qVocvShdbwtMi
echo $tempval >> templist

echo JordanLee singlesig
nbtBalance B5Zi5XJ1sgS6mWGu7bWJqGVnuXwiMXi7qj
echo $tempval >> templist

echo JordanLee singlesig [from liquidity ops]\(https://discuss.nubits.com/t/nsr-buyback-calculations/3347/90\)
nbtBalance BT9AWq9r1i6kghZc6LtrvNb2wRFh7JLCdP
echo $tempval >> templist

echo FLOT 3-of-5 multisig
nbtBalance BqyRzFtWXDmjxrYpyJD42MLE5xc8FrB4js
echo $tempval >> templist

#cat templist
# calc the first line minus rest of the lines
circNBT=`awk  '{if(n) c-=$1; else {c=$1;n=1}}END{printf "%f",c;printf "%f",c*0.15 > "reserve"}' templist`

echo
echo Total NBT in circulation is $circNBT NBT.
echo Required 15% reserve is `cat reserve` NBT
echo

echo **Tier 4 Funds**
echo
echo Tier 4 buy side funds controlled by FLOT
echo FLOT 5-of-8 multisig old
btcBalance 3QDWJ2yqJ5iTUg6cSpAwxx95ba3NG97hzG
echo $tempval > templist

echo FLOT 5-of-8 multisig new
btcBalance 3HikFkS2Zinab1TJq7dqp6wSPyLu7i7bhe
echo $tempval >> templist

jltbc=138.0
echo Tier 4 buy side funds controlled by JordanLee [$jltbc BTC]\(https://discuss.nubits.com/t/nsr-buyback-calculations/3347/92\)
echo $jltbc >> templist

nuSafe=30000
echo NuSafe has [\$$nuSafe]\(https://discuss.nubits.com/t/flot-operations-buy-side-btc-related/3117/317\) for T4

# echo
# echo status of sell side gateway:
# $NUD getliquidityinfo B | grep BETwD8nSjtj9ADSvej2na34xmsMYwPRymv -A 2
# echo status of buy side gateway:
# $NUD getliquidityinfo B | grep BFGMPykfKxXZ1otrCZcsbnTwJjKHPP9dsP -A 2

echo
btcPrice
bp=$tempval

awk  '{c+=$1}END{\
printf "Tier 4 buy side funds total %f BTC and $%f, valued $%f (%f BTC)\n\n",c,NS,c*BTCP+NS,c+NS/BTCP;\
printf "%f NBT excluded from the share buyback calculation equals %f BTC.\n",RES,RES/BTCP;\
pool=c+NS/BTCP-RES/BTCP;\
printf "%f - %f = %f BTC sits in the share buyback pool.\n",c+NS/BTCP,RES/BTCP,pool;\
printf "10 percent of this **%f BTC will be used for share buyback next week.**\n",pool*0.1;\
printf "That is equivalent to approximately $%f.\n",pool*0.1*BTCP;\
}' RES=`cat reserve` NS=$nuSafe BTCP=$bp templist

1 Like

so we will set buyback order next week?
that is a good news for NSR market.

3 Likes

Is there exact time when weekly buyback price counting progress into new day? Im asking this because I see price change sometimes right after midnight and sometimes in the early morning. In my opinnion this is not good

If the point of time were exactly known, it could be used to game the system.

It also could be much easier for people who are in contact with buyback manager to game the sistem, so they are ahead of everybody else.

Do you doubt the integrity of our buyback manager?
If so, you should think one step further - the buyback manager himself is in the perfect position to game the system.
But know what? Most (should I say: (almost) all) community members trust @Nagalim, because of all he did and does and the way he did and does that.

If you mistrust him, I recommend supporting auctions that can trade BTC for NSR and vice versa, because the transactions there happen on blockchain.

A concept for that has once been created to auction NBT for NSR:

I dont have problem with @Nagalim, i really appreciate everything what he is doing. I was just asking if there is time pattern for progressing days or it is just buyback managers will.

I must say it is really hard to be awake whole night waiting for buyback progress :smile:

So put your orders up earlier :wink:

This is the correct answer. I use a die roll to determine when to move the wall. If i wanted to game the system i would mess with the buyback price more than the time i put it up at.

The order book needs orders. Put your orders up and let the market do its thing. I too have been up late nights watching markets like ppc/usd and the best advice ive ever found is just put your bets in and lay your weary head to rest, let the world keep turning.

I do try to do the move between 12a and 12p UTC. I use the full day’s trades (recent weighted more) to get a price so if you put a sell an appropriate amount below the general market price on tuesday or wednesday night you are likely to get it.

Now that we are operating on only one exchange, maybe it would be good to do every move at the same time each day. My issue with that is that my schedule doesnt really allow the buybacks to be a top priority for me. I’d love someone to propose a motion or a software…

2 Likes

Can the parametric nubot be configured to sell NSR with a huge spread of 90% - 70% of the volume weighted average price in the last 24hr?

1 Like

As far as i know theres no nsr wrapper.

The price feed is another issue.

@Nagalim what is happening with buyback progress? it was supposed to move to 90% market price 18hrs ago.

Shit! Sorry, my bad. I had a very long night and morning. Done now.

Always good to have some variance in order to stay unpredictable :wink:

Id prefer to keep it reasonable. Still, i can’t wait till Nu fires me from this job, lol.

1 Like

Can I get fired as well, lol?

You will, we all will eventually. This is not Nu’s final form.

1 Like

As I don’t get paid for most of what I do, it won’t be very hard - financially speaking :wink:

2 Likes

@nagalim i am intrested in this job, what qualifications are required?

also, i would like to present an idea maybe a better way for NSR to go up without fear of buyback being gamed.

What would happen if funds for weekly buyback are not spend on buying nsr? what if we just put buy offer at 70% (or 90%) of market price and never move it, until it is eaten by sellers? this way we could evade weekly nsr price bounces, as weekly highs are always when buyback is going to match market price - wednesday night.
This way we could buy more nsr for less price, and price would be much stable. also marketcap would be little biger cause nsr burning would be slowed down a little.

Any thoughts on idea?