Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RBF+CPFP monster #301

Open
BullishNode opened this issue May 16, 2023 · 0 comments
Open

RBF+CPFP monster #301

BullishNode opened this issue May 16, 2023 · 0 comments

Comments

@BullishNode
Copy link

  • We want to RBF a transaction. It is 200 bytes and has a fee of 2000 sats, a priori feerate of 10 sats/vbyte.

  • But the transaction has many unconfirmed ancestors.

  • So when doing the RBF we need to take into account the effective feerate of the transaction.

  • We sum the weight of all ancestors + the weight of the transaction we want to RBF.

example: 4 ancestors of 200 vbytes each, for total of 1,000 vbytes

  • We sum all the fees of the ancestors + the fee of the transaction we want to RBF.

example: 4 ancestors at 5 sats/vbyte each is 4000 sats, plus the transaction we want to RBF at 10 sats/vbyte which is 2000 sats, for a total of 6000 sats.

  • We obtain effective rate of the transaction we want to RBF in sat/vbyte.

example: 6 sats/vbyte

  • We set a target for an effective sat/vbyte we want for that transaction, given an estimated confirmation time in blocks.

example: 20 sats/vbyte

  • We calculate how many sats in total we need to obtain our effective rate.

1000 vbytes * 20 sats/vbyte = 20,000 sats

  • Since Bitcoin Core only accepts feerate as argument for RBF, and not fee, we need to calculate the feerate based on the transaction size so that the total fee will be 20,000 sats.

20,000 sats / 200 bytes = 100 sats/vbyte

  • We use the Bitcoin Core bumpfee command with feerate 100 sats/vbyte to obtain an effective feerate of 20 sats/vbyte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant