Before talking about Hiro, we have to cover a few things first:
- What a blockchain is
- What a blockchain application is
- What Stacks is
- What role Hiro plays in this story
Let’s start from the beginning.
The Double Spend Problem
There was a problem in computer science called “double-spending,” which describes the potential of a single digital asset to be spent more than once. For example, let’s say I have 3 dollars in cash. I give you 2 dollars, leaving me with a balance of 1 dollar. I can’t physically spend my 3 dollars again because my balance is just 1 dollar. No double-spending.
However, on the internet, that double spending problem takes on a different meaning. Who is to say whether I sent you a digital dollar? Maybe I just copy/pasted that dollar and sent you a duplicate, leaving me with that same dollar in my wallet too (double spending it). To get around that issue, we trusted a central entity (like a bank or PayPal) to verify transactions and dictate the balance of any given account.
The big blockchain revolution came in 2009 with the arrival of Bitcoin. Bitcoin was the first implementation of a blockchain where, for the first time, the public could verify transactions of digital assets without the need for that central entity. If I have 3 Bitcoin in my wallet, and I send you 2 of them, then we could trust technology and cryptography to update our wallet balances instead of trusting a bank.
An explanation of how Bitcoin works is beyond this article's scope, but I’ll go through the bare minimum so you can follow along with the rest of the story.
What Is a Blockchain?
A blockchain is an open and decentralized database. A database is just data held in a computer. This blockchain database is open, meaning anyone can access it and anyone can read it, at any time. This database is also decentralized, meaning that it stores information across a distributed computer network, instead of on a single device.
Each blockchain has a consensus mechanism, a way in which this distributed network agrees on what new information is written on that database, ensuring that the data is true and therefore trustworthy. Bitcoin’s consensus mechanism is called Proof of Work (PoW).
In a PoW network, the people verifying transactions (the new information being written to the database) are called miners. These miners compete with each other by expending effort to solve an arbitrary mathematical puzzle. Since solving this puzzle is very hard, miners invest in fast computers and electricity, and as a reward for their actions, the network pays them Bitcoins.
So, a Bitcoin is a reward that the network gives to miners to thank them for verifying transactions. These transactions are verified in batches, or blocks. These blocks are mined periodically and strung together, as if they were a chain. Hence: blockchain!
I know this isn’t easy to grasp, and it’s ok if you don’t get it. At this point, you just need to understand that blockchain technology allows doing trustless and decentralized transactions. We trust technology and a network of miners instead of a single entity like a bank.
At this point, you just need to understand that blockchain technology allows doing trustless and decentralized transactions. We trust technology and a network of miners instead of a single entity like a bank.
If you want to learn more about blockchains, I highly recommend this video that explains how bitcoin works in straightforward terms.
What is Web3?
Bitcoin as a technology is, by design, very limited. Bitcoin is a ledger, and you can only read transactions between accounts in the Bitcoin database. For example, Account A sent this amount to Account B, Account B sent this amount to Account C, and so on.
Web3, also known as a user-owned internet, is an internet where users own all of their information.
In 2009, a Russian-born Canadian developer by the name of Vitalik Buterin was deeply involved in the Bitcoin community and thinking about ways to expand the functionalities of Bitcoin. How could Bitcoin be more than just a store of value? Since Bitcoin is limited by design to just be a ledger, he couldn’t. So he created a new blockchain called Ethereum, which introduced the concept of smart contracts for the first time.
A smart contract is a computer program that runs on a blockchain. This ability makes a blockchain programmable, and it opened the doors to what we call today “Web3.”
Web3, also known as a user-owned internet, is an internet where users own all of their information. Today it manifests in two forms: DeFi, or decentralized finance, and Dapps, or decentralized applications.
DeFi aims to remove third parties and centralized institutions from financial transactions where we can replicate any financial instrument that exists “in real life” in the blockchain. Think about stablecoins, lending platforms, swappers exchanges, yield farming, etc.
Dapps are applications built on a decentralized network that combines a smart contract and a front-end user interface. Similar to a regular Web2 application, but with a dapp, the data and user information belongs to the user, not to the app.
That’s the vision of Web3: we can create a user-owned internet where the financial information and data of users belongs to those individual users.
Now that we covered, at a very high level, what blockchain and Web3 are, let’s talk more specifically about Stacks.
What Is Stacks?
Stacks, like Bitcoin or Ethereum, is a blockchain, and like any other blockchain, it has a consensus mechanism, so users can trust each other by trusting the network.
Stack’s connection to Bitcoin introduces programmability to BTC, extending Bitcoin’s functionalities to be more than just a store of value.
As I mentioned, there are many consensus mechanisms: Bitcoin’s is called Proof of Work (PoW), Ethereum’s Proof of Stake (PoS), and Stacks’ consensus mechanism is called Proof of Transfer (PoX).
I’ll explain how PoX works on a very high level. For a deeper explanation, please check out this article.
PoX is a mechanism in which miners use Bitcoin (BTC), a PoW coin, to mine Stack (STX). Every miner bets an amount of BTC, and whoever gets chosen will verify the transactions in the next block and earn a STX reward.
Let's say you and I are miners. I bet 3 BTC, and you bet 7 BTC. This means you have a 70% chance of winning the next block, and I have 30%. With those chances set, one miner is picked randomly, and the winner gets the right to mine the next block, verify transactions, and earn the STX reward that the ecosystem pays.
BTC introduced into the system by miners gets distributed to Stackers. Stackers are people that lock their STX for a period of time, securing liquidity to the ecosystem. Here is more information about Stacking. Of course, this system has many nuances, and you can read the white paper for a complete picture.
The thing that is essential to understand here is that Stack’s connection to Bitcoin introduces programmability to BTC, extending Bitcoin’s functionalities to be more than just a store of value.
A transaction on STX will use BTC as a settlement layer. Stacks adds programmability to BTC, since an application running on Stacks would use STX as their gas money (to pay for the transaction) and BTC as the settlement layer.
Bitcoin is by design just a ledger. Stacks is the programmable layer that extends BTC to be more than a “digital rock,” adding functionality and enabling Bitcoin's true potential.
Today, there are numerous projects in the ecosystem, including the Stacks Foundation, which builds and funds programs that grow the ecosystem, as well as DeFi projects, like ALEX and Arkediko, and NFT projects, like Gamma and Megapont.
Editor's note: if you're curious to learn more about Stacks, watch this conversation to get a great high level overview of the ecosystem and why the future of Web3 will be built on Bitcoin.
Let’s look next at Hiro’s role in the Stacks ecosystem.
What Is Hiro?
Hiro, the company I work at, is a developer tooling company that aims to help developers create Stacks applications.
By using Hiro tools, a developer can convert their Web3 ideas into actual businesses.
Think about it this way: if the mission of Stacks is to create a user-owned internet, where users have ownership of their data, both financial and personal, then Hiro’s mission is to make the best tools to allow developers to create this user-owned internet on Stacks.
Hiro helps developers build Web3 apps with a variety of different tools:
- We’ve established that blockchains are databases. Sometimes developers might need to query that database to find information or perhaps write new information to that database. We make that easy for developers with the Stacks API.
- If you’ve taken away anything from this post, it might be that blockchains are a complicated technology. There are a lot of moving parts. Developers need to handle encryption and decryption, user authentication, data storage, and more. We offer an SDK (a package of code) that offers a lot of basic functionality developers need to build a blockchain app. That SDK is called Stacks.js.
- Developers need an environment to write and test their smart contract code. We offer that environment with Clarinet.
- Users, whether they are miners, developers or investors, need to understand and visualize what is happening on the blockchain. We develop and maintain the Stacks Explorer, which gives visibility into blockchain activity.
It’s ok if you don’t fully understand what these tools are, just know that by using these tools, a developer can convert their Web3 ideas into actual businesses and help create a user-owned internet. If you’d like to learn more about Hiro, visit our website.
Sound Interesting? You Can Be a Part of It
My favorite thing about Hiro is the people I get to work with. It’s a driven team full of some of the kindest and smartest people I know, and we all work together to build a better digital future while innovating with some fascinating tech in the process.
If you’re interested in blockchain and enabling developers to build a user-owned internet, check out our careers page.