Sort:  

It's complicated.

The sender pays the fee, BUT the fee is dependent on the number of "inputs" (and "outputs") in the transaction. It's also dependent on the "traffic jams", sometimes (still!) transactions goes through almost for free, other times it costs a fortune. To complicate matters, the sender is free to choose how much fee to spend (and even 0 is a valid option) - but if the fee is too low, the transaction may not get confirmed, the receiver will not get the money. Even worse, the transaction may get "stuck" in the mempool for three days. Also, the receiver may try to spend "unconfirmed" funds, and if paying a sufficiently high fee, both transaction may confirm faster. This is called "Child Pays for Parent" (CPFP).

Let's take an example. I have received 5 BTC from someone, and I borrow 1 BTC to my aunt. It's a simple one-input-two-output-transaction; a 5 BTC input, a 1 BTC output and an almost 4 BTC output to myself ("change"). I pay 0.0001 in fees, so 1.0001 sent. The fee was too low, so my aunt will spend 0.001 btc when sending those funds further. In this case, the receiver actually paid most of the fee.

Then she pays me 0.001 BTC each day in interests. One day I have 0.1 BTC in my wallet, but spread over 100 inputs. There is peak traffic on the blockchain, and I need a fast confirmation. The transaction should have costed 0.001 BTC if it was a simple one-input-two-outputs-transaction, but instead it costs maybe 0.04, which is 40% of what I have in my wallet!

With SegWit, the input part of the transaction gets a discount. It won't help in the situation above, but if I empty my wallet, generate a new SegWit address and my aunt starts paying to that one, then next time I have 0.1 BTC in my wallet and need to move it during prime time, I will need to spend "only" 0.01 instead of 0.04.

With Lightning ... well, the problem is that I would need to spend probably 0.05 just to move those funds into the Lightning network, and yet more transaction fees to close the lightning channel ... and, more importantly, both the sender and the receiver needs to be connected to the lightning network, sharing some path (probably through some centralized hub) in order to use the lightning network. I tend to believe that still in a year, take two random peers, and the likelihood that they can easily transact through some shared alt-coin is higher than that they will be able to transact through the lightning network.

I guess they really aren't free. Still not sure why you used the giant FREE graphic. :p


http://www.FlippyCoin.com is the #1 Cryptocurrency Exchange!

Its a fee market so the higher you pay the better chance you have to be included in the block

Usually the sender pays the fee, the minimum fee is based on a complex formula that I don't know completely, but it's based on the number of inputs to the transaction. More inputs means more space needed in the block to represent the transaction, and blocks have limited space.
What has happened recently as the article says, is as the amount of available space in each block has diminished (due to more transactions), even single input transactions have needed higher fees, otherwise they get left out of the block (in favour of other transactions that did set higher fees). So then a marketplace opens up where people 'bid' to get their transactions included by adding more fees.

I have been wondering how the transaction fees are calculated

you (or your wallet) decide how much you are willing to pay. you can easily decide to put a .00000000 fee in that field, BUT it's very probable that in this case no miner will be willing to procede your transaction. basically it's a bidding mechanism.

The sender will pay for the transaction fee.

Coin Marketplace

STEEM 0.25
TRX 0.20
JST 0.037
BTC 96006.08
ETH 3568.65
USDT 1.00
SBD 3.77