• Stars
    star
    101
  • Rank 338,166 (Top 7 %)
  • Language
    Solidity
  • License
    MIT License
  • Created over 5 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A bidirectional Ethereum / RSK Token Bridge implementation.

RSK <-> ETH Token Bridge

Ethereum/RSK Bridge that allows to move ERC20 tokens from one chain to the other.

Rationale

Cross chain events are very important in the future of crypto. Exchanging tokens between networks allows the token holders to use them in their favorite chain without beeing restricted to the contract owner network choice. Moreover this also allows layer 2 solutions to use the same tokens on different chains, this concept together with stable coins creates a great way of payment with low volatility across networks.

Overview

The smart contract on each network are connected by bridges, a bridge on one chain would receive and lock the ERC20 tokens, this action emits an event that will be served to the bridge on the other chain. This interoperability is achieved using a Federation that sends the event from one contract to the other, once the bridge on the other chain receives the event from the Federation, it mints the tokens on the mirror ERC20 contract. See the FAQ to know more about how it works!

The bridges on each contract are upgradeable, this would enable a smooth transition to a more decentralized bridge in the future. Here's is a link to the first POC of the trustless decentralized bridge

Usage

You can use the 'Token Bridge Dapp' together with Nifty Wallet or Metamask with custom network to move tokens between networks. This is the Dapp guide if you don't know how to use it. Or you can use a wallet with the abi of the contracts. See the 'interaction guide using MyCrypto' for more information on how to use the bridge.

Contracts deployed on RSK, Ethereum, RSK Testnet and Kovan

Here are the 'addresses' of the deployed contracts in the different networks.

Report Security Vulnerabilities

To report a vulnerability, please use the vulnerability reporting guideline for details on how to do it.

Developers

Contracts

The smart contracts used by the bridge and the instructions to deploy them are in the 'bridge folder'. The ABI to interact with the contracts are in the 'abi folder'

Dapp

The dapp of the token bridge can be found in the repository 'tokenbirdge-ui'

Federation

A federation sends notification of events happening in the bridge of one chain to another chain. The federation is composed of oracles listening to the events created in one chain and sending it to the other chain. When a majority of the federators votes on an event, the bridge accepts the event as valid and releases the tokens on the other chain. See the 'federator' for more information about federations.

Integration Test

An integration test is prepared for contracts and federators. To properly run integration test, you need check network config in the truffle-config.js and package.json in bridge folder with your test chains' configuration before run npm run deployIntegrationTest.

