pull down to refresh

Is there a difference in size between sending from a P2SH to a bc1, comparing to sending from a bc1 to a bc1? Why?
The process for transferring Bitcoin starts when one user broadcasts a request to the network. This request includes the user's public address, the amount of Bitcoin being sent, and a transaction fee for the miners.
The TX size is a code generated from input and output addresses participating in this transaction
Next, miners process the transaction; information from both users is encrypted, which means the data is turned into a line of computer code called the transaction ID. At this point, the transaction is queued. Transactions are added to the queue until the block limit is reached and a block is created.
So yes, there's a difference in the amount of data required by the miner to "compose" a tx ID and that's why:
  • LEGACY (1) A legacy address is simply the hash of the public key to your private key. Back when Bitcoin launched in 2009, this was the only way to create an address. Today, this uses the most amount of space inside a transaction and is therefor the most expensive address type.
  • P2SH (3) In contrast to legacy addresses, pay-to-script-hash addresses are not the hash of the public key, but of a script that involves certain spending conditions, which stay hidden from the sender. These spending conditions can be very simple (owner of public key A can spend this bitcoin), or rather complex (owner of public key B can spend this bitcoin after X amount of time if he reveals a predetermined secret). Using this script, P2SH addresses can even make use of SegWit and save transaction fees. Sending to a P2SH address is roughly 26% cheaper than using a wallet with legacy addresses.
  • P2WPKH native SegWit (bc1q) This type of address reduces the amount of information stored in the transaction even more by not keeping the signature and script within the transaction, but in the witness. Hence the name "SEGWIT : SegregatedWitness". Using this type of address you can save additional 16% over the P2SH addresses, adding up to over 38% savings over legacy addresses

Why are segwit transactions cheaper?
Segregated witness transactions are cheaper because they are designed to be.
In legacy transactions, every byte has the same "cost"; they all count equally towards the 1000000 byte block limit. Segwit transactions on the contrary keep certain data (signatures etc) in a separate "witness" section, and that witness section is discounted: every witness byte only counts as 0.25 byte towards the block limit. Fees are determined by the market and not a system rule, but the fact that segwit transactions have some of their content discounted results in the market pricing them less.
reply