With the future release of Goguen, Cardano – the first, third-generation blockchain to emerge from a scientific & peer-reviewed philosophy – will introduce smart contracts to the main Cardano blockchain. Specifically, developers will be able to write smart contracts for Cardano using Plutus.
What is Plutus?
Plutus is a programming language that allows smart contracts to be developed and deployed, and has been designed with three key audiences in mind that align with Cardano’s vision: developers, enterprises and academia. Today, anyone can deploy test contracts that are developed in the Plutus Playground – a lightweight, web-based environment to test smart contracts without maintaining a full development environment on the blockchain. The Plutus platform grants developers an unrivaled smart contract experience.
Plutus has been designed to be clear, concise and convenient. Most importantly however, Plutus is much safer than previous alternatives to smart contract development. Still, what exactly makes Plutus such a safe, secure programming language platform, and why is this important?
Why is Safety Important?
Safety is important as Cardano smart contract developers want to ensure their program does exactly what they want it to do without any side effects. This means minimizing the risk of errors occuring. Errors are common in many programming languages used on a daily basis. Cardano aims to minimize these errors so that the transfer of value via smart contracts is achieved with a high degree of assurance. This reduces the chance of loss of funds, unexpected problems, and unforeseen complications. While errors that occur in our favorite messaging apps or social media websites may result in our message not being sent or a picture not being posted, an error that occurs in a blockchain environment where valuable assets are on the line requires a higher degree of safety. In fact, EMURGO has also been supporting Syre – a tokenless invoice based protocol to make sending cryptocurrencies like ADA easy and worry-free for users by removing any concerns about confirming recipient wallet addresses through the dLab/EMURGO accelerator.
Safe Smart Contracts: A Functional Approach
Plutus is embedded in Haskell, the leading purely functional programming language. The reason for this is based on the idea that functional programming languages are much more suitable for secure and verifiable smart contracts than alternatives currently available in the blockchain industry. An important reason for this is the robust type system offered by Haskell. Types are designed to impose constraints that enforce correctness. The type system used by Plutus eliminates many of the errors that plague other programming languages. It checks that all parts of a smart contract fit together in a logically consistent, provably correct way.
A type system can be thought of as a system of painting in which an artist sketches out their art rigorously and determines what colors go where before they ever put a brush on the canvas. Rather than immediately beginning to paint, the artist takes the time to ensure all pieces fit together and transition well. In Plutus, this means that smart contracts are well-designed and thought through in advance.
While this requires more upfront work, developing smart contracts in Cardano comes with a later payoff: smart contracts are safer and easier to maintain into the future. The type system Plutus uses helps to eliminate errors, as the type system catches them before the smart contract is executed. This is in direct contrast to other smart contract programming languages, where errors may only appear when a program is run. Due to the high-stakes nature of executing potentially error-prone smart contracts, third parties are often employed to check the program to ensure correctness. With Plutus, there exists a more efficient & safer developer experience due to the built-in robustness of the programming language itself.
Safe Smart Contracts: On-Chain and Off-Chain Code
Through Plutus, both on-chain and off-chain code is based on the same programming language. A smart contract developer can use a single code base, which Plutus automatically divides into on-chain and off-chain code and packages for deployment. On-chain code is code that is executed on the blockchain itself. Off-chain code is code that is executed off of the blockchain, such as in a web browser. This feature of Plutus is much safer than current alternatives found in smart contract development today. It is common throughout the industry for smart contracts to be written in one language for the on-chain code and a second language for the off-chain code. Not only does this more than double the development time required, it also opens up massive security risks for smart contracts.
This is similar to a restaurant experience, where the chef and the waiter both play different roles in getting you the food you ordered. The chef who prepares the food and the waiter who serves it both need to communicate with each other to ensure what is ordered gets served up correctly. By generating both on-chain and off-chain code, Plutus provides a massive safety benefit for developers. The food, so to speak, is both prepared and served by the chef.
With Plutus, developers can be confident that their smart contracts will execute correctly. Cardano utilizes gold-standard, modern language research to guarantee a secure, full-stack programming environment. This environment is built on the pillars of the leading functional programming language Haskell, and all the benefits it brings. Cardano smart contracts enjoy a high degree of safety unrivalled in the blockchain & cryptocurrency industry.
EMURGO drives the adoption of Cardano and adds value to ADA holders by building, investing in, and advising projects or organizations that adopt Cardano’s decentralized blockchain ecosystem. EMURGO leverages its expertise in blockchain R&D as well as its global network of related blockchain and industry partners to support ventures globally.
EMURGO is the official commercial and venture arm of the Cardano project, headquartered in Singapore, with a presence in Japan, the USA, India, and Indonesia. EMURGO works closely with IOHK and The Cardano Foundation to grow Cardano’s ecosystem globally, and promote its adoption. Learn more about the project at https://emurgo.io
Follow EMURGO on Social Media
- Official Homepage: emurgo.io
- Twitter (English): @emurgo_io
- Twitter (Japanese): @Emurgo_Japan
- Youtube: EMURGO
- LINE: @emurgo
- Telegram: EMURGO Announcements
- Facebook: @emurgo.io
- Instagram: @emurgo_io
- LinkedIn: @emurgo_io
About Yoroi Wallet & Seiza Explorer