0
I am attempting to build a working withdrawal system where users can withdraw funds in BTC. I am required to estimate the fee before allowing them to withdraw to include it in their payment. I was able to determine the maximum estimated fee based on inputs and outputs of the transaction. I had assumed that the transactions would have 1 input and 2 outputs as when I was testing that was the outcome. I am now seeing transactions with multiple inputs and outputs making the transaction size larger, therefore, increasing the fee. This is problematic for me as I am having to pay for these fees. I need to be able to determine the inputs and outputs of the transaction before I send it to the blockchain.
Possible duplicate of How to calculate transaction size before sending
– pebwindkraft – 2017-06-04T12:41:53.633I am trying to determine inputs/outputs, not the formula to a transaction size – Monstrum – 2017-06-05T06:52:56.290
1
I don't really see your question, but I think the term you're looking for is "Coin selection" or "Coin control". This question might help explain the issue at hand: What is the coin selection algorithm?. Do you know what a UTXO is?
– Murch – 2017-06-06T05:54:44.880