I'm writing an essay about bitcoin and while reading on internet about transactions, this sentance came up "For the transaction to be valid, every input must be an unspent output of a previous transaction". Can someone explain what this means? Thanks.

A bitcoin transaction works by you giving someone else a designated amount of the BTC you own. In order for a bitcoin transaction to be deemed valid, there has to be at least one input, although multiple inputs are possible as well. An input is a reference to an output from a previous transaction. every input associated with a bitcoin transaction has to be an unspent output of a previous transaction. and every input in a bitcoin transaction must be digitally signed, A bitcoin transaction can have not just multiple inputs, but multiple outputs as well.

For example: Your 5 BTC balance will be sent to Ryu (2 btc) and Ken (1btc) and the remaining 2 btc is sent to a different bitcoin wallet under your control. On the blockchain, this one transaction will have three different outputs, one going to Ryu, one to Ken, and the third to your other bitcoin wallet address.

When sending bitcoins from addresses A, B, and C to address X, the transaction actually says something more like, "these bitcoins at addresses A, B, and C can now be spent by address X". In this transaction, A, B and C are the inputs and X is the output.

Now, the requirement says that in order to spend the bitcoins at X (in other words, in order to use it as an input), it must must have been an output in a previous transaction, but not already used as an input in any other transaction (i.e. "unspent").

Bitcoin basically works by taking previous outputs and combining them to create new outputs that can be used in subsequent transactions.

I'm writing an essay about bitcoin and while reading on internet about transactions, this sentance came up "For the transaction to be valid, every input must be an unspent output of a previous transaction". Can someone explain what this means? Thanks.

This is how Bitcoin transaction works. The transaction will contain a scriptsig that contains the signed input and the public key. The output contains the amount and the requirement for spending it, specifically the address that can spend this.

For the signature, the public key should be able to verify that it is signed from there. The address can be derived from the public key and hence the nodes will know that the requirement has been fulfilled. The new output created will then be added into the UXTO(unspent output) list.

For a transaction to be valid, the transaction must have the UXTO which the nodes have in their database, the signature for each of the inputs in the transaction, outputs with the requirements for spending it. When the nodes see the transaction, they will remove the UXTO from their UXTO list.

If you were to send a transaction without the requirements above, nodes will reject it.

But this " unspent output" is confusing me. Having trouble translating that.

You should keep in minde that bitcoins aren't stored in your computer, you can say they are ethereal coins as they are managed by the blockchain, and this is what you keep in you computer.When you receive a transaction with x amount of bitcoins, their status is set to "unspent" it means that hey still belong to this address, now if you spend them, they no longer belong to your address.This is a way to keep track of bitcoins and coin supply.

Bitcoin wallets provide a layer of abstraction for us so that we can use words that are comfortable to us (such as address and bitcoin) that don't actually exist at the protocol level. This makes it easier to talk about transferring control over value with phrases such as "Please send 1.2 bitcoins to my address" instead of needing to understand what is actually happening in the blockchain or at the protocol level.

This means that when you start reading about or looking at the protocol, concepts that you thought you understood suddenly don't make sense.

A transaction with the bitcoin protocol doesn't have any addresses, and there aren't any actual things that can be called "bitcoins" that are used in the transaction. Instead the blockchain is a ledger of entries where each entry is a "transaction" and a transaction consists of two lists:

A list of "inputs" - these supply value to the transaction. Each input is simply a reference to an "output" somewhere earlier in the ledger along with some data that satisfies the requirements which the output was encumbered with. If the requirements aren't met, then the transaction is invalid. If the requirements are met, then the value assigned to that output is available for the transaction to use in it's own outputs.

A list of "outputs" - these encumber the value that was provided to the transaction with new requirements that must be met for these outputs to be used as inputs to some other transaction. Each output is simply a value and some data that defines the requirements that must be met to use that value.

Any remaining value that was supplied to a transaction that was not accounted for in the list of outputs is then available for the miner to claim as a "transaction fee" when they add the transaction to the block they are mining. A transaction can only be in the blockchain in a single block. Once it is in a block in the blockchain, it is invalid for any other miner to re-include the transaction in another block later in the blockchain.

If an output has not yet been referenced as an input into any transaction that is in the blockchain, then that output is called "unspent". Once an output is referenced in a list of inputs in a transaction in the blockchain, that output is called "spent" and can never be used in a transaction again.

