<p>Turned out we had an override for <code>minrelaytxfee</code> in the config file:</p>
<pre><code># Mempool
minrelaytxfee=0.00005 
</code></pre>

CC BY-SA 4.0
2023-10-17T14:58:26.163Z
Hi Chris, thanks for returning to answer your own question! Welcome to Bitcoin Stack Exchange.
Murch
CC BY-SA 4.0
2023-10-17T07:39:28.587Z
2023-10-17T07:39:28.587Z
Chris Shucksmith
<p>We find that <code>estimatesmartfee</code> will not return results lower than 5 sats/vB, even though many transactions are completing at much lower fee rates.</p>
<p>Looking at <a href="https://github.com/bitcoin/bitcoin/blob/master/src/rpc/fees.cpp#L88" rel="nofollow noreferrer">the implementation of <code>estimatesmartfee</code></a>, it bounds the result to the higher of three values:</p>
<pre><code>CFeeRate feeRate{fee_estimator.estimateSmartFee(conf_target, &amp;feeCalc, conservative)};
if (feeRate != CFeeRate(0)) {
    CFeeRate min_mempool_feerate{mempool.GetMinFee()};
    CFeeRate min_relay_feerate{mempool.m_min_relay_feerate};
    feeRate = std::max({feeRate, min_mempool_feerate, min_relay_feerate});
    result.pushKV(&quot;feerate&quot;, ValueFromAmount(feeRate.GetFeePerK()));
} else {
    errors.push_back(&quot;Insufficient data or no feerate found&quot;);
    result.pushKV(&quot;errors&quot;, errors);
}
result.pushKV(&quot;blocks&quot;, feeCalc.returnedTarget); 
</code></pre>
<p>Therefore we need to ensure <code>min_mempoool_feerate</code> and <code>min_relay_feerate</code> are both below 5000 sat/vKB on the nodes used for estimation.</p>
<ul>
<li><p>Looks like <code>min_relay_feerate</code> seems to come from <code>m_min_relay_feerate{opts.min_relay_feerate}</code> <a href="https://github.com/bitcoin/bitcoin/blob/master/src/txmempool.cpp#L409C1-L410C1" rel="nofollow noreferrer">in src/txmempool.cpp</a> which comes from <a href="https://github.com/bitcoin/bitcoin/blob/92704535f66976c09a658348e554d47b7f7bcf6e/src/policy/policy.h#L57" rel="nofollow noreferrer"><code>DEFAULT_MIN_RELAY_TX_FEE</code> defaulted to 1000</a></p>
</li>
<li><p><code>min_mempool_feerate</code> coming from mempool.GetMinFee() seems to inherit a minimum from <code>incremental_relay_feerate{DEFAULT_INCREMENTAL_RELAY_FEE}</code> <a href="https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.h#L35C61-L35C65" rel="nofollow noreferrer">where <code>DEFAULT_INCREMENTAL_RELAY_FEE</code> default is 1000</a></p>
</li>
</ul>
<p>Does anyone know what else holds it this high?</p>

<fee-estimation>
Why does estimatesmartfee not return < 5 sats/vB even for long confirmation times?
Chris Shucksmith
# Why does estimatesmartfee not return < 5 sats/vB even for long confirmation times?

(Asked by: username_0 on 2023-10-16)

We find that `estimatesmartfee` will not return results lower than 5 sats/vB, even though many transactions are completing at much lower fee rates.

Looking at [the implementation of `estimatesmartfee`](https://github.com/bitcoin/bitcoin/blob/master/src/rpc/fees.cpp#L88), it bounds the result to the higher of three values:

```
CFeeRate feeRate{fee_estimator.estimateSmartFee(conf_target, &feeCalc, conservative)};
if (feeRate != CFeeRate(0)) {
    CFeeRate min_mempool_feerate{mempool.GetMinFee()};
    CFeeRate min_relay_feerate{mempool.m_min_relay_feerate};
    feeRate = std::max({feeRate, min_mempool_feerate, min_relay_feerate});
    result.pushKV("feerate", ValueFromAmount(feeRate.GetFeePerK()));
} else {
    errors.push_back("Insufficient data or no feerate found");
    result.pushKV("errors", errors);
}
result.pushKV("blocks", feeCalc.returnedTarget); 

```

Therefore we need to ensure `min_mempoool_feerate` and `min_relay_feerate` are both below 5000 sat/vKB on the nodes used for estimation.

* Looks like `min_relay_feerate` seems to come from `m_min_relay_feerate{opts.min_relay_feerate}` [in src/txmempool.cpp](https://github.com/bitcoin/bitcoin/blob/master/src/txmempool.cpp#L409C1-L410C1) which comes from [`DEFAULT_MIN_RELAY_TX_FEE` defaulted to 1000](https://github.com/bitcoin/bitcoin/blob/92704535f66976c09a658348e554d47b7f7bcf6e/src/policy/policy.h#L57)
* `min_mempool_feerate` coming from mempool.GetMinFee() seems to inherit a minimum from `incremental_relay_feerate{DEFAULT_INCREMENTAL_RELAY_FEE}` [where `DEFAULT_INCREMENTAL_RELAY_FEE` default is 1000](https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.h#L35C61-L35C65)

Does anyone know what else holds it this high?

**Tags:** fee-estimation


---

## 1 answers

### Answer by username_0 on 2023-10-17. Score: 3

Turned out we had an override for `minrelaytxfee` in the config file:

```
# Mempool
minrelaytxfee=0.00005 

```

> **Comments:**
> **username_1**: Hi username_0, thanks for returning to answer your own question! Welcome to Bitcoin Stack Exchange.  

---

