I'm not 100% what you're asking, but I'll just explain what happens, so hopefully it answers your question indirectly. You purchase a ticket for X DCR. When you either vote or revoke a ticket, a "stakebase" transaction is created. When it's a vote, the output amount will be X+6% of the non-reduced block subsidy. When it's a revocation, the output amount is just X. Since it's a "stakebase" transaction in both cases, it has to wait out the 256 block maturity period.
when I run getstakeinfo I get : -4: the wallet is currently syncing to the best block, please try again later why ??
wait for your daemon and wallet to finish updating then try again. To anyone else, when i try and get my balance my locked decred amount shows up as zero even though it should be close to 200. Is this because I am using the stake pool? Does locked Decred being voted on by a hot wallet make it not show up when using the getbalance flags in the cold wallet?
you should probably try this command to see coin staking/earned from stakepool Code: --wallet getbalance imported 0 locked/spendable/all The script you get from stakepool is imported into your wallet so the coins used for staking are shown in "imported" account rather than "default account". To see coins from all accounts use Code: --wallet getbalance "*" 0 all/locked/spendable
Code: echo "scale=6;`dcrctl getticketpoolvalue`/`dcrctl --wallet getstakeinfo|grep "poolsize"|cut -f 4 -d" "|cut -f 1 -d","`"|bc I'm using this script to calculate the average price of all the tickets in the pool. This is useful to know if the current difficulty is reasonable or not!
Something you might find useful is jq. I prefer to use it for dealing with processing the JSON as it's not as susceptible to minor changes in the output format like cut and grep are. So, for example getting the poolsize using jq looks like this: Code: $ dcrctl --wallet getstakeinfo | jq .poolsize 42390 Thus your command is reduced to: Code: echo "scale=6;`dcrctl getticketpoolvalue`/`dcrctl --wallet getstakeinfo|jq .poolsize`"|bc
For checking mempool fees, it's a little tricky using the default commands. I've been using this to see the next N tickets sorted by price. This helps you pitch your ticketfee as low as possible, while still getting included in the next few blocks.: mempool.sh Code: LENGTH=${1:-20} dcrctl --wallet getrawmempool true tickets|jq '.[]|.fee/.size*1000'|sort -n|tail -n $LENGTH Then you call it as "mempool.sh 100" to see the next 100 tickets, etc. Also, now that the price has changed to a e+06 display, to get the average price of tickets in the pool you need to do the following script: Code: echo "scale=6;`dcrctl getticketpoolvalue|sed -e 's/[eE]+*/\*10\^/'`/`dcrctl --wallet getstakeinfo|jq .poolsize`"|bc
Code: info=`dcrctl --wallet getstakeinfo` balance=`dcrctl --wallet getbalance` echo $info|jq . echo $balance|jq 'reduce(.balances[]| to_entries[]) as $r ({};.[$r.key] +=$r.value)|.accountname="all"' dcrctl estimatestakediff|jq . averageOwned=$(echo "scale=6;$(echo $balance|jq ".balances|map(.lockedbytickets)|add") / $(echo $info|jq ".live+.immature")"|bc) purchaseable=$(echo "scale=2;`echo $balance|jq ".balances|map(.spendable)|add"` / `echo $info|jq ".difficulty"`"|bc) priceChange=$(echo $info|jq '144-.blockheight%144') echo \{ \"averagePaid\": ${averageOwned}, \ \"purchaseable\": ${purchaseable}, \ \"priceChangeIn\": $priceChange\}|jq; I use this script to check on my staking. It adds up all of your different balances from different accounts, tells you how much your average ticket has cost, when the prices changes, and how many tickets you can buy at the current price. You need to have jq installed, so "sudo apt-get install jq" if needed. I run everything through jq to make it pr Thanks to @davecgh for the jq reduce syntax.