For testing purposes only, you can let env.FEDERATOR_KEY empty, which fulfills the role that a FEDERATOR_KEY key would have in production. Also, a test.local.config.js configuration is provided in federator/config for the same purpose, acting as the config.js file would in a productive environment.

  1. Check mnemonic.key in bridge
  2. Check infura.key in bridge (must contain your Infura's project ID in plain text)
  3. Check your networkName in bridge/migrations/4_deploy_erc1820.js when your test network does not have ERC1820:Pseudo-introspection Registry Contract deployed.

Then

  1. run npm run deployIntegrationTest in bridge
  2. run npm run integrationTest in federator

More Repositories

1

rskj

RSKj is a Java implementation of the Rootstock protocol.
Java
670
star
2

rif-marketplace-nfts

RIF Marketplace for non fungible tokens.
JavaScript
53
star
3

RSKIPs

RSK Improvement Proposals
HTML
51
star
4

rwallet

The RSK Wallet is based on our rWallet open-source code-base, which will allow developers and organizations to use it to build their own apps.
JavaScript
43
star
5

mock-web3-provider

A mock web3 provider for Cypress built in Cyprus.
TypeScript
42
star
6

devportal-1.0

Legacy Rootstock+RIF Developer Docs. Refer to the current docs repo: https://github.com/rsksmart/devportal
JavaScript
31
star
7

rif-wallet

React Native account abstraction wallet that allows users to pay transaction fees in ERC20 tokens. Check out the docs linked below:
TypeScript
29
star
8

rLogin

A web tool that combines Web3 and W3C standard protocols to manage user's identity
TypeScript
25
star
9

artifacts

Shell
18
star
10

bips

Bitcoin BIPs
16
star
11

rsk-explorer

RSK Explorer
Vue
16
star
12

faucet

RSK testnet faucet website
JavaScript
15
star
13

erc677

Simple implementation of ERC-677 token contract, compatible with RIF Token.
Solidity
15
star
14

rsk-explorer-api

JavaScript
13
star
15

rif-wallet-services

RIF Wallet services
TypeScript
12
star
16

utils

RSK Utils to convert keys from BTC to RSK
CSS
12
star
17

2wp-app

TypeScript
12
star
18

utilities

Tools that we find useful in the usage of an RSK node
11
star
19

rif-relay

Meta-transaction support for RSKJ
TypeScript
11
star
20

rif-wallet-libs

Libraries used by the RIF Wallet
TypeScript
9
star
21

powpeg-node

RSK Node run by RSK PowPeg signatories
Java
9
star
22

lumino

Python
9
star
23

rsk-powhsm

Special purpose PowHSM firmware for the RSK PowPeg.
C
8
star
24

rif-marketplace-ui

RIF Marketplace UI
TypeScript
8
star
25

bitcoinj-thin

Reduced version of BitcoinJ used in RskJ
Java
8
star
26

tokenbridge-ui

Token Bridge UI
Vue
8
star
27

web3-events

Framework for robust handling of web3 events
TypeScript
7
star
28

2wp-api

TypeScript
7
star
29

rif-identity-ui

RIF Self-sovereign identity UI library.
TypeScript
7
star
30

rsk-runes

This project is an open-source proof of concept implementing a Runes Mock Bridge
TypeScript
7
star
31

rns-manager-react

RNS Manager - ⌨️ buidling
JavaScript
6
star
32

rskjs-util

JavaScript
6
star
33

rsk-token-box

Truffle box configured to create an ERC20 token using Open Zeppelin smart contracts library with RSK Networks.
JavaScript
5
star
34

rLogin-sample-apps

rLogin sample apps
JavaScript
5
star
35

rif-ui

React library for RIF projects
TypeScript
5
star
36

rif-storage-js

Client library integrating distributed storage projects
TypeScript
5
star
37

rif-identity-services

RIF Identity proof of concept
TypeScript
5
star
38

rif-identity.js

RIF Self-sovereign identity library.
TypeScript
5
star
39

lumino-contracts

Solidity
4
star
40

decentralized-tokenbridge

Decentralized version of bridge that allows to cross ERC20 tokens between Rsk and Ethereum
JavaScript
4
star
41

ckpool

CKPool with RSK Merged Mining Capabilities
C
4
star
42

rif-marketplace-storage

Pinning contracts
JavaScript
4
star
43

lumino-light-client-sdk

JavaScript
4
star
44

rif-gateways-storage

TypeScript
4
star
45

bitcoin-scaling-hackathon

Repository for "Rootstock: Bitcoin Scaling Hackathon" submissions
4
star
46

btc-rsk-derivation

This tool can be used to derive a BTC private key from an RSK private key and address, and vice versa.
JavaScript
3
star
47

lll-compiler

LLL Compiler
Java
3
star
48

rif-marketplace-cache

Caching backend for information needed for RIF Marketplace
TypeScript
3
star
49

demo-code-snippets

Mini demos and code snippets for use on the RSK network
JavaScript
3
star
50

rns-sdk

RNS SDK
TypeScript
3
star
51

rbank

rBank
Vue
3
star
52

ethr-did-utils

Utils for Ethr DID method in RSK network.
JavaScript
3
star
53

rootstock-subgraph

JavaScript
3
star
54

eloipool

Eloipool with RSK Merged Mining Capabilities
Python
3
star
55

reproducible-builds

Reproducible builds of RSKj's dependencies
Dockerfile
3
star
56

precompiled-abis

Here you will find the ABIs for the existing precompiled contracts in Rootstock. You will also get their addresses and a builder to use it with web3js.
HTML
3
star
57

vc-json-schemas

A repository of JSON Schemas for Verifiable Credentials
JavaScript
3
star
58

devportal

This repo contains the Rootstock + RIF Developer Portal
JavaScript
3
star
59

rsk-stats

JavaScript
3
star
60

rootstock-quick-start-guide

JavaScript
3
star
61

react-app-rif-template

React.js template with Typescript, Sass, Enzyme, ESlint and CircleCI
TypeScript
3
star
62

rootstock-hardhat-starterkit

TypeScript
3
star
63

metamask-rsk-custom-network

This was a proof of concept and is no longer being developed. The URL below is a better version:
TypeScript
3
star
64

multisig-sample-app

A sample app for the multisig project to help developers build dapps with the SDK transaction service.
TypeScript
3
star
65

rsk-plant-box

Truffle box configured to create a complete dApp using Truffle framework connected to RSK Networks, including a frontend.
JavaScript
2
star
66

rootstock-integration-tests

Rootstock integration tests
JavaScript
2
star
67

rif-data-vault

RIF Data Vault
TypeScript
2
star
68

lumino-web

JavaScript
2
star
69

RSKWalletConnect

React Native app with Wallet Connect using RSK networks
JavaScript
2
star
70

rif-faucet-client

CSS
2
star
71

rLogin-essentials

rLogin essentials
TypeScript
2
star
72

rbank-js

Libraries for rBank
JavaScript
2
star
73

rsk-hardhat-starter

RSK Hardhat Starter
JavaScript
2
star
74

rns-partner-registrar

An Abstraction over RNS for the custom needs of rns partners
TypeScript
2
star
75

rsk3.js

JavaScript
2
star
76

lumino-lightclient-dapp

JavaScript
2
star
77

rif-relay-server

This repository contains all the typescript code for the Rif Relay Server
TypeScript
2
star
78

rif-storage-pinner

TypeScript
2
star
79

rif-marketplace-upload-service

TypeScript
2
star
80

rif-web-sdk-template

RIF Web SDK Template
JavaScript
2
star
81

RSKBook

RSK Design Wiki
2
star
82

rif-relay-contracts

This repository contains all the rif relay contracts
TypeScript
2
star
83

rif-marketplace-dev

Local development environment for RIF Marketplace services
JavaScript
2
star
84

rsk-utils

JavaScript
2
star
85

rlogin-workshop

rLogin workshop demo app
JavaScript
2
star
86

rif-relay-client

This repository contains all the client logic for the Rif Relay System
TypeScript
2
star
87

e2e_dapps_automation

E2E Browser Automation for web3 dApps using Cucumber+Playwright+Synpress in JavaScript
JavaScript
2
star
88

rsk-wagmi-starter-kit

RSK & Wagmi starter kit
TypeScript
2
star
89

btc-transaction-solidity-helper

The library is intended to make easier to work with BTC transactions in Solidity
TypeScript
1
star
90

canary

Canary: Armadillos's notifier.
TypeScript
1
star
91

native

Cloudflare altbn128 JNI implementation
C
1
star
92

rif-notifier

Java
1
star
93

rLogin-providers

rLogin EIP-1193 providers
TypeScript
1
star
94

rbtc-faucet

TypeScript
1
star
95

rsk-academy

RSK Academy
JavaScript
1
star
96

email-vc-issuer

Email VC Issuer
TypeScript
1
star
97

bridge-transaction-parser

A tool to find interactions with the Bridge on RSK
JavaScript
1
star
98

rootstock-transaction-helper

Utilitary library to send transactions on RSK using Web3 and Ethereum-js
JavaScript
1
star
99

paid-cloud-demo

Demo: paid cloud
TypeScript
1
star
100

examples

Code examples
C#
1
star