Do you have any rule of thumb to know when to consolidate?
<>
Should I wait until I have 8-10 inputs? If I wait that long maybe the fees have skyrocketed.
The number of unspent outputs you have should not be considered when deciding if you want to consolidate. You should consider:
- the value of your unspent outputs
- how high you anticipate transaction fees being when you need to spend your unspent outputs
- the value of the transactions you anticipate spending when fees are higher (including the cost of the tx fee)
For example, if you have a bunch of unspent outputs valued at 0.002, but never anticipate spending more than 0.001 in a single transaction (inclusive of anticipated fees), you should not consolidate any of your unspent outputs, and should not consolidate anything until you have unspent outputs totaling 0.001 (including tx fees to consolidate), but once you have enough to consolidate into at least 0.001, you should not consolidate additional unspent outputs, unless you have enough to consolidate into an additional multiple of 0.001, in which case your new outputs will each be 0.001.
If you anticipate spending varying amounts, you can use a similar principle. For example, if for every three 0.002 transactions you will have, you will have one transaction valued at 0.005, you can consolidate into new outputs valued at 0.002 three times and 0.005 one time (in any order).
When deciding if it is economical to consolidate, you should add the cost to create a consolidation transaction to the cost of a transaction with one input and one output (plus change if applicable) at the fee rate you believe fees will rise to when you have to actually spend your coin. You should compare this cost to the cost of creating a transaction with however many inputs you are consolidating, and one output (plus change, if applicable). If consolidating results in a lower total fee paid, you should consolidate, otherwise, you should not.
The above ignores any privacy implications to consolidating, which you should also consider.