<p><strong>Basic explanation:</strong></p>

<p>Two things are happening here, first, the transaction is quite big (<code>2903 bytes</code>). And second, the inputs of the transaction hold really low value (
<code>27982 Satoshi</code> each). If we put together this two facts, what happens is what you have seen, that the most of the transaction value is spent in fees.</p>

<p><strong>Extended explanation:</strong></p>

<p>When a previous transaction output (<code>utxo</code>) is used to create an input of a new transaction, there is a minimum amount of data that it will add to the transaction. This data can be split in two parts, a <code>fixed_size</code> that will be non-dependant of the input type, and a <code>variable_size</code>,that will depend on the input type (and therefore in the <code>utxo</code> type). </p>

<p>The <code>fixed_size</code> can be defined as follows:</p>

<pre><code>fixed_size = prev_tx_id + prev_out_index + nSequence = 32 + 4 + 4 = 40 
</code></pre>

<p>In the transaction you are referencing, all inputs are <code>P2PKH</code>, which means that the minimum amount of <code>variable_size</code> data that creating an input will contribute to the transaction can be expressed as follows:</p>

<pre><code>min_variable_size = scriptSig_len + PUSH signature + signature + PUSH public_key + public_key
</code></pre>

<p>Signatures can be <code>71-73 bytes</code> depending on their <code>r</code> and <code>s</code> components, and public keys can be <code>33/65 bytes</code>, depending whether they are compressed or uncompressed. If we take the minimum signature size, and compressed public keys, the result is as follow:</p>

<pre><code>min_variable_size = 1 + 1 + 71 + 1 + 33 = 107
</code></pre>

<p>and therefore:</p>

<pre><code>min_size = fixed_size + min_variable_size = 147
</code></pre>

<p>Then, if we check how big was the transaction (<code>2093 bytes</code>) and how much was paid as fees (<code>408400</code> Satoshi) we get that the fee ratio paid is around <code>141 sat/b</code>. Now, if we check how much we should pay just for including one of our inputs in the best case we get:</p>

<pre><code>min_size * fee_ratio = 107 * 141 = 20727 
</code></pre>

<p>So, around the <code>74%</code> (<code>20727/27982 * 100</code>) of each input value is spent just for paying the fees required to spend itself. If you take into account the rest of the transaction (<code>version</code>, <code>outputs</code> and <code>nLockTime</code>), we got that around the <code>85%</code> of the inputs value is paid as fee:</p>

<pre><code>total_value = 475694
fee = 408400

perc = fee / total_value * 100 = 85.85
</code></pre>

CC BY-SA 3.0
2017-09-18T19:55:07.253Z
The part that I am confused that I didn't pay for that high transaction fee that's seen in the screenshot. In the coinbase transaction details shows the fee as 0.00031674 BTC (not as 0.004084 BTC). So I wonder, why the transaction details in the Blockcypher shows up a higher fee value for the transaction?
omt66
CC BY-SA 3.0
2017-09-18T19:59:47.710Z
Notice that there are 17 inputs in the transaction, if each one of the inputs' "owner" payed 0.00031674 BTC, the total fee amount will be 0.00538458, which is even more than what's shown in Blockcypher.
sr_gi
CC BY-SA 3.0
2017-09-18T20:06:20.843Z
Thanks so much sr-gi, I really appreciate your explanations, but the part that puzzles me is that I checked the balances both in the Coinbase and the Copay, and I know that I didn't pay that much high transaction fee! The actual fee that I paid was way lower than the one shows up in the transaction details. That's why I am so confused about the 0.004084 fee, because no one paid for that amount.
omt66
CC BY-SA 3.0
2017-09-18T20:22:33.063Z
Lets move it to the chat to not spam the comments a lot. https://chat.stackexchange.com/rooms/65802/how-come-the-fees-were-higher-than-the-actual-amount-in-the-bitcoin-transaction
sr_gi
CC BY-SA 3.0
2017-09-18T22:03:18.960Z
Hey @omt66, let me know if you enter the chatroom.
sr_gi
CC BY-SA 4.0
2024-11-12T16:52:38.440Z
This was apparently discussed in the chat. What was the outcome? I have exactly the same question.
geohei
CC BY-SA 3.0
2017-09-18T19:07:37.387Z
2017-09-18T21:01:45.757Z
2017-09-18T21:01:45.757Z
sr_gi
<p>The transaction fee is automatically included by most wallets, so you generally don't specify it.</p>

