<blockquote>
<p><strong>Can i send coins internally to one big wallet?</strong></p>
</blockquote>
<p>No.</p>
<p>By internal you mean without communicating with the Bitcoin network and without involving external miners.</p>
<p>All Bitcoin transactions which move money from one set of Bitcoin addresses to another Bitcoin address are external in the sense that they must be recorded on the blockchain and therefore must incur transaction fees.</p>

CC BY-SA 4.0
2021-03-13T19:54:47.010Z
ok, i understand, but how to implement a payment systems when i transfer all i got into my big wallet and after that i lose a lot of money? if i use a big payment gateway service, they send with 10 ... 20 usd fee ... how they do it ?
dotifag851
CC BY-SA 4.0
2021-03-13T16:13:51.920Z
2021-03-13T16:13:51.920Z
RedGrittyBrick
<p>Each on-chain payment you receive creates a new Unspent Transaction Output (UTXO) for your wallet. When you forward the received payments to your other wallet, each of those UTXOs is consumed in an input of your consolidation transaction. This will happen whether you receive payments to different addresses or reuse the same one.</p>
<p>Given that you will need to spend a number of UTXOs corresponding to the count of payments you receive and Bitcoin transactions bid on the amount of blockspace they occupy, you have several options to reduce the total cost:</p>
<ol>
<li><strong>Blockspace-efficient output types</strong><br />
If you have been using P2PKH addresses (i.e. &quot;legacy addresses&quot; that start with 1…), you could significantly reduce weight of your inputs by switching to a more modern output type. P2PKH inputs weigh 148 vbytes each, while P2WPKH (native segwit) inputs weigh 68 vbytes, and P2TR inputs even weigh only 57.5 vB.</li>
<li><strong>Low feerate</strong><br />
Consolidation transactions tend to require a larger amount of blockspace than most transactions. The command that you cite<br />
<code>bitcoin-cli sendtoaddress &quot;MY_WALLET&quot; 0.1 &quot;&quot; &quot;&quot; true</code><br />
does not set a feerate. This means that your transaction will use the default feerate estimate which aims to get a transaction confirmed very quickly. In this case, you are just moving money from your left pocket to your right pocket, so you actually probably do not need the transaction to be confirmed urgently. Instead of using a feerate high enough to get a confirmation in the next half hour, you could use a feerate that is sufficient for the transaction to confirm within the next day or week. This could easily reduce the overall transaction fee by 50–90% depending on, or di the prevalent feerates. You can find a view of the mempool as well as a feerate estimate for example on mempool.space.</li>
<li><strong>Off-chain payments</strong><br />
In the time since you wrote this question, it has become a lot more viable to receive payments off-chain, e.g. via the Lightning Network. Especially if you are receiving many small payments, you may consider running a Lightning node to receive your payments which would allow you to receive payments without generating a new UTXO with every single payment.</li>
</ol>

