Demystifying the Cardano “ghost” chain

Crypto Cutie
BLOCK6
Published in
8 min readJul 6, 2022

Cardano is one of the most disputed blockchains, gaining extreme love or extreme hate. The love comes from Charles Hoskinson’s loyal community who believe in the technology, the academic approach and (I believe) have gained substantial benefits from Cardano’s rise. The hate comes mainly from outside the Cardano community. They say it is a ghost chain — late to the smart contract and no lively ecosystem. Working in the Cardano ecosystem gives me a comprehensive view of its strength and weaknesses. I consider myself to hold a neutral view on Cardano. This article is fact-based and with my observations inside and outside Cardano. I use real-life analogies to translate Cardano’s obscured technical concepts, hoping to demystify them also to non-technical readers.

UTXO vs ACCOUNT MODEL

The first thing I should talk about is the uniqueness of Cardano’s model, which explains its competitive advantage and why it is late to the party in dapp development. Cardano uses an Extended Unspent Transaction Output (eUTXO) model to manage transactions. eUTXO is based on Unspent Transaction Output (UTXO ), the same model that Bitcoin uses. While Ethereum and EVM chains use the Account model. How are they different from each other?

Example: I have $100 and I need to give my friend Lynn $20. Lynn already has $30.

In the UTXO model, things work like cash. The $100 I have is a banknote, I give it to the transaction. The transaction’s output is giving Lynn a banknote of $20, and I get back a banknote of $80.

The Account model works like the bank account balance. The system deducts $20 from my account and adds $20 to Lynn’s account.

In the UTXO model, every transaction has Input (the $100 banknote) and Output (Lynn’s $20 banknote, and my $80 banknote). Every Input should be spent as a whole. You can’t tear apart a banknote. The total balance of Input equals that of Output. The Outputs can be used as new Input in the new transactions. Assuming my purse is an input, when making a purchase, I must give my entire purse in the transaction even though there are banknotes, coins, business cards, and bus tickets — things not relevant to the purchase. The merchant takes some banknotes from the purse and gives me back all that were not spent.

The UTXO transaction is what happens in smart contracts on Cardano. This model imposes challenges in developing smart contracts because it is not as intuitive as Ethereum. In the Account model, you can send a smart contract script to an address, and it stays there for people to interact with. The script’s state is updated by each transaction. In the UTXO model, you cannot update a script’s state, you can only add or delete. When someone interacts with the script, it is spent and gets removed. This means you need to repost the script in one of the outputs for the next person to use.

In practice, the “banknote” in the example is the wallet address. Every transaction generates new (associated) wallet addresses, so it keeps the privacy of the wallet owner. Unlike the Account model, the same wallet address is used in all transactions. It is rather straightforward to track a wallet’s activities. On Cardano, it is only possible to know a wallet’s all associated wallets if the wallet is staking. If not, you can be sure about your privacy.

Parallelism

Now I make another story about Lynn.

Lynn has a banknote of $20 and one of $30. She is taking her daughter out for a walk. Her daughter wants to buy ice cream, and Lynn needs to get a bunch of flowers. Lynn gives $20 to her daughter so that she can go to the nearby gelateria herself; meanwhile, Lynn stops by the flower stand to get the flowers. They do it in parallel at the same time. This is Cardano.

What if Lynn has no cash and only a card that day? To satisfy her and her daughter’s needs, she will first accompany her daughter to the ice cream and then go to the flower stand. Or in a reversed order. Not both can be done contemporarily. Each task needs to be done one after the other. This is Ethereum.

Cardano allows parallel execution of transactions that Ethereum does not. In Cardano, each UTXO’s state is fixed (the daughter has $20, Lynn keeps $30, and each amount is fixed). Therefore, you can validate multiple transactions in parallel (the daughter’s $20 is independent of the $30 that Lynn keeps; their spending does not interfere with each other ). In Ethereum, however, the transaction processing is sequential (first buy ice cream, then flowers, or vice versa). Because Lynn’s bank account balance should be updated after each transaction and then can be used for the next transaction.

Determinism

