<p>Could it be that the outputs depicted in <code>listfunds</code> do not have yet enough confirmations? Maybe you got them after you closed a channel and c-lightning did not allow you to use them right away. Could you check again? </p>

CC BY-SA 4.0
2019-03-05T10:33:12.347Z
That's my expectation as well. c-lightning 0.7 will only consider outputs with at least 1 confirmation by default. To use unconfirmed outputs you can use the `minconf=0` parameter, but be careful since that can lead to chaining of unconfirmed transactions if the first one never confirms.
cdecker
CC BY-SA 4.0
2019-03-05T08:19:05.657Z
2019-03-05T10:34:11.003Z
2019-03-05T10:34:11.003Z
Rene Pickhardt
<p>When you use the <code>fundchannel</code> command, a 2-of-2 multisig transaction is made on-chain.</p>

<p>From The <a href="https://github.com/lightningnetwork/lightning-rfc/blob/master/03-transactions.md#commitment-transaction-outputs" rel="nofollow noreferrer">BOLT #3: Bitcoin Transaction and Script Formats</a>:</p>

<blockquote>
  <p>"The amounts for each output MUST be rounded down to whole satoshis. If this amount, minus the fees for the HTLC transaction, is less than the dust_limit_satoshis set by the owner of the commitment transaction, the output MUST NOT be produced (thus the funds add to fees)."</p>
</blockquote>

<p>Probably your funding ammount is under the ammount of the <code>dust_limit_satoshis</code> + <code>transaction fees</code>.</p>

CC BY-SA 4.0
2019-03-05T08:16:31.117Z
No 400k Satoshi is far more than the dust limit. I checked the Api of fundchannel command. It expects Satoshi and not msatoshi in which case we would be below dust limit
Rene Pickhardt
CC BY-SA 4.0
2019-03-06T06:51:00.790Z
Ah ok, good to know. Thx.
dvg
CC BY-SA 4.0
2019-03-06T11:37:54.610Z
I just tried again, and it gone through. I have no idea, when and why it happens.
Ronald Wiplinger
CC BY-SA 4.0
2019-03-05T07:36:04.950Z
2019-03-05T07:36:04.950Z
dvg
<p>version 0.7 clightning</p>

<p>Listfunds shows me:</p>

<pre><code>963692 satoshi available to fund channels
6280512 satoshi owned in channels
14832105 satoshi total channel capacity
</code></pre>

<p>When I try to fund a channel with 400000 I get:</p>

<pre><code>lightning-cli fundchannel 02b414e4e29a685b8699152be47a0420fa3c8ab59629d2da2d6c0a95c582636350 400000
{ "code" : 301, "message" : "Cannot afford transaction" }
</code></pre>

<p>Why?</p>

<core-lightning>
"Cannot afford transaction"
Ronald Wiplinger
# "Cannot afford transaction"

(Asked by: username_0 on 2019-03-05)

version 0.7 clightning

Listfunds shows me:

```
963692 satoshi available to fund channels
6280512 satoshi owned in channels
14832105 satoshi total channel capacity

```

When I try to fund a channel with 400000 I get:

```
lightning-cli fundchannel 02b414e4e29a685b8699152be47a0420fa3c8ab59629d2da2d6c0a95c582636350 400000
{ "code" : 301, "message" : "Cannot afford transaction" }

```

Why?

**Tags:** core-lightning


---

## 2 answers

### Answer by username_1 on 2019-03-05. Score: 1

Could it be that the outputs depicted in `listfunds` do not have yet enough confirmations? Maybe you got them after you closed a channel and c-lightning did not allow you to use them right away. Could you check again?

> **Comments:**
> **username_2**: That's my expectation as well. c-lightning 0.7 will only consider outputs with at least 1 confirmation by default. To use unconfirmed outputs you can use the `minconf=0` parameter, but be careful since that can lead to chaining of unconfirmed transactions if the first one never confirms.  

---

### Answer by username_3 on 2019-03-05. Score: 0

When you use the `fundchannel` command, a 2-of-2 multisig transaction is made on-chain.

From The [BOLT #3: Bitcoin Transaction and Script Formats](https://github.com/lightningnetwork/lightning-rfc/blob/master/03-transactions.md#commitment-transaction-outputs):

> "The amounts for each output MUST be rounded down to whole satoshis. If this amount, minus the fees for the HTLC transaction, is less than the dust\_limit\_satoshis set by the owner of the commitment transaction, the output MUST NOT be produced (thus the funds add to fees)."

Probably your funding ammount is under the ammount of the `dust_limit_satoshis` + `transaction fees`.

> **Comments:**
> **username_1**: No 400k Satoshi is far more than the dust limit. I checked the Api of fundchannel command. It expects Satoshi and not msatoshi in which case we would be below dust limit  
> **username_3**: Ah ok, good to know. Thx.  
> **username_0**: I just tried again, and it gone through. I have no idea, when and why it happens.  

---

