All Projects → interlay → Btc Parachain

interlay / Btc Parachain

Licence: apache-2.0
BTC-Parachain: Trustless Bitcoin on Polkadot

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Btc Parachain

Lightning Faucet
A faucet for the Lightning Network!
Stars: ✭ 56 (-20%)
Mutual labels:  bitcoin
Blockstack Browser
The Blockstack Browser
Stars: ✭ 1,119 (+1498.57%)
Mutual labels:  bitcoin
Fast Dat Parser
Superfast blockchain parser for stats
Stars: ✭ 68 (-2.86%)
Mutual labels:  bitcoin
Cryptoawesome
The most complete cryptocurrency image library to be used in your project.
Stars: ✭ 58 (-17.14%)
Mutual labels:  bitcoin
Secuela Variable
Secuela Sans & Condensed - Variable Font OFL
Stars: ✭ 62 (-11.43%)
Mutual labels:  bitcoin
Blocksci
A high-performance tool for blockchain science and exploration
Stars: ✭ 1,127 (+1510%)
Mutual labels:  bitcoin
Merkle Tools
Tools for creating Merkle trees, generating merkle proofs, and verification of merkle proofs.
Stars: ✭ 54 (-22.86%)
Mutual labels:  bitcoin
Icointicker
macOS crypto currency menubar ticker (맥 가상화폐 시세 메뉴바 티커)
Stars: ✭ 70 (+0%)
Mutual labels:  bitcoin
Gdax Orderbook Ml
Application of machine learning to the Coinbase (GDAX) orderbook
Stars: ✭ 60 (-14.29%)
Mutual labels:  bitcoin
Arbitrader
A market neutral cryptocurrency trading bot.
Stars: ✭ 66 (-5.71%)
Mutual labels:  bitcoin
Bitp0wn
Algorithms to re-compute a private key, to fake signatures and some other funny things with Bitcoin.
Stars: ✭ 59 (-15.71%)
Mutual labels:  bitcoin
Crypto Whale Watcher
An app to keep a watch on big volume trades of cryptocurrecies on different exchanges by sending alerts via a Telegram Bot.
Stars: ✭ 60 (-14.29%)
Mutual labels:  bitcoin
Python Opentimestamps
Stars: ✭ 64 (-8.57%)
Mutual labels:  bitcoin
Bitcoin.org
Bitcoin.org Website
Stars: ✭ 1,090 (+1457.14%)
Mutual labels:  bitcoin
Blockked
Blockked - blockchain.info companion (and educational) app for Android
Stars: ✭ 69 (-1.43%)
Mutual labels:  bitcoin
Qtum
Qtum Core Wallet
Stars: ✭ 1,080 (+1442.86%)
Mutual labels:  bitcoin
The Journal Of Blockchain
区块链自媒体、专注区块链技术学习和实践、IPFS/Filecoin、Bitcoin、Ethereum、EOS、Cosmos、区块链、白皮书、Coinmarketcap、Coindesk、Safe Network、Telegram、Docker、社会治理、经济激励
Stars: ✭ 63 (-10%)
Mutual labels:  bitcoin
Bitcoin Elixir
Bitcoin tools and full node implementation in Elixir.
Stars: ✭ 70 (+0%)
Mutual labels:  bitcoin
Chainstate
Bitcoin & altcoins chainstate (old & new formats) parser
Stars: ✭ 69 (-1.43%)
Mutual labels:  bitcoin
Kryptoflow
Real-time analysis of bitcoin markets with Kafka and Tensorflow Serving
Stars: ✭ 66 (-5.71%)
Mutual labels:  bitcoin

BTC-Parachain

A trust-minimized bridge from Bitcoin to Polkadot.
Explore the specification »

Report Bug · Request Feature

This repository is hosted on GitLab: https://gitlab.com/interlay/btc-parachain with a mirror on GitHub.

This project is currently under active development.

Table of Contents

About the Project

This is a proof of concept implementation of a BTC Parachain to bring Bitcoin into the Polkadot universe. It allows the creation of PolkaBTC, a fungible token that represents Bitcoin in the Polkadot ecosystem. PolkaBTC is backed by Bitcoin 1:1 and allows redeeming of the equivalent amount of Bitcoins by relying on a collateralized third-party.

