ERGO Deep Dive: The Road to Top 10 Cryptocurrency
If you are like me you understand that the move-fast-and-break-things approach that plagues the cryptocurrency ecosystem is detrimental to long term sustainability. The basis for my strong belief in Ergo and Cardano comes from their approach to code implementation: research twice, implement once.
Charles Hoskinson once said he believes Ergo to be a top 10 cryptocurrency project. The community surrounding Ergo have been hanging on to that statement ever since. Today we hash out perspectives as to why that is possible and why a multi-billion dollar Ergo might be right around the corner.
The Ethereum Miners Perspective
An overly simplistic explanation of EIP-1559: its the restructuring of Ethereum's gas-management and monetary system to improve the UX by introducing the BASEFEE (BF) mechanism. The BF mechanism is at the base-layer which removes third-party price suggestions, and is based off the utilization of the Ethereum network.
These BF's do not go to the miners. If you want to pay for a quicker transaction you can tip the miners similar to CashApp or Venmo ‘Instant Transfer’ utility. The BF's are burned and therefore create deflation.
This disincentivizes miners to participate in the ecosystem because they are less profitable which effectively prices out GPU miners for ASIC miners, falling closer and closer to centralization. This will drive a number of miners to projects that will protect its interest on the protocol level and bring that project considerable growth.
Ergo is well positioned to attract these miners with Autolykos v2, a PoW algorithm built by Ergo that implements progressive memory-hard computation which make it ASIC resistant.
In June when EIP-1559 passes this will provide a home for non-industry miners who have been essentially priced out of Ethereum's mining mechanism. That’s not to say industry-grade miners wont also have a home here as well, because they too will be out of a job once Ethereum 2.0 comes and transitions to PoS.
The Consensus Perspective
It is fundamentally true that above all other consensus mechanisms, Proof-of-Work is the most rigorously well-tested and studied. Its also true that PoW can enable centralization by super-efficient or pooled mining resources, but Ergo has preemptively solved these issues with Autolykos (learn more in the forum).
Ergo will also have on-chain voting that can address issues such as energy-consumption as network usage grows.
As an aside, this isn't to say that a Proof-of-Stake mechanism is inferior to PoW, or even superior.
For instance, a PoS mechanism is open to Byzantine attacks from distributed systems and malicious coordination between validators because coins are inextricably linked to network security.
Cardano has solved these issues with Ouroboros, but there is still the issue of network siphoning when financial products from DeFi protocols begin offering more attractive instruments than the inflation rate from staking rewards.
The point here is mainly that all consensus protocols can be improved upon, and just as Cardano has done with PoS, Ergo is doing with PoW.
It is beneficial to recognize that PoW and PoS is not a zero-sum game. They are both growing on non-linear trajectories rather than having superiority over each other. One could look at Autolykos as a superior PoW model to Bitcoin, just as one could look at Ouroboros as a superior PoS model to PeerCoin.
In the end, it's wise to invest in both trajectories — and we believe Ergo is doing a superior job than most in the PoW space.
The Scripting Perspective
To understand how transactions are handled under the hood of Ergo we must take a brief peek under the hoods of Bitcoin and Ethereum.
Bitcoin uses what is called BitcoinScript. BitcoinScript is a stack-based scripting language that works in FILO (first-in-last-out) which means when transactions occur the necessary scripts stack on top of each other and execute from top to bottom.
The person who initiated the transaction needs to prove that certain statements in the transaction are true for the transaction to execute. This means validation happens on-chain, i.e. by each full node in the network.
BitcoinScript does not allow for the notion of state, which means there is no knowledge of the current global state of transactions, instead they reference previous transactions.
For example, when a user wants to know their wallets account balance, the wallet doesn't have full knowledge of the state of the blockchain. Instead, it follows the linked transactions all the way through the blockchain and adds up all the unspent transaction outputs (UtxO) and displays it to the user.
In essence, it only has the state of those linked transactions.
Ethereum uses a smart contract language of its own design called Solidity. Solidity is an object-oriented language with a stack-based execution environment that executes on chain. But, unlike Bitcoin, also allows for Turing-completeness.
That means a Solidity smart contract can solve any algorithm or problem but with one caveat, it gives no guarantees regarding how long it will take or how much memory it will use.
How do they prevent bad actors from writing malicious programs that eat up network space? Create a pay wall in the form of gas fees. This decision, without thinking far into the future, gives us the really high gas fees we are experiencing now (some reaching as high as a single $ETH, currently valued at $2,380).
I can hear you now, "Wait, so you're saying gas fees aren't inextricably linked to validating transactions on a blockchain?"
Yep, that's what I'm saying — crazy right?
Now, what if there was a way to combine first principles from Ethereum and Bitcoin in a way that allowed Turing-complete smart contracts, notion of global state, and no gas fees?
A scripting language that is robust enough to support things like loops, recursion and DoS prevention, ErgoScript is proven to be Turing-complete compatible while also using the UtxO model like Bitcoin.
Now, I say Turing-complete compatible because the scripting language is complex enough to allow for programs to be overlaid on top of those scripts in a Turing-complete way.
This means we can now estimate with accuracy the script complexities themselves before execution, eliminating the need for gas fees. Yes, no gas fees.
ErgoScript will also allow for the implementation of another novel and intuitive design concept: extended unspent transaction output, or EUtxO. EUtxO provides the solution for BitcoinScript's lack of global state awareness. This means at any point a smart contract or user can access the latest global state of the blockchain without the memory-hardness of Ethereum’s accounting model.
The DeFi Perspective
The decentralized finance perspective requires some in-depth research into the stablecoin and DEX landscape as a whole, so while this section may be lengthy, bare with me. It is important to build a foundational understanding of the space to better understand Ergo's unique position in DeFi.
We break this section into 2 main pillars:
- StableCoins & the AgeUSD Protocol
- Decentralized Exchanges & Automated Market Makers
Speculators and investors alike cycled out of altcoins and into Ethereum, Bitcoin and cash, some never to return again. As regulations and sentiment shifted in favor toward the big stablecoin protocols like Tether (formerly RealCoin) and USDC, the option to sell your profits into a stablecoin and earn a yield became useful.
It's my prediction that this current bull-run will not see the exodus to cash much like we did in 2017 but a shift to stay within the crypto ecosystem via stablecoins.
As it stands, the current stablecoin environment is broken into 4 pillars:
To understand the nuances, its helpful to get some real-world examples of each:
Tether ($USDT) is an example an off-chain collateralized stablecoin as it is pegged to the dollar deposited in central banks.
The un-collateralized algorithmic stablecoin narrative is building momentum as its counterparts have notable flaws. Off-chain fiat collateralized stablecoins are counter-intuitive to the ethos that underpins the crypto industry, yet they currently dominate.
They are also subject to centralization, counter-party risks, and regulatory constraints which was tangibly evident in the latest round of regulation bouts between the SEC and Tether.
MakerDAO ($DAI) is an example of an on-chain-collateralized stablecoin as it is backed by deposits of other cryptocurrencies.
On-chain-collateralized stablecoins also have major flaws which stem from the volatility of the crypto markets. This volatility can cause events much like Black Thursday, a massive liquidation event in the MakerDAO protocol due to the black swan liquidity crisis caused by Covid-19.
Absolutely colossal amounts of ETH were liquidated from MakerDAO vaults with ZERO auction-bids (i.e. free ETH due to network congestion), oracle price discrepancy, and the sharp Ethereum sell-off. The amount of ETH gamed from MakerDAO from ‘keepers’ who took advantage of the volatility in a non-competitive auction is equal to $130 million dollars with today's current ETH prices.
Uncollateralized stablecoins are typically smart contracts on the blockchain and therefore require an oracle to feed data to the smart contract to govern the algorithms, which leaves them open to manipulation.
NuBits ($NBT) is an example of an un-collateralized stablecoin as its price is stabilized via algorithms that respond to price volatility.
In the interest of brevity, let's simply say these are mainly experimental.
AgeUSD protocol is an example of a hybrid stablecoin that is algorithmically stabilized and collateralized on-chain (i.e. crypto-backed).
But, before we discover how the novel AgeUSD protocol works I would like to preface that AgeUSD is not a solution to all the above problems. But, using sound mathematics instead of dynamic transaction handling, AgeUSD aims to provide a higher assurance alternative than existing counterparts.
With that said, we believe it's a serious contender in the pursuit of true stablecoins in the cryptocurrency space. Because of that, we look deeper into what it has to offer and why its uniquely positioned to work well on the Ergo blockchain.
AgeUSD takes a hybrid approach in a design model that focuses on key concepts from traditional finance and legal compliance. Remember, Ergo aims to be a platform for financial smart contract applications, it is in their best interest to develop their suite of products in a legally compliant way.
AgeUSD’s hybrid model is also the first of its kind with two pillars from which the protocol stands on; the stablecoin itself (SigmaUSD) and the reserve coin (SigmaRSV).
SigmaUSD is the first and only algorithmic stablecoin to run on the EUTxO model.
SigmaUSD distinguishes itself from other crypto-backed stable coins like MakerDAO by not implementing collateralized-debt positions (CDPs). These CDPs leave MarkerDAO users susceptible to untimely forced-liquidations from unstable price thresholds that are vulnerable to blockchain congestion.
So how does AgeUSD work differently?
Let’s say a user wants to purchase SigmaUSD with their ERG token (this will work the same way with ADA as well, when supported). They would send their ERG to a smart contract and the smart contract would use an oracle to determine the exchange-rate from your ERG to SigmaUSD. As the smart contract is sending out the SigmaUSD stablecoin to users, it is simultaneously building up a reserve of ERG.
How do price fluctuations in ERG affect the reserves in the contract when users who sell their SigmaUSD and get their ERG back?
First, it would be correct to assume that if the price of ERG went up after you sent them to the smart contract, you would receive less ERG back when you exchange them back for ERG. You would also be correct to assume that if the price of ERG went down after you sent them to the smart contract, you would receive more ERG.
But, wouldn't that mean the reserves would be subject to shortage? Yes, but the novelty of the protocol lies in the introduction of SigmaRSV, an incentivized alternative in which a user on the ERG blockchain can choose variability over stability by providing liquidity to the reserves of the SigmaUSD contract.
A user will be able to purchase SigmaRSV with their ERG token (this will also work the same way with ADA, when supported). By purchasing SigmaRSV the user is sending their ERG to the SigmaRSV smart contract and an oracle determines the exchange-rate from your ERG to SigmaRSV token.
The SigmaRSV smart contract will then link the dollar value of the ERG tokens within the contract to the SigmaUSD smart contract and allow the equivalent SigmaUSD to be minted for users of the SigmaUSD contract.
This creates an interesting dynamic where holders of SigRSV who provide liquidity to the SigmaUSD reserves will benefit in opposition to SigmaUSD users when ERG price fluctuates. Put more plainly, when ERG token prices rise a SigmaRSV holder benefits, whereas a SigmaUSD holder does not — and vice versa. Another incentive for SigmaRSV holders is that they will receive rewards from transaction fees within the AgeUSD protocol.
Stability vs. Variability
For a more concrete example, if Alice enters into SigmaUSD with $100 dollars worth of ERG and mints the exchange-rate of SigmaUSD – as close to $1 dollar as possible – and Bob enters into SigmaRSV with $100 dollars worth of ERG and mints the exchange-rate of SigmaRSV and the price of the $ERG token then goes up, the following will happen:
- Alice, who wants to sell her SigmaUSD for ERG, will use the SigmaUSD she previously minted – hypothetically $100 dollars worth – and purchase the ERG token at a higher price, therefore receiving less ERG.
- Now there is more ERG in the reserves because Alice could not afford to purchase the same amount of ERG she originally minted SigmaUSD for.
- The SigmaUSD smart contract holding the ERG that Alice could not afford to buyback is now called by the SigmaRSV contract holding the ERG exchanged for SigmaRSV by Bob when Bob wants to sell his minted SigmaRSV.
- By diluting the supply of the ERG he deposited to the contract he can purchase more ERG with the same minted SigmaRSV with a net gain. This works in the opposite way if prices drop.
This novel dynamic provides an ecosystem of stability and variability through game-theory, math, and incentives. This disables susceptibility to blockchain congestion which consequently nullifies the ability to force-liquidate liquidity providers (LPs) with zero competition.
The AgeUSD protocol is one of the most long-term sustainable approaches I have come across to date, but only if the ERG token has reached its full market potential and is less prone to market volatility. I suspect this will come simultaneously with the maturation of the crypto market as a whole.
Decentralized Exchanges (DEX)
The introduction of automated market makers (AMM) has brought the use of decentralized exchanges (DEX) to the forefront of the crypto industry and has been the catalyst for the recent decentralized finance (DeFi) movement.
An AMM is an algorithm that allows participants to partake in trading and swapping cryptocurrencies in a trustless environment. This is done by participants providing liquidity to liquidity pools in a trading pair like ETH/USDT, with algorithms in smart contracts acting as the buyer for exchanges to be made.
This replaces the need for orderbook-based exchanges where a market maker orders buy and sell orders based off price and outside influence.
An AMM has the advantage of providing liquidity to fragmented markets and illiquid assets as long as there are liquidity providers. The disadvantage is when there aren't liquidity providers, slippage and impermanent loss from arbitragers pose significant threat to both exchange users and liquidity providers.
Also, because most DEX’s like Uniswap, 1inch, and Bancor run on Ethereum (and as we discussed earlier, due to Ethereum’s design approach, are subject to the massive fees that come with it) small traders are priced out. Large traders are also prone to high fees from slippage as well.
Order-book based DEX’s are way too prone to manipulation like wash trading, order book front-running, and pump-and-dumps because they cannot be regulated like centralized exchanges.
With that being said, order book based DEX’s do thrive if the market is liquid enough because transaction fees are low compared to AMM’s, regardless of the blockchain it is run on.
ErgoDEX is another testament to the power of the EUtxO model as it will allow both AMM and order-book based exchanges using liquidity pools.
This can't be done with the account-model or the barebones UtxO model as there is no notion of state across blocks. This will allow ErgoDEX to utilize the advantages of both models, and because of its design architecture will benefit from very low fees as gas is not intrinsic to computation in Ergo.
ErgoDEX will also support seamless atomic swaps (swapping tokens across blockchains), without the use of wrapped assets, gateways or trust-based bridges.
If that wasn't enough, the DEX will also support buyback orders to reduce exposure and risk for ICO/IDO investors. This approach allows investors to set block-times representing the amount of funds the token issuer can utilize in a given period and allowing investors to buyback their investment if they are unsatisfied.
This is another novel development from Ergo.
All of these facets — stablecoin protocols, AMMs and DEX offerings — position Ergo to be radically equipped to solve many of the current DeFi pains currently plaguing the crypto space.
The Oracle Perspective
As it stands the current market for oracles has been largely cornered by Chainlink, a cryptocurrency project that blossomed from the 2017 ICO boom. Chainlink captured the first-mover advantage by introducing the ability to bring data outside of the blockchain to be utilized in a variety of ways via a smart contract and sits at a massive valuation of $13.4 billion dollars at the time of writing.
It's important to note that the founder of Ergo, Alex Cherpunoy, helped develop Chainlink with Sergey Nazarov and Steve Ellis when the project was still called smartcontract.com.
Before that, Cherpunoy was creating the frameworks for DEX’s and tokenized assets before Vitalik Buterin even came out with the Ethereum whitepaper. It goes without saying that Cherpunoy is one of the most experienced developers in the entire blockchain industry and is more than capable of understanding the importance of oracles to decentralized finance.
Chainlink set the standard for oracles in blockchain but over time has highlighted many issues within the oracle space. Currently, oracles can be considered private entities that provide data for blockchain users in a trusted manner – which does not satisfy the argument for decentralized design. This framework of trust in data-feeding oracles has led to doubt of data reliability both in terms of accuracy and posting schedule.
The partnership between Ergo and Emurgo finds it too important that oracles not rely on centralized sponsorship and instead be designed to bolster public participation. Within the oracle pool framework, unlike existing oracle providers, all data handling happens on-chain. This means that data is not paid for using a separate utility token like Chainlink, but rather the blockchain’s native token which provides simpler economic incentives.
The way this happens is by utilizing the UTXO model in which an oracle pool, which has multiple oracle providers within, will post their data inside of a UTXO to a smart contract that aggregates all the oracle providers data.
The smart contract will average all the data points and produce a UTXO with the final datapoint and post it to the blockchain for anybody to use for the cost of a transaction fee. This is separate than traditional “pay-to-play” oracle provider models. It also opens the door for economic incentive as data providers within an oracle pool have a pledge to the pool that can be taxed if that data provider provides bad data or fails to provide any data. This model allows for so much more flexibility than existing oracle providers by enabling governance, strict posting-schedule via an epoch-based program, and democratized data finality.
This novel mechanism is the gateway for oracle providers to produce cheap off-chain data that will actually enable traditional financial smart contracts to be written in a cost effective way, allowing traditional financial companies to be more profitable.
Summary: Code Twice, Implement Once
Much like Cardano, Ergo has spent the past few years with their head's down researching and developing the most elaborate and beautiful foundation for a smart contract platform in the entire cryptocurrency ecosystem.
With developers like Robert Kornacki and Alex Cherpunoy at the helm — building a framework that will support a full suite of novel financial smart-contract products for the traditional world, both retail and enterprise alike — Ergo is finally stepping out from their dimly lit coding rooms and into the mainstream.
With the core development having mostly been finished, the cries from loyal Ergo investors for marketing and exposure is now being answered. Now that you know just how revolutionary the technology behind Ergo is, and the problems it solves, prepare yourself for its eventual entrance into the top 10 cryptocurrencies.