# Using an external wallet and CPFP

Introduction

See how the following transaction is using an input of 0.00032839 BTC, which pays the fee for an Ordinal transfer in this case. And the rest is returned to the same address 0.00031678 BTC (output). The output can be used for a new transaction, by using an extra high fee for the new (child) transaction we make it interesting for the miner to pick up the transaction as well as its parent transaction. This process is called Child Pay For Parent (CPFP).&#x20;

The process to increase the effective fee rate for the old transaction entails opening the address from your Leather account in an external wallet that supports CPFP, such as Sparrow wallet. Find the 0.00031678 BTC output and then apply CPFP. I will end this guide with some guidelines on setting the right fee.&#x20;

<figure><img src="https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2F4zjk0byjgIrwmYRkK3w9%2Fimage.png?alt=media&#x26;token=a243563f-15c3-4b3d-b4b0-f62baa4dbc0e" alt=""><figcaption></figcaption></figure>

### Part 1: Accessing your native segwit address with Sparrow Wallet

1. Install and open Sparrow wallet from <https://sparrowwallet.com/>

2. Select “New wallet” from the “File” menu.

<img src="https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2FM31aPwm6Yrhx2Qp1QZqA%2FUntitled.png?alt=media&#x26;token=261f9507-1c40-45dd-970c-49743960beb5" alt="" data-size="original">

3. Name your wallet.

![](https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2F1z0BPSAQDaT6kWocyy0Y%2FScreenshot_2023-02-27_at_20.50.54.png?alt=media\&token=5d49b774-5de6-4b33-ad55-70a6892b29c6)

4. Set the "script type" to "native SegWit" at the top of the settings page.

![](https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2FdrmpfeKo3sorrwzgJaMj%2FUntitled.png?alt=media\&token=5b7a3439-5403-49b8-81fa-79d6a4d64333)

5. Select "New or Imported Software Wallet" from under "Keystores".

![](https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2FUAzrpvpo3zyYZmYN50AP%2FUntitled.png?alt=media\&token=66070997-3235-4a44-8ad7-7d823a61f167)

6. Select “Use 24 words” and enter your Secret Key from Leather. \
   \
   ❗️IMPORTANT: You must use the exact same seed phrase / Secret Key as the one you use in Leather, or these instructions won’t work.

![](https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2FzIGVUh4SLWaGdqP0Z1eH%2FScreenshot_2023-02-27_at_20.53.30.png?alt=media\&token=05214329-5aee-4dfd-933a-004374f37f36)

7. Select “Create Keystore” then “Import Keystore”.

![](https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2FdmHyUeGB6mjUTmBUx13e%2FUntitled.png?alt=media\&token=73a8f79a-4221-4c99-8159-7da46d46d5a4)

![](https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2F9FYc6PKCEen2Vp1dap4h%2FScreenshot_2023-02-27_at_20.54.23.png?alt=media\&token=d819687c-6d13-4427-80a4-3537223f5cd7)

<mark style="color:blue;">Note: m/84'/0'/0' assumes you want to access the BTC balance address on Account 1 in the Leather extension. If, for example, you want to access Account</mark> <mark style="color:blue;"></mark><mark style="color:blue;">**269**</mark> <mark style="color:blue;"></mark><mark style="color:blue;">in Leather, change the derivation path to m/84'/0'/</mark><mark style="color:blue;">**268**</mark><mark style="color:blue;">'</mark>

8. Select "Apply" in the bottom right corner.

![](https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2FCi79SeXgLaiz1swDWwiT%2FUntitled.png?alt=media\&token=d727db2f-7dc5-4f88-8036-4fb07fe21b2d)

9. Select “No Password” or set password.

![](https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2FACmREbPD2i0uxC8Slp1P%2FUntitled.png?alt=media\&token=a354de8d-c30b-4066-a4d1-dba9c41ee66b)<br>

### Part 2: Finding the unspend Bitcoin (UTXO) to increase the fee, using CPFP

10. Select UTXO's from the sidebar.\
    ![](https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2Fg2i6vAYPLI5MYbo0aJpg%2Fimage.png?alt=media\&token=a2a1aaca-3a29-412c-b38a-ce91a2c5c589)<br>
11. One-by-one, check the UTXO's to find the one with the correct value, in this case we are looking for the 0.00031678 BTC output. [Example](https://mempool.space/tx/13475456859cdd2482f178d59d788a94c1f0e9f02336b3a136ebe272e9513dc8).<br>

    <figure><img src="https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2FrWUCdJ79XeGapj3myP6O%2Fimage.png?alt=media&#x26;token=90ecf014-0a8f-49ca-94eb-295b75e383e1" alt=""><figcaption><p>Finding the bitcoin output of pending incoming transaction to increase the fee.</p></figcaption></figure>

<figure><img src="https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2FajqDgSAr5tXKVcY45IyB%2Fimage.png?alt=media&#x26;token=0b74e008-d796-4ba5-b408-508f3a76c074" alt=""><figcaption><p>Checking the pending/unconfirmed UTXO has the expected value.</p></figcaption></figure>

134\.

