I’ve been working with various cryptocurrency technologies for the past few years. The two blockchains that interest me the most are Ethereum and Bitcoin.
The Bitcoin network is fascinating because of its community’s determination to make it the de facto currency of the modern world. Over the past decade or so we’ve all been witnesses to the currency’s meteoric rise and it’s not a currency that anyone easily ignore. More and more people are starting to use bitcoin as a store of value and it’s exciting to see.
The Ethereum network is even more fascinating because it is pushing finance to the next level. It was incredible that bitcoin became a viable alternative to store value along side the U.S. dollar (or any local currency for that matter), the Ethereum ecosystem wanted to bring the entire financial industry to the digital and permission-less world.
Ethereum has the ability to process code (i.e. smart contracts). Over the past few years, people around the world have come together to redefine what it means to do banking through Ethereum smart contracts. They are spinning up an open ecosystem of financial services and products that are accessible to anyone that has access to internet and a basic computer.
One of the largest use cases in the decentralized finance ecosystem is stablecoins.
Stablecoins are cryptocurrencies that pin their value to an external reference (e.g. the U.S. dollar). The price is achieved through having the stablecoin be collateralized or through an algorithmic mechanism. These cryptocurrencies were created because people interacting with the cryptocurrency economy needed a reliable way to store their value.
Collateralized cryptocurrencies can exist through fiat-backing or cryptocurrency-backing.
Fiat-Collateralized: This type of stablecoin has a reserve of fiat (e.g. U.S. dollar) to act as collateral for the stablecoin that is issued. Other collateral can include precious metals and commodities (e.g. USDT).
Cryptocurrency-Collateralized: This type of stablecoin is backed by cryptocurrencies like ether and bitcoin. Due to the volatility in the cryptocurrency market, these stablecoins are often collateralized more than a 1:1 ratio (e.g. DAI, sUSD).
Algorithmic stablecoins are tokens that do not rely on centralized systems or capital to determine its price. Developers and economists are defining new methods and techniques to have a stablecoin stay pinned against a certain price target.
An idea that I was throwing around last week was “what if I could launch a stablecoin that was pegged to one bitcoin?”. The idea became more and more compelling the more I shared it along with some of my colleagues. A few days later, I was neck deep in code, figuring out how to develop and launch something that acted as an algorithmic stablecoin that was pinned to the price of bitcoin.
I looked at projects by Ampleforth, Basis, and Empty Set Squad. Each team had a different way of developing a stablecoin that had a price target of around 1 U.S. dollar. I wondered if I could fork their codebases and spin something similar for bitcoin.
Some of the key concepts I borrowed from the teams included the following:
Rebasing: protocol alters the supply of tokens depending on a set condition (e.g. if price of token is above a certain value then increase the supply of the token).
Bond tokens: a token that represents a future claim on a stablecoin. Type type of token is typically auctioned off when a stablecoin is below a certain price (involved with multi-token solutions to stablecoins).
Price oracles: provides a signed price feed to an ecosystem that relies on prices of a certain asset (e.g. the protocol I was working on needed a price oracle for bitcoin).
Incentivized pools: liquidity pools are tokens that are locked in a smart contract. Pools are used to provide tokens for people who want to trade. Typically the smart contract takes a fee from people using the pool Additional incentives can be added for these types of pools (hence the term incentivized pools).
After figuring out the coding side of things I thought about deploying it and letting it run for a few days to observe how the code and protocol would behave if I left it up. Here’s how it went down:
“Hey are you building <TOKEN X>?”
I was casually browsing Twitter last weekend and then someone slid into my personal messages and asked me , “"Hey, are you building <TOKEN X>?”. They told me that they saw me pushing code that seemed like I was working on an algorithmic stablecoin for bitcoin. I confirmed the person’s hunch and told them that it’d be up and running in a few days. The person asked me to keep them posted.
As I continued to code and ask around in various community groups about various parameters of some of the smart contracts I was working on, more and more people started sending me personal messages. They were recommending various methods, asking me to keep them posted, and referencing me to additional groups for advice. It was an interesting experience because I hadn’t publicly shared my intent / goals / etc. for the project, but there were people all over the internet that were showing interest in the code I was pushing up to GitHub.
After finalizing the smart contracts I was working on and getting a simple front-end application put together for the project, I was ready to send the project up to the Ethereum blockchain. My head was spinning because there were a ton of things for me to think through and I was tackling this on my own (or so I thought).
When I laid it all down, here’s what I had to do:
Launch the smart contracts
Release the website for people to interact with the smart contracts
Create a Twitter
Message the community members that had expressed interest
Write a blog about the project’s goals and publish it
I started with step 1: launch the smart contracts. This was an intense experience. I had a handful of smart contracts that I needed to send to the Ethereum blockchain. I created a script that took inputs from one smart contract (after it was deployed to the network) and fed it to the next smart contract. Each contract that I sent up would cost a certain amount of cryptocurrency to pay for network transaction fees (i.e. ether, 1 ether was trading at around 1300 U.S. dollars at the time). The first time I tried to deploy, the script executed 1 of 10 lines and then failed. I started to panic because I wasn’t sure why the script failed.
I realized about 30 minutes after that the script didn’t fail but the connection that I had to the Ethereum blockchain was fickle. I decomposed the script I had and executed each line one by one. This slower approach allowed me to deploy the contracts without wasting more ether than needed. Eventually I managed to deploy all the contracts. The victory that I felt was short-lived.
What’s crazy is, as soon as all the contracts were up on the network, one of the community members messaged me and asked me if that was mine. Given that I was working on the Ethereum blockchain and all my code was public, the person was able to identify the project without me having to tell them anything. It was a surreal moment and I honestly felt my stomach sink because now I knew it was becoming real and I probably wasn’t ready for what was going to happen next.
I’m going to pause here for now! The days after that was the ultimate frenzy and I want to make sure that I capture the details as best as I can.
Stay tuned for the next article!