The project uses the concept of Cryptocurrency-backed Assets to lock Bitcoin on the Bitcoin blockchain and issue BTC-backed tokens on the BTC Parachain. The implementation is based on the BTC Parachain specification.

Built with

The BTC-Parachain is built with:

Roadmap

  • Alpha - November 2020
  • Beta - February 2021
  • Rococo - Feburary 2021
  • Kusama - TBD
  • Polkadot - TBD

Development Progess

The Substrate runtime makes use of various custom pallets that are found in the crates folder.

  • bitcoin: [Beta] Library for Bitcoin type, parsing and verification functions.
  • btc-relay: [Beta] Stateful SPV client for Bitcoin. Stores Bitcoin main chain, tracks forks, verifies Merkle proofs and validates specific transaction formats.
  • collateral [Beta] Handles locking, releasing and slashing of collateral (e.g. DOT).
  • exchange-rate-oracle: [Beta] Exchange rate oracle. Integration with external provider pending.
  • fee: [Beta] Participant reward calculation and distribution.
  • issue: [Beta] Handles issuing of PolkaBTC.
  • redeem [Beta] Handles redeeming of PolkaBTC for BTC on Bitcoin.
  • refund [Beta] Handles refunds for when a vault receives more BTC than it can cover.
  • replace [Beta] Handles replacing vaults.
  • security: [Beta] Handles BTC Parachain status and error changes.
  • sla: [Beta] Participant scoring for reward & slashing calculations.
  • staked-relayers: [Beta] Handles registration and stake of Staked Relayers, as well as voting on Parachain status changes.
  • treasury: [Beta] Exposes functions related to handling of the PolkaBTC currency (mint, lock, burn)
  • vault-registry: [Beta] Handles registration, collateral and liquidation of vaults.

Getting started

Prerequisites

curl https://sh.rustup.rs -sSf | sh

Installation

Building requires nightly. Run the following commands to set it up:

rustup toolchain install nightly-2021-01-25
rustup default nightly-2021-01-25
rustup component add rustfmt
rustup component add rls
rustup toolchain install nightly
rustup target add wasm32-unknown-unknown --toolchain nightly-2021-01-25

To build, run:

cargo build

For more detailed development instructions see here.

Testing

cargo test

To run with coverage, using cargo-cov:

cargo install cargo-cov

# clean up previous coverage result
cargo cov clean

# test the code
cargo cov test

# open the coverage report
cargo cov report --open

Running

To run a local development node, use the dev chain spec.

cargo run --release -- --dev

Clear the database using the purge-chain command.

cargo run --release -- purge-chain --dev

To disable all btc-relay block inclusion checks, use the special dev-no-btc chain spec. This is useful for testing without the overhead of running a block relayer.

cargo run --release -- --alice --chain dev-no-btc --rpc-cors all --validator --force-authoring --tmp

Additional CLI usage options are available and may be shown by running cargo run -- --help.

Rococo

By default, the btc-parachain builds in standalone mode with the aura-grandpa feature.

To build with "parachain" support use the cumulus-polkadot feature:

cargo build --manifest-path parachain/Cargo.toml --release --no-default-features --features cumulus-polkadot

To connect with a local relay-chain follow these instructions.

Test Coverage

Test coverage reports available under docs/testcoverage.html

Substrate Chain Configuration

The Substrate runtime configuration is in the parachain folder.

Javascript / Typescript

When interacting via polkadot{.js} you will need to use our custom types. Please also checkout polkabtc-js for a more complete (strongly-typed) library with bitcoinjs-lib integration.

Contributing

If you would like to contribute, please file an issue on GitLab or reach out to us.

We are hiring!

License

(C) Copyright 2020 Interlay Ltd

BTC-Parachain is currently licensed under the terms of the Apache License (Version 2.0). See LICENSE

Contact

Website: Interlay.io

Twitter: @interlayHQ

Email: [email protected]

Acknowledgements

This project is supported by a Web3 Foundation grant.

We would also like to thank the following teams for their continuous support:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].