This is why transactions have "change" outputs. Lets say you have a single output valued at 2 bitcoins. You create a transaction that lists that output as its only input and provides the signature that the output requires for spending it. This supplies 2 bitcoins of value to the transaction and if your transaction gets confirmed (included in a block in the blockchain) that 2 bitcoin output is then "spent" and can never be used in an input list again. Your transaction also has an output that is given a value of 0.5 bitcoins. This output is encumbered with a requirement of a signature generated with the private key that your friend owns (in other words, you've just "sent 0.5 bitcoins to your friend"). That leaves 1.5 bitcoins of value in the transaction that you haven't accounted for yet in your list of outputs. You can't spend the 2 bitcoin output anymore since it is now considered to be "Spent". Your wallet can either leave the transaction like this (in which case you have just paid a 1.5 bitcoin transaction fee) or, before it sends the transaction onto the network, it can add a second output to the list of outputs in the transaction. This second output can be assigned a value of 1.4999 bitcoins and be encumbered with a requirement of a signature generated with a private key that your wallet has control over. If it does that, then the remaining 0.0001 bitcoins of value that aren't accounted for become the "transaction fee", and there is now a new unspent output valued at 1.4999 bitcoins that is available for you to reference in the next transaction that you create.

Thanks for the replies everyone, helped me a lot. I've also came across Ethereum, that's not clear to me. Is it a blockchain, is it a wallet... what is it?

Ethereum is the most complicated one for me, it is like bitcoin except that it is more javascript turned, you can create "smart contracts" and the management is harder then bitcoin.So basically, the fees for transactions are calculated using gas not eth, gas price is calculated but i don't know exactly how, you can go to their gitter channels, they may give you more informations.But if you want to introduce someone to cryptocurrencies, i advise you to stay with bitcoin as cryptos like ethereum are not user friendly.

Thanks for the replies everyone, helped me a lot. I've also came across Ethereum, that's not clear to me. Is it a blockchain, is it a wallet... what is it?

Ethereum is the most complicated one for me, it is like bitcoin except that it is more javascript turned, you can create "smart contracts" and the management is harder then bitcoin.So basically, the fees for transactions are calculated using gas not eth, gas price is calculated but i don't know exactly how, you can go to their gitter channels, they may give you more informations.But if you want to introduce someone to cryptocurrencies, i advise you to stay with bitcoin as cryptos like ethereum are not user friendly.

Anyone can write a whole essay on bitcoin.You guys can use these points.Bitcoin is a crypto currency which is widely used nowadays.You can buy many things mostly everythingLike I personally buy things on steam especially games.Even Starbucks accepts steam.Now let me tell you some ways how you can earn bitcoins.First of all , when you have just started using bitcoins,Use faucets to earn bitcoins. By faucets I mean apps in which there will be survey's.If you complete them you will earn satoshi's.Then when you get ranked up by making posts ,You can enroll in signature campaigns.And for that your post quality should be good.Then when you become hero or legendary member you will have much knowledge about trading.So you can trade and also invest in bitcoin.As the prices keep reducing and increasing,You can buy bitcoins when the prices are less and then sell them when the prices increase.So by that time you can earn a lot with bitcoins.But this can only be used as a side business.You cannot live your whole life depending on earnings of bitcoin.Now you know something about bitcoin.

I'm writing an essay about bitcoin and while reading on internet about transactions, this sentance came up "For the transaction to be valid, every input must be an unspent output of a previous transaction". Can someone explain what this means? Thanks.

I will explain it in simple terms. The term unspent output of previous transactions means that the bitcoin sent to your wallet in the previous transactions before doing or sending a new transaction is not yet spent or sent to another wallet. The term input here is when you send a certain amount of bitcoins to a certain address. The terminologies seems to be complicated but it means simply this, to have a successful transaction you must send bitcoin less than or equal to the amount that is present in your balance. In short you cannot make transactions if you dont have bitcoins in your wallet.

I am currently working on this topic, too, I mean writing an essay about cryptocurrencies and Bitcoin as the most significant one among them (task at college). Just wonder, where do you take info not to be caught on plagiarism or you just appointing references and quotations? I use a plagiarism checker to make sure my text is original by the way. As there are a lot of notions I can't explain by myself, only paraphrasing and changing words' order. Official site doesn't give answers to all of the questions, meanwhile Wikipedia using is rather trivial and I don't trust this source to be honest.