# What is a smart contract?

A *smart contract* is an automated digital agreement, written in code, that tracks, verifies, and executes the binding transactions of a contract between various parties. The contract transactions are automatically executed by the smart contract code when predetermined conditions are met. Essentially, a smart contract is a short program whose inputs and outputs are transactions on a blockchain.

Smart contracts are self-executing and reliable and do not require the actions or presence of third parties. The smart contract code is stored on, and distributed across, a decentralized blockchain network, making it transparent and irreversible.

In summary, smart contracts are immutable as a contract cannot be changed, they are distributable and tamper-proof, fast and cost effective, as there is no middle man which saves money and time, and is safe due to encryption.

Cardano was introducing Smart Contract support in 2021. As a multi-functional environment, Cardano will support the development and deployment of smart contracts using such programming languages as:

* **Plutus** — a purpose-built smart contract development and execution platform. Plutus contracts consist of parts that run on the blockchain (on-chain code) and features that run on a user’s machine (off-chain or client code). Plutus draws from modern language research to provide a safe, full-stack programming environment based on Haskell, the leading functional programming language.
* **Marlowe** — a domain-specific language (DSL) for writing and executing financial contracts that allows building contracts visually as well as in more traditional code. For example, financial institutions can use it to develop and deploy custom instruments for their customers and clients. The Marlowe language itself is now embedded in both JavaScript and Haskell, offering a choice of editors depending on developers’ preference and skillset.

**Related Topics**

* [Marlowe explainer](https://docs.cardano.org/marlowe/learn-about-marlowe)
* [Plutus explainer](https://docs.cardano.org/plutus/learn-about-plutus)

Source: [Cardano Docs](https://docs.cardano.org/new-to-cardano/what-is-a-smart-contract)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mayz.gitbook.io/mayz-whitepaper-v2/mayz/knowledge-base/what-is-a-smart-contract.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