<p>The other thing you need to understand is that the fee is calculated based on the size of the transaction measured in <em>bytes</em> not <em>btc</em> .  Since this transaction is large in bytes and small in btc, the fee is higher than the transferred amount.</p>

CC BY-SA 3.0
2017-09-18T21:26:33.867Z
2017-09-18T21:40:24.260Z
2017-09-18T21:40:24.260Z
Jestin
<p>First of all, sorry for the newbie and probably a stupid question, I am so new to the digital currency thing :)</p>

<p>A day ago, I sent $2.5 worth bitcoin from my coinbase account to the copay wallet for testing. It went through OK, but later when I looked at the transaction details (via Blockcypher) I noticed that the fee shows up way higher than the actual amount: It was 0.004084 BTC (~16 US dollar as of yesterday).</p>

<p><a href="https://i.sstatic.net/DJ7Fj.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DJ7Fj.png" alt="enter image description here"></a></p>

<p>I understand that the miner fees changes based on the demand and the block space of a transaction takes, and nowadays they are quite high. But I didn't get why the transaction went through in the first place if the fees that high, and I didn't pay for them (I think). Maybe I am missing something (probably I am)!</p>

<p>So, can someone kindly explain to me what's happening?</p>

<p>Thanks in advance.</p>

<p>PS: I am also adding the transaction information from coinbase. In that, the fee shows as 0.000316764 where as in the transaction details page via Blockcypher shows the fees as 0.004084. That is the part I am confused about. In other words, the fees don't match, and I was wondering what is the big discrepancy all about!
<a href="https://i.sstatic.net/Yb3B2.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Yb3B2.png" alt="enter image description here"></a></p>

CC BY-SA 3.0
2017-09-18T18:21:50.263Z
The tx id in text will be nice to have, in order to check the tx (to avoid the struggle of copying it from the image).
sr_gi
CC BY-SA 3.0
2017-09-18T18:30:25.723Z
Here it is https://live.blockcypher.com/btc/tx/a8cdc2774ddd22e6cd1399bd9bc89c3ecc933304516f7efc44b368b470e62224/
omt66
<transaction-fees>
How come the fees were higher than the actual amount in the bitcoin transaction?
omt66
# How come the fees were higher than the actual amount in the bitcoin transaction?

(Asked by: username_0 on 2017-09-18)

First of all, sorry for the newbie and probably a stupid question, I am so new to the digital currency thing :)

A day ago, I sent $2.5 worth bitcoin from my coinbase account to the copay wallet for testing. It went through OK, but later when I looked at the transaction details (via Blockcypher) I noticed that the fee shows up way higher than the actual amount: It was 0.004084 BTC (~16 US dollar as of yesterday).

