Converting BTC to RBTC and vice versa
Mainnet Conversion
In this section we will go over the steps of converting BTC to RBTC and vice versa in Bitcoin and Rootstock (RSK) Networks.
The minimum amount of Bitcoin to convert is 0.005 BTC for Mainnet.
BTC to RBTC conversion
Instructions on how to do a Mainnet peg-in.
- Any Bitcoin wallet that supports legacy (
p2pkh
) private key works for this step. In this section, we use the Electrum BTC wallet for connecting to BTC Mainnet.- Download the wallet from Electrum Website
- Install Electrum
- Start Electrum
- Once Electrum starts, create or import a wallet
- Go to the third tab "Receive". You will see a Bitcoin Testnet address like below:
Note: Use a legacy Bitcoin wallet (not Segwit) with a public key beginning with
m
orn
, and a private key prefixed byp2pkh
.
Send Bitcoin to Rootstock Federation address
- The Rootstock Federation address is retrieved by making a Smart Contract call on Rootstock Mainnet. To make the call, you need to have MyCrypto installed:
- Select Rootstock (RSK) Network.
- Navigate to MyCrypto -> Contracts.
- Select Existing Contracts and choose Bridge from the drop-down menu.
- Click getFederationAddress to execute the call. It should look like the screenshot below:
Once you have the Rootstock Federation address, you can send Bitcoin to it from your Bitcoin address.
Note: You must send a minimum amount of 0.005 BTC.
- To ensure the transaction is successful, we need to wait for 100 BTC network confirmations.
100 blocks * 10 minutes/block = 1000 minutes = 16.667 hours. That is, this will take approximately 17 hours.
- You can get a corresponding RBTC address from your BTC private key by using the Rootstock Utils. If you do not want to compile the utility, you can download the latest release.
Note: when entering Bitcoin private key do not include p2pkh: in the front.
You can check balance of RBTC address on Metamask, MyCrypto, or any Rootstock compatible wallets.
Note: You have to wait a minimum of 100 confirmations + a minimum of 5 minutes for checking your RBTC balance.
RBTC to BTC conversion
Instructions on how to do a Mainnet peg-out.
You can get a corresponding BTC address from your RBTC private key by using the Rootstock. If you do not want to compile the utility, you can download the latest release.
- Rootstock Bridge Contract address:
0x0000000000000000000000000000000001000006
- Note: The minimum amount to send must be at least 0.004 RBTC for Mainnet, sending any amount below this, will fail and funds will be reimbursed. The Gas Limit of the transaction needs to be manually set at 100,000 gas; otherwise the transaction will fail. Gas Price can be set to 0.06 gwei (or the gas price suggested by the wallet).
- You can either use Electrum wallet downloaded earlier or from any Bitcoin explorer to check the balance.
Note: The release process on Bitcoin network takes 4000 Rootstock block confirmations and at least 10 more minutes.
Testnet Conversion
In this section we will go over the steps of converting t-BTC to tRBTC, and vice versa on the Bitcoin and Rootstock Testnets.
The minimum amount of Bitcoin to convert is 0.005 tBTC for Testnet.
tBTC to tRBTC conversion
Instructions on how to do a Testnet peg-in.
We recommend to use Electrum BTC wallet for connecting to Bitcoin Testnet.
- Download the wallet from Electrum Website
- Install Electrum
- Start Electrum in Testnet mode
- For example on MacOS:
/Applications/Electrum.app/Contents/MacOS/Electrum --testnet
- For example on MacOS:
- After Electrum starts, create or import a wallet
- Go to the third tab, "Receive". You will see a Bitcoin Testnet address like below.
- Note: The Bitcoin wallet needs to be legacy (not Segwit) whose public key starts with either
m
orn
, and private key starting withp2pkh:
There are a few options to get Bitcoin on Testnet. We use https://testnet-faucet.mempool.co/.
- The Rootstock Federation address is retrieved by making a Smart Contract call on Rootstock Testnet.
- In order to make the call, you will need to have MyCrypto installed, select Rootstock Testnet in "More Networks", and Navigate to "MyCrypto -> Contracts -> Select Existing Contracts -> "Bridge" -> "getFederationAddress" to execute the call.
- It should look like the screenshot below. Once you have the Rootstock Federation address, you can send Bitcoin to it from your Bitcoin address.
- Note: You need to send a minimum amount of 0.01 tBTC for conversion.
-
You can get a corresponding tRBTC address from your tBTC private key by using github.com/rsksmart/utils. If you do not want to compile the utility, you can download the latest release.
-
Note: When entering Bitcoin private key do not include
_p2pkh:_
in the front.
- You can check the balance of the above tRBTC address on Metamask, MyCrypto or any Rootstock Testnet compatible wallets.
- You have to wait a minimum of 10 confirmations + a minimum of 5 minutes for checking your RBTC balance.
tRBTC to tBTC conversion
Instructions on how to do a Testnet peg-out.
The release process on Bitcoin network takes 10 Rootstock block confirmations and at least 10 more minutes.
- You can get a corresponding tBTC address from your tRBTC private key by using github.com/rsksmart/utils. If you do not want to compile the utility, you can download the latest release.
- Rootstock Bridge Contract address:
0x0000000000000000000000000000000001000006
- Important note: The minimum amount to send must be at least 0.004 tRBTC for Testnet, values below that will be rejected and reimbursed to the sender.
- Gas Limit of the transaction needs to be manually set at 100,000 gas; otherwise the transaction will fail.
- Gas Price can be set to 0.06 gwei.
You can either use Electrum wallet downloaded earlier or from any Bitcoin explorer to check the balance.