Solving What Satoshi Couldn’t Solve
Charles Hoskinson recently said that concurrency, and smart contracts on a UTXO model, was the problem ‘Satoshi couldn’t solve’. Here, we look at the history behind this decade-old debate.
September 12th is going to be an eventful day in the cryptocurrency industry. It will turn what was supposed to be a relaxing Sunday into a day long-awaited by many Cardano supporters and detractors alike. On this day, the Plutus Smart Contract language for Cardano goes through the Alonzo hard fork, and projects and users will finally be able to implement and run smart contracts on Cardano.
Cardano’s initial release in September of 2017 is now culminating with the implementation of Plutus smart contracts, but this exciting feat of technological and academic prowess has raised many technical questions as the clock continues to tick down towards smart contract-Day. Many people, from ‘hodlers’ of ADA to detractors of the project and its vision, are questioning what this world of Cardano smart contracts is going to look like — in development for many years and finally about to make its debut.
This article takes a markedly different approach to the current discussions happening around the account-based vs. eUTXO model, and the supposed issue of ‘Concurrency’. Instead, we hope to encourage a new mindset when thinking about Cardano; as the Alonzo hard fork not only marks a change in the Cardano blockchain, but it should also give rise to a new way of thinking among new and existing Cardano supporters.
We’ve already published a fairly detailed article discussing concurrency which can be found here, moreover, there are plenty of other articles put out by teams like SundaeSwap which discuss the issue here; or educational YouTubers like ‘Army of Spies’ who have and continue to cover issues like this here. Nonetheless, we’ll briefly cover the eUTXO model underlying Cardano, we will recap the concurrency problem, and from there we will build upon the ideas put forth by Charles Hoskinson in his most recent video here and look to the future of what smart contracts entail for the entire Cardano ecosystem. Finally, we’ll explore why projects like ours, Occam.fi, are helping lead the way in that domain.
So please, get comfy, get a cup of coffee or tea and let us help you discover why this is going to be one of the most exciting and instrumental phases in the evolution of Cardano and the cryptocurrency industry as a whole.
The cryptocurrency zeitgeist is dominated by two schools of thought: the UTXO model as exemplified by Bitcoin and the accounts model as exemplified predominately by Ethereum. These two models, as well as the multitude of hybrids and alternatives that exist in the industry, all seek to solve or at the very least address, “The Blockchain Trilemma” as pictured below.
The blockchain trilemma is the primary problem all serious blockchain projects should be focused on solving, and contains three primary factors. Firstly, security represents the platform’s ability to guarantee the immutability (i.e. inability to change) of the information which is placed or stored on its platform, as well as its resistance to attacks. Security can be affected by various means, from the way in which information is loaded, stored, and used on the platform to the number of active participants engaging with the network, security like the rest of the points on the above chart is an umbrella term for a variety of things.
Following security is decentralization, or how the platform manages to delegate responsibilities among the many participants of the platform. One of the fundamental principles of blockchain is a trustless environment in which any individual can indiscriminately participate. The more decentralized a platform is, the higher the number of possible participants that can exist within the system to assist in the consensus process — thus alleviating the chance of malicious actors being able to take over the platform.
Finally, there is scalability, which also happens to be the focal point of many projects within the 2021 crypto industry. Scalability refers to the platform’s ability to handle large amounts of transactions and users while still maintaining a reliable response time. Scalability is often looked at when platforms are compared to companies like Visa, which can handle around 24,000 TPS. This should give a straightforward look at the blockchain trilemma and now allow us to discuss the two models which dominate the current approaches to solving the problem.
The UTXO Model
The UTXO or ‘Unspent Transaction Output’ model of account is the idea put forth by Satoshi Nakamoto in his original whitepaper: “Bitcoin: A Peer-to-Peer Electronic Cash System”. This model kick-started the entire crypto-currency industry and is easily understood by the figure below.
You can think of the UTXO model like a wallet filled with different denominations of fiat currency. You may have coins, $1, $10 . . . $100 bills, etc., but what’s understood is that all of these are ‘Unspent Transactions’, which are distinct and can be individually manipulated.
This system, as implemented by Bitcoin, does exceedingly well in solving the issues of security and decentralization as the network is secured by miners, who independently verify and reach consensus. Although arguments can be made that large mining companies dominate the space and leave it open for actors to potentially gain control of the system, to all intents and purposes, Bitcoin does a very good job of approaching the first two issues of the blockchain trilemma — just not the third, scalability. Bitcoin, as it’s currently designed, is not in a position to compete with chains or even companies handling multiple hundreds to thousands of TPS.
The Accounts Model
The accounts model, as popularized by Ethereum, does away with the distinctness and clarity of these transactions and instead treats money in wallets as a ‘liquid’ resource which is essentially fluid in composition — meaning spending money comes down to simply pouring the money out of your wallet as you might pour milk into a glass.
As most will be aware by now, Ethereum does come with some setbacks, as its entire system is founded around state transitions. Since the EVM is a global state machine, while the mechanics of ‘pouring liquid money’ is easy to understand, this does affect the totality of the Ethereum ecosystem with burdensome state transitions that can cause painfully high gas prices. All of these points have been addressed in our previous article here.
Ethereum, as it is now still a proof of work blockchain, shares the security and decentralization aspects of Bitcoin — but it also shares its scalability consequences. It is yet to be seen how the upgrade to Ethereum 2.0 will change many of its current features but as of now, it shares the same approach as Bitcoin to solving the blockchain trilemma.
Cardano introduces the concept of the eUTXO, which is based on the datum, redeemer, and validator, and their inclusion in Plutus smart contracts. The datum is arbitrary data included inside the UTXO, and is essentially the internal state of the transaction. The redeemer is the ‘what’ of the smart contract and is used to activate the purpose of the contract. Lastly, the validator is the conditions under which the UTXO can be utilized and plays a secondary role in ensuring whether the new state is correct. Cardano can best be thought of as the next evolution of the Bitcoin blockchain, as it takes the system put forth by Satoshi Nakamoto and expands upon that with eUTXO functionality and imbues it with the power of smart contracts innovated on by Ethereum.
Cardano, and its multistage effort to gradually identify the most efficient answer to the blockchain trilemma, has one of the most probable chances of solving it in the long term, although many chains are trying to vie for dominance in the short term. Cardano has finally made it to the realm of smart contracts and all of the pieces are in place to build more upon these solid foundations as we look forward to scalability and governance in the upcoming development phases.
Warming Up for the Big Game
The cryptocurrency industry is all about developing innovating new ways of solving problems that have plagued society as well as looking to the future for new directions to expand this useful technology into, all of this to say that as builders in the industry we look forward to, and expect to meet challenges and do our best to surpass them and continue moving forward, the issue of concurrency is no different than any other obstacle faced by the industry or just by Cardano, as all of the other problems we’ve solved the ‘Concurrency Problem’ will be answered.
Concurrency is essentially the ability of actors in a system to all access, contribute to or interact with the same object at the same time. In our previous article, we used the example of a vending machine being able to process two lines of customers and dispense two selections at the same time as being an example of concurrency.
Ethereum is able to handle concurrency in a relatively reliable manner, gas fees aside, because of the platform being structured in a fashion where the entire EVM is one giant global state. Actors are all able to access the smart contracts concurrently, Alice and Bob can all swap ETH -> USDC on Uniswap by interacting with the exact same smart contract, but it suffers quite significantly when large amounts of actors begin to try to access the same thing concurrently. For example, look at minting NFTs on Ethereum, where users could end up spending hundreds of dollars on gas alone just to mint an NFT.
Cardano’s use of the eUTXO models contrasts Ethereum’s bloated global state by inserting state into every single one of the UTXOs floating around on the Cardano blockchain, thus it cuts down on the noticeable bloat (fees) from the end-user perspective when interacting on Cardano. The tradeoff of this is that when interacting with Plutus smart contracts agents must ‘consume’ the contract and the consumption of the contract creates issues, as other agents aren’t able to interact with the contract at that time. This ties back into Cardano’s determinism — when you interact with its smart contract you know exactly what you’re going to get on the output side. Many hundreds of transactions can be performed per block, but in order for multiple agents to interact with the same contract, developers must think critically about developing means for said agents to interact in order to avoid concurrency issues.
Some Cool Cats — Minswap
On the 1st of September, 2021, the Cardno Public Testnet hard forked into the Alonzo era. Soon after, an up-and-coming decentralized exchange ‘Minswap’ debuted their testnet on the 3rd of September, as the first dApp to deploy on Cardano. While the Minswap team worked hard and achieved the great accolade of becoming the first dApp for Cardano, they also inadvertently became the first hands-on experience for many users of the concurrency problem; and through no fault of their own attracted a wave of attention that rippled throughout the entire cryptocurrency industry. While users were impressed with Minswap’s interface, the highly anticipated ‘Concurrency Problem’ was for the first time on full display, and some actors used these perceived problems to attack Cardano. However, these detractors have an incomplete picture of the novel approaches that many projects are taking to circumvent the concurrency problem.
The error pictured above was encountered by many of the people trying to interact and swap test tokens on Minswap’s demo, and gave fuel to the fear that current modes of thinking, applying Ethereum’s account model to Cardano’s eUTXO model, would result in concurrency issues among other things.
However, many participants in the ecosystem need to take a step back and understand what a pivotal moment this is for the Cardano blockchain as a whole. Minswap is the first of many dApps that are making its way into the ecosystem and building with the new tools provided by Plutus, and it is certainly going to take time to take these first iterations and refine them into stellar products that will eventually out-compete and out-service their Ethereum counterparts. Projects like Minswap should be applauded for their willingness to go forward and be the first dApp to deploy.
Minswap is providing answers to one of the many questions people in the Cardano ecosystem have to the DEX question, and as we will outline below, there are plenty of other projects ready to answer the call and deploy their solutions in parallel. Let’s explore a few here.
SundaeSwap is another DEX that’s getting ready to debut on Cardano. As mentioned in their whitepaper, as well as the most recent article on their Medium channel, they already have a working solution planned; and although it hasn’t been fully revealed, they outlined two potential solutions: an order book model DEX, and a DEX that has fractured liquidity pools.
Maladex is a DEX project that prides itself on being research driven, as well as building to accommodate some very interesting ideas within the DeFi realm from a decentralized hedge fund to a synthetics protocol on top of its basic DEX offering. Maladex has plans for a variety of things and they too have found a novel workaround for the concurrency dilemma, and will eventually make their code open-source for others to innovate on. Found here.
Occam.fi and OccamX
We at Occam.fi have already outlined in a previous press release here that we have also reached a two-phase solution that will be implemented when we roll out our DEX (OccamX). The first phase will address the problem of concurrency on the front end with some centralization on the back end, followed by our second phase which will then completely decentralize the system. So, concurrency will be avoided when it comes to using the OccamX DEX.
Our decentralized exchange is going to be powered by the OCX token, not to be confused with the current OCC token. OCX enables users to participate in the governance of OccamX. Participating allows users to vote on DEX system parameters, project listings, and upcoming DEX improvement proposals. The OCX token will play a key role in liquidity provision on our platform, and OCX tokens will be distributed to OCC token holders according to their stake and the length of time that they have staked OCC tokens.
The Demo Heard Round the World
The Minswap team did a brave and admirable thing, they chose to be the first project to launch on the testnet, becoming the first dApp to go live on Cardano, and with that came a flurry of attacks from all across blockchain. The current problem-flavor of the month is concurrency but many who aren’t builders in the ecosystem fail to realize that this issue is the first of many that will be overcome by successive Cardano projects, we’re only halfway through the roadmap, and obstacles like this will continue to be surmounted as we continue to progress.
As holders and supporters of Cardano, we should expect to see uproar and noise similar to what was elicited by Minswap’s demo constantly and throughout the process of Cardano growing to its position as a leading smart contract blockchain. We should be looking forward to projects that are taking steps into deeper waters and exploring areas we’ve previously been unable to, enacting positive change within Cardano and the wider blockchain ecosystem.
Charles Hoskinson’s Insights
Charles Hoskinson recently published a video highlighting some extremely important things going on behind the scenes and some of the important research continuing to happen. In regards to Minswap and their demo, it’s important to realize that we’re starting with something like ‘Bubble Sort’ and gradually learning how we can improve our designs as we become accustomed to the new Plutus environment. We need to change our mindset and focus on building in a Cardano-native space.
Ethereum and Solidity smart contracts have basically dominated the scene since their debut back in 2014 as a result all of the modes of thinking about and writing smart contracts have been centred around Ethereum and how to implement them in an accounts model environment. Obviously, Cardano being a eUTXO model, stands in contrast to the Ethereum way of doing things, and so it seems only reasonable that people are going to have to shift their mindset in order to properly put together Plutus smart contracts for Cardano.
Furthermore, Cardano continues to widen the gap between itself and competitors, like Ethereum, by the very nature of the design principles that it was founded upon. Looking at Ethereum 2.0 and how the entire blockchain is going to shift towards PoS at some point in the near future, as well as all of the potential L2s that are built on top of Ethereum, Optimism, Arbitrum, Polygon, etc, it becomes apparent that there is a variety of ideas and solutions that are being built to ‘fix’ Ethereum. Now that’s not intended to disparage the work of the Ethereum foundation and the developers in the Ethereum community, it’s just meant to show the realities of getting a product to market as soon as possible and its consequences.
Cardano has and will continue to be meticulous, detail-oriented, and focused on rigorous engineering proofs to give credence to the work it’s doing and the systems that are being built. Where solutions to Ethereum’s scaling issues are being rolled out in a reactionary manner after the network is being used, Cardano is already looking at different solutions for its own L2s and planning for them now. dcSpark’s Milkomeda protocol is being built to act as a sidechain of Cardano, which is able to replicate the virtual machines of popular chains in the market today, Ethereum, Solana, etc. At the same time, IOHK is publishing papers and developing Hydra, another L2 solution focused on scaling to meet the needs of thousands of potential TPS, these two are but a few of the many things being worked on to propel Cardano to the spot at the top of the blockchain hierarchy, and for it to be able to best solve the blockchain trilemma.
But, for all of these things in development, we as members of the Cardano ecosystem need to divorce our thinking from the constraints laid upon us from experiences on previous blockchains. As we build on a new model for smart contracts, we need to be open to novel ways of doing things and constantly experimenting and testing the bounds of our knowledge.
Occam.fi Leads the Charge
Occam.fi’s mission as a launchpad and project incubator for Cardano is to take our investor network and expertise for building on blockchain, to work in tandem with IOG and its mission to develop Cardano. We see the problems being encountered by projects building on Cardano and seek to answer them by helping projects and teams come together and produce products that are able to solve the challenges faced in the present and continue to build for tomorrow. This is evidenced in our approach to solving issues through our in-house engineering talent, and also our sponsorship of community-led Cardano hackathons.
The focus of the article is this: Cardano is continuing to deliver on its promises, Cardano is continuing to evolve and innovate in the space, and it’s now up to us as builders to adapt to a new Cardano-focused way of thinking to discover and solve all of these new problems unique to Cardano.
By doing this, we will ensure that Cardano becomes the blockchain that underlays the world’s operating system. In the meantime, smart contracts are almost here, and it’s going to be a lot of fun!