<p>No. If you create one, it won't be relayed or mined by Bitcoin Core. If it gets into a block, it will be rejected. From the source code for Bitcoin Core (<a href="https://github.com/bitcoin/bitcoin/blob/f8a29ca823fba7fc0eb63896ac4d3d5a0093a023/src/consensus/tx_verify.cpp#L164" rel="nofollow noreferrer"><code>tx_verify.cpp:164</code></a>):</p>
<pre><code>if (tx.vout.empty())
    return state.DoS(10, false, REJECT_INVALID, &quot;bad-txns-vout-empty&quot;);
</code></pre>
<p>However, you can create a vout with 0 satoshis. That isn't a &quot;standard&quot; transaction, so it will not be mined by the software by default. However, if it gets into a block, it's valid.</p>
<p>There is another way you could do it. Using the <code>OP_RETURN</code> opcode. <code>OP_RETURN</code> in a transaction output forces anyone referencing that output to fail spending it(the script returns and transaction is invalid). Although the output exists, it is <strong>provably unspendable</strong>.</p>

CC BY-SA 3.0
2013-08-01T05:19:03.277Z
However if a custom miner puts a 100% transaction fee TX into a block, it would be accepted, and new blocks built on top of it.
makerofthings7
CC BY-SA 3.0
2013-08-01T11:33:24.333Z
@makerofthings7 That is not correct. It is a hard network rule that transactions have at least one input and at least one output. Putting a transaction without outputs in a block would make that block invalid. However, referring to the advice above, you can indeed have outputs with 0 satoshi. The network will not relay such transactions either, but they are valid inside blocks.
Pieter Wuille
CC BY-SA 4.0
2018-05-30T19:31:23.333Z
I just looked through `tx_verify.cpp` to find a rule which would reject any `vout` value of `0`, but couldn't find any. Can anyone point to where Bitcoin Core would reject such a transaction?
Jacob Ford
CC BY-SA 4.0
2013-08-01T04:39:22.840Z
2021-11-30T00:37:04.683Z
2021-11-30T00:37:04.683Z
Nick ODell
<p>I am interested in the possible use of the Bitcoin (or other altcoin) blockchain as a generalized distributed ledger, meaning that it is useful for tracking information other than coin transactions proper. A prerequisite for that would seem to be the ability to pay for transactions whose primary purpose is not moving Bitcoins from one address to another. So, can Bitcoin transactions list no outputs, thus leaving all inputs as a transaction fee reward for the miner?</p>

<transactions><transaction-fees>
Are Bitcoin transactions permitted to have no outputs (i.e. all inputs become transaction fee)?
Josh Hansen
# Are Bitcoin transactions permitted to have no outputs (i.e. all inputs become transaction fee)?

(Asked by: username_0 on 2013-08-01)

I am interested in the possible use of the Bitcoin (or other altcoin) blockchain as a generalized distributed ledger, meaning that it is useful for tracking information other than coin transactions proper. A prerequisite for that would seem to be the ability to pay for transactions whose primary purpose is not moving Bitcoins from one address to another. So, can Bitcoin transactions list no outputs, thus leaving all inputs as a transaction fee reward for the miner?

**Tags:** transactions, transaction-fees


---

## 1 answers

### Answer by username_1 on 2013-08-01. Score: 20 | Accepted answer

No. If you create one, it won't be relayed or mined by Bitcoin Core. If it gets into a block, it will be rejected. From the source code for Bitcoin Core ([`tx_verify.cpp:164`](https://github.com/bitcoin/bitcoin/blob/f8a29ca823fba7fc0eb63896ac4d3d5a0093a023/src/consensus/tx_verify.cpp#L164)):

```
if (tx.vout.empty())
    return state.DoS(10, false, REJECT_INVALID, "bad-txns-vout-empty");

```

However, you can create a vout with 0 satoshis. That isn't a "standard" transaction, so it will not be mined by the software by default. However, if it gets into a block, it's valid.

There is another way you could do it. Using the `OP_RETURN` opcode. `OP_RETURN` in a transaction output forces anyone referencing that output to fail spending it(the script returns and transaction is invalid). Although the output exists, it is **provably unspendable**.

> **Comments:**
> **username_2**: However if a custom miner puts a 100% transaction fee TX into a block, it would be accepted, and new blocks built on top of it.  
> **username_3**: @username_2 That is not correct. It is a hard network rule that transactions have at least one input and at least one output. Putting a transaction without outputs in a block would make that block invalid. However, referring to the advice above, you can indeed have outputs with 0 satoshi. The network will not relay such transactions either, but they are valid inside blocks.  
> **username_4**: I just looked through `tx_verify.cpp` to find a rule which would reject any `vout` value of `0`, but couldn't find any. Can anyone point to where Bitcoin Core would reject such a transaction?  

---