12. Now select the transactions on the right side of the Sparrow Wallet\
    ![](https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2FgMRj14XPKexjNxliPcCy%2Fimage.png?alt=media\&token=fe5f25a1-e84f-473f-9f7e-3047d3ba9217)

13. Right click unconfirmed in the "date" column and click the "Increase effective fee (CPFP)" option. <br>

    <figure><img src="https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2FM1yOtrSNfQJIT5fM8gut%2Fimage.png?alt=media&#x26;token=489360d7-eead-4da8-a29e-13e8e3d23317" alt=""><figcaption><p>Note that balance in the last column is the total on the account, this can be different from the total pending amount.</p></figcaption></figure>

14. Then see the pending UTXO amount again (Amount 29678+2000=31678 sats). <br>

    <figure><img src="https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2FASKjKItyNqDpnQGMyCqQ%2Fimage.png?alt=media&#x26;token=4d2fb5f7-e59f-4a3b-9249-639d5829a9ca" alt=""><figcaption></figcaption></figure>

15. And set the correct fee.\
    Roughly if you set twice the average seen in the last couple blocks that will increase the effective fee enough. You want to make sure there is enough to cover the fee of the new transaction and enough to spare to increase the effective fee on the previous transaction.\
    [To make a more accurate estimate see the next section.  ](#part-3-setting-the-fee)<br>

    <figure><img src="https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2FHGG9m0MtOlHHtVTJZagG%2Fimage.png?alt=media&#x26;token=9a9b2100-3da9-454b-a0cb-e313e5d15e9f" alt=""><figcaption><p>Review the fee, the amount will return to the current transaction using the CPFP method.</p></figcaption></figure>

16. Click create transaction

17. Then finalize transaction for signing and sign it.<br>

    <figure><img src="https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2FmbCnmc8jDF1BuH2Xahlk%2Fimage.png?alt=media&#x26;token=377eb143-d0f0-4de4-b6c5-fe6d42d2557c" alt=""><figcaption></figcaption></figure>

18. Finally broadcast transaction (Before and After, the effective fee rate has been increased)\
    ![](https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2FaHzgfljhGUtkWC1ynlaT%2Fimage.png?alt=media\&token=6aeb2088-7836-4cbb-aafd-7af76b7a37c9)![](https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2F9LLTXKDasHryIoUcVgb2%2Fimage.png?alt=media\&token=d1668c93-27ca-4a35-98d5-7e3ec176a58b)\ <br>

    <figure><img src="https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2FsZlIG73vC6SKv5T4Z6n2%2Fimage.png?alt=media&#x26;token=2c239d29-5a80-44ab-af22-3791c13f8673" alt=""><figcaption><p><a href="https://mempool.space/tx/13475456859cdd2482f178d59d788a94c1f0e9f02336b3a136ebe272e9513dc8">Old transaction</a>: Showing a CPFP transaction with its Descendent (child)</p></figcaption></figure>

    <figure><img src="https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2FyrbFy1WvSxDDkJq1Uu4e%2Fimage.png?alt=media&#x26;token=112fd169-9354-4db0-b244-0c663fa519f5" alt=""><figcaption><p><a href="https://mempool.space/tx/d90b1ac3cb24d9a2da4b35c37e1b269036b50ac2001458e8a24e7100c54c8a00">New transaction</a>: The 20.1 sat/vB fee is "shared" between the two transactions for an adequate fee to get both processed. </p></figcaption></figure>

### Part 3: Setting the fee

19. To select the right fee here, first check mempool.space to get an idea of current average fees. <br>

<figure><img src="https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2F5OFzUn58thVuaAKxlw6Z%2Fimage.png?alt=media&#x26;token=5db34eb8-c234-4d4f-9664-ef7f791d120a" alt=""><figcaption><p>The current average is about 10-32 sats per vByte.</p></figcaption></figure>

20. The pending transaction already has a 5.53 sats/vB available. \
    ![](https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2FzgZbHr56G7dVfZMVkCQV%2Fimage.png?alt=media\&token=a4d82357-362b-487e-8c1c-02e792a647ec)
21. If we send a new transaction of similar size (\~200 vB) a fee of 15 sats/vB would put the effective fee at 5\*200+15\*200 = 1000+3000 = 4000 Sats fee total which means an effective fee rate of 4000 / 400 vB = 10 sats per vB)
22. With the current mempool an effective fee rate of 10 Sat/vB could still be to low to get picked up quickly. If you do not want to risk that, set the fee higher. Also set the fee higher if the transaction size of the pending transaction is much larger than "normal". \
    A normal Ordinal transfer or BTC transaction with 1-2 inputs and outputs will have a virtual size of around 100-200 vB. You can check the size on mempool.space in the lower left section of the transaction details:<br>

    <figure><img src="https://2711255060-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgNoCNE0bvsne0MKkDx44%2Fuploads%2FBwT3muRlygrpcEf6U6ge%2Fimage.png?alt=media&#x26;token=4e867c00-26c8-4f32-8166-7a808e51f3e4" alt=""><figcaption><p>Checking the Virtual Size of a pending transaction</p></figcaption></figure>
