What is Powpeg? The Powpeg is RSK’s 2-way peg protocol used to do conversions between BTC and R-BTC. The Powpeg protects private keys stored in special purpose PowHSMs based on tamper-proof secure elements, using a layered design which is referred to as defense-in-depth. To learn more about it, I suggest you read the article , from Sergio Demian Lerner and Sebastian Lindner. Building the Most Secure, Permissionless and Uncensorable Bitcoin Peg Overview Steps Get some tR-BTCs on the faucet Send tR-BTC to RSK Bridge Contract Export private key Get the BTC address equivalent to R-BTC address Wait 4000 RSK block confirmations and at least 10 more minutes. Check balance in your BTC address Import your private key on a BTC wallet I strongly recommend trying the 2-way peg on Testnet, before doing it on Mainnet. At this moment, the minimum amount of the process is 0.008 R-BTCs on Mainnet and 0.005 tR-BTCs on Testnet, so you must be careful not to do something wrong and lose your “real” funds. Get some tR-BTCs on the faucet I am using the Metamask wallet to store my tR-BTCs. Nifty is also an excellent option! Here are the instructions to use them on RSK networks: Metamask Nifty Maybe you already have tR-BTCs because you first tried the PegIn process, but if you didn’t , you can get some tR-BTCs in the faucet. Go to the RSK faucet Paste your address and resolve the captcha Wait some seconds... Take a look on my transaction: https://explorer.testnet.rsk.co/tx/0x55bd44539942ae36ebad0489694402dac39392bb8a34f056ca32ef476710db42 Send tR-BTC to RSK Bridge Contract You will send the tR-BTC to the RSK Bridge Contract address, updating the gas limit. In your R-BTC wallet, click on the / button. Send Transfer The RSK Bridge Contract address is: 0x0000000000000000000000000000000001000006 The minimum amount to send 0.005 tR-BTC for Testnet must be greater than Fill the RSK Bridge Contract address: 0x0000000000000000000000000000000001000006 Fill the value, 0.005 tR-BTC for Testnet greater than Check the gas price, at least: 0.06 GWei Update the Gas Limit to 100000 Important The of the transaction must be manually set at 100,000 gas; otherwise the transaction will fail. Gas Limit Confirm the transaction The transaction will be pending for a while Wait the transaction be confirmed Export private key I am using the Metamask wallet. On the 3 dots on the left side, click on Account details Then click on Export Private key For example, this is the private key for my account in this tutorial b4a670a4240b900cadf14c680a82a917159712fa303038f5e8d4fd3b88675bd3 Do not show your private key to anyone! I am showing it to you because this is a tutorial and we're using the Testnet, however I will never store real cryptos using this seed :) Get the BTC address equivalent to R-BTC address The private key for your R-BTC address will be used to discover your Bitcoin private key, and use it in a wallet to get the BTC address also to transfer your BTC later. RSK has a tool to get your BTC private key in a secure way, on your desktop, without exposing your private key on the internet. So, let’s use it! If you already did the PegIn process, you had used this before. Go to . github.com/rsksmart/utils If you do not want to compile the utility, you can download the . I will use it. latest release Go to last release page and click on to download it build.zip I saved, unzipped it in and renamed to C:\RSK rsk-utils-build In the build folder, open index.html in your browser For example, my path is file:///C:/RSK/rsk-utils-build/build/index.html Enter your . RSK private key Select TestNet Click on the button. Transform Then you’ll get your BTC private key. In my example, the BTC private key is cTdrwp5UenJqFUrMV58sT9VwbpSmX8EMN2bZKU8QUpnDAbTi9aZp Remember: never share your private key! Here I am doing a tutorial, so I can share it only for educational purposes. Import your BTC private key on a BTC wallet I will use the wallet, which we explained how to download and installed it on the previous post, the part of . Electrum PegIn How to do Conversions Between BTC and R-BTC Using the Powpeg Protocol For example, I had it installed in the folder. Then I run: C:\RSK\Electrum electrum -portable.exe --testnet -4.0 .9 Choose Create new wallet Choose a new name, if you like it. For example, my wallet will be from_rsk Click the button. Next Choose , then click the button again. Import Bitcoin addresses or private keys Next Paste your private key and click on button Next For example, this is that I’m using in this tutorial: Define a password, if you would like to do it, and click on button again. Next And this is your new imported wallet from private key on Electrum! Get your BTC Address on Electrum Go to the third tab, . Receive Change the to . Expires after Never Click the button new address You will see a Bitcoin Testnet address like below. My BTC testnet address is: n1izvJX1RTXHaLyp6LWZKhuqbLK8919vpA You can check it out in the zoomed image: Wait block confirmations Wait 4000 RSK block confirmations and at least 10 more minutes. A block is confirmed on RSK Network in average, 30s, so you need to wait at least 33h20min more 10 minutes. This is equivalent to waiting 33h30min! Check balance of your BTC address Besides the Electrum, you can check your balance in - a block explorer for Bitcoin testnet Blockcypher For example, this is my tBTC in this tutorial: https://live.blockcypher.com/btc-testnet/address/n1izvJX1RTXHaLyp6LWZKhuqbLK8919vpA/ Final message In the previous post, you learn the part of Powpeg. How to do Conversions Between BTC and R-BTC Using the Powpeg Protocol PegIn Here I showed you how to do the : transforming your R-BTCs in BTCs. So now you know all the processes! PegOut I hope this tutorial has been helpful and I’d appreciate your feedback. Happy with this tutorial? Share it if you like it :) The end