Comparing UTXO transactions with Accounts transactions

Lets consider if Bitcoin had no batching and I had to somehow send BTC to multiple people:

3f99102c76af2ecfe7c7da826cbefd8a5d4465ac2c63e88a975df89b23c8bf5d has 1 input and 5 outputs

Size for each input and output involved in tx

Input: 91 vB

Output 1: 32 B 
Output 2: 32B
Output 3: 32 B
Output 4: 31 B
Output 5: 32 B

Size of original tx: 344 / 235 bytes 
Virtual size / weight: 263 / 1049

Fee for original tx: 0.00019 BTC

If you create 5 transactions to use one input and different outputs mentioned in above tweet, 91*4=360vB extra will be required or maybe more.

If same fee rate is used (73 sat/vB), 0.00026 BTC extra fee will have to paid


One of the reasons batching is used by lot of people in Bitcoin:

transactions – p2pkh vs. p2pk keeping public key private

I just got into learning Bitcoin programming through Jimmy Song’s Programming Bitcoin.
Jimmy says that some of p2pkh’s advantages over p2pk include:

  1. a smaller ScriptPubKey

  2. keeping one’s public key private

I completely agree with the first advantage but I’m having a little trouble with the second advantage.

Jimmy explains that, if ECDSA was every broken, one could steal bitcoin from another entity because they could find their public key in the ScriptPubKey (if they were using p2pk) and create a valid signature.

My question is: If all we are doing is moving the public key from the ScriptPubKey to the ScriptSig, what security does that grant us if the ScriptSig is also accessible? If I was to spend a UTXO that was made to my public key hash, my public key would be public. Couldn’t a malicious user who had broken ECDSA keep looking for a UTXO ScriptPubKey with my hash in it, copy my public key from the previous transaction, generate a signature, and steal my bitcoin? It seems to me that my public key is private as long as I don’t spend anything.

Of course, I know I’m missing something 🙂 Any help is appreciated.

unconfirmed transactions – Instantly Accept Bitcoin Payments (0 confirmation trx)

GAP600 is a service (that has processed $5 billion in cryptocurrency) which allows exchanges and payment service providers to process Bitcoin payments instantly (0 confirmation trx). It guarantees a transaction against double-spend, expiration or other fraud even before it is confirmed by the Bitcoin network:

GAP600 facilitates instant, risk-mitigated cryptocurrency commerce by
enabling exchanges to recognize unconfirmed Bitcoin.. transactions as
final using a proprietary risk engine, which analyzes and performs
live risk scoring for each transaction as it reaches the mempool.

How is it possible to guarantee a transaction against double-spend, expiration or other fraud before it is confirmed by the Bitcoin network? What kind of “risk analysis” might be performed to achieve this result?

bitcoin feeless transactions – Bitcoin Stack Exchange

The mobile application cashapp specifically says I can send bitcoin to any address anywhere in the world for free.

Coinbase also says they can do off the network transactions instantly and for free as long as both parties have a coinbase address…how does this work ? Does a miner check these transactions ?

Where does the concept of average transaction fee come into place ?

How do light clients using compact-block-filters get relevant unconfirmed transactions?

There’s no design consideration in Neutrino / BIP157 for unconfirmed transactions, but it’s not as much of a concession with context. A light wallet can effectively do nothing with an unconfirmed transaction, as they can not verify anything about its validity to begin with. At best it is a suggestion that a transaction may have occurred, but this is even weaker than a normal unconfirmed transaction sent to a fully validating wallet.

It has always been an issue with “SPV” wallets that they can be duped into showing completely absurd false data, for BIP37 especially it was completely possible to sniff the incoming filter and dynamically produce transactions paying to the addresses that likely matched it billions of dollars. The client, as dumb as it is, can only show them to the user and hope that common sense prevails.

segregated witness – Were anyone-can-spend transactions valid before SegWit?

Non-segwit nodes (legacy nodes) see segwit transactions as anyone-can-spend (ACS) transactions. It is clear that such a nodes can (and do) validate blocks containing ACS transactions, because the scripts they run are compatible with the original rules of Bitcoin (this is why SegWit is considered a soft fork). However, I see around the statement that a miner running a non-segwit node cannot include a ACS transaction in his own mining block, because, if he had managed to mine that block, segwits nodes would reject it because digital signatures were missing, resulting in an orphaned block.

