<blockquote>
  <p>Does that mean that Bitcoin Core implicitly calculates and sets a smart fee for a given block target?</p>
</blockquote>

<p>Yes that's how fee estimation work (basically statistics are made out of the transactions you relay given their feerate and how many blocks it takes for them to be confirmed).</p>

<blockquote>
  <p>If so what is the priorities if I:</p>
  
  <ol>
  <li>Set TX fee explicitly before</li>
  <li>Set conf_target == 1</li>
  <li>Set estimate_mode == UNSET</li>
  </ol>
</blockquote>

<p><em>Assuming you mean calling <code>settxfee</code> by "Set TX fee explicitly before".</em></p>

<p>The command parameters take precedence over globally-defined parameter, so the <code>conf_target</code> parameter will be used for fee calculation.</p>

<p>Setting <code>estimate_mode</code> to <code>UNSET</code> will make the decision of using conservative estimates depending on either you signal for RBF (use <code>ECONOMICAL</code>) or not (use <code>CONSERVATIVE</code>).</p>

CC BY-SA 4.0
2020-03-27T10:54:41.130Z
2020-03-27T10:54:41.130Z
Antoine Poinsot
<p>Judging by the source code, smartfee will be used (conf_target)</p>

<p><a href="https://github.com/bitcoin/bitcoin/blob/6e9eda556717ad651a6a691db8d6dc68556285cb/src/wallet/fees.cpp#L38" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/6e9eda556717ad651a6a691db8d6dc68556285cb/src/wallet/fees.cpp#L38</a></p>

<pre><code>/* User control of how to calculate fee uses the following parameter precedence:
   1. coin_control.m_feerate
   2. coin_control.m_confirm_target
   3. m_pay_tx_fee (user-set member variable of wallet)
   4. m_confirm_target (user-set member variable of wallet)
   The first parameter that is set is used.
*/
</code></pre>

CC BY-SA 4.0
2019-07-01T06:51:50.017Z
2019-07-01T06:51:50.017Z
user96599
<p>In <a href="https://bitcoincore.org/en/doc/0.16.0/rpc/wallet/sendmany/" rel="nofollow noreferrer">sendmany</a> there is a <code>conf_target</code> parameter with the comment "Confirmation target (in blocks)". Does that mean that Bitcoin Core implicitly calculates and sets a smart fee for a given block target?</p>

<p>If so what is the priorities if I:  </p>

<ol>
<li>Set TX fee explicitly before  </li>
<li>Set conf_target == 1  </li>
<li>Set estimate_mode == UNSET  </li>
</ol>

<p>What will be the resulting fee rate on the transaction in each case?</p>

<bitcoin-core><transaction-fees>
How does the tx fee in sendmany method get calculated?
Timopheym
# How does the tx fee in sendmany method get calculated?

(Asked by: username_0 on 2019-06-30)

In [sendmany](https://bitcoincore.org/en/doc/0.16.0/rpc/wallet/sendmany/) there is a `conf_target` parameter with the comment "Confirmation target (in blocks)". Does that mean that Bitcoin Core implicitly calculates and sets a smart fee for a given block target?

If so what is the priorities if I:

1. Set TX fee explicitly before
2. Set conf\_target == 1
3. Set estimate\_mode == UNSET

What will be the resulting fee rate on the transaction in each case?

**Tags:** bitcoin-core, transaction-fees


---

## 2 answers

### Answer by username_1 on 2020-03-27. Score: 2 | Accepted answer

> Does that mean that Bitcoin Core implicitly calculates and sets a smart fee for a given block target?

Yes that's how fee estimation work (basically statistics are made out of the transactions you relay given their feerate and how many blocks it takes for them to be confirmed).

> If so what is the priorities if I:
>
> 1. Set TX fee explicitly before
> 2. Set conf\_target == 1
> 3. Set estimate\_mode == UNSET

*Assuming you mean calling `settxfee` by "Set TX fee explicitly before".*

The command parameters take precedence over globally-defined parameter, so the `conf_target` parameter will be used for fee calculation.

Setting `estimate_mode` to `UNSET` will make the decision of using conservative estimates depending on either you signal for RBF (use `ECONOMICAL`) or not (use `CONSERVATIVE`).


---

### Answer by username_2 on 2019-07-01. Score: 0

Judging by the source code, smartfee will be used (conf\_target)

<https://github.com/bitcoin/bitcoin/blob/6e9eda556717ad651a6a691db8d6dc68556285cb/src/wallet/fees.cpp#L38>

```
/* User control of how to calculate fee uses the following parameter precedence:
   1. coin_control.m_feerate
   2. coin_control.m_confirm_target
   3. m_pay_tx_fee (user-set member variable of wallet)
   4. m_confirm_target (user-set member variable of wallet)
   The first parameter that is set is used.
*/

```


---

