Cardano blockchain

Gepubliceerd op 7 augustus 2022 om 11:31

Cardano has been one of the most popular crypto from the moment it launched. After years of research, the project is starting to take shape. Currently, it is already possible to run smart contracts on the Cardano blockchain. This allows Decentralized Applications (Dapps) to be run on the Cardano blockchain. Cardano is not the only one that can run smart contracts. Ethereum also has smart contracts.

What is Cardano?

Cardano is a crypto project that has been worked on for a long time. This is partly due to the amount of research that has been done before they started realizing it. That is why it is said that Cardano is the blockchain of academics, given that almost everything is based on mathematical theories.

Now you might be thinking that several other projects are also based on mathematical research. That's right, so what makes Cardano so special? Cardano is a blockchain that will compete with blockchains like Ethereum (ETH).

Why did it take the Cardano team so long to start building their own blockchain? It's because the Cardano team wants to have solved the problems of Bitcoin and Ethereum before they would run into those problems themselves. As a result, they did long and deep research before they started building the Cardano blockchain.

A well-known problem of blockchain is scalability. As included in previous blogs, many blockchains run into this problem. Bitcoin and Ethereum can process far fewer transactions per second than the Credit Card companies. Given the popularity of this crypto, the network could crash due to the large amount of transactions the network has to process. That means the network could be congested. This increases transaction costs.

Ethereum can solve such problems, but they often have to come up with updates. Given the size of the network, it is not easy to make updates. The network has to agree to this. If it doesn't, forks occur. Forks are easy to solve, but they also have their drawbacks. As a network you want to prevent forks. It is easier to deal with the problems from the beginning.

How does Cardano work?


For example, the Solidity programming language is used in programming the Ethereum blockchain. The developers of Cardano use the programming language Haskell. There is no one programming language you must use to program. Haskell is considered one of the most secure crypto programming languages available.

It is obvious that security is important. This is true for any blockchain. Should a programming language not be secure, hackers can easily find exploits and corrupt the blockchain. This can cause the crypto running on this blockchain to quickly become worthless. 

Besides Solidity and Haskell, there are other programming languages on which a blockchain is programmed. These include Python, Golang, C++, C#, Vyper, Rholang and JavaScript. These are well-known programming languages that are widely used by developers to program a blockchain.

Haskell example code

Bedtime story generator

This generates a "random" bedtime story:

stories :: [String]
stories = do
let str0 = "There once was "

str1 <- ["a princess ", "a cat ", "a little boy "]

let str2 = "who lived in "

str3 <- ["a shoe.", "a castle.", "an enchanted forest."]

let str4 = " They found a "

str5 <- ["giant ", "frog ", "treasure chest " ]

let str6 = "while "

str7 <- ["when they got lost ", "while strolling along "]

let str8 = "and immediately regretted it. Then a "

str9 <- ["lumberjack ", "wolf ", "magical pony "]

let str10 = "named "

str11 <- ["Pinkie Pie ", "Little John ", "Boris "]

let str12 = "found them and "

str13 <- ["saved the day.", "granted them three wishes."]

let str14 = " The end."