Is it correct what I’m saying? If yes, let me consider the following scenario BEFORE the creation and implementation of SegWit on Bitcoin:

Before the creation and implementation of SegWit, when all running nodes were non-segwit, if a miner had included an ACS transaction in his own block and he had managed to mine it, would such a block be accepted by others nodes? I don’t see the reason why such a block could be forbidden. From the point of view of the other nodes (which are all non-segwit), they see this new block a one containing ACS transactions, and like any other block nowadays, they should validate it.

What I’m trying to say is that, in the previous version of Bitcoin (before SegWit), there was nothing to “prohibit” a miner from spending/stealing someone else’s funds. If the answer is that before SegWit nodes would never accept blocks containing ACS transactions, this means that SegWit is in fact a hard fork, because nowadays they do accept them.

Hence, I see the following three “scenarios”

  1. Before SegWit implementation, miners could include ACS transactions in their blocks and all the other nodes should validate them. The fact that it never happened is because all miners were “honest”.
  2. Before SegWit, nodes did not validate blocks containing ACS transactions. But they do validate them now. This results in a HARD fork.
  3. There is something that I’m missing or I’m misunderstanding.

I hope the answer is number 3. I’ll appreciate if somebody could help me.

transactions – Is there a risk in entering my Bitcoin-Core wallet passphrase, if it’s for sending all my available balance and never using that wallet again?

I have Bitcoin-Core wallet.dat with a single address and a small amount of bitcoins in it.
Say I want to send all the available bitcoins I have, and then never use that wallet again. Can I use an online computer for that, including entering the passphrase while connected to the internet? Will anybody be able to steal any bitcoins from me?


How are segwit block transactions verified?

From my understanding, segwit blocks send transaction information without the witness, which includes the signature. I thought nodes needed the signature to verify the transactions?

transactions – Keeping Track of User Deposits with Bitcoin

Can someone explain why it “is fairly easy” to do this in Bitcoin”?

I hope you already read what all things you need to do as a workaround in other chains that use accounts.

How to create a new address in bitcoin core:


Doesn’t Bitcoin also require UTXO Sweep when consolidating BTC from many addresses to one address?

UTXO consolidation is only preferred if you have lot of small inputs. Small here depends on amounts normally used while sending BTC from that wallet. If I have 1000 UTXOs in my wallet with each 0.01-0.02 BTC and I normally send 0.01-0.02 BTC in one transaction, I may not consolidate anything and spend them separately when required.

If at any point any business has lot of very small inputs, they can be consolidated when mempool is clear with 1-5 sat/vByte without affecting business assuming if you are running a business with so many transactions, must have other UTXOs to spend.

Consolidation after coinjoin also kills privacy and few other cases so it’s always up to an individual to decide how he wants to spend UTXOs. Coin control features in lot of bitcoin wallets provide users with the freedom to easily select UTXOs for a transaction.

I was under the impression that BTC does not allow multiple public addresses corresponding to a single private key?

There can be multiple addresses associated with the same private key: What is the relationship between a Bitcoin Private Key / Public Key / Address?

Not related to tracking deposit but still relevant to understand basic differences:

Batching is easier and cheaper in bitcoin:

Tx count and fees of UTXO chains can’t be compared with account based chains (Few websites exist trying to spread misinformation). Below link explains the reasons and lot of people use coinmetrics data:

Bitcoin doesn’t have failed transactions: Do we have failed transactions in bitcoin?

transactions – Single API to Get Fee Estimates for All Major Cryptocurrencies?

Many sites provide estimates of miner/gas fees for individual cryptocurrencies. For example, EtherScan provides gas estimates for ETH. BTC Network provides fee estimates for Bitcoin.

Both of these sites provide API functionality, but they are limited to a single cryptocurrency. If I wanted to integrate many cryptocurrencies into my site I would need to integrate a different API for each of the cryptocurrencies I support.

I’m looking for a site/solution that offers a single interface to obtain gas/transaction/miner fees for all major coins such as BTC, ETH, LTC, BCH, USDT, USDC, XRP etc. The API must also provide estimates based on the desired transaction confirmation times. In other words, I should be able to request estimated fee if I want 90% likelihood of confirmation within the next 30 min, 60 min, 600 min and so on.

Note: I realize this platform is only about Bitcoin. However, the rules state that if the same answer is applicable to other types of coins question is valid. I am precisely looking for an API that works with all major cryptocurrencies.