I will skip them for now.
v0.3
First the full output:
As of Sat Feb 6 12:28:23 UTC 2016
"blocks" : 734247,
Total NBT = 3223876.6386
FSRT multisig
Balance of BhCnQrYrA5LZm871dtMQEXeU93gmqbhdrC is 2000000 NBT
FSRT singlesig
Balance of BFTnCyMX1nsTNp6X7Bcm1qVocvShdbwtMi is 103104.7025 NBT
JordanLee singlesig
Balance of B5Zi5XJ1sgS6mWGu7bWJqGVnuXwiMXi7qj is 150000 NBT
FLOT 3-of-5 multisig
Balance of BqyRzFtWXDmjxrYpyJD42MLE5xc8FrB4js is 160628.65 NBT
Total NBT in circulation is 810143.286100 NBT.
Required 15% reserve is 121521.492915 NBT
Tier 4 BTC
Tier 4 buy side funds controlled by FLOT
FLOT 5-of-8 multisig old
Balance of 3QDWJ2yqJ5iTUg6cSpAwxx95ba3NG97hzG is 124 BTC
FLOT 5-of-8 multisig new
Balance of 3HikFkS2Zinab1TJq7dqp6wSPyLu7i7bhe is 142.10575761 BTC
Tier 4 buy side funds controlled by JordanLee 174.8 BTC
status of sell side gateway:
“BETwD8nSjtj9ADSvej2na34xmsMYwPRymv” : {
“buy” : 4317.96,
“sell” : 7273.609
status of buy side gateway:
“BFGMPykfKxXZ1otrCZcsbnTwJjKHPP9dsP” : {
“buy” : 6595.22,
“sell” : 5647.5302
bitfinex mid price is 374.33 USD
Tier 4 buy side funds total 440.905758 BTC, valued $165044.252246
121521.492915 NBT excluded from the share buyback calculation equals 324.637333 BTC.
440.905758 - 324.637333 = 116.268424 BTC sits in the share buyback pool.
10 percent of this – 11.626842 BTC-- will be used for share buyback next week.
That is equivalent to approximately $4352.275933.
Here is the code.
NUD=./nud
echo As of `date --utc`
$NUD --unit=B getinfo | grep 'blocks'
totalNBT=`$NUD --unit=B getinfo | awk '$1 ~ /moneysupply/{print $3}' | tr -d ,`
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}'`;echo Balance of $1 is $tempval NBT; }
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}'`;echo Balance of $1 is $tempval BTC; }
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 \"`;echo bitfinex mid price is $tempval USD; }
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 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 BTC**
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
echo Tier 4 buy side funds controlled by JordanLee [174.8 BTC]\(https://discuss.nubits.com/t/nsr-buyback-calculations/3347/51\)
echo 174.8 >> templist
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, valued $%f\n",c,c*BTCP;\
printf "%f NBT excluded from the share buyback calculation equals %f BTC.\n",RES,RES/BTCP;\
pool=c-RES/BTCP;\
printf "%f - %f = %f BTC sits in the share buyback pool.\n",c,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` BTCP=$bp templist