Skip to main content
MVP development
Create a top-notch MVP for your startup with us
> $1
billion the capitalization of our portfolio
120+
MVP for startups around the world

As a full-cycle software development company, we build the best minimum viable products ensuring your idea becomes a reality.

Learn more

Cardano 2022: Overcoming PAB Challenges to Achieve Competitiveness

cardano

Cardano (ADA) is one of the top 10 cryptocurrencies by market cap. Cardano is much more than a cryptocurrency. It is a scalable and sustainable blockchain platform for smart contracts launch . Cardano runs on a Proof of Stake Ouroboros consensus protocol. Moreover, it was developed on evidence-based research by the academic community of experts and software scientists. The goal of Cardano is to design a fully decentralized blockchain project, which is managed and funded by an e-voting system. Despite the benefits, the community criticizes Cardano for slow development. In 2021 Cardano launched several updates. As a result, they introduced the Plutus platform for writing smart contracts and announced its potential interoperability with smart contracts based on Ethereum. The article tells about these updates, the challenges we faced operating on Cardano and our solutions.

Every stage of Cardano's development is devoted to the specific problem solution. They are introduced in the blockchain development roadmap and named after the cultural figures of the past:

  1. The Byron era - Cardano foundation (2017)
  2. The Shelley era - decentralization (2020)
  3. The Gauguin era - smart contracts (2021)
  4. The Basho era - scaling (2022?)
  5. The Voltaire era - management (in progress)

Cardano developed the Plutus language and the Plutus Platform for writing smart contracts in the Gauguin era. Plutus is an innovative platform for building transactions. Also, it is a compiler of Haskell script code to the internal language of smart contracts. Like Ethereum (and even more efficient), it allows to design secure decentralized applications, new crypto tokens and smart contracts.

Plutus is built on the Haskell, functional programming language. Cardano has other languages, but Plutus is the fastest, cheapest and most secure. The developers, business experts and academic communities supervised the Plutus development. We can write any smart contracts using it. People with no technical background (but some expertise in business and/or finance) can create financial smart contracts on the Plutus platform using the Marlowe language (DeFi platform).

Plutus is part of the Alonzo hard fork, a long-awaited update of the Gauguin era, launched in September 2021. However, the platform still does not operate well, and our team faced several challenges.

Hook up with the PAB

The PAB is a server application that contains a smart contract and allows it to operate efficiently via WebSockets or HTTP requests. The PAB was supposed to deploy on a remote server or a browser, integrating with wallet applications.

So far, the PAB cannot interact with the Nami wallet and Yoroi browser wallet in the cloud or as a browser-based application. In this case, users need to set up a browser wallet such as Nami, Yoroi or CCVault. So, they will be able to receive and send transactions from the PAB hosted on the dApp provider node.

The problem is that the browser wallet is not flexible and can not send a transaction. It must be able to execute a Plutus script to do this. The Cardano team is working on a solution.

The PAB runs locally on the user computers (hosted PAB + WBE), and it is challenging to make a transaction. Every transaction party must have a full Cardano blockchain node, API wallet and the PAB. It is inconvenient, time-consuming and needs a lot of storage space.

For example, the developer wants to deploy Dapp to the cloud. Then, the wallet back end (WBE) processes each user's wallets and stores their private keys on the server. It processes the transaction, signs and sends requests from the PAB. This test model is not supposed to operate in the future as it does not correlate with the decentralized blockchain philosophy. Users should control their wallets, not the dApp entity.

Today Plutus' smart contract infrastructure is inefficient and user-unfriendly. Keeping it simple, we run contracts through the Command Line Interface (CLI) by signing the Cardano wallet. It is easier than using the hosted PAB with lots of problems that need to be solved. When the PABs can deploy on a remote server without a wallet, we will be able to talk about the efficient DeFi market on Cardano.

Stay out of my UTxO

Like Bitcoin, Cardano uses UTxO, but only in the extended EUTxO version (Extended Unspent Transaction Output). The UTxO is a registration and verification model, an alternative to Ethereum accounts and other blockchains. The UTxO is the transaction recording model, where every transaction has its inputs and outputs.

Let us look at the practical example. Tanya wants to send 5 tokens from her wallet to the PapaJohn's pizzeria wallet to pay for the order. Also, she needs to send 10 tokens to the wallet of Margo, her nail artist. Finally, she wants to send 15 tokens to Mark's wallet, her boyfriend. In this case, a transaction is a record of inputs and outputs information about money flow. At the input, Tanya's wallet uses one or more unspent outputs from previous transactions, where the total number of tokens is 30 or more.

