From b96880c314cc31967a3de6ec805e6acbec7f35c0 Mon Sep 17 00:00:00 2001 From: Mohan <86064887+binarybaron@users.noreply.github.com> Date: Sun, 14 Sep 2025 14:45:32 -0400 Subject: [PATCH] fix(cli,gui): Assume double spend safety after 22 confirmations (#558) * fix(cli,gui): Assume double spend safety after 22 confirmations * change env.rs --------- Co-authored-by: binarybaron --- CHANGELOG.md | 1 + swap-env/src/env.rs | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d27e7f7..9d293fb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] - GUI + CLI: Fix an issue where it'd take a long time to redeem the Monero. We did not properly skip the block scanning. +- GUI + CLI: Assume Monero double spend safety after 22 instead of after 12 blocks given the recent large re-org attacks - ORCHESTRATOR: Change exposed mainnet port from `9839` to `9939` ## [3.0.0-beta.11] - 2025-08-20 diff --git a/swap-env/src/env.rs b/swap-env/src/env.rs index f64ff658..9a06ebfe 100644 --- a/swap-env/src/env.rs +++ b/swap-env/src/env.rs @@ -60,8 +60,8 @@ impl GetConfig for Mainnet { // If Alice cannot lock her Monero within this timeout, // she will initiate an early refund of Bobs Bitcoin monero_lock_retry_timeout: 10.std_minutes(), - monero_finality_confirmations: 12, - monero_double_spend_safe_confirmations: 12, + monero_finality_confirmations: 22, + monero_double_spend_safe_confirmations: 22, monero_network: monero::Network::Mainnet, } } @@ -79,8 +79,8 @@ impl GetConfig for Testnet { bitcoin_network: bitcoin::Network::Testnet, monero_avg_block_time: 2.std_minutes(), monero_lock_retry_timeout: 10.std_minutes(), - monero_finality_confirmations: 12, - monero_double_spend_safe_confirmations: 12, + monero_finality_confirmations: 22, + monero_double_spend_safe_confirmations: 22, monero_network: monero::Network::Stagenet, } }