return ( str0
++ str1
++ str2
++ str3
++ str4
++ str5
++ str6
++ str7
++ str8
++ str9
++ str10
++ str11
++ str12
++ str13
++ str14

main = do
let len = length stories
putStrLn ("Enter a number from 0 to " ++ show (len - 1))
n <- readLn
putStrLn ""
putStrLn (stories !! n)


Cardano's blockchain is programmed with Haskell (see above). But Cardano's smart contracts are not. If developers want to create smart contracts, developers must use Plutus as their programming language. This programming language is also developed by Cardano itself so developers need to master two programming languages. 

This may be a reason not to continue programming with Cardano. Developers do not want to learn a new language that can only be used in Cardano. Rather, developers want to learn a programming language that can be applied in multiple blockchains, such as Solidity. Why is Cardano sticking with Plutus as its programming language?

There have been many occasions when a security hole was found in Solidity and it was hacked. Solidity is often used to build smart contracts. Because hacks occurred in the Solidity code, developers had questions about the security of Solidity. Also, this does not do Solidity's reputation any favors. So Cardano has a good reason not to use Solidity to write smart contracts code but rather its own programming language - Plutus.

Plutus can be used to write complex smart contracts. But the disadvantage of Plutus is that it is an incredibly complex programming language. In addition to offering a faster and more secure alternative to bitcoin and Ethereum, Cardano also wants to offer to create more secure and complex smart contracts. This will allow more applications to be built that can be innovative. Such as more and more complex DeFi (Decentralized Finance) applications. 

Marlow/Blockly: Dapp for all!

No experience or knowledge of programming smart contracts/decentralized applications? No worries! Cardano has Morlowe. Marlowe is a platform built on top of Plutus and Haskell.

Using Marlowe, you can drag and drop blocks to put together an application. It does take some technical knowledge, but you don't have to be technically inclined. Basic knowledge of coding is required though. With some time and effort you can build an application yourself! 

By dragging blocks yourself, it will be automatically converted into a Plutus code file. When you're done, the Plutus code is linked to the Cardano blockchain. Then others can use your own built application.

Did you get curious? You can build your own application on the Cardano blockchain through Marlow here. Have fun! 

Plutus core

How is it ensured that the blockchain can handle such complex smart contracts? It is done with Plutus Core.

Plutus Core is the programming language that ensures that smart contracts are linked to the Cardano blockchain. Smart contracts programmed with Plutus are in fact very complex. This of course has many advantages, as it allows developers to create sophisticated applications. However, it also causes the blockchain to be heavily loaded.

The Plutus core ensures that the smart contracts are made somewhat simpler. As a result, it takes less power to be able to run the smart contract on the blockchain. Because less power is required, more transactions per second can be processed on the blockchain. This is a major scalability advantage.

If you don't do this right - the smart contract takes a lot of power to run - it will cost you speed and scalability. You can use multiple blockchains side-by-side to share the computing power. But this is often not practical. 

Because less computing power is required and the blockchain can become more scalable, this will reduce transaction costs. This is because the blockchain will then have enough space to handle the many transactions.

Ouroborus: consensus mechanism

Each blockchain has its own consensus mechanism. Bitcoin has the Proof of Work and Ethereum the Proof of Stake. Cardano has a consensus mechanism based on the Proof of Stake consensus mechanism. The consensus mechanism Cardano uses is called Ouroborus.

Because Ouroborus is based on the Proof of Stake, transactions on the blockchain can be verified without using a lot of electricity and computing power, which is required with the Proof of Work. The Proof of Stake/Ouroborus allows users to ''stake'' crypto. The more a wallet owns ADA (Cardano's crypto), the more likely it is to be allowed to process the transaction on the blockchain. Suppose you have 1 ADA and you have 'delegated' it to a a 'stake pool'. These are ADA holders who have united their ADA into a stake pool. The more ADA in a stake pool, the more transactions the pool can process which means the stake pool also gets more transaction costs as a reward.

Ouroborus: epochs

In short, an epoch is a 5-day pay cycle. The owner of ADA can stake ADA into a staking pool. The more ADA a pool has, the greater the chance that that staking pool can verify a transaction on the blockchain and thereby receive a reward in more ADA. The ADA never leaves the wallet of the respective users. The owner of ADA retains 100% ownership of its staked ADA. This epoch process is completed every 5 days. After each epoch, you will receive a reward in ADA credited to your ADA wallet. The estimated APY (average per year) is 4.5% to 6% per year. But this also depends a bit on the staking pool in which you have staked your ADA.

By using the epoch calendar, you can easily see exactly when rewards will be paid out if you have staked ADA. Rewards are received by users who have staked their ADA. You do not need to do anything else, other than stake ADA in a stake pool.

Reactie plaatsen


Er zijn geen reacties geplaatst.