There are an endless list of buzzwords that have been circulating in the media, daily conversation, and Reddit threads about blockchain and crypto over the last few years: DeFi, mining, wallets, altcoins, decentralization, NFT, DApps, smart contracts, distributed ledgers, ICOs, POW, POS...
But if you're like us, you don't like buzzwords and ambiguity is the root of all evil...you want to know what it really means and how it actually works.
If you're a software developer or curious about the technical implementation of blockchain and cryptocurrency, this blog is for you. My name is Roberto Zubieta and I'm a blockchain engineer for Admios.
A Brief History
The original Bitcoin Whitepaper was released more than a decade ago and it sparked worldwide enthusiasm.. The original concept of a distributed ledger, basically just a distributed database, was pretty simple. However, in the past 10 years, there have been many changes and iterations that improved on the original concept. Back then all these networks could do was keep a ledger of accounts and transfers. But as developers realized you could validate other kinds of data inside the transactions, new features such as executing code or offering disk space as part of the consensus mechanism (more about this later) were developed. These new blockchain networks have become very powerful and versatile opening up a wide variety of possible applications.
The following three presentations demonstrate the capabilities of these new tools in order to create a blockchain of your own, write a smart contract, and create your own crypto coin.
What You'll Need
Some resources to help anyone who wants to start developing their own DApps (Decentralized Applications) and follow along with the demonstrations:
- Cryptozombies.io is a great tutorial for learning about the Ethereum ecosystem
- An ethereum wallet. Metamask is the most popular choice for software wallets.
- A solidity development environment: Truffle or Hardhat. Truffle is the most popular environment, and is the one used in cryptozombies, but for the presentations I used Hardhat.
- An IDE: In this workshop I used Visual Studio Code, with a Solidity Language plugin. But another popular alternative is Remix (remix.ethereum.org), which is an entire IDE designed for smart contracts that runs inside a web browser.
- Infura: a public Ethereum Node. Instead of running your own Ethereum node you connect to Infura's nodes to interact with the chosen network.
Building on the Ethereum Network
On day one we deep dive into the crypto world. How it looks in 2021. How Bitcoin, Ethereum and other networks work. How they enable Smart Contracts and how those Smart Contracts allow a new generation of applications to exist, like NFTs. And the world of Decentralized Finance (DeFi) applications that has been built on that foundation, a network that already holds billions of dollars in financial instruments.
Writing Your Own Smart Contract
On day two I write a Smart Contract in Solidity for use on the Ethereum Blockchain and upload it to the Rinkeby Testnet. That contract stores a message in the blockchain itself, and allows anyone to read it and to change it. And once the contract is uploaded to Rinkeby I interact with it via a Web Frontend, written in ReactJS and NextJS.
Happy Coin to the Moon!
On the third day we ran a mock ICO (Initial Coin Offering) for a new cryptocurrency running on top of the Ethereum Blockchain, an "ERC-20 Token" called Happy Coin. I uploaded a website where the conference participants could stake Ether to a Staking Smart Contract and join the waiting list. Meanwhile I wrote a small contract for the Happy Coin token and uploaded it to the Rinkeby Network and plugged it into the Staking Smart Contract. And when I declared the ICO over I ran the Staking Contract and had it mint new Happy Coins for everyone in the waiting list. Those tokens appeared on all their wallets: the participants could start to pay each other with Happy Coins. Finally, I attempted to modify day 2's contract to have it accept Happy Coins as payment whenever someone posts a new message.
I hope these demonstrations have given you a foundation to start experimenting with blockchain on your own.