This transaction has four outputs:

  • 5 tokens (for PapaJohn's wallet);
  • 10 tokens (for Margo's wallet);
  • 15 tokens (for Mark's wallet);
  • The unspent sum from the input (for Tanya's wallet), if the total amount of more than 30 tokens was recorded in the input.

These outputs can also be inputs for the next transaction.

In short, UTxO is a sum left from previous transactions. So, it can be used as input for future transactions. If it is still not clear, here is a video. After watching it, you will have no more questions about UTxO.

In Cardano, UTxO upgraded new features. In addition to sender address and transfer amount, EUTxOs contain Datum not carried by traditional UTxOs. It is additional data or state required for the Program operation. Data can be random and change on different EUTxO. At the same time, the data structure remains the same for a particular script.

We may need Datum for transaction validation because the transaction contains only the blockchain information with the incoming EUTxOs. For example, we want to exchange one token within a transaction. But, we need to get the exchange rate from an external source. This source sends its EUTxO to the transaction, which contains the exchange rate in Datum.

Also, wallets have an additional wallet backend structure. It allows them to process payments and facilitate off-chain code involved in on-chain code execution. Outputs are locked by validator scripts, and inputs are unlocked with redeemer scripts.

Before the Gauguin era, Cardano's UTxO model was criticized for the concurrency issue. Different algorithm units can perform simultaneously with the same smart contract. For example, an account-based blockchain allows multiple users to operate on one smart contract at once. DApp runs quickly and efficiently. So, in the case of shared state, concurrency can lead to deadlock or resource contention issues.

EUTxO can be used once and fully, so it is easier to validate the transaction. Unfortunately, when two or more parties try to use the same EUTxO, the system can not verify the transaction. In the case of smart contracts, many users interact with its protocol, so they will have to send a transaction several times. It will continue until the platform can include it in the block and process it. As a rule, it takes 1 to 20 seconds to start a new block.

The UTxO model is less vulnerable and centralized than the one account based on Ethereum. It is significant for decentralized DeFi platforms. So, developers pay much attention to the concurrency issue and try to solve it. For example, they build and control many UTxOs with different NFTs, which contain the same data. Moreover, developers store all transactions of the same UTxO into one block and process them together.

We can solve the concurrency issue through a centralized coordinator. However, the Plutus platform does not have a global state or "Cardano virtual machine" that will evaluate the system and connect all the Plutus smart contracts. It is not the only possible solution. IOHK offered to reach the maximum level of the concurrency. Developers should write codes to limit any conflicts. For example, it is necessary to avoid shared states and random dependencies.

The system needs to shift from concurrency to parallelism. Cardax also suggested a solution. They released the Streaming Merge algorithm, which delivers user actions into a single time-based stream and processes it through the converter. Cardax released the algorithm in a shared library, and everyone can access it.

Keep calm and scale on

One of the main reasons why blockchain has not won everyone's love and has not been introduced everywhere is the scalability issue. Users faced technology capacity limitations when the decentralized Bitcoin network launched. Since then, blockchain projects have been trying to solve this issue.

The problem origins are in the block propagation delay. Each new block needs time to get to the network nodes. If the information distribution takes too long, network segments will have different states. Finally, it will compromise the network integrity and endanger its security.

The larger the block is, the memory capacity is expanded respectively. The transaction chain will be faster as well. We can regulate the Cardano block size. The developers have increased the block size by 12.5% to 72 KB lately. Then, they increased it by 11% to 80 KB. Every block contains no more than 5 transactions (16 KB each). So, the next expansion will be done in an ad hoc approach. It seems that the developers will restrain it until a critical need.

If the block size increases rapidly, the number of people who can run nodes will decrease. However, large block processing demands powerful hardware, and big transactions require high commissions. As a result, a reduced number of full network nodes can lead to network centralization. Moreover, it will increase the number of orphan blocks and branch the network.

The Cardano chain efficiency is not high. The blockchain can process 257 transactions per second (TPS) max. In comparison, Bitgert processes up to 100,000 transactions per second and launches a new block in 15 seconds. However, Cardano's throughput is quite less. According to Sundaeswap, the average number of transactions for Plutus smart contracts is 0.15 TPS. It is a maximum of 12,960 transactions per day.

According to Tim Harrison, VP of Community and Ecosystems at Input Output Global, they plan network optimization for 2022. This work will help it scale and become more functional. Plutus will be updated in the Basho era, increasing Cardano throughput in June 2022. The main update is the Vasil hard fork, named after the Bulgarian mathematician Vasil Dabov. In April, Charles Hoskinson, Cardano Founder, announced the approaches to scaling Vasil. They are pipelining, new Plutus CIPs, UTXO on-disk storage and Hydra.

In particular, pipelining will speed up the block allocation and reduce block propagation delay. It will improve reference scripts that can reduce the transaction size and the cost of script execution. Moreover, pipelining will increase throughput. Cardano has also adopted RINA. It is a little-known network topology that resembles the torrent protocol. It introduces the Internet as a layer for nodes interaction and exchange of state information. Also, RINA allows us to add new networks, keeping them confidential and transparent.

Summary

  • Cardano is an open-source decentralized blockchain DApp development platform with layered architecture and verifiable smart contracts. However, after more than six years, it is criticized for its slow development and limited features.
  • We launched Plutus, the smart contract writing platform, but the PAB is not user-friendly. Developers run smart contracts via CLI through a local computer, expecting the PAB deployment on a remote server without a wallet. The server should synchronize with the test net, storing the chain index and the PAB databases. After that, the user can operate with contract endpoints by sending server requests.
  • One EUTxO allows you to withdraw a transaction only once. Users may face the concurrency issue while accessing the same UTxO. Some developers have already found solutions.
  • Cardano solves the scalability issue that is common to all blockchains. Trying to reach a better throughput and transaction speed, the developers increased the block size to 80 KB, launched the Vasil hard fork and adopted the RINA protocol.
  • Cardano solves the interoperability issue through sidechains.
Solana
New
TON_jettons
New
blocks
New
package_solution
Uma_protocol
Featured story
adsgram

How to Monetize Games on Telegram

Alexey Fedin

CEO at magnetto.pro

Articles

business
startup
TON
hamster_tap
Featured story
ggem
wine_vinesia
Featured story

Why Use Blockchain for Tokenizing Premium Alcohol

Elizaveta Chernaya

Brand Media Editor

Articles

ethereum
web3
business
dao

What Is DAO and How Does It Function?

Pavel Naydanov

Solidity developer

Articles

education
web3
l2
stacking_nft
Featured story
legendary_play
Featured story
payments
TON
sharding
Featured story
blockchain_top_companies
mvp_2024
launchpad

How to Successfully Create a Launchpad

Nico Bordunenko

Business Analyst at MetaLamp

Articles

web3
dApps
launchpad
aa zkp
Featured story
zksync
Featured story
rwa
Featured story
anonymus
Featured story

Zero-knowledge proof explained and 2024 Trends

Yevgeniy Biktimirov

Venture Analyst

Articles

ethereum
web3
dApps
cpay
Featured story
stock market chart
Featured story
planets
fundraising
Featured story
cto
wallet

How Account Abstraction Lowers Gas Fees in DApps

Nico Bordunenko

Business Analyst at MetaLamp

Articles

ethereum
web3
tokens
Featured story
rocketcomputer
Featured story

How to Create a Startup MVP Design in 7 Days

Julia Cherepanova

Head of Design Office

Articles

startup
MVP
design
crypto wallets
Featured story
speed up development
myths
Featured story

Myths About Blockchain Product Development Explained

Nico Bordunenko

Business Analyst at MetaLamp

Articles

web3
dApps
startup
mvp launching rocket
Featured story

Who Should Be on Your Team to Launch an MVP

Alexey Sukharev

Head of Sales Department

Articles

business
startup
MVP
galaxy
Featured story
magazine
Top_trends
cryptocoffee
investments
investors
squares

The First NFT Marketplace on Cardano: Our Story

Stanislav Zhdanovich

Haskell developer

Articles

cardano
web3
NFT
stair
bridge
abstraction

How We Use Our Training Program to Recruit Plutus Engineers

Svetlana Dulceva

The Education Program Supervisor

Articles

education
cardano
web3
mountains
computer in space

Discover Why IT Companies Appreciate Our Junior Developers

Svetlana Dulceva

The Education Program Supervisor

Articles

education
web2
business
salary
IT developer
cardano
chains
abstraction
salary

How to Effectively Motivate Developers

Roman Shtih

CEO Metalamp

Articles

business
purewhite
Featured story
rocket
a man with books
Featured story