CC BY-SA 4.0
2024-09-10T17:40:30.603Z
2024-09-10T17:40:30.603Z
Murch
<blockquote>
<p>I mean don't think that big payment gateways that do the same thing and create an address for every invoice but pay such amounts of fees.</p>
</blockquote>
<p>As far as I know typical approach is to have root P2WPKH bitcoin wallet and to generate child wallets for each payments. Benefits of P2WPKH is lower transaction fees. Because the witness data is stored outside the main block, less block space is used, resulting in lower fees.</p>
<p>Then you need to create many-to-one transaction to withdraw, where inputs are the unspent UTXOs related to your child wallets and one output is the destination address. Required fee for your withdraw transaction = <code>raw transaction size * fee rate in sat/vB</code>. You can use public API (for example, <a href="https://blockstream.info/api/fee-estimates" rel="nofollow noreferrer">https://blockstream.info/api/fee-estimates</a>) to get current fee rate.</p>

CC BY-SA 4.0
2024-09-10T17:45:49.810Z
Hi dmitrdv, welcome to Bitcoin Stack Exchange. Thanks for chiming in on this topic. I am writing to point out that it’s a common myth that witness data is not part of the block. While non-segwit output types used the input script to authorize payments, segwit transactions have a new section called "Witness" that holds a witness stack for each input. The witness is part of the transaction, and each transaction is recorded in full in the block that confirms it.
Murch
CC BY-SA 4.0
2024-09-10T05:08:48.683Z
2024-09-10T05:09:58.967Z
2024-09-10T05:09:58.967Z
dmitrdv
<p>I am using <code>bitcoin-rpc</code> and every time I create an invoice for the client to pay, I create a new address. The payment is okay, I get the money after a <code>cron.php</code> sees that the transaction has three or more confirmations, but then when I try to send my money back to my big wallet, I see 200—300 usd in fees.</p>
<p><code>bitcoin-cli sendtoaddress &quot;MY_WALLET&quot; 0.1 &quot;&quot; &quot;&quot; true</code></p>
<p>I see on blockchain that everything was sent from each and every address that I have created</p>
<pre><code>ADDRESS1 ... 0.05
ADDRESS2 ... 0.08
ADDRESS2 ... 0.028
</code></pre>
<p>... and so on</p>
<p>How can I send everything from one big address and pay only 20$ usd fee?</p>
<p>I think I pay per vbyte for what I have read ... but I want to send internally with low or no fees or something. Can I send coins internally to one big wallet?</p>
<p>I mean don't think that big payment gateways that do the same thing and create an address for every invoice but pay such amounts of fees.</p>
<p>Thank you.</p>

CC BY-SA 4.0
2021-03-13T19:52:39.363Z
i think it is `estimate_mode` and as imputs i have 30 40 50 100 ... a lot , explain more about `UTXO` or a link ...
dotifag851
<bitcoin-core><bitcoind><transaction-fees><transaction-weight><utxo-management>
Why does it cost so much to forward all my received payments to my other wallet?
dotifag851
# Why does it cost so much to forward all my received payments to my other wallet?

(Asked by: username_0 on 2021-03-13)

I am using `bitcoin-rpc` and every time I create an invoice for the client to pay, I create a new address. The payment is okay, I get the money after a `cron.php` sees that the transaction has three or more confirmations, but then when I try to send my money back to my big wallet, I see 200—300 usd in fees.

`bitcoin-cli sendtoaddress "MY_WALLET" 0.1 "" "" true`

I see on blockchain that everything was sent from each and every address that I have created

```
ADDRESS1 ... 0.05
ADDRESS2 ... 0.08
ADDRESS2 ... 0.028

```

... and so on

How can I send everything from one big address and pay only 20$ usd fee?

I think I pay per vbyte for what I have read ... but I want to send internally with low or no fees or something. Can I send coins internally to one big wallet?

I mean don't think that big payment gateways that do the same thing and create an address for every invoice but pay such amounts of fees.

Thank you.

**Tags:** bitcoin-core, bitcoind, transaction-fees, transaction-weight, utxo-management

> **Comments:**
> **username_0**: i think it is `estimate_mode` and as imputs i have 30 40 50 100 ... a lot , explain more about `UTXO` or a link ...  

---

## 3 answers

### Answer by username_1 on 2021-03-13. Score: 2

> **Can i send coins internally to one big wallet?**

No.

By internal you mean without communicating with the Bitcoin network and without involving external miners.

All Bitcoin transactions which move money from one set of Bitcoin addresses to another Bitcoin address are external in the sense that they must be recorded on the blockchain and therefore must incur transaction fees.

> **Comments:**
> **username_0**: ok, i understand, but how to implement a payment systems when i transfer all i got into my big wallet and after that i lose a lot of money? if i use a big payment gateway service, they send with 10 ... 20 usd fee ... how they do it ?  

---

### Answer by username_2 on 2024-09-10. Score: 1

Each on-chain payment you receive creates a new Unspent Transaction Output (UTXO) for your wallet. When you forward the received payments to your other wallet, each of those UTXOs is consumed in an input of your consolidation transaction. This will happen whether you receive payments to different addresses or reuse the same one.

Given that you will need to spend a number of UTXOs corresponding to the count of payments you receive and Bitcoin transactions bid on the amount of blockspace they occupy, you have several options to reduce the total cost:

1. **Blockspace-efficient output types**  
   If you have been using P2PKH addresses (i.e. "legacy addresses" that start with 1…), you could significantly reduce weight of your inputs by switching to a more modern output type. P2PKH inputs weigh 148 vbytes each, while P2WPKH (native segwit) inputs weigh 68 vbytes, and P2TR inputs even weigh only 57.5 vB.
2. **Low feerate**  
   Consolidation transactions tend to require a larger amount of blockspace than most transactions. The command that you cite  
   `bitcoin-cli sendtoaddress "MY_WALLET" 0.1 "" "" true`  
   does not set a feerate. This means that your transaction will use the default feerate estimate which aims to get a transaction confirmed very quickly. In this case, you are just moving money from your left pocket to your right pocket, so you actually probably do not need the transaction to be confirmed urgently. Instead of using a feerate high enough to get a confirmation in the next half hour, you could use a feerate that is sufficient for the transaction to confirm within the next day or week. This could easily reduce the overall transaction fee by 50–90% depending on, or di the prevalent feerates. You can find a view of the mempool as well as a feerate estimate for example on mempool.space.
3. **Off-chain payments**  
   In the time since you wrote this question, it has become a lot more viable to receive payments off-chain, e.g. via the Lightning Network. Especially if you are receiving many small payments, you may consider running a Lightning node to receive your payments which would allow you to receive payments without generating a new UTXO with every single payment.


---

### Answer by username_3 on 2024-09-10. Score: 0

> I mean don't think that big payment gateways that do the same thing and create an address for every invoice but pay such amounts of fees.

As far as I know typical approach is to have root P2WPKH bitcoin wallet and to generate child wallets for each payments. Benefits of P2WPKH is lower transaction fees. Because the witness data is stored outside the main block, less block space is used, resulting in lower fees.

Then you need to create many-to-one transaction to withdraw, where inputs are the unspent UTXOs related to your child wallets and one output is the destination address. Required fee for your withdraw transaction = `raw transaction size * fee rate in sat/vB`. You can use public API (for example, <https://blockstream.info/api/fee-estimates>) to get current fee rate.

> **Comments:**
> **username_2**: Hi username_3, welcome to Bitcoin Stack Exchange. Thanks for chiming in on this topic. I am writing to point out that it’s a common myth that witness data is not part of the block. While non-segwit output types used the input script to authorize payments, segwit transactions have a new section called "Witness" that holds a witness stack for each input. The witness is part of the transaction, and each transaction is recorded in full in the block that confirms it.  

---

