Skip to content

Set anti-fee-sniping locktime on bitcoin sends#3362

Open
bc1cindy wants to merge 1 commit into
cake-tech:devfrom
bc1cindy:locktime-anti-fee-sniping
Open

Set anti-fee-sniping locktime on bitcoin sends#3362
bc1cindy wants to merge 1 commit into
cake-tech:devfrom
bc1cindy:locktime-anti-fee-sniping

Conversation

@bc1cindy

@bc1cindy bc1cindy commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Cake sets nLockTime = 0 on all BTC txs, no anti-fee-sniping and a fingerprint that diverges from Core/Electrum (payjoins especially).

adds a shared antiFeeSnipingLocktime helper replicating Core's DiscourageFeeSniping (tip; ~10% backdate by rand(0..99); 0 if unsynced), wired into both locktime-defaulting paths: BitcoinTransactionBuilder (normal sends) and PSBTTransactionBuild/PsbtV2 via setGlobalFallbackLocktime (payjoin originalPsbt).

closes #3361

@bc1cindy bc1cindy force-pushed the locktime-anti-fee-sniping branch from aaa583a to d6e887a Compare July 2, 2026 12:58
Tip + ~10% backdate (Core DiscourageFeeSniping) via shared helper, wired into normal sends (path A) and payjoin/PSBT (path B). 0 when unsynced.
@bc1cindy bc1cindy force-pushed the locktime-anti-fee-sniping branch from d6e887a to 48a44b7 Compare July 7, 2026 18:29
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

Successfully merging this pull request may close these issues.

Bitcoin sends use nLockTime = 0 (anti-fee-sniping + payjoin fingerprint)

1 participant