1A balance is a pile of coins
The wallet shows one number, but the node keeps a list of separate coins, one for each payment you received and never spent. Each coin stakes on its own: it has its own age, its own chance of winning (proportional to its value), and when it wins it is the only coin that moves. The list is one command away:
# Divi node and IronDivi alike
divi-cli listunspent
irondivi-cli listunspent
Every entry is one coin with an address, an amount and its confirmations. Divi Desktop and BoxWallet don't show this list, but they run the same node underneath and follow the same rules.
2What the node does when a coin wins
When a coin stakes a block, the node spends it and creates it again with the reward added. At that moment it decides the shape of the result, using one number, the stake split threshold:
- Split. If the coin plus its reward is more than the threshold, it comes back as two coins of half the value each. Today's reward is about 415 DIVI, so a 19,700 DIVI coin that wins becomes two coins of 10,057.5 DIVI, and each of those will never split again until it has grown past 20,000.
- Combine. Otherwise, if auto-combine is on (it is by default), the node looks for other coins at the same address and pulls them into the same transaction, smallest first, as long as the running total stays at or under half the threshold (10,000 DIVI) and no more than 20 coins are involved. A coin that would push the total over the ceiling is skipped, not trimmed. The result is one coin.
- Neither. With auto-combine off, the coin simply comes back as one coin with the reward added.
Worked example with the defaults. Address A holds four coins: 3,000, 1,000, 2,000 and 8,000 DIVI, and the 3,000 wins. With the 415 reward it is worth 3,415, under the threshold, so the node tries to combine. The 1,000 and 2,000 fit under the 10,000 ceiling; the 8,000 would not, so it stays. Result: address A now holds two coins, 6,415 and 8,000.
Combining only ever merges coins that share an address. Coins at different addresses are never joined, however small. And combining adds no reward: the extra coins are just carried along, so there is nothing to gain or lose by it except tidiness and the hour of age the merged coins lose.
Every rule above is taken from the Divi node's source, PoSTransactionCreator.cpp; the fact check at the end of this page lists the lines.
3Why the number of coins matters
First, what it does not change: your expected rewards. The network picks each block in proportion to the value staked, so 20,000 DIVI in one coin wins exactly as often, on average, as 20,000 DIVI in ten coins. Splitting is not a way to earn more. What it changes is what happens around each win and each spend:
- A spend only disturbs the coins it touches. Sending 500 DIVI from a wallet that holds one 20,000 coin spends that coin, and the whole 19,500 of change starts the one-hour wait again. From a wallet with ten 2,000 coins the same payment stops one coin; nine keep staking. Why isn't my wallet staking? shows this reset happening.
- A win only rests the coin that won. The winning coin comes back new, so it waits an hour before it can stake again, and its value can't be spent for 20 blocks. One coin means the whole balance rests; many coins means a slice does.
- Many tiny coins cost you later. Every coin is one input when you spend, and fees are paid per byte, so a payment built from forty dust coins costs more than one built from two. That is what auto-combine is for.
The default rules push every wallet towards coins between about 10,000 and 20,000 DIVI on their own, slowly, one win at a time. The rest of this page is for people who don't want to wait, or want a different size.
4Change the thresholds on a Divi node
Both settings live in divi.conf, and only there: there is no command to change them while the node runs, and Divi Desktop runs the Divi node underneath and reads the same file. Config files shows where it is on each system.
# divi.conf: split a winning coin above 5,000 DIVI, and never merge coins
stakesplitthreshold=5000
autocombine=0
Restart the node. The value in use is the last line of getstakingstatus:
divi-cli getstakingstatus
{
...
"staking status" : true,
"stake split threshold" : 5000.00000000
}
The combine ceiling follows automatically at half the split value, 2,500 here. Three details from the source:
- The threshold is whole DIVI; a decimal is cut off.
- Coins in a staking vault never use a threshold below 20,000 DIVI, whatever the file says: the node raises it back for them.
- The setting changes what happens at the next win. It never touches coins that haven't staked.
5IronDivi: no splitting, no combining
IronDivi 0.2.6 doesn't reshape coins at all. When a coin wins, it comes back as exactly one coin, its value plus the reward, however large it has grown. Its config has split_threshold and combine_threshold fields under [staking], but nothing reads them yet, and getstakingstatus prints a fixed "stake split threshold": 20000.0 that doesn't come from anywhere. If you want pieces on IronDivi, make them yourself, as in the next step. Treat this as a description of today's version; check the release notes of a newer one.
6Split a balance by hand
Sending to yourself does it. Each payment to a fresh address becomes one coin, and sendmany makes several in a single transaction for one fee. We did this on testnet, on a Divi node holding one coin of 12,900 tDIVI and a 100 one. First, four fresh addresses and a full unlock (not the staking-only kind: a send needs the whole key):
divi-cli walletpassphrase "passphrase" 180
divi-cli getnewaddress
yDuW9Vuzpr5WHtcyLMGtX34aCty7Dean4i
# ...three more: y93cu…, y6fS8…, y2htJ…
Then one transaction with four outputs of 3,000 each:
divi-cli sendmany "" '{"yDuW9Vuzpr5WHtcyLMGtX34aCty7Dean4i":3000,"y93cuUVSZF1up4fUz4KfrspobckxqPZBRo":3000,"y6fS8tZA7DrMG6RZyZBQeJRirRfYaCMKiB":3000,"y2htJLAUem1sYpD9uu33h6XW3RN7ck7XUr":3000}'
fabffc1aec95a739a81d0ff0bcf4056e0bc5547dbd85ba7a046fd8388f26ea16
divi-cli listunspent 0
# six coins now: four of 3000, the untouched 100, and the change
"address" : "yDuW9Vuzpr5WHtcyLMGtX34aCty7Dean4i",
"amount" : 3000.00000000,
"confirmations" : 0,
...
"address" : "y6ycuLVwujB2KHHSyiTPh8u1XYDMHCmB53",
"amount" : 899.99992200,
"confirmations" : 0,
The fee was 0.0000328 tDIVI, and the change, 899.99992200, landed on a fifth new address. All five new coins start their one hour of age at the block that confirms them; the 100 coin, untouched, keeps its age. On IronDivi the same two commands work, and sendmany there also takes a list of addresses to subtract the fee from.
Different addresses, as above, keep the pieces apart for good: auto-combine never merges across addresses. Sending the pieces to one address instead lets the node sweep them back together, up to half the split threshold, as each one wins. sendmany can't repeat an address in one call, so for that use several sendtoaddress commands or run sendmany more than once.
Check every address twice, send a small amount first, and lock the wallet again with walletlock when you're done. Then unlock for staking only, as in Stake from the command line.
7Combine coins by hand
The reverse is the same trick: send the total to one of your own addresses, and the wallet chooses which coins to spend. You don't pick the inputs; the node picks the set it likes for the amount, so to merge specific coins you would build a raw transaction. For most people "send 6,000 to myself" is enough. On our testnet wallet, after the split above confirmed:
divi-cli sendtoaddress yHG25mjoz6AxgDupzJqo9gXP7KhH8Urv5r 6000
9dc0d1e299789549d81ce93004a1d3f80225766bfd00963a8c932b301af0bc83
divi-cli listunspent 0
"address" : "y6Hni2ZJbfswHRv6TLNwApPVR4RxiT1QQd",
"amount" : 100.00000000,
"confirmations" : 13,
"address" : "y6ycuLVwujB2KHHSyiTPh8u1XYDMHCmB53",
"amount" : 899.99992200,
"confirmations" : 3,
"address" : "y2htJLAUem1sYpD9uu33h6XW3RN7ck7XUr",
"amount" : 3000.00000000,
"confirmations" : 3,
"address" : "yHwAmnrfpz7F75NFYQo6DP1CzNYr6X4kUj",
"amount" : 2999.99994780,
"confirmations" : 0,
"address" : "yHG25mjoz6AxgDupzJqo9gXP7KhH8Urv5r",
"amount" : 6000.00000000,
"confirmations" : 0,
Notice what the wallet did: to make 6,000 it spent three of the 3,000 coins, not two, and sent 2,999.9999 back as change to yet another address. Five coins became three (6,000, the change, and one untouched 3,000) plus the two it never considered. So a self-payment does combine, but not always the way you pictured. If the exact set of inputs matters to you, build the transaction yourself with createrawtransaction, as in Raw transactions.
Or leave it to the node: with auto-combine on, coins at the same address drift together as they win, up to the 10,000 ceiling. It takes as long as the wins take, which Estimate your stakes can tell you.
8How big should the pieces be?
There is no size that wins more. Choose by what you do with the wallet:
- You never spend from it: leave the defaults alone. The node settles the pile between 10,000 and 20,000 DIVI by itself.
- You spend from it sometimes: keep one or two coins the size of a typical payment, so a spend touches only those. A few thousand DIVI apiece, and a dozen coins at most. Anything over 20,000 will be halved by the node at its first win anyway.
- You run IronDivi: split once by hand into pieces you're happy with, since nothing will split them later.
- You hold millions: the default threshold gives you hundreds of coins over time, which is fine for staking and only matters for the fee when you move them all at once. A higher
stakesplitthresholdkeeps the count down.
Over 20,000? The node halves it when it wins. Under 10,000 and sharing an address? The node merges it. Want a different shape? sendmany to yourself, pay one fee, wait an hour.
Next
- How Divi staking works: coin age, maturity and the lottery behind every block.
- Estimate your stakes: how often your balance should win.
- Staking returns: where the 415 DIVI reward comes from.
- Glossary for the words on this page.
Still have a question? Ask the Divi chatbot, or see all tutorials.