0.0886 s - время 147 - запросов

We use cookies in order to improve your experience while using our website. If you continue to use our site, you accept our Cookies Policy, revised Privacy Policy and updated Terms of Use.

BTC $ 4059.451903 (0.82 %)
ETH $ 140.165994353 (0.68 %)
XRP $ 0.3179465141 (0.26 %)
LTC $ 60.5826126438 (1.14 %)
EOS $ 3.7641981377 (0.61 %)
BCH $ 161.953948383 (-0.16 %)
XLM $ 0.1153928717 (3.57 %)
BNB $ 15.6721904586 (0.83 %)
USDT $ 1.015227753 (0.39 %)
TRX $ 0.0229939466 (0.44 %)

Transaction. 3. Transaction Inputs And Outputs And Their Interconnection

20:15 11/12/2018
Transaction Inputs And Outputs And Their Interconnection



In the previous articles we have described main transaction components and discussed the problem of the network capacity. The transfer of the same amount of assets to a recipient’s account may be executed through different transactions. It looks similar to paying for goods with banknotes of different values. The different number of a records inside of a single transaction requires different spacing.


Bitcoin generation peculiarity


Before examining a single transaction structure and content in detail, we should make a reservation. Even though bitcoins are one of optional legal tenders, they are not generated on demand. In other words, their generation is not similar to the common currency emission. In case of common money, a special government print house emits a required amount of paper units that may wait for their time to be issued.


In contradiction, bitcoin has no single source, which gets along with the decentralization. All coins appear at the moment of a new block approval, and they come from different sources. It would be more correct to say that a new bitcoin sum starts being associated with one of full nodes wallet after successful mining. Thus, each bitcoin has both its own and general genesis sources simultaneously.


Transaction components


Any transaction consists of three different element sets. They are inputs, outputs and service data.


Transaction inputs define where assets came from. These assets are managed by the transaction’s author. Transaction’s output defines a recipient, the one the author gives the right to manage assets. According to the main transaction rule, the inputs assets sum must be more than the output assets sum or equal.


In accordance with the Bitcoin protocol rules, each transaction input is a reference to one output of the available transaction from a previously approved block. The transaction author selects a set of these references, unites them into a list and place into the transaction, making sure that all outputs have not been used before and are accessible. If the same reference is used several times, all transactions but the first by time are dropped by miners. All transaction outputs, in their turn, become new references of the same kind. After the transaction is placed in a block, and the block is placed in blockchain — they can be referred.

Transactions references
Transactions references


Assets management


Assets inside of transactions are subjected to changes as well. First of all, the sum of the assets on all input addresses is calculated. This is a maximal value of funds a transaction author is able to manage. Later on, he or she chooses what parts are this sum will be divided into. Here, the rule is rather simple. Each recipient requires a single output. Each output has an available asset value. The sum of all outputs values must be less than the sum at all inputs or equal.

Incorrect transaction
Incorrect transaction

If there is a difference in the amounts, it is received by the miner who closes the block with this transaction inside. This difference becomes a part of the reward for closing the block and is called a transaction fee.

Miner’s fee
Miner’s fee


The difference in the sums brings some inconvenient consequences for inexperienced users.


Firstly, zero fee may cause troubles for those who select it. In this case, the sum of all outputs is equal to the sum of all inputs. Since miners are interested in profit maximisation, they will obviously prefer dealing with paid transactions. Taking into account blockchain network capacity problems, these transaction might never be placed into the block.


Secondly, users might decide that the change is calculated automatically, similar to the credit card payment. Unfortunately, the whole unaccounted difference will be directed to a miner’s account. If a sender wants to get the change back, this should be specified in the transaction output list.




Basically, the concept of transaction outputs and inputs is easy to understand. For a user, it is important to learn how to calculate fees and clearly set changes. Modern wallets in most cases do this automatically obviating the need to get deeper into details.

Found a mistake? Highlight it and press Ctrl + Enter to notify the administrator.

Up-to-date Blockchain and cryptocurrency news. Be the first to know!

What is it for?