<p>A transaction is dependent on all transactions whose outputs are spent, and it can only be confirmed after all its ancestors are confirmed (this can be within the same block, just in the correct order). This has a few implications:</p>
<ul>
<li>If a transaction is replaced or double-spent, all its descendants become invalid, because they are now spending non-existent inputs.</li>
<li>If a descendant transaction pays a higher fee than its ancestor, this creates an incentive for miners to confirm both (this is called Child Pays For Parent or CPFP).</li>
</ul>
<p>You can attach a dependent transaction to a transaction as long as you are the recipient of one of its outputs. If the transaction contains a change output, this also includes the sender. Depending on a transaction has no impact other than potentially incentivizing miners to confirm it faster.</p>

CC BY-SA 4.0
2022-09-17T21:35:05.823Z
Is there any cost associated with that? I mean, is it free for the sender to depend transaction?
Motiv
CC BY-SA 4.0
2022-09-18T00:20:15.713Z
All transactions bid with their transaction fees for the blockspace they occupy. So it depends on the amount of data in a transaction, and the feerate it's trying to achieve. If it wants to reprioritize a parent transaction it must add the additional fees to do so. So generally, a CPFP transaction will be more expensive than other transactions.
Murch
CC BY-SA 4.0
2022-09-17T19:39:42.367Z
2022-09-18T00:18:39.723Z
2022-09-18T00:18:39.723Z
Vojtěch Strnad
<p>I am wondering who can attach dependent transactions to a transaction not confirmed and is in the Mempool.
Is that the sender or the receiver?</p>
<p>Assume Alice wants to send 20 BTC to Bob. Her transaction is still waiting in the Mempool. Can Alice depend on another transaction for this one? Or can Bob do that?</p>
<p>What are the incentives?</p>
<p>Thank you</p>

CC BY-SA 4.0
2022-09-17T18:47:01.317Z
Is your question about Child Pays For Parent (CPFP)? Your wording is a little confusing, you cannot "attach dependent transactions" to an existing transaction, you can only make your transaction depend on it (the inverse relation).
Vojtěch Strnad
CC BY-SA 4.0
2022-09-17T19:18:56.973Z
Thanks for your response. I want to know how descendent and ancestor fields are created in Mempool per transaction. Each has a fee, size and count field. 
Based on your answer, it means Bob(receiver) can depend on a new transaction to the previous one.

does depending a transaction need some kind of permission?
Thank you
Motiv
CC BY-SA 4.0
2022-09-17T19:20:52.980Z
What exactly do you mean by Mempool? The website [mempool.space](https://mempool.space/)?
Vojtěch Strnad
CC BY-SA 4.0
2022-09-17T19:20:55.670Z
Mempool: Mempry pool
A waiting pool in which submitted transactions are waiting for the confirmation of the miner
Motiv
<transactions><unconfirmed-transactions><mempool><dependencies>
who attaches dependent transactions? Sender or receiver
Motiv
# who attaches dependent transactions? Sender or receiver

(Asked by: username_0 on 2022-09-17)

I am wondering who can attach dependent transactions to a transaction not confirmed and is in the Mempool.
Is that the sender or the receiver?

Assume Alice wants to send 20 BTC to Bob. Her transaction is still waiting in the Mempool. Can Alice depend on another transaction for this one? Or can Bob do that?

What are the incentives?

Thank you

**Tags:** transactions, unconfirmed-transactions, mempool, dependencies

> **Comments:**
> **username_1**: Is your question about Child Pays For Parent (CPFP)? Your wording is a little confusing, you cannot "attach dependent transactions" to an existing transaction, you can only make your transaction depend on it (the inverse relation).  
> **username_0**: Thanks for your response. I want to know how descendent and ancestor fields are created in Mempool per transaction. Each has a fee, size and count field.  Based on your answer, it means Bob(receiver) can depend on a new transaction to the previous one.  does depending a transaction need some kind of permission? Thank you  
> **username_1**: What exactly do you mean by Mempool? The website [mempool.space](https://mempool.space/)?  
> **username_0**: Mempool: Mempry pool A waiting pool in which submitted transactions are waiting for the confirmation of the miner  

---

## 1 answers

### Answer by username_1 on 2022-09-17. Score: 3 | Accepted answer

A transaction is dependent on all transactions whose outputs are spent, and it can only be confirmed after all its ancestors are confirmed (this can be within the same block, just in the correct order). This has a few implications:

* If a transaction is replaced or double-spent, all its descendants become invalid, because they are now spending non-existent inputs.
* If a descendant transaction pays a higher fee than its ancestor, this creates an incentive for miners to confirm both (this is called Child Pays For Parent or CPFP).

You can attach a dependent transaction to a transaction as long as you are the recipient of one of its outputs. If the transaction contains a change output, this also includes the sender. Depending on a transaction has no impact other than potentially incentivizing miners to confirm it faster.

> **Comments:**
> **username_0**: Is there any cost associated with that? I mean, is it free for the sender to depend transaction?  
> **username_2**: All transactions bid with their transaction fees for the blockspace they occupy. So it depends on the amount of data in a transaction, and the feerate it's trying to achieve. If it wants to reprioritize a parent transaction it must add the additional fees to do so. So generally, a CPFP transaction will be more expensive than other transactions.  

---

