{"id":13632692,"url":"https://github.com/interlay/interbtc","last_synced_at":"2025-05-16T07:04:54.521Z","repository":{"id":36955479,"uuid":"251576007","full_name":"interlay/interbtc","owner":"interlay","description":"interBTC: Bitcoin Anywhere","archived":false,"fork":false,"pushed_at":"2025-04-04T20:48:59.000Z","size":194479,"stargazers_count":250,"open_issues_count":107,"forks_count":82,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-14T02:41:25.818Z","etag":null,"topics":["bitcoin","blockchain","bridge","defi","interbtc","kusama","polkadot","rust","substrate"],"latest_commit_sha":null,"homepage":"https://app.interlay.io/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/interlay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-03-31T10:53:54.000Z","updated_at":"2025-03-17T16:26:03.000Z","dependencies_parsed_at":"2023-09-22T20:34:55.959Z","dependency_job_id":"76a151cd-5fbd-48e6-bec5-9216cf999928","html_url":"https://github.com/interlay/interbtc","commit_stats":null,"previous_names":[],"tags_count":147,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interlay%2Finterbtc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interlay%2Finterbtc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interlay%2Finterbtc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interlay%2Finterbtc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interlay","download_url":"https://codeload.github.com/interlay/interbtc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485055,"owners_count":22078767,"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":["bitcoin","blockchain","bridge","defi","interbtc","kusama","polkadot","rust","substrate"],"created_at":"2024-08-01T22:03:11.152Z","updated_at":"2025-05-16T07:04:49.513Z","avatar_url":"https://github.com/interlay.png","language":"Rust","funding_links":[],"categories":["Rust","Applications","应用程序 Applications","Others"],"sub_categories":["Blockchain","加密货币 Cryptocurrencies","Cryptocurrencies"],"readme":"\u003cp align=\"center\"\u003e\n  \u003ch2 align=\"center\"\u003einterBTC\u003c/h2\u003e\n\n  \u003cp align=\"center\"\u003e\n    A modular and programmable layer for Bitcoin and the multi-chain ecosystem.\n    \u003cbr /\u003e\n    \u003ca href=\"https://docs.interlay.io/\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/interlay/interbtc/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/interlay/interbtc/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n## Table of Contents\n\n- [About the Project](#about-the-project)\n- [Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Installation](#installation)\n- [Contributing](#contributing)\n- [License](#license)\n- [Contact](#contact)\n- [Acknowledgements](#acknowledgements)\n\n## About the Project\n\nThe interBTC project is a modular and programmable layer to bring Bitcoin to the multi-chain ecosystem. It includes:\n\n- A collateralized and permissionless Bitcoin bridge based on [XCLAIM](https://www.xclaim.io/)\n- A DeFi hub with a Rust-native Uniswap v2-style AMM, Curve v1-style AMM, and a Compound v2-style money market.\n- [EVM-compatible smart contracts and blocks](https://github.com/paritytech/frontier).\n- Bridges to other smart contract chains.\n- A [Rust smart contract layer](https://use.ink/) to interact with everything above.\n\n### Built with\n\nThe interBTC project is built with:\n\n- [Rust](https://www.rust-lang.org/)\n- [Substrate](https://substrate.dev/)\n\n### Structure\n\n#### Runtime\n\nThe Substrate runtime configuration is in the [parachain](./parachain) folder.\n\n- [Interlay](parachain/runtime/interlay/): The Interlay runtime configuration.\n- [Kintsugi](parachain/runtime/kintsugi/): The Kintsugi canary network runtime configuration.\n- [Common](parachain/runtime/common/): Common runtime configuration for Interlay and Kintsugi.\n\nTest networks are build from the mainnet runtimes and have no dedicated runtimes.\n\n#### Crates\n\nThe chain makes use of various custom pallets that are found in the [crates](./crates) folder.\n\n- [annuity](crates/annuity): Block rewards for stake-to-vote and vaults.\n- [bitcoin](crates/bitcoin): Library for Bitcoin type, parsing and verification functions.\n- [btc-relay](crates/btc-relay): Stateful SPV client for Bitcoin. Stores Bitcoin main chain, tracks forks, verifies Merkle proofs and validates specific transaction formats.\n- [clients-info](crates/clients-info): Stores current and future [interbtc-client](https://github.com/interlay/interbtc-clients) software releases.\n- [collator-selection](crates/collator-selection/): Decentralized sequencers (collators) for the chain.\n- [currency](crates/currency) Handles currencies (e.g. DOT/KSM/IBTC).\n- [democracy](crates/democracy): Optimistic governance fork of `pallet-democracy`.\n- [dex-general](crates/dex-general/): Uniswap v2-style AMM implementation.\n- [dex-stable](crates/dex-stable/): Curve v1-style AMM implementation.\n- [dex-swap-router](crates/dex-swap-router/): Swap router for the AMMs.\n- [escrow](crates/escrow): Rust implementation of Curve's Voting Escrow contract.\n- [farming](crates/farming): Farming module for AMM liquidity mining.\n- [fee](crates/fee): Participant reward calculation and distribution.\n- [issue](crates/issue): Handles issuing of interBTC for BTC on Bitcoin.\n- [loans](crates/loans): Compound v2-style money market implementation.\n- [multi-transaction-payment](crates/multi-transaction-payment/): Pay assets other than the native one for transaction fees.\n- [nomination](crates/nomination): Interface for vault nomination.\n- [oracle](crates/oracle): Trusted providers use this to set exchange rates and Bitcoin fee estimates.\n- [redeem](crates/redeem): Handles redeeming of interBTC for BTC on Bitcoin.\n- [replace](crates/replace): Handles replacing vaults.\n- [reward](crates/reward): Scalable reward distribution.\n- [security](crates/security): Handles status and error changes.\n- [staking](crates/staking): Core logic for vault nomination and slashing.\n- [supply](crates/supply): Token minting and inflation.\n- [tx-pause](crates/tx-pause): Handles pausing of transactions.\n- [vault-registry](crates/vault-registry): Handles registration, collateral and liquidation of vaults.\n\n## Getting started\n\n### Prerequisites\n\n```\ncurl https://sh.rustup.rs -sSf | sh\n```\n\nPlease also install the following dependencies:\n\n- `cmake`\n- `clang` (\u003e=10.0.0)\n- `clang-dev`\n- `libc6-dev`\n- `libssl-dev`\n\n### Installation\n\nBuilding requires a specific rust toolchain and nightly compiler version. The\nrequirements are specified in the [./rust-toolchain.toml](./rust-toolchain.toml)\n[override file][].\n\nRunning `rustup show` from the root directory of this repo should be enough to\nset up the toolchain and you can inspect the output to verify that it matches\nthe version specified in the override file.\n\nTo build, run:\n\n```\ncargo build\n```\n\nFor more detailed development instructions [see here](./docs/README.md).\n\n[override file]: https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file\n\n### Testing\n\n```\ncargo test --features runtime-benchmarks\n```\n\nTo run with coverage, using [cargo-cov](https://github.com/kennytm/cov):\n\n```\ncargo install cargo-cov\n\n# clean up previous coverage result\ncargo cov clean\n\n# test the code\ncargo cov test\n\n# open the coverage report\ncargo cov report --open\n```\n\n\n### Running\n\nTo run a local development node, use the `dev` chain spec.\n\n```shell\ncargo run --release --bin interbtc-parachain -- --dev\n```\n\nTo connect with a local relay-chain follow [these instructions](docs/rococo.md).\n\n### Development node\n\nRunning a development can be achieved without compiling the node with docker and `instant-seal`. Replace the release version with one of the available tags:\n\n```shell\ndocker run --network=host interlayhq/interbtc:RELEASE_TAG --dev --instant-seal\n#  Example\ndocker run --network=host interlayhq/interbtc:1.25.0-rc5 --dev --instant-seal\n```\n\n#### Test Coverage\n\nTest coverage reports available under [docs/testcoverage.html](https://github.com/interlay/interbtc/blob/master/docs/testcoverage.html)\n\n### Javascript / Typescript\n\nEither use the [polkadot.js API](https://polkadot.js.org/docs/api) or checkout [interbtc-api](https://github.com/interlay/interbtc-api) for a TypeScript SDK.\n\n## Contributing\n\nIf you would like to contribute, please file an issue on GitHub or reach out to us.\n\n- [Discord](https://discord.gg/interlay)\n\n## License\n\ninterBTC is licensed under the terms of the Apache License (Version 2.0). See LICENSE\n\n## Contact\n\nLinktree: [Linktree](https://linktr.ee/interlay)\n\nWebsite: [interlay.io](https://www.interlay.io)\n\nTwitter: [@interlayHQ](https://twitter.com/InterlayHQ)\n\nDiscord: [Discord](https://discord.gg/interlay)\n\nTelegram: [Telegram](https://t.me/joinchat/G9FaYhNbJK9v-6DN3IyhJw)\n\n## Acknowledgements\n\nThis project is supported by a [Web3 Foundation grant](https://web3.foundation/grants/) and the [Substrate Builders Program](https://substrate.io/ecosystem/substrate-builders-program/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterlay%2Finterbtc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterlay%2Finterbtc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterlay%2Finterbtc/lists"}