Smart Contracts

The foundation of decentralized applications on the Computation Layer.

The Goguen Era

The introduction of Smart Contracts marked the Goguen era of Cardano. Smart Contracts are programmable logic that dictates under what precise conditions the transfer of values (ADA or Native Assets) is mathematically permitted.

Plutus & Haskell

Cardano's primary smart contract language is Plutus, which is deeply rooted in Haskell, a functional programming language. Unlike imperative languages (like Solidity on Ethereum), functional programming relies heavily on mathematical functions avoiding hidden states or mutable variables.

This academic foundation ensures that code does exactly what it says and nothing else. It makes Plutus contracts much easier to mathematically verify and audit for critical financial applications, significantly reducing the amount of "hacked" protocols.

Evolving the Developer Ecosystem: Aiken

Because Haskell is notoriously difficult to learn for average developers, the community and builders have created open-source alternatives. One of the most prominent today is Aiken, a modern, highly optimized language that compiles to Plutus Core but is far easier to learn for developers coming from languages like Rust or TypeScript. This has dramatically accelerated the growth of dApps on Cardano.

Interaction with eUTXO

In Cardano's eUTXO model, smart contracts do not "hold" money in an account. Instead, the smart contract logic acts as a "lock" on a UTXO. To spend the money inside that UTXO, a user must submit exactly the "key" (the correct data and cryptographic conditions) that the smart contract demands. Once validated, the UTXO is consumed.

Smart Contracts | Cardano Wiki | Cardano Observer