paint-brush
RootStock - First Impression Through The Eyes Of A Front-end Developer And A Web 3 Laymanby@tomaszs
294 reads

RootStock - First Impression Through The Eyes Of A Front-end Developer And A Web 3 Layman

by Tom Smykowski September 18th, 2024
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Rootstock is the first and longest-lasting Bitcoin sidechain. It is the only layer 2 solution that combines the security of Bitcoin's proof of work with Ethereum's smart contract capabilities. The platform is open-source, EVM-compatible, and secured by over 60% of Bitcoin’s hashing power.
featured image - RootStock - First Impression Through The Eyes Of A Front-end Developer And A Web 3 Layman
Tom Smykowski  HackerNoon profile picture

Did you ever want to write software on the blockchain? For Bitcoin and stuff? Smart contracts? I did. But also going in this direction with the little time I have is quite challenging. But I know there are companies that seek Solidity developers and smart contract developers, so there’s a demand.


Would it be more interesting than moving stuff 1px left and right? It’s actually hard to say. I’ve never been into financial stuff; frontend development and design development are things I have been interested in most of my life. But you have to develop, they say. Also, Rootstock and HackerNoon made this contest where you can write an article and compete for a prize.


It’s the middle of September, the Round 2 ends on September 30, so I’ve seen there are already some great pieces on this subject. So rather, for my own benefit of curiosity satisfaction, I’ve decided to check out Rootstock. Will a Bitcoin-noob be able to do anything with smart contracts? Let’s see.


After navigating to Rootstock, we can go to the dev subpage that looks like this:


I went immediately to “Beginner to Web3” because I didn’t know too much about it. So first of all, what is Rootstock?


Rootstock is the first and longest-lasting Bitcoin sidechain. It is the only layer 2 solution that combines the security of Bitcoin's proof of work with Ethereum's smart contract capabilities. The platform is open-source, EVM-compatible, and secured by over 60% of Bitcoin’s hashing power, making it the gateway to a vibrant ecosystem of dApps that continues to evolve to become fully trustless.


There are some things that I don’t understand here:


  • sidechain
  • layer 2 solution
  • EVM-compatible
  • what does it mean it combines Bitcoin and Ethereum? Aren’t these like two blockchains?
  • what does it mean it’s secured by over 60% of Bitcoin’s hashing power?
  • what are dApps?
  • what is trustless?


It’s like being hit with a pan right in the face. But it isn’t unusual for Web3 projects to use unfamiliar words. So, let’s break it down. I’ve done some research, and here’s the result:

Sidechain

According to Wikipedia:


A sidechain is a designation for a blockchain ledger that runs in parallel to a primary blockchain.[73][74] Entries from the primary blockchain (where said entries typically represent digital assets) can be linked to and from the sidechain; this allows the sidechain to otherwise operate independently of the primary blockchain (e.g., by using an alternate means of record keeping, alternate consensus algorithm, etc.)


So, a sidechain is some stuff that is linked with blockchain. Not that hard after all. Let’s move further.

Layer 2 Solution

I’ve read about it here, and it appears that Layer 2 solution is something built on top of a blockchain. So, rather than doing stuff on the main blockchain, there’s something on top of that. It has some special features, but it uses the main blockchain. So, it’s like network layers I guess.

EVM-compatible

EVM stands for Ethereum Virtual Machine. It’s where smart contracts are executed. When something is EVM-compatible, it means it can run on various blockchains and layers. So, it’s like a standard to execute smart contracts.

dApps

Decentralized applications according to Wikipedia are:


decentralised application (DApp,[1] dApp,[2] Dapp, or dapp) is an application that can operate autonomously, typically through the use of smart contracts, that run on a decentralized computingblockchain or other distributed ledger system.[3] Like traditional applications, DApps provide some function or utility to its users. However, unlike traditional applications, DApps operate without human intervention and are not owned by any one entity, rather DApps distribute tokens that represent ownership.[3] These tokens are distributed according to a programmed algorithm to the users of the system, diluting ownership and control of the DApp. Without any one entity controlling the system, the application is therefore decentralised.


What it means is that the app is decentralized basically and uses blockchain to operate. So, there’s no administrator or someone who can pull the plug. The app describes who has control over what parts of the application, who can do what etc.

Trustless

Contrary to popular meaning, the word has other meanings in the Web3 world. It appears it means that there’s no third party required to operate.


After including all of these terms, we can form a new description of Rootstock:


Rootstock links stuff with Bitcoin blockchain. It uses Bitcoin security and Ethereum smart contracts. It’s open source. Can operate on blockchains supporting Ethereum Virtual Machine standard. It helps create decentralized apps that doesn’t require third parties to operate.


I don’t know if the new definition is anyhow better, but at least I know a little bit more now.


Further reading the documentation reveals there’s a process where you can take your Bitcoins, send them to Rootstock, and they will give you Rootstock Bitcoins. Also, you can give Rootstock Bitcoins (called Smart Bitcoins (RBTC)) and get regular Bitcoins back. This is called “powpeg” and “peg-in” and “peg-out.”


While you have Rootstock Bitcoins, you can execute smart contracts on them. It is done with Rootstock Virtual machine (RVM) which is, as I understand, EVM-compatible.


According to the documentation, it allows to run Ethereum DApps. Another interesting thing I’ve learned is that you pay gas for transactions in the RGTC blockchain. You can offer minimum gas, average, or more. Depending on this, your transaction can be rejected, may be fast, or slow. If your transaction gets rejected, you have to pay anyway. I think it’s how Web3 operates.


Also, what’s quite interesting for me is that in the case of smart contracts, you pay for opcodes that are like blockchain operations:


The document goes over how to save gas by writing good contracts. It’s quite interesting because it means optimizations to smart contracts can actually save v-money.


So yeah, that’s all I was able to learn about Rootstock today. I enjoy the documentation. The start wasn’t impressive, but with time, I find it really well written. Surprisingly, I got a bit more interested in this topic.


Cheers!