Словник

Plutus (Cardano)

Hard

The scripting language used on Cardano blockchain for smart contract development.

What Is Plutus (Cardano)?

Plutus is one of the most important components of Cardano that enables the creation of smart contracts and decentralized applications (dApps) on Cardano.
Smart contracts are automated contracts that can be used to exchange money, property, shares, or anything of value in a transparent way while avoiding the services of a middleman.

Plutus is an advanced programming language that allows developers to write smart contracts on Cardano in a functional way. It is based on Haskell, which offers a unique combination of top-notch security and high performance.

Developers will be able to create dApps (decentralized applications) using Plutus and Haskell, then run them on the blockchain securely and efficiently.

Plutus was born out of the desire to have a clear, intuitive and consistent language for writing smart contracts on Cardano. It has been specifically designed to interact with a blockchain. It is based on Haskell, which is a general-purpose functional programming language that has been around for decades and is widely used in industry and academia. It's a statically-typed, purely functional language with a strong type system.

Plutus programs run in two different environments:

The first one is a blockchain node, where your financial contract will run when it will be submitted by someone who wants to use it;

The other one is your desktop computer, where you can write and test your contract locally before submitting it.

A contract has no state other than the value of its bound variables. It can read and write data to the ledger, but cannot store any information locally. The only way to change the outcome of a contract based on changing inputs is through recursion because there are no loops or variables in Haskell.

The value of each bound variable appears in the output of the transaction; in addition, a contract can return a list of events to record in the blockchain's event log.

Contracts aren't allowed to interact with external resources outside of the blockchain, so they're much easier to verify and reason about than traditional smart contracts.

In fact, Haskell has long been used for writing critical financial software like the Barclays trading platform and the Bloomberg terminal. 

The reason Haskell is such a good fit for financial programming is that it allows you to build large systems in a principled way from small components. For example, Plutus contracts are written in a subset of Haskell — a subset that is functionally pure and has no side effects. This means you can be certain that if you give your contract the same input data, it will always produce the same output.