Skip to content

feat(wallet): enable anti-fee sniping with randomization #1912

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

Closed

Conversation

aagbotemi
Copy link

Description

This PR implements Anti-Fee-Sniping with randomization as discussed in issue bitcoindevkit/bdk_wallet#47.

Notes to the reviewers

The implementation adds randomization to anti-fee-sniping behavior:

  1. Uses a 50/50 chance to choose between nLockTime and nSequence (when possible)
  2. Adds a 10% chance to set either value further back in time (by a random value between 0-99)
  3. Detects taproot inputs and their confirmation status

Changelog notice

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

@aagbotemi
Copy link
Author

This PR has been reopened on bitcoindevkit/bdk_wallet#207

@aagbotemi aagbotemi closed this Apr 12, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in BDK Wallet Apr 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants