TRON Wallet-Only Support:
- Added initial TRON blockchain integration with HD wallet activation, TRC20 token support, transaction signing, fee estimation, and withdrawals. #2467 #2712 #2714
WalletConnect:
- Implemented BTC/UTXO transaction signing and legacy swap (v1) support via WalletConnect. #2566
UTXO:
- Added RXD
ForkIdRxdsighash signing path for Radiant chain support. #2713
EVM / ETH:
- Added SafeERC20 V1 USDT support and docker tests. #2711
Infrastructure / CI:
- Migrated service endpoints to gleec.com. #2704
- Migrated docker image push to GLEEC organization. #2705
- Split docker tests into feature-gated parallel suites. #2707
- Removed review reminder bot. #2706
Documentation:
- Added AGENTS.md documentation across key crates. #2465
Legal:
- Updated LICENSE IP ownership.
P2P Network:
- Default P2P netid changed from 8762 to 6133 as part of GLEEC rebranding; netid 8762 added to the deprecated list. Nodes on the old default netid will no longer discover peers on the new default. #2710
Dex Fees:
- Dex fee rate updated to 2% with a 1% discount for GLEEC; fee collection addresses migrated to GLEEC. #2710
SIA Integration:
- Completed SIA coin integration, adding SIA as a new protocol with activation in both Iguana and HD modes using the
m/44'/1991'/0'/0'/0'derivation path, wallet operations, transaction history v1, and legacy swaps are supported. #2540
WalletConnect:
- Implemented BTC/UTXO coin activation via WalletConnect, aligning UTXO with existing EVM/Cosmos activations. #2499
Trading:
- Added expirable maker orders controlled by an optional
timeout_in_minutesfield onsetprice, so stale listings retire automatically while staying backwards compatible. #2516
UTXO Management:
- Introduced a
consolidate_utxosRPC to merge small outputs and reduce fee overhead. #2587
Solana Protocol (feature-flagged):
- Added the initial wallet-only Solana implementation (activation, token handling, WASM-compatible RPC wiring) behind the
enable-solanaflag, swaps and transaction history are not yet available. #2586 #2598 #2622 #2679
Liquidity Routing:
- Added a
best_swapRPC that performs ask-side liquidity routing to surface the optimal route for a desired outcome amount. #2362
Swaps and Order Matching:
- Banned makers after failed negotiation attempts in legacy swaps to prevent repeated retries on the same maker. #2688
- Reduced legacy swap payment broadcast intervals for faster propagation on mobiles. #2680
- Hardened swap v2 offline validation by reusing the offline maker/taker checks, then added best‑effort visibility gates with one‑shot rebroadcast fallback to all coins. #2646 #2618
- Split the orderbook trie from the orderbook to cut lock contention during propagation. #2661
- Ensured order subscriptions are set on kickstart and skipped GC of own pubkeys. #2597
- Corrected dexfee balance checks for TPU swaps to avoid false failures. #2600
Wallet and Keys:
- Corrected shielded HD derivation path formatting in
get_private_keysresponses. #2685 - Fixes a critical bug where
get_private_keysreturned incorrect keys in iguana mode that were derived from an empty passphrase whenpassphraseis null, this happened when loading wallets from KDF encrypted storage. #2683 - Updated Trezor UTXO/EVM calls to match recent firmware changes. #2565
UTXO / Electrum:
- Switched Electrum block-count queries to sequential mode to avoid server bans on endpoints with strict per-IP limits. #2666
- Added a fixed-fee option for DINGO-like chains. #2454
- Revised minimum trading volume for fixed-fee UTXO coins to account for HTLC spend fees and avoid unprofitable swaps. #2564
- Relaxed scriptSig signature parsing to stop rejecting valid inputs during validation. #2591
- Overhauled UTXO block-header deserialization and fork handling for AuxPoW/KAWPOW variants, PIVX Sapling, Namecoin, XEC, Cheetahcoin, and many others to prevent parsing failures and false AuxPoW attempts. #2583 #2563 #2572
- Made UTXO chain variants explicit via
chain_variantconfig replacing hardcoded ticker handling. #2692
EVM / ETH:
- Refined gas fee policy handling (adjustment params, renamed RPC) for swap/signing flows. #2533
- Added activation validation tweaks and increased EVM timeouts; aligned naming for platform balance helpers. #2543
- Fixed ETH
maxwithdrawal logic, prevented underflow on low balances, and now return structured EIP-1559 withdrawal errors that include network-required fee info. #2531 #2532
WalletConnect:
- Returned the
pairing_topicinnew_connectionresponses. #2538
RPCs:
- Allowed
get_enabled_coins,task::init_trezor::init, andwc_get_sessionsto accept an emptyparamsfield so RPC callers can omit optional payloads without breaking compatibility. #2612 - Returned JSON-formatted help responses from the
helpRPC. #2613
Event Streaming:
- Broadcast OS shutdown signals via the streaming manager (
stream::shutdown_signal::enable). #2667 - Stopped streamer errors from crashing dev builds by handling SIGINT/SIGTERM/SIGQUIT more gently when the signal handler runs. #2669
- Fixed SSE client-id parsing and allowed query parameters to pass through to event-stream endpoints. #2677 #2678
- Fixed iOS certificate validation for Tendermint balance streaming. #2674
Tendermint / Cosmos:
- Implemented
get_trade_feeRPC for Tendermint-based assets (trade/swap only, not wallet-only assets) that requires an existing on-chain account. #2663
CLI:
- Migrated the CLI to
clap, standardizing-h/--helpand version output, removing unused/undocumented modes. #2510
Graceful Shutdown:
- Refactored signal handling to cover more signals, and fail gracefully with the feature disabled on Windows/Web. #2667
Error Handling:
- Added an
map_mm_errhelper and applied it at key conversion sites to satisfy newer Rust coherence rules without changing error semantics forMmError. #2443
Toolchain:
- Switched the build to always use the latest available stable compiler (including WASM targets). #2444 #2528 #2557
Dependencies:
- Applied broad security/dependency updates (tokio, anstream, atty, mio, time, chrono, and more), removed some deprecated/duplicated crates. #2562
Infrastructure / CI:
- Updated the CI container base image to Debian 11 to keep dependencies working across host OSes. #2534
- Added Node.js 20 to the CI container image to satisfy tooling needs for release builds and scripts. #2536
- Added a git blame ignore list so toolchain/formatting churn no longer dominates blame views. #2649
- Deployed a GitHub Action that publishes WASM playground previews on PRs with the
deploy: wasm-playgroundlabel. #2607 - Avoided using port 7000 for MYCOIN in docker tests to skirt macOS AirPlay receiver conflicts. #2681
Core Maintenance:
- Removed remaining
static mutglobals in favor of thread-safe primitives across executor/WASM/coins/swap tests. #2590
Documentation:
- Improved macOS docs for common Docker startup errors to ease initial setup and troubleshooting. #2544 #2550
ETH Clients:
- Parity client support was removed. #2527
EVM / ETH Withdrawal Errors:
- EIP-1559 withdrawal failures now return structured error objects containing network-required fees; clients parsing RPC strings should handle the new schema. #2532
Fixed-Fee UTXO Coins:
- Minimum trading volume calculation was revised for fixed-fee UTXO coins, which may change minimum order sizes on those networks (dynamic-fee/dust-based coins unchanged). #2564 #2591 #2692
CLI Modes:
- Unused/undocumented CLI modes were removed during the migration to
clap; scripts relying on them may need updates (RPC API unchanged). #2510
Swap Stats DB:
- Swap status broadcasting was enabled for privacy coins with the persistent pubkey hidden (set to zeros) to maintain user privacy. #2648
- Stats database now correctly stores persistent pubkeys for both maker and taker instead of incorrectly storing htlc pubkeys in some cases. #2648
ARRR/Pirate:
- The
get_nullifiersfunction for Zcoin WASM build is now aligned with its sqlite counterpart to return nullifiers for both unspent notes and notes with unconfirmed spends, fixing thespent_by_mefield in transaction history and balance calculations. #2651
Metrics:
- The
memory_dbsize metric that relied onparity-util-mem::malloc_sizewas removed because it intermittently segfaulted on Linux due to allocator conflicts. #2632
Build and Dependency Management:
- A CI job was added to build macOS Universal2 artifacts for KDF, this combines
x86_64-apple-darwinandaarch64-apple-darwinbinaries vialipoto produce a single binary that runs natively on both Intel and Apple Silicon. The universal binary is uploaded askdf_<commit>-mac-universal.zip. #2628 - The
parity-util-memdependency was removed. #2632 - CI container base image was bumped to
debian:bullseye-slim#2534 #2641
Wallet:
- A comprehensive
get_private_keysRPC was implemented to export private keys, public keys, and addresses for any configured coin without requiring activation. HD and Iguana modes with protocol-specific logic for UTXO, EVM, Tendermint, and ZHTLC coins were supported, enabling offline recovery workflows (implemented by Devin AI). #2542
WalletConnect Integration:
- WalletConnect v2 support for EVM and Cosmos coins was implemented, enabling wallet connection and transaction signing via the WalletConnect protocol. #2223 #2485 #2508
Cosmos Network and IBC Swaps:
- Pre-swap validation logic was implemented for maker order creation, requiring HTLC assets and healthy IBC channels on the Cosmos network, with all changes gated behind the
ibc-routing-for-swapsfeature. #2459 - The taker and maker order types were extended with an
order_metadatafield to carry protocol/IBC details, and cross-checks for IBC channels were added (also feature-gated), enabling both parties to validate IBC routing before a swap. #2476
TRON Integration:
- Initial groundwork for TRON integration was started, including the addition of basic structures and boilerplate code; no end-to-end functionality is yet available. #2425
Event Streaming:
- Streamer IDs in the event-streaming system were strongly typed to improve type safety and code clarity. #2441
Peer-to-Peer Network:
- Hardcoded seed node IP addresses were removed from the peer-to-peer network configuration to improve maintainability. #2439
Orders and Trading Protocol:
- The minimum trading volume logic was revised to remove BTC-specific volume behavior, standardizing the calculation across all coins. #2483
Tendermint / Cosmos:
- A helper for generating internal transaction IDs for Tendermint transactions was introduced. #2438
- The IBC channel handler was improved to enhance safety and reliability when interacting with IBC channels. #2298
Wallet:
- Unconfirmed z-coin notes are now correctly tracked. #2331
- HD multi-address support for message signing was implemented, allowing message signatures from multiple derived addresses. #2432 #2474
- A
delete_walletRPC was introduced to securely remove wallets after password confirmation, while preventing the deletion of the currently active wallet. #2497 - A race condition during the initialization of Trezor-based hardware wallets was resolved by ensuring the correct account and address are loaded before fetching the enabled address, preventing startup errors. #2504
UTXO:
- Validation of expected public keys for p2pk inputs was corrected, resolving an error in p2pk transaction processing. #2408
- Transaction fee calculation and minimum relay fee handling for UTXO coins were improved for accurate fee estimation. #2316
EVM / ERC20:
- ETH address serialization in event streaming was updated to use the
AddrToStringtrait for consistency. #2440
Pubkey Banning:
- Expirable bans for pubkeys were introduced, allowing temporary exclusion of certain public keys. #2455
RPC Interface:
- A unified interface was implemented for legacy and current RPC methods. #2450
DNS Resolution:
- IP resolution logic was improved to fail only if no IPv4 address is found. #2487
Database and File System:
- More replacements of
dbdirwithaddress_dirwere made as part of an ongoing improvement to database architecture. #2398
Build and Dependency Management:
- Duplicated mm2 build artifacts were removed from the build process to reduce clutter. #2448
- Static CRT linking was enabled for MSVC builds, improving the portability of Windows binaries. #2464
- The
timed-mapdependency was bumped to version1.4.1for improved performance and stability. #2413 #2481 - The
base58crate was removed and replaced withbs58throughout the codebase for consistency and security. #2427 - Dependencies were reorganized using the
workspace.dependenciesfeature for centralized management. #2449
Documentation:
- Old URLs referencing atomicDEX or previous documentation pages were updated throughout the documentation. #2428
- A DeepWiki badge was added to the README to highlight documentation resources. #2463
Core Maintenance:
- Workspace dependencies were organized for consistent dependency management across the project. #2449
- A unit test was added to validate DEX fee handling for ZCoin. #2460
- Improved ERC20 token lookup to use platform ticker alongside contract address for proper token identification across platforms. #2445
WalletConnect/EVM Coin Activation Policy:
- The
priv_key_policyfield for EVM coin activation now requires the new enum variant format:"priv_key_policy": { "type": "ContextPrivKey" }. #2223
TRON/EVM Chain Specification:
- EVM coin configurations must now include
chain_idinside theprotocol_datafield. Legacychain_idfields are deprecated. #2425
mm2 Build Artifacts:
- The
mm2binaries have been removed from build outputs. Users must reference new artifact locations. #2448
Seednode Configuration:
- Hardcoded seed nodes were removed. KDF will no longer connect to 8762 mainnet by default without proper
seednodesconfiguration. #2439
IBC/Cosmos Changes:
- The
ibc_chainsandibc_transfer_channelsRPC endpoints have been removed. #2459 - The
ibc_source_channelfield now requires numeric values only (e.g.,12instead ofchannel-12). #2459
Experimental Namespace:
- Introduced experimental namespace for APIs that may undergo breaking changes in future releases #2372
Event Streaming:
- Refactored event-streaming system to support dynamic, API-driven subscription management #2172
- Added support for additional event types including transaction history events, swap events, and more #2172
Cosmos Staking:
- The following staking operations were added for Cosmos chains:
- Additional RPC endpoints were added for:
- Relocated staking RPCs under experimental::staking namespace with new method names #2372
Event Streaming:
- UnknownClient error was moved to trace level #2401
- Initial addresses registration in UTXO balance streaming was fixed to properly track address balances when streamer is enabled #2431
Peer-to-Peer Network:
- Implemented network time synchronization validation to avoid swap failures due to node clock drift #2255 #2302, with additional testing coverage #2304
- Removed static seed node IP addresses for improved reliability #2407
- Improved error handling in best_orders RPC when no peers respond to orderbook requests #2318
- Fixed peer-to-peer backward compatibility for swap negotiations by improving serialization of pubkey fields #2353
Trading Protocol Improvements:
- Implemented zero DEX fees for v2 swaps (TPU) for KMD trading pairs #2323
- Added swap protocol versioning with fallback support to legacy swaps #2324
- Added pre-burn address outputs for collecting 25% of taker DEX fees:
- Fixed payment spend and secret extraction logic in swaps v2 #2261
- Removed unnecessary state during ETH funding validation in swaps v2 #2334
- Allowed skipping unnecessary P2P message handling in ETH swaps v2 #2359
- Improved swap robustness by checking for existing maker/taker payments before timeout validation #2283
- Fixed memory leak issue in legacy swaps tracking (running_swap) #2301
- Added
is_successfield to legacy swap status response, making success state more explicit #2371
Tendermint/Cosmos Improvements:
- Improved transaction query reliability using standardized TxSearchRequest #2384
- Added token transaction history support #2404
- Fixed unhandled IBC and HTLC events #2385
Wallet Improvements:
- Added an RPC to change mnemonic passwords #2317
- Enabled storage and usage of non-BIP39 mnemonics #2312
- Fixed hardware-wallet context initialization for UTXO withdrawals #2333
- Added validation to restrict wallet names to alphanumeric characters, dash, and underscore #2400
- Changed wallet file extension from .dat to .json to better reflect content #2400
- Implemented optional password strength validation for mnemonic encryption #2400
FIRO Integration:
- Added support for FIRO Spark verbose transaction details #2396
Pirate/ARRR Integration:
- Dockerized Zombie/Pirate tests for improved test environment reliability #2374
Database and File System Improvements:
- Improved database architecture with context functions and global DB usage has started in #2378, this is still under development under the new-db-arch compilation flag.
- Fixed file filtering logic to exclude directories #2364
RPC Enhancements:
- Implemented dynamic RPC port allocation (rpcport: 0) allowing automatic selection of available ports #2342
NFT integration #900:
- Fixed
update_nftto work correctly with HD wallets using the enabled address #2386 - Fixed
withdraw_nftmethod to work correctly in HD mode #2424
Simple Maker Bot #1065:
- Added LiveCoinWatch price provider and removed deprecated Nomics provider #2416
UTXO Improvements:
- Added support for parsing taproot output address types from
blockchain.transaction.getverbose transactions #2423
Qtum Delegation:
- Standardized parameter naming by using
validator_addressfor QTUM delegation similar to Cosmos #2419
Security Fixes:
- Fixed potential panics in hash processing by enforcing fixed-size arrays and proper length validation #2279
- Improved security of key derivation by validating key material length #2356
- Ensured consistent Argon2 parameters for wallet encryption/decryption #2360
- Fixed path traversal vulnerability in wallet file handling #2400
Code and Dependencies:
- Added default implementations for protocol-specific SwapOps functions #2354
- ETH address displaying now uses a generic trait #2348
- Removed unnecessary Arc wrappers from Ethereum websocket implementation #2291
- Updated dependencies:
Build and Testing Improvements:
- Rewrote main build script for clarity/stability and to eliminate cache invalidation #2319
- mm2_main error is now unified across native and wasm #2389
- mm2_main in wasm now returns a js promise by making it async #2389
- A lot of unstable tests were made more stable in #2365
- Added additional Sepolia testnet nodes for improved test coverage #2358
- Fixed failing Electrum protocol version test #2412
- Updated Docker build configuration for WASM to fix dependency version issues #2294
- Fixed WASM build by adding test-ext-api feature to required toml files #2295
- Improved CI performance with proper Rust caching implementation #2303
- Updated broken RPC link in Cosmos tests #2305
- Unlocked wasm-pack version constraints in CI workflows and Docker builds #2307
- Fixed mm2_p2p module development build to support individual module testing #2311
- Added Cargo.lock validation to CI process to prevent lockfile inconsistencies #2309
- Improved branch naming flexibility by allowing feature-specific patterns like
feat/swapstatus-is-success#2371 - Fixed formatting and linting job failures by correcting the syntax for rustup component installation #2390
NB - Backwards compatibility breaking changes:
- Event streaming model changed from static configuration to API-driven subscription #2172
- 1inch Integration:
- Error Handling:
- Dependencies:
- Performance:
- Replaced GStuff constructible with OnceCell for better performance #2267
Features:
- Connection Healthcheck
- Connection healthcheck implementation for peers was introduced. #2194
- Custom Tokens Activation
- Support for enabling custom EVM (ERC20, PLG20, etc..) tokens without requiring them to be in the coins config was added. #2141
- This allows users to interact with any ERC20 token by providing the contract address.
- Support for enabling custom EVM (ERC20, PLG20, etc..) tokens without requiring them to be in the coins config was added. #2141
Enhancements/Fixes:
- Trading Protocol Upgrade #1895
- NFT integration #900
- Graceful Shutdown
- CTRL-C signal handling with graceful shutdown was implemented. #2213
- Seed Management #1939
- A new
get_wallet_namesRPC was added to retrieve information about all wallet names and the currently active one. #2202
- A new
- Cosmos Integration #1432
- Order Management
- Cancel order race condition was addressed using time-based cache. #2232
- Swap Improvements
- A legacy swap issue was resolved where taker spent maker payment transactions were sometimes incorrectly marked as successful when they were actually reverted or not confirmed, particularly in EVM-based swaps. #2199
- Two new events were added: "MakerPaymentSpendConfirmed" and "MakerPaymentSpendConfirmFailed"
- A fix was introduced where Takers don't need to confirm their own payment as they can wait for the spending of it straight away. #2249
- This invalidates this fix #1442, a better solution will be introduced where taker rebroadcasts their transaction if it's not on the chain.
- A fix was introduced for recover funds for takers when the swap was marked as unsuccessful due to the maker payment spend transaction not being confirmed. #2242
- The required confirmations from coin config for taker/maker payment spend are now used instead of using 1 confirmation max. This is because some chains require more than 1 confirmation for finality, e.g. Polygon.
- A legacy swap issue was resolved where taker spent maker payment transactions were sometimes incorrectly marked as successful when they were actually reverted or not confirmed, particularly in EVM-based swaps. #2199
- Swap watchers #1431
- Taker fee validation retries now work the same way as for makers. #2263
- Electrum Client
- Electrum client was refactored to add min/max connection controls, with server priority based on list order. #1966
- Electrum client can now operate in single-server mode (1,1) to reduce resource usage (especially beneficial for mobile) or multi-server (legacy) mode for reliability.
- Higher priority servers automatically replace lower priority ones when reconnecting during periodic retries or when connection count drops below minimum.
- Coins Activation
- EVM addresses are now displayed in full in iguana v2 activation response. #2254
- HD Wallet #1838
- RPC Service
- A fix was introduced to run rpc request futures till completion in #1966
- This ensures RPC request futures complete fully even if clients disconnect, preventing partial state updates and maintaining data consistency.
- A fix was introduced to run rpc request futures till completion in #1966
- Security Enhancements
- Build Process
wasm-optoverriding was removed. #2200
- Escaped response body in native RPC was removed. #2219
- Creation of the all-zeroes dir on KDF start was stopped. #2218
- OPTIONS requests to KDF server were added. #2191
Removals:
- Solana Support #1085
- Solana implementation was removed until it can be redone using the latest Solana SDK. #2239
- Adex-CLI #1682
- adex-cli was deprecated pending work on a simpler, more maintainable implementation. #2234
Other Changes:
- Documentation
- Code Structure
- lib.rs was replaced by mm2.rs as the root lib for mm2_main. #2178
- Code Improvements
- Tests
- Tendermint IBC tests were fixed by preparing IBC channels inside the container. #2246
.wait()usage was replaced withblock_onin tests to ensure consistent runtime usage, fixing issues with tokio TCP streams in non-tokio runtimes. #2220- Debug assertions for tests were enabled. #2204
- More Sepolia test endpoints were added in #2262
NB - Backwards compatibility breaking changes:
- RPC Renaming
get_peers_infoRPC was renamed toget_directly_connected_peers. #2195
- Cosmos Integration #1432
- Updates to Tendermint activation payloads:
- 'rpc_urls' field (previously a list of plain string values) is replaced with 'nodes' (a list of JSON objects). #2173
- Updates to Tendermint activation payloads:
- Komodo DeFi Proxy
- All RPC methods fields controlling komodo-defi-proxy are renamed to 'komodo_proxy', affecting various activations, including ETH/EVM. #2173
Features:
- Seed Management #1939
- Seed generation, encryption, and storage features were introduced, including a new
get_mnemonicAPI. #2014
- Seed generation, encryption, and storage features were introduced, including a new
- A new
sign_raw_transactionrpc was added for UTXO and EVM coins, this will facilitate air-gapped wallet implementation in the future. #1930
Enhancements/Fixes:
- Event Streaming #1901
- Balance event streaming for Electrum clients was implemented. #2013
- Balance events for UTXOs were introduced.
- Electrum notification receiving bug was fixed.
- Balance event streaming for EVM was added. #2041
- Error events were introduced. #2041
- Heartbeats were introduced to notify about streaming channel health. #2058
- Balance event streaming for ARRR/Pirate was added. #2076
- Balance event streaming for Electrum clients was implemented. #2013
- Trading Protocol Upgrade #1895
- Important note: Seednodes update is needed to support and rebroadcast new swap protocol messages. #2015
- WASM storage for upgraded swaps introduced. #2015
- Migration of old swaps data was added. #2015
- Swaps now automatically kickstart on MM2 reload. #2015
- File lock for swaps added, preventing the same swap from starting in different processes. #2015
my_swap_status,my_recent_swapsV2 RPCs introduced. #2015- Upgraded swaps data now accessible through V1 RPCs. #2015
- Locked amount handling for UTXO swaps implemented. #2046
- Conditional wait for maker payment confirmation was added before signing funding tx spend preimage on taker's side. #2046
active_swapsV2 RPC introduced. #2046- Handling
accept_only_fromfor swap messages (validation of the sender) was implemented. #2046 swap_uuidfor swap v2 messages was added to avoid reuse of the messages generated for other swaps. #2046- Maker payment immediate refund path handling was implemented. #2046
- KMD Burn #2010
- KMD dex fee burn for upgraded swaps was added. #2046
- Hardware Wallet #964
- NFT integration #900
- A new
clear_nft_dbRPC for NFT data management was added. This enables selective (based on a chain) or complete NFT DB data clearance. #2039 - NFT can now be enabled using
enable_eth_with_tokensorenable_nft, similar toenable_erc20. #2049 - NFT swaps V2 POC was shown, which includes a NFT maker payment test using the dockerized Geth dev node. #2084
komodo-defi-proxysupport for NFT feature was added. #2100- Additional checks were added for malicious
token_urilinks. #2100 clear_allparameter inclear_nft_dbRPC is now optional (default:false). #2100
- A new
- WASM Worker
- Improved environment detection to ensure the correct method is used for accessing the IndexedDB factory, accommodating both window and worker contexts. #1953, #2131
- SharedWorker support was added, allowing any worker path in
event_stream_configurationwith a default toevent_streaming_worker.js. #2080
- Simple Maker Bot #1065
- IndexedDB
- Swap Stats DB
stats_swapstable now includes GUI and MM2 version data used for a swap. #2061
- P2P Layer
- Added
max_concurrent_connectionsto MM2 config to control the maximum number of concurrent connections for Gossipsub. #2063
- Added
- ARRR/Pirate #927
- EVM Transport
- ETH websocket transport was introduced.
komodo-defi-proxysigned messages were also supported for websocket transport. #2058
- ETH websocket transport was introduced.
- Tendermint integration #1432
- Nucleus chain support was introduced as an alternative HTLC backend to Iris. #2079
- Tendermint fee calculation was fixed to use
get_receiver_trade_feein platform coin. #2106 - Pubkey-only mode for Tendermint protocol was introduced, allowing use of any external wallet for wallet and swap operations. #2088
ibc_withdrawRPC was removed, andwithdrawwas refactored to support IBC transfers by automatically finding IBC channels. #2088- Transaction history handling was enhanced to support base64 encoded transaction values for Cosmos-based networks, preventing missing transactions in the history table. #2133
- The precision of max amount handling was improved for Tendermint withdraw operations by simulating the transaction and removing the estimated fee. #2155
- Account sequence numbers are now resolved locally, incorrect sequence numbers from cached responses are also avoided. #2164
- HD Wallet #1838
- Full UTXO and EVM HD wallet functionalities were implemented. #1962
- Swap watchers #1431
- UTXO swaps were fixed to apply events that occurred while the taker was offline, such as maker spending or watcher refunding the taker payment. #2114
- Fees Improvements #1848
- EIP-1559 gas fee estimator and RPCs were added for ETH, including priority fee support for withdrawals and swaps, and improved gas limit for swap transactions. #2051
gas_limitparameter can be used in coins config to override default gas limit values. #2137- Default
gas_limitvalues now ensure that Proxied ERC20 tokens have sufficient gas. #2137
- Rust Toolchain #1972
- CI Builds
- MacOS builds for Apple Silicon are now provided through the CI pipeline. #2163
- Miscellaneous
- BCH block header deserialization was fixed to match BTC's handling of
KAWPOWversion headers. #2099 - Implemented root application directory
.kdfunder$HOMEto consolidate all runtime files, enhancing user experience by following standard UNIX practices. #2102 - Memory usage was improved a bit through preallocation optimizations. #2098
- Swaps and orders file handling was enhanced to use
.tmpfiles to avoid concurrent reading/writing issues. #2118 - UTXO P2PK balance is now shown as part of the P2PKH/Legacy address balance and can be spent in withdrawals and swaps. #2053
wallet-onlyrestriction was removed frommax_maker_volRPC, enabling its use for wallet-only mode assets. #2153
- BCH block header deserialization was fixed to match BTC's handling of
NB - Backwards compatibility breaking changes:
- Renamed
mm2binaries tokdf, while providing backward-compatible copies withmm2naming; WASM binaries usekdfnaming only, which is a breaking change. #2126
Features:
- KMD Burn #2010
- Burn 25% of taker fee when paid in KMD #2006.
- Trading Protocol Upgrade #1895
- Implement successful swaps v2 of UTXO to UTXO coins in #1958.
- Add Swaps V2 message exchange using Protobuf in #1958.
- Storing upgraded swaps data to SQLite DB was partially implemented in #1980.
- Protocol enhancement for UTXO coins by adding one more funding tx for taker, which can be reclaimed immediately if maker back-outs was implemented in #1980.
- Event Streaming #1901
Enhancements/Fixes:
- Network Enhancements:
- P2P layer now uses the latest stable libp2p version in #1878.
7777network was deprecated in #2020.- Seednodes for
netid8762were updated in #2024. libp2p-yamuxnow uses yamuxv0.13(new version) by default and fall back to yamuxv0.12(old version) when setting any configuration options in #2030.- The backpressure buffer cap was increased from
25to256in #2030. - New protocol version (Version2) was used for peer exchange and request-response behaviours in #2030.
- Network information is now written to stdout to find mm2 ports easily after #2034.
- NFT integration #900
exclude_spamandexclude_phishingparams were added forget_nft_listandget_nft_transfersRPCs in #1959.nft_cache_dbwas added inNftCtxfor non wasm targets in #1989.AsyncConnectionstructure that can be used as async wrapper for sqlite connection was added in #1989.async_sqlite_connectionfield was added toMmCtxin #1989.- Spam transfers with empty meta no longer update after #1989.
- ARRR/Pirate:
- Adex-CLI #1682
- Storable State Machine abstraction was added while having few changes to existing state machines in #1958.
- EVM web3 requests timeout was reduced to 20s in #1973.
- Fixed 0.0001 min threshold for TakerFee was removed in #1971.
- The minimum trading volume for evm and tendermint was changed to be the smallest possible amount of the coin in #1971.
- Minimum trading price is reduced to be any value above 0 in #1971.
- Cryptocondition script type was added to utxo transactions in #1991.
- On response error the next web3 node is tried in #1998.
- Watchtower taker-side restart bug was fixed in #1908.
- 'version' method was added to
PUBLIC_METHODSthat require no login in #2001. rpcportvalue can now accept a string after #2026.- An additional
PRICE_ENDPOINTSurl which is a cached copy ofhttps://prices.komodian.info/api/v2/tickersand is updated every minute was added in #2032.
NB - Backwards compatibility breaking changes:
7777Network deprecation and the upgrade to a new p2p layer breaks compatibility with previous versions of Komodo DeFi Framework. Connections between nodes/clients running an older version of Komodo DeFi Framework and nodes/clients running this latest version will not be possible. To avoid this, all nodes/clients must be upgraded to the latest version of Komodo DeFi Framework.- Because of KMD burn of a part of the taker fee, the taker fee outputs for any
coin/KMDswap are changed and makers running older versions will not be able to validate the taker fee, this will cause the swap to fail. This case will never happen anyway because older versions will not be able to connect to this latest version due to the network upgrade. - Because of the removal of the fixed 0.0001 min threshold for TakerFee, taker fee validation will also fail for these cases. Again, this case will never happen as the previous case.
Features:
- Trading Protocol Upgrade #1895
- HD Wallet #1838
- Global enabling of an account'/change/address_index path for all coins using hd_account_id config parameter was replaced by enable_hd which is a bool that defaults to false in #1933
- path_to_address parameter was added to coins activation requests to set the default account'/change/address_index path that will be used for swaps. If not provided, the default will be 0'/0/0 in #1933
- HD withdrawal from any account'/change/address_index path was implemented for UTXO, EVM and Tendermint coins in #1933
- Pirate Integration #927
- ARRR synchronization now supports using a specific start date. This allows users to specify a specific date as the starting point for synchronization as a substitute for the checkpoint block from config or syncing from the first block #1922
Enhancements/Fixes:
- Adex-CLI #1682
- The file permissions of the cli config file is now set to 660 in unix to disallow reading by other users #1913
- Activation types have been introduced to prevent malicious substitution of them in the activation scheme file #1912
- HTTPS connection support was added in #1910
- Activation scheme was changed so the related data types were refactored to be fit for it in #1938
- PoSV coins withdrawal issue was fixed. The issue was a missing n_time field in the generated transaction. The fix now correctly considers when n_time is required, and the rawtransaction can be broadcasted #1925
- Latest relayer channel is now used for tendermint test #1929
- Price urls were updated in #1928
- NFT transactions that transfer multiple NFT tokens were fixed in db, log_index is now used as part of the transfers history table primary key #1926
- State machine was refactored as a preparation step for StorableStateMachine pattern extension in #1927
- A fix was introduced to use kmd rewards for fees if change + interest is below dust threshold in #1944
- Debug info was removed from release binary to reduce the file size in #1954
- Failing tests due to BCHD were ignored in #1955
Features:
- Komodo DeFi Framework was introduced in #1903
- The project/repo was renamed from AtomicDEX-API to Komodo-DeFi Framework
- The readme file, logo, links, and some references in the documentation were updated to reflect the new name/brand
- CI was updated to use the new name where it's needed.
- Swap watcher nodes #1431
- Using watcher nodes for swaps were enabled by default for UTXO coins in #1859
use_watchersconfiguration was set to true by default. It was later disabled in #1897 due to this issue #1887- All nodes doing a swap will broadcast a watcher message after the taker payment is sent if the swapped coins are supported by watchers (currently only UTXO). This was also disabled in #1897 due to this issue #1887
- This update also fixes an issue that caused nodes to broadcast two consecutive watcher messages after the taker payment was sent.
- Using watcher nodes for swaps were enabled by default for UTXO coins in #1859
- NFT integration #900
- Cache support was added for sqlite (non-wasm targets) in #1833
- IndexedDb support for wasm was added in #1877
- DB unit tests were added in #1877
- Handling of
bafyin IPFS Moralis links in a correct way was done in #1877 get_uri_metafunction was added to optimize the retrieval ofUriMetafromtoken_uriandmetadatain #1877protect_from_spamfeature was added to redact URLs in specific fields and flag them as possible spam in #1877- Address is now used instead of string in NFT and transaction objects in #1914
guard: Arc<AsyncMutex<()>>from structNftCtxis added to lock nft functions which uses db in #1914- IndexedDB Cursor collect method was used to fix uncaught Error in #1914
- HTTPS support was added for the RPC server in #1861
- Adex-CLI #1682
- New commands
enable,get-enabled,orderbook,sell,buywere added to adex-cli in #1768
- New commands
Enhancements/Fixes:
- Some RUSTSEC advisories where resolved in #1853
- ARRR/ZCOIN code was refactored to be compiled in WebAssembly (WASM) in #1805
- The PR for this paves the way for subsequent implementation of the empty/todo functions related to WASM storage and other functionalities.
- Orderbook response now returns the right age for the age field, this was fixed in #1851
- A bug that caused
best_ordersrpc to returnis_mine: falsefor the user's orders was fixed in #1846- An optional parameter
exclude_minewas also added to thebest_ordersrequest that allows users to exclude their own orders from the response. exclude_minedefaults to false to maintain the same behaviour before the PR.
- An optional parameter
- Watchtower integration tests were moved to the new ethereum testnet and the ignore attributes were removed in #1846
- The PR also adds a new test case for watcher rewards.
- It also fixes the unstable
send_and_refund_eth_payment,send_and_refund_erc20_payment,test_nonce_lockandtest_withdraw_and_send teststests that were failing due to concurrency issues.
- Infrastructure DNS rotation for default seednodes was done in #1868
- Price endpoints were updated in #1869
- A fix removed the passed config string from the error logs during mm2 initialization if there was a deserialization error was done in #1872
- The time needed for CI completion was reduced by caching the downloaded dependencies in #1880
- Label validation on PRs was added. This validation will only succeed if one of the following labels is used but not both:
under revieworin progress#1881 orderbookmod of adex-cli was refactored by moving it from the internalresponse_handlerto its appropriate folder, enhancing code organization and clarity in #1879- A bug was fixed for adex-cli to allow starting if configuration does not exist in #1889
- IBC and standard withdrawals for Cosmos now allow users to specify the gas price and gas limit for each transaction #1894
- A fix was introduced to adex-cli to allow starting mm2 from cli under regular user in macOS #1856
- The repo logo was updated to be visible in GitHub light theme in #1904
- A CI job was added to check if mm2 version was bumped before merging any pull request to main in #1899
- All CI tests now run with the
--no-fail-fastflag, allowing other tests to proceed despite any failures #1907 - Index out of bounds errors in the
tx_details_by_hashfunctions was fixed in #1915 - Adex-CLI
test_activation_schemewas fixed by removing the old file in #1920
Features:
- NFT integration #900
- UriMeta was added to get info from token uri, status and metadata in nft tx history #1823
Enhancements/Fixes:
- Deprecated
wasm-timerdependency was removed from mm2 tree #1836 log,getrandomandwasm-bindgendependencies were updated to more recent versions that are inline with the latest libp2p upstream #1837- A CI lint pipeline was added that validates pull request titles to ensure that they comply with the conventional commit specifications #1839
- KMD AUR were reduced from 5% to 0.01% starting at
nS7HardforkHeightto comply with KIP-0001 #1841
Features:
Enhancements/Fixes:
- Some enhancements were done for
enable_bch_with_tokens,enable_eth_with_tokens,enable_tendermint_with_assetsRPCs in #1762- A new parameter
get_balanceswas added to the above methods requests, when this parameter is set tofalse, balances will not be returned in the response. The default value for this parameter istrueto ensure backward compatibility. - Token balances requests are now performed concurrently for the above methods.
- A new parameter
- Swap watcher nodes #1750
- PoC for ETH/UTXO and ERC20/UTXO swaps with rewards
- Improved protocol to let only the taker pay the reward
- Add passive parent coin state for keeping tokens active when platform is disabled #1763
- Optimize release compilation profile for mm2 #1821
- CI flows for
adex-cliadded #1818 - Detect a chain reorganization, if it occurs, redownload and revalidate the new best chain headers for SPV #1728
- Fix moralis request in wasm target, add moralis tests #1817
- PoSV support for UTXO coins was added in #1815
- Use a new testnet for ETH tests, reduce the amount of ETH and ERC20 tokens exchanged, use fixed addresses instead of one-time use random addresses, fix some existing bugs (#1828)
Features:
Enhancements/Fixes:
- cosmos/iris ethermint account compatibility implemented #1765
- p2p stack is improved #1755
- Validate topics if they are mixed or not.
- Do early return if the message data is not valid (since no point to iterate over and over on the invalid message)
- Break the loop right after processing any of
SWAP_PREFIX,WATCHER_PREFIX,TX_HELPER_PREFIXtopic.
- An issue was fixed where we don't have to wait for all EVM nodes to sync the latest account nonce #1757
- optimized dev and release compilation profiles and removed ci #1759
- fix receiver trade fee for cosmos swaps #1767
- All features were enabled to be checked under x86-64 code lint CI step with
--all-featuresoption #1760 - use OS generated secrets for cryptographically secure randomness in
maker_swapandtendermint_coin::get_sender_trade_fee_for_denom#1753
Features:
adex-clicommand line utility was introduced that supplies commands:init,start,stop,status#1729
Enhancements/Fixes:
- CI/CD workflow logics are improved #1736
- Project root is simplified/refactored #1738
- Created base image to provide more glibc compatible pre-built binaries for linux #1741
- Set default log level as "info" #1747
- Refactor
native_logmodule #1751- implement stdout/err streaming to persistent file without dependencies
- Add new parameter
silent_consoleto mm conf
Features:
- NFT integration
WIP#900 - Swap watcher nodes #1431
- Watcher rewards for ETH swaps were added #1658
- Cosmos integration
WIP#1432ibc_withdraw,ibc_chainsandibc_transfer_channelsRPC methods were added #1636
- Lightning integration
WIP#1045- rust-lightning was updated to v0.0.113 in #1655
- Channel
current_confirmationsandrequired_confirmationswere added to channel details RPCs in #1655 Uuidis now used for internal channel id instead ofu64#1655- Some unit tests were added for multi path payments in #1655
- Some unit tests for claiming swaps on-chain for closed channels were added in #1655, these unit tests are currently failing.
protocol_infofields are now used to check if a lightning order can be matched or not in #1655- 2 issues discovered while executing a KMD/LNBTC swap were fixed in #1655, these issues were:
- When electrums were down, if a channel was closed, the channel closing transaction wasn't broadcasted. A check for a network error to rebroadcast the tx after a delay was added.
- If an invoice payment failed, retring paying the same invoice would cause the payment to not be updated to successful in the DB even if it were successful. A method to update the payment in the DB was added to fix this.
mm2_gitcrate was added to provide an abstraction layer on Git for doing query/parse operations over the repositories #1636
Enhancements/Fixes:
- Use
env_loggerto achieve flexible log filtering #1725 - IndexedDB Cursor can now iterate over the items step-by-step #1678
- Uuid lib was update from v0.7.4 to v1.2.2 in #1655
- A bug was fixed in #1706 where EVM swap transactions were failing if sent before the approval transaction confirmation.
- Tendermint account sequence problem due to running multiple instances were fixed in #1694
- Maker/taker pubkeys were added to new columns in
stats_swapstable in #1665 and #1717 - Get rid of unnecessary / old dependencies:
crossterm,crossterm_winapi,mio 0.7.13,miow,ntapi,signal-hook,signal-hook-mioin #1710 - A bug that caused EVM swap payments validation to fail because the tx was not available yet in the RPC node when calling
eth_getTransactionByHashwas fixed in #1716.eth_getTransactionByHashin now retried inwait_for_confirmationsuntil tx is found in the RPC node, this makes sure that the transaction is returned frometh_getTransactionByHashlater when validating. - CI/CD migrated from Azure to Github runners #1699
- CI tests are much stabilized #1699
- Integration and unit tests are seperated on CI stack #1699
- Codebase is updated in linting rules at wasm and test stack #1699
crossbeambumped to0.8from0.7#1699- Un-used/Unstable parts of mm2 excluded from build outputs which avoids mm2 runtime from potential UB #1699
- Build time optimizations applied such as sharing generics instead of duplicating them in binary (which reduces output sizes) #1699
RUSTSEC-2020-0036,RUSTSEC-2021-0139andRUSTSEC-2023-0018resolved #1699- Enabled linting checks for wasm and test stack on CI #1699
- Release container base image updated to debian stable from ubuntu bionic #1699
- Fix dylib linking error of rusb #1699
OperationFailure::Othererror was expanded. New error variants were matched withHwRpcError, so error type will beHwError, notInternalError#1719- RPC calls for evm chains was reduced in
wait_for_confirmationsfunction in #1724 - A possible endless loop in evm
wait_for_htlc_tx_spendwas fixed in #1724 - Wait time for taker fee validation was increased from 30 to 60 seconds in #1730 to give the fee tx more time to appear in most nodes mempools.
Features:
- ARRR integration #927:
- Tendermint integration #1432
- HD Wallet #740
- Hardware Wallet #964
- Implement TX history V2 for UTXO coins activated with a Hardware wallet #1467
- Fix KMD withdraw with Trezor #1628
task::get_new_address::*RPCs were added to replace the legacyget_new_addressRPC #1672trezor_connection_statusRPC was added to allow the GUI to poll the Trezor connection status #1672
- Simple Payment Verification #1612
- New RPCs
- Lightning integration
WIP#1045- rust-lightning was updated to v0.0.110 in #1452
- Inbound channels details was added to SQL channels history in #1339
- Blocking was fixed for sync rust-lightning functions that calls other I/O functions or that has mutexes that can be held for some time in #1452
- Default fees are retrieved from rpc instead of config when starting lightning #1452
- 0 confirmations channels feature was added in #1452
- An
update_channelRPC was added that updates a channel that is open without closing it in #1452 - Lightning RPCs now use the
lightning::namespace in #1497 TakerFeeandMakerPaymentswap messages were modified to include payment instructions for the other side, in the case of lightning this payment instructions is a lightning invoice #1497MakerPaymentInstructionsReceived/TakerPaymentInstructionsReceivedevents are added toMakerSwapEvent/TakerSwapEventin #1497, for more info check this comment- Lightning swaps were implemented in #1497, #1557
- Lightning swap refunds were implemented in #1592
MakerPaymentRefundStarted,TakerPaymentRefundStarted,MakerPaymentRefundFinished,TakerPaymentRefundFinishedevents were added to swap error events in #1592, for more info check this comment- Enabling lightning now uses the task manager #1513
- Disabling lightning coin or calling
stopRPC now drops theBackgroundProcessorwhich persists the latest network graph and scorer to disk #1513, #1490 avg_blocktimefrom platform/utxo coin is used for l2/lightning estimating of the number of blocks swap payments are locked for #1606
- MetaMask
WIP#1167- Login with a MetaMask wallet #1551
- Check if corresponding ETH chain is known by MetaMask wallet on coin activation using
wallet_switchEthereumChain#1674 - Refactor ETH/ERC20 withdraw taking into account that the only way to sign a transaction is to send it using
eth_sendTransaction#1674 - Extract address's public key using
eth_singTypedDataV4#1674 - Perform swaps with coins activated with MetaMask #1674
Enhancements/Fixes:
- Update
rust-web3crate #1674 - Custom enum from stringify derive macro to derive From implementations for enums #1502
- Validate that
input_txis calling'receiverSpend'ineth::extract_secret#1596 - Validate all Swap parameters at the Negotiation stage #1475
- created safe number type castings #1517
- Improve
stopfunctionality #1490 - A possible seednode p2p thread panicking attack due to
GetKnownPeersmsg was fixed in #1445 - NAV
cold_stakingscript type was added to fix a problem in NAV tx history in #1466 - SPV was temporarily disabled in WASM in #1479
BTC-segwitswap locktimes was fixed in #1548 by using orderbook ticker instead of ticker in swap locktimes calculations.- BTC block headers deserialization was fixed for version 4 and
KAWPOW_VERSIONin #1452 - Error messages for failing swaps due to a time difference between maker and taker are now more informative after #1677
- Fix
LBCblock header deserialization bug #1343 - Fix
NMCblock header deserialization bug #1409 - Refactor mm2 error handling for some structures #1444
- Tx wait for confirmation timeout fix #1446
- Retry tx wait confirmation if not on chain #1474
- Fix electrum "response is too large (over 2M bytes)" error for block header download #1506
- Deactivate tokens with platform coin #1525
- Enhanced logging in
spvandrpc_clientmods #1594 - Update metrics related dep && refactoring #1312
- Fix rick and morty genesis block deserialization #1647
- In
librustzcashbumpedbech32to0.9.1(which we already have in mm2, so we will not have 2 versions ofbech32) - Use dev branch as a target branch for Dependabot #1424
- Fixed Zhtlc orders is_mine bug (orders had "is_mine":false) #1489
- Grouped SwapOps method arguments into new groups(structures) #1529
- Handling multiple rpcs optimization #1480
- Solana tests are disabled #1660
- Some of vulnerable dependencies(tokio, libp2p) are fixed #1666
- Add
mm2_stopWASM FFI #1628 - Use
futures_timercrate and fix some unstable tests #1511 - Fix
Timer::sleep_msin WASM #1514 - Fix a race condition in
AbortableQueue#1528 - Spawn
process_json_requestso the RPC requests can be processed asynchronously #1620 - Fix
task::-::cancelif the RPC task is an awaiting status #1582 disable_coinshould fail if there are tokens dependent on the platform #1651- Implement a repeatable future #1564
- Version handling was enhanced #1686
- Version of
mm2_bin_libfrom cargo manifest is now used for the API version --version,-v,versionarguments now print the mm2 version
- Version of
- Workflow for VirusTotal results was added to CI #1676
parity-ethereumandtestcontainers-rscrates from KomodoPlatform repo are now used #1690- Testnet node of atom was updated, RUSTSEC-2023-0018 was ignored #1692
- Timestamp value sent from the peer in
PubkeyKeepAlivemsg was ignored and the received timestamp was used instead #1668 - Change release branch from mm2.1 to main in CI #1697
- CHANGELOG.md was introduced to have a complete log of code changes #1680
- Small fixes #1518, #1515, #1550, #1657
NB - Backwards compatibility breaking changes:
- Because of #1548, old nodes will not be able to swap BTC segwit with new nodes since locktimes are exchanged and validated in the negotiation messages.