[![enter image description here](https://i.sstatic.net/DJ7Fj.png)](https://i.sstatic.net/DJ7Fj.png)

I understand that the miner fees changes based on the demand and the block space of a transaction takes, and nowadays they are quite high. But I didn't get why the transaction went through in the first place if the fees that high, and I didn't pay for them (I think). Maybe I am missing something (probably I am)!

So, can someone kindly explain to me what's happening?

Thanks in advance.

PS: I am also adding the transaction information from coinbase. In that, the fee shows as 0.000316764 where as in the transaction details page via Blockcypher shows the fees as 0.004084. That is the part I am confused about. In other words, the fees don't match, and I was wondering what is the big discrepancy all about!
[![enter image description here](https://i.sstatic.net/Yb3B2.png)](https://i.sstatic.net/Yb3B2.png)

**Tags:** transaction-fees

> **Comments:**
> **username_1**: The tx id in text will be nice to have, in order to check the tx (to avoid the struggle of copying it from the image).  
> **username_0**: Here it is https://live.blockcypher.com/btc/tx/a8cdc2774ddd22e6cd1399bd9bc89c3ecc933304516f7efc44b368b470e62224/  

---

## 2 answers

### Answer by username_1 on 2017-09-18. Score: 3

**Basic explanation:**

Two things are happening here, first, the transaction is quite big (`2903 bytes`). And second, the inputs of the transaction hold really low value (
`27982 Satoshi` each). If we put together this two facts, what happens is what you have seen, that the most of the transaction value is spent in fees.

**Extended explanation:**

When a previous transaction output (`utxo`) is used to create an input of a new transaction, there is a minimum amount of data that it will add to the transaction. This data can be split in two parts, a `fixed_size` that will be non-dependant of the input type, and a `variable_size`,that will depend on the input type (and therefore in the `utxo` type).

The `fixed_size` can be defined as follows:

```
fixed_size = prev_tx_id + prev_out_index + nSequence = 32 + 4 + 4 = 40 

```

In the transaction you are referencing, all inputs are `P2PKH`, which means that the minimum amount of `variable_size` data that creating an input will contribute to the transaction can be expressed as follows:

```
min_variable_size = scriptSig_len + PUSH signature + signature + PUSH public_key + public_key

```

Signatures can be `71-73 bytes` depending on their `r` and `s` components, and public keys can be `33/65 bytes`, depending whether they are compressed or uncompressed. If we take the minimum signature size, and compressed public keys, the result is as follow:

```
min_variable_size = 1 + 1 + 71 + 1 + 33 = 107

```

and therefore:

```
min_size = fixed_size + min_variable_size = 147

```

Then, if we check how big was the transaction (`2093 bytes`) and how much was paid as fees (`408400` Satoshi) we get that the fee ratio paid is around `141 sat/b`. Now, if we check how much we should pay just for including one of our inputs in the best case we get:

```
min_size * fee_ratio = 107 * 141 = 20727 

```

So, around the `74%` (`20727/27982 * 100`) of each input value is spent just for paying the fees required to spend itself. If you take into account the rest of the transaction (`version`, `outputs` and `nLockTime`), we got that around the `85%` of the inputs value is paid as fee:

```
total_value = 475694
fee = 408400

perc = fee / total_value * 100 = 85.85

```

> **Comments:**
> **username_0**: The part that I am confused that I didn't pay for that high transaction fee that's seen in the screenshot. In the coinbase transaction details shows the fee as 0.00031674 BTC (not as 0.004084 BTC). So I wonder, why the transaction details in the Blockcypher shows up a higher fee value for the transaction?  
> **username_1**: Notice that there are 17 inputs in the transaction, if each one of the inputs' "owner" payed 0.00031674 BTC, the total fee amount will be 0.00538458, which is even more than what's shown in Blockcypher.  
> **username_0**: Thanks so much username_1, I really appreciate your explanations, but the part that puzzles me is that I checked the balances both in the Coinbase and the Copay, and I know that I didn't pay that much high transaction fee! The actual fee that I paid was way lower than the one shows up in the transaction details. That's why I am so confused about the 0.004084 fee, because no one paid for that amount.  
> **username_1**: Lets move it to the chat to not spam the comments a lot. https://chat.stackexchange.com/rooms/65802/how-come-the-fees-were-higher-than-the-actual-amount-in-the-bitcoin-transaction  
> **username_1**: Hey @username_0, let me know if you enter the chatroom.  
> **username_2**: This was apparently discussed in the chat. What was the outcome? I have exactly the same question.  

---

### Answer by username_3 on 2017-09-18. Score: 0

The transaction fee is automatically included by most wallets, so you generally don't specify it.

The other thing you need to understand is that the fee is calculated based on the size of the transaction measured in *bytes* not *btc* . Since this transaction is large in bytes and small in btc, the fee is higher than the transferred amount.


---

