What is Plutus?
Plutus is a platform that brings together DeFi products and applications on the market today.
The project allows users to compare and find the best loan interest rates of different properties.
Plutus was founded in 2018 by a team based in the British Virgin Island.
To implement the EUTXO model, it is necessary to clearly define the terms script and data. Scripts require a definite, well-specified scripting language, and it is also important to define the type of data that is attached to outputs and used as redeemers.
This is where Plutus Core comes in. Plutus Core is the scripting language used by Cardano. It is a simple functional language similar to Haskell, and a large subset of Haskell can be used to write Plutus Core scripts. As a contract author you don't write any Plutus Core. All Plutus Core programs are generated by a Haskell compiler plugin.
These scripts will be executed by nodes during transaction validation ‘live’ on the chain. They will either lock UTXOs in the form of validator scripts or as minting policies, which control the minting and burning of native tokens (see below).
Redeemer data is a simple (algebraic) data type that can be defined easily in Haskell, which is another reason why Haskell is a good option for writing Plutus Core scripts. In practice, a smart contract developer will write validator scripts in Haskell, which will then be automatically compiled into Plutus Core.
Appropriate Haskell libraries simplify such validation logic by providing core data types for the inspection of transactions during validation, and by offering many helper functions and higher level abstractions, allow contract authors to concentrate on the business logic and not have to worry about too many low -level details.
The Plutus Application Framework (PAF)
The on-chain state of validator scripts can only be modified by transactions that spend and produce script output. When writing a Plutus application, we need to consider not only the on-chain part of the application (the Plutus Core scripts) but also the off-chain part that builds and submits transactions.
The off-chain code is written in Haskell, just like the on-chain code. That way we only need to write the business logic once. Then we can use it in the validator script and in the code that builds the transactions that run the validator script.
Many applications need to watch the UTXO set for changes to particular addresses, so if we write our contract as a state machine, we need to track the unspent output that represents the current state of the machine and update our local state when the on-chain state changes. Likewise, many apps need to communicate with the wallet backend to access the crypto currency that they are using for transactions.
The PAF provides easy access to services that are commonly used by Plutus applications. Applications deployed using the framework's libraries can be run on the Plutus application backend, which provides runtime support for access to the blockchain and other such as persistence, logging, and monitoring concerns. Applications written on top of the PAF automatically provide an HTTP and WebSocket interface that can be used to interact with the application from the web browser.
Read full Article: CLICK HERE