{"id":13511312,"url":"https://github.com/KomodoPlatform/komodo-defi-framework","last_synced_at":"2025-03-30T20:33:02.631Z","repository":{"id":37271273,"uuid":"119973711","full_name":"KomodoPlatform/komodo-defi-framework","owner":"KomodoPlatform","description":"This is the official Komodo DeFi Framework repository","archived":false,"fork":true,"pushed_at":"2025-03-25T16:46:10.000Z","size":258222,"stargazers_count":113,"open_issues_count":367,"forks_count":102,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-03-25T20:17:06.497Z","etag":null,"topics":["atomic-swap","atomic-swaps","bitcoin","blockchain","cross-chain","cross-chain-applications","cross-chain-bridge","cross-chain-dex","cross-chain-swap","dex","erc20","ethereum","komodo","p2p","qrc20","qtum","utxo"],"latest_commit_sha":null,"homepage":"https://komodoplatform.com/en/docs/komodo-defi-framework/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"jl777/SuperNET","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KomodoPlatform.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-02-02T11:28:52.000Z","updated_at":"2025-03-03T02:25:28.000Z","dependencies_parsed_at":"2023-09-23T01:40:48.779Z","dependency_job_id":null,"html_url":"https://github.com/KomodoPlatform/komodo-defi-framework","commit_stats":null,"previous_names":["komodoplatform/komodo-defi-framework","komodoplatform/atomicdex-api"],"tags_count":243,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KomodoPlatform%2Fkomodo-defi-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KomodoPlatform%2Fkomodo-defi-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KomodoPlatform%2Fkomodo-defi-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KomodoPlatform%2Fkomodo-defi-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KomodoPlatform","download_url":"https://codeload.github.com/KomodoPlatform/komodo-defi-framework/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246379366,"owners_count":20767694,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atomic-swap","atomic-swaps","bitcoin","blockchain","cross-chain","cross-chain-applications","cross-chain-bridge","cross-chain-dex","cross-chain-swap","dex","erc20","ethereum","komodo","p2p","qrc20","qtum","utxo"],"created_at":"2024-08-01T03:00:47.136Z","updated_at":"2025-03-30T20:32:57.621Z","avatar_url":"https://github.com/KomodoPlatform.png","language":"Rust","funding_links":[],"categories":["Cross-Chain"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://atomicdex.io\" alt=\"Contributors\"\u003e\n        \u003cimg width=\"420\" src=\"https://user-images.githubusercontent.com/24797699/252396802-de8f9264-8056-4430-a17d-5ecec9668dfc.png\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/komodoplatform/komodo-defi-framework/graphs/contributors\" alt=\"Contributors\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/contributors/komodoplatform/komodo-defi-framework\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/komodoplatform/komodo-defi-framework/releases\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/downloads/komodoplatform/komodo-defi-framework/total\" alt=\"downloads\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/komodoplatform/komodo-defi-framework/\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/last-commit/komodoplatform/komodo-defi-framework\" alt=\"last commit\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/komodoplatform/komodo-defi-framework/pulse\" alt=\"Activity\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/commit-activity/m/komodoplatform/komodo-defi-framework\" /\u003e\n    \u003c/a\u003e\n    \u003cbr/\u003e\n    \u003ca href=\"https://github.com/komodoplatform/komodo-defi-framework/issues\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/issues-raw/komodoplatform/komodo-defi-framework\" alt=\"issues\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/komodoplatform/komodo-defi-framework/issues?q=is%3Aissue+is%3Aclosed\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/issues-closed-raw/komodoplatform/komodo-defi-framework\" alt=\"issues closed\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/komodoplatform/komodo-defi-framework/pulls\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/issues-pr/komodoplatform/komodo-defi-framework\" alt=\"pulls\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/komodoplatform/komodo-defi-framework/pulls?q=is%3Apr+is%3Aclosed\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/issues-pr-closed/komodoplatform/komodo-defi-framework\" alt=\"pulls closed\"\u003e\n    \u003c/a\u003e\n    \u003cbr/\u003e\n    \u003ca href=\"https://github.com/KomodoPlatform/komodo-defi-framework/actions/workflows/release-build.yml\"\u003e\n        \u003cimg src=\"https://github.com/KomodoPlatform/komodo-defi-framework/actions/workflows/release-build.yml/badge.svg?branch=main\" alt=\"build status\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/KomodoPlatform/komodo-defi-framework/releases\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/v/release/komodoplatform/komodo-defi-framework\" alt=\"release version\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://discord.gg/3rzDPAr\"\u003e\n        \u003cimg src=\"https://img.shields.io/discord/412898016371015680?logo=discord\" alt=\"chat on Discord\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://twitter.com/komodoplatform\"\u003e\n        \u003cimg src=\"https://img.shields.io/twitter/follow/komodoplatform?style=social\u0026logo=twitter\" alt=\"follow on Twitter\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\n## What is the Komodo DeFi Framework?\n\nThe Komodo DeFi Framework is open-source [atomic-swap](https://komodoplatform.com/en/academy/atomic-swaps/) software for seamless, decentralised, peer to peer trading between almost every blockchain asset in existence. This software works with propagation of orderbooks and swap states through the [libp2p](https://libp2p.io/) protocol and uses [Hash Time Lock Contracts (HTLCs)](https://en.bitcoinwiki.org/wiki/Hashed_Timelock_Contracts) for ensuring that the two parties in a swap either mutually complete a trade, or funds return to thier original owner.\n\nThere is no 3rd party intermediary, no proxy tokens, and at all times users remain in sole possession of their private keys.\n\nA [well documented API](https://developers.komodoplatform.com/basic-docs/atomicdex/introduction-to-atomicdex.html) offers simple access to the underlying services using simple language agnostic JSON structured methods and parameters such that users can communicate with the core in a variety of methods such as [curl](https://developers.komodoplatform.com/basic-docs/atomicdex-api-legacy/buy.html) in CLI, or fully functioning [desktop and mobile applications](https://atomicdex.io/) like [Komodo Wallet Desktop](https://github.com/KomodoPlatform/komodo-wallet-desktop).\n\nFor a curated list of Komodo DeFi Framework based projects and resources, check out [Awesome AtomicDEX](https://github.com/KomodoPlatform/awesome-atomicdex).\n\n\n## Features\n\n- Perform blockchain transactions without a local native chain (e.g. via Electrum servers)\n- Query orderbooks for all pairs within the [supported coins](https://github.com/KomodoPlatform/coins/blob/master/coins)\n- Buy/sell from the orderbook, or create maker orders\n- Configure automated [\"makerbot\" trading](https://developers.komodoplatform.com/basic-docs/atomicdex-api-20/start_simple_market_maker_bot.html) with periodic price updates and optional [telegram](https://telegram.org/) alerts\n\n## Building from source\n\n### On Host System:\n\n[Pre-built release binaries](https://developers.komodoplatform.com/basic-docs/atomicdex/atomicdex-setup/get-started-atomicdex.html) are available for OSX, Linux or Windows.\n\nIf you want to build from source, the following prerequisites are required:\n- [Rustup](https://rustup.rs/)\n- OS specific build tools (e.g. [build-essential](https://linuxhint.com/install-build-essential-ubuntu/) on Linux, [XCode](https://apps.apple.com/us/app/xcode/id497799835?mt=12) on OSX or [MSVC](https://docs.microsoft.com/en-us/cpp/build/vscpp-step-0-installation?view=vs-2017) on Win)\n- (Optional) OSX: install [openssl](https://www.openssl.org/), e.g. `brew install openssl`.\n- (Optional) OSX: run `LIBRARY_PATH=/usr/local/opt/openssl/lib`\n- (Optional) Linux: Install libudev-dev (dpkg) or libudev-devel (rpm) package.\n- [Download](https://github.com/protocolbuffers/protobuf/releases) or [compile](https://github.com/protocolbuffers/protobuf) `protoc 3.21.x+` and add it to your PATH env. It is also available via package managers depending on the OS.\n\nTo build, run `cargo build` (or `cargo build -vv` to get verbose build output).\n\nFor more detailed instructions, please refer to the [Installation Guide](https://developers.komodoplatform.com/basic-docs/atomicdex/atomicdex-setup/get-started-atomicdex.html).\n\n### From Container:\n\nIf you want to build from source without installing prerequisites to your host system, you can do so by binding the source code inside a container and compiling it there.\n\nBuild the image:\n\n```sh\ndocker build -t kdf-build-container -f .docker/Dockerfile .\n```\n\nBind source code into container and compile it:\n\n```sh\ndocker run -v \"$(pwd)\":/app -w /app kdf-build-container cargo build\n```\n\nJust like building it on your host system, you will now have the target directory containing the build files.\n\n## Building WASM binary\n\nPlease refer to the [WASM Build Guide](./docs/WASM_BUILD.md).\n\n## Configuration\n\nBasic config is contained in two files, `MM2.json` and `coins`\n\nThe user configuration [MM2.json file](https://developers.komodoplatform.com/basic-docs/atomicdex/atomicdex-setup/configure-mm2-json.html) contains rpc credentials, your mnemonic seed phrase, a `netid` (8762 is the current main network) and some extra [optional parameters](https://developers.komodoplatform.com/basic-docs/atomicdex/atomicdex-setup/get-started-atomicdex.html).\n\nFor example:\n```json\n{\n  \"gui\": \"core_readme\",\n  \"netid\": 8762,\n  \"rpc_password\": \"Ent3r_Un1Qu3_Pa$$w0rd\",\n  \"passphrase\": \"ENTER_UNIQUE_SEED_PHRASE_DONT_USE_THIS_CHANGE_IT_OR_FUNDS_NOT_SAFU\"\n}\n```\n\nThe coins file contains information about the coins and tokens you want to trade. A regularly updated version is maintained in the [Komodo Platform coins repository](https://github.com/KomodoPlatform/coins/blob/master/coins). Pull Requests to add any coins not yet included are welcome.\n\nTo facilitate interoperability with the `kdf` service, there is the `adex-cli` command line utility. It provides a questionnaire initialization mode to set up the configuration and obtain the proper coin set through the internet. It can also be used to start or stop the service.\n\n## Usage\n\nTo launch the Komodo DeFi Framework, run `./kdf` (or `kdf.exe` in Windows)\n\nTo activate a coin:\n```bash\ncurl --url \"http://127.0.0.1:7783\" --data '{\n\t\"coin\": \"KMD\",\n\t\"method\": \"electrum\",\n\t\"servers\": [\n\t\t{\"url\": \"electrum1.cipig.net:10001\"},\n\t\t{\"url\": \"electrum2.cipig.net:10001\"},\n\t\t{\"url\": \"electrum3.cipig.net:10001\"}\n\t],\n\t\"required_confirmations\":10,\n\t\"requires_notarization\":true,\n\t\"mm2\":1,\n\t\"userpass\": \"$userpass\"\n}'\n```\n\nTo view the orderbook for a pair:\n```bash\ncurl --url \"http://127.0.0.1:7783\" --data '{\n    \"userpass\":\"$userpass\",\n    \"method\":\"orderbook\",\n    \"base\":\"KMD\",\n    \"rel\":\"BTC\"\n}'\n```\n\nTo place a buy order:\n```bash\ncurl --url \"http://127.0.0.1:7783\" --data '{\n  \"userpass\": \"$userpass\",\n  \"method\": \"buy\",\n  \"base\": \"KMD\",\n  \"rel\": \"DOGE\",\n  \"volume\": \"10\",\n  \"price\": \"4\"\n}'\n```\n\nRefer to the [Komodo Developer Docs](https://developers.komodoplatform.com/basic-docs/atomicdex/introduction-to-atomicdex.html) for details of additional RPC methods and parameters\n\n\n## Project structure\n\n[mm2src](mm2src) - Rust code, contains some parts ported from C `as is` (e.g. `lp_ordermatch`) to reach the most essential/error prone code. Some other modules/crates are reimplemented from scratch.\n\n\n## Additional docs for developers\n\n- [Contribution guide](./docs/CONTRIBUTING.md)\n- [Setting up the environment to run the full tests suite](./docs/DEV_ENVIRONMENT.md)\n- [Git flow and general workflow](./docs/GIT_FLOW_AND_WORKING_PROCESS.md)\n- [Komodo Developer Docs](https://developers.komodoplatform.com/basic-docs/atomicdex/introduction-to-atomicdex.html)\n\n\n## Disclaimer\n\nThis repository contains the `work in progress` code of the brand new Komodo DeFi Framework (kdf) built mainly on Rust.  \nThe current state can be considered as a alpha version.\n\n**\u003cb\u003eWARNING: Use with test coins only or with assets which value does not exceed an amount you are willing to lose. This is alpha stage software! \u003c/b\u003e**\n\n\n## Help and troubleshooting\n\nIf you have any question/want to report a bug/suggest an improvement feel free to [open an issue](https://github.com/artemii235/SuperNET/issues/new) or join the  [Komodo Platform Discord](https://discord.gg/PGxVm2y) `dev-marketmaker` channel.  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKomodoPlatform%2Fkomodo-defi-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKomodoPlatform%2Fkomodo-defi-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKomodoPlatform%2Fkomodo-defi-framework/lists"}