In the context of transaction processing, determinism is the ability to predict the impact and outcome of a transaction locally (off-chain), before the actual on-chain execution of the transaction. In the UTXO model, the state is “local”, meaning the UTXO has a fixed value and cannot be changed (Lynn’s $30 and her daughter’s $20 banknote). In an account-based model, the state is “global”, meaning the balance is constantly updated. Cardano makes off-chain predictability possible because of the “local state” of UTXO. When a user submits a transaction, due to the “local state”, it is explicitly declared how the outcome should look after the transaction is accepted. This makes off-chain predictability possible. Suppose the desired outcome of a user’s transaction cannot be reached. In that case, the order will be rejected, and the user will pay no transaction fee. Ethereum cannot make off-chain predictability because the global state could change between when you submit your order and when your order is executed.

To best explain determinism, let me compare eating at a canteen vs dining in a restaurant.

Cardano is a canteen. When you stroll around the canteen, you see the available plates and pick the ones you like. Once you’ve picked the plates, you are sure that you will be able to eat them and know how much you will pay. All of these are known before you pay at the cashier.

Ethereum is a restaurant. When you get seated, the waiter comes to take your order. You order a plate of spaghetti bolognese. But later, the waiter may come back and say: I’m sorry, but spaghetti bolognese is not available anymore. It’s sold out. Would you like something else?

Now you may get angry. Why do other guests’ orders precede mine? The restaurant has a maximum quantity of bolognese sauce a day. Who comes first gets the plate. The remaining amount of bolognese sauce is changed (in this case, reduced) after each dish is made(global state). When multiple waiters take different guests’ orders, they need to take the orders to the kitchen to confirm a dish’s availability.

The fact that others’ orders precede yours usually happens when others have paid a higher gas fee in Ethereum. Higher gas fee enjoys higher priority because the miners gain more profits. While on Cardano, the transaction fee is determined. There is no possibility of bidding a higher fee for getting the priority.

In Sintesi, in Cardano you can either get your desired result or nothing at all. In Ethereum, you may get a different result from what you expected.

Cardano’s concurrency

Concurrency is multiple actors’ ability to progress on a task without interfering with each other. Ethereum is good at concurrency, and Cardano is less.

In the Account model, the “global state” of the accounts (wallet addresses) and their balances are updated with every block. Ethereum allows multiple users to transact with a single smart contract in a single block. This perfectly suits the needs of various defi protocols.

In the UTXO model, a UTXO can only be spent once means that only one person can interact with a smart contract per block (which is every 20 seconds). Once a user has interacted with a UTXO, the UTXO is removed and replaced with an updated UTXO for the next block. Still, only one person can use the smart contract in each block. Only one will get the spot when multiple users try to make transactions to a smart contract. The others will see order rejection instantly. This creates high congestion and frustration. Dapp on Cardano needs to make a new design to mitigate congestion and allows a reasonable degree of concurrency. Several Cardano defi projects have designed and executed their solutions. You can have a collective view here.

I summarize a common point among these solutions: inserting a middle step between submitting an order and order execution. The middle step assumes different functions in different protocols. But its main objective is the same — collecting users’ submitted orders and sequencing them for execution.

Imaging two scenarios. The first is a group of uneducated kids trying to get on a bus. Only one kid gets through the gate at a time, and those that fail fall to the ground, total chaos. This is a Cardano dapp without a concurrency design. The second scenario is with the presence of a teacher that organizes the kids in a queue, so each one of them can effectively get on the bus. This is a Cardano dapp with a concurrency design.

The future of Cardano

I think Cardano has a very bright future. If it cannot reach in the short term, it definitely will in an extended long term.

Cardano is unique. It has a hard time attracting developers to build because of the difficulty and non-mainstream Haskell language. On top of that, even Haskell developers building in Cardano are facing constant challenges in delivering the dapps. The dapp ecosystem in other chains is light years ahead of Cardano.

I’m interested in the Cardano projects that try to create a new thing that does not exist on other chains yet. What Cardano builders have to offer should be a new paradigm of web 3, rather than re-inventing the protocols already running somewhere else.

Cardano ecosystem is the one that has most projects thriving on solving real-life problems, such as housing, environmental issues, digital identity, etc. Other chains were/are focusing on defi innovations. In summary, their most famous protocols are DEX, lending, or trading — money-driven. Cardano can be the blockchain that gives birth to the next disruptive web3 applications connecting to people’s lives.

Contents distributed by Learn.Block6.tech

👉 Discord — Live Talks

👉 Twitter — Latest articles

👉 LinkTr.ee

--

--