<p>You are asking a few questions here, so I'll try my best to point you in the right direction. I feel like <a href="https://twitter.com/_KtorZ_/status/1439168735810555906?s=20" rel="noreferrer">KtorZ</a> did a great job explaining it, but it doesn't hurt to put it into different words.</p>
<hr />
<p><strong>Terminology</strong></p>
<p><strong>Validator</strong> or <strong>Validator Script</strong>: (not to be confused with validation nodes) Code used to say &quot;yes&quot; or &quot;no&quot; to transactions spending UTxOs at the script address</p>
<p><strong>Minting Policy</strong>: Code used to say &quot;yes&quot; or &quot;no&quot; to transactions forging tokens from the policy address</p>
<p><strong>On-Chain Code</strong>: Validator Scripts and Minting Policies (for the most part). This code is run by the validation nodes in conjunction with relevant transactions.</p>
<p><strong>Off-Chain Code</strong>: Code for building and submitting transactions. Typically referring to wallet code, but technically the Cardano CLI can fulfill the same role to some extent</p>
<hr />
<p><strong>Background</strong></p>
<p>A common misconception about Cardano &quot;smart contracts&quot; is that the &quot;on-chain&quot; code is a program. That you send some &quot;smart contract&quot; to live on the blockchain and it &quot;runs&quot; or &quot;executes&quot; like a normal program with processes and state.</p>
<p>This is wrong.</p>
<p>In reality, the &quot;on-chain&quot; code is just used passively to validate transactions. It just says &quot;yes&quot; or &quot;no&quot;.</p>
<p>So, &quot;off-chain&quot; you can build whatever transaction you want: mint a million stable coins or take all the liquidity of a DEX for your own. The &quot;on-chain&quot; Minting Policies and Validator Scripts are what keep you from doing that. The &quot;on-chain&quot; code doesn't do anything, it just keeps you from doing bad things.</p>
<hr />
<p><strong>Answer</strong></p>
<p>This is the distinction I think people are trying to make.</p>
<blockquote>
<p>What's the difference between programmable validators and smart contracts?</p>
</blockquote>
<p>Smart contracts on other chains are pieces of code that have shared, mutable state and imperative logic to change that state. More similar to programs people are used to writing.</p>
<p>On Cardano, state may be stored on chain, but the logic of how to change state lives off-chain and the on-chain code just validates your transaction. It will never produce anything or change state for you.</p>
<p>One might call other chains' model &quot;smart contracts&quot; and Cardano's model &quot;programmable validators&quot;. What's important is that they achieve the same goal with different paradigms.</p>

CC BY-SA 4.0
2021-10-02T08:15:25.373Z
Sorry this is so long.
Mitchell Turner
CC BY-SA 4.0
2021-10-04T06:50:15.487Z
Thanks @mitchell-turner!  So in summary, on Cardano, contracts that execute on-chain can only function to accept or reject transactions (submitted to that contract's address), as opposed to on other chains where smart contracts can create transactions.  Is that right?
mathandy
CC BY-SA 4.0
2021-10-04T21:40:35.430Z
That's close. I think you're using "transaction" slightly wrong. On Cardano, a transaction is literally the proposed state change, and it must be validated to be executed. Whereas on other chains, a transaction is telling a smart contract what you want, and it tries to perform the state changes for you. If that makes sense.
Mitchell Turner
CC BY-SA 4.0
2021-10-04T23:01:34.637Z
That does make sense.  Thanks again @MitchelTurner!
mathandy
CC BY-SA 4.0
2021-10-02T08:15:01.787Z
2021-10-02T08:15:01.787Z
Mitchell Turner
<p>Charles Hoskinson indicated in <a href="https://twitter.com/IOHK_Charles/status/1439386177220403204" rel="nofollow noreferrer">this tweet</a> that he favors the term &quot;programmable validator&quot; to the term &quot;smart contract&quot; with regard to Cardano.</p>
<p>Quoting the tweet Charles Hoskinson is responding to, &quot;In Cardano, &quot;smart-contracts&quot; tend to refer to the combination of the on-chain validator(s) and the off-chain code that's driving it / them.&quot;</p>
<p>Here's what I've gathered so far.  (This is speculation.  Please do not believe it and please do correct it in the answers and comments.)</p>
<p>All operations (and data) necessary for Cardano to function are executed (and stored) on 3rd party-owned compute resources known as &quot;validation nodes&quot; (with the caveat that Cardano itself owns a number of &quot;validation nodes&quot;).  The results returned by these 3rd parties can be trusted, statically speaking, thanks to redundancy -- each operation is performed by all nodes in a random sample of validation nodes, and results are checked against each other.</p>
<p>This also describes <a href="https://cardano.stackexchange.com/questions/219/whats-the-difference-between-on-chain-and-off-chain-in-plutus-smart-contract">code running &quot;on-chain&quot;</a> and AFAIK is similar to how contracts execute on Ethereum.</p>
<p>All blockchains have &quot;off-chain&quot; code driving the miners or validators.</p>
<p>Are all these statements correct?  If not please correct me and if so, what's the big difference between Cardano contracts and contracts on other chains alluded to in the above tweets?</p>

<smart-contract><validator>
What's the difference between programmable validators and smart contracts?
# What's the difference between programmable validators and smart contracts?

(Asked by: username_0 on 2021-10-02)

Charles Hoskinson indicated in [this tweet](https://twitter.com/IOHK_Charles/status/1439386177220403204) that he favors the term "programmable validator" to the term "smart contract" with regard to Cardano.

Quoting the tweet Charles Hoskinson is responding to, "In Cardano, "smart-contracts" tend to refer to the combination of the on-chain validator(s) and the off-chain code that's driving it / them."

Here's what I've gathered so far. (This is speculation. Please do not believe it and please do correct it in the answers and comments.)

All operations (and data) necessary for Cardano to function are executed (and stored) on 3rd party-owned compute resources known as "validation nodes" (with the caveat that Cardano itself owns a number of "validation nodes"). The results returned by these 3rd parties can be trusted, statically speaking, thanks to redundancy -- each operation is performed by all nodes in a random sample of validation nodes, and results are checked against each other.

This also describes [code running "on-chain"](https://cardano.stackexchange.com/questions/219/whats-the-difference-between-on-chain-and-off-chain-in-plutus-smart-contract) and AFAIK is similar to how contracts execute on Ethereum.

All blockchains have "off-chain" code driving the miners or validators.

Are all these statements correct? If not please correct me and if so, what's the big difference between Cardano contracts and contracts on other chains alluded to in the above tweets?

**Tags:** smart-contract, validator

---

## 1 answers

### Answer by username_1 on 2021-10-02. Score: 8 | Accepted answer

You are asking a few questions here, so I'll try my best to point you in the right direction. I feel like [KtorZ](https://twitter.com/_KtorZ_/status/1439168735810555906?s=20) did a great job explaining it, but it doesn't hurt to put it into different words.

---

**Terminology**

**Validator** or **Validator Script**: (not to be confused with validation nodes) Code used to say "yes" or "no" to transactions spending UTxOs at the script address

**Minting Policy**: Code used to say "yes" or "no" to transactions forging tokens from the policy address

**On-Chain Code**: Validator Scripts and Minting Policies (for the most part). This code is run by the validation nodes in conjunction with relevant transactions.

**Off-Chain Code**: Code for building and submitting transactions. Typically referring to wallet code, but technically the Cardano CLI can fulfill the same role to some extent

---

**Background**

A common misconception about Cardano "smart contracts" is that the "on-chain" code is a program. That you send some "smart contract" to live on the blockchain and it "runs" or "executes" like a normal program with processes and state.

This is wrong.

In reality, the "on-chain" code is just used passively to validate transactions. It just says "yes" or "no".

So, "off-chain" you can build whatever transaction you want: mint a million stable coins or take all the liquidity of a DEX for your own. The "on-chain" Minting Policies and Validator Scripts are what keep you from doing that. The "on-chain" code doesn't do anything, it just keeps you from doing bad things.

---

**Answer**

This is the distinction I think people are trying to make.

> What's the difference between programmable validators and smart contracts?

Smart contracts on other chains are pieces of code that have shared, mutable state and imperative logic to change that state. More similar to programs people are used to writing.

On Cardano, state may be stored on chain, but the logic of how to change state lives off-chain and the on-chain code just validates your transaction. It will never produce anything or change state for you.

One might call other chains' model "smart contracts" and Cardano's model "programmable validators". What's important is that they achieve the same goal with different paradigms.

> **Comments:**
> **username_1**: Sorry this is so long.  
> **username_0**: Thanks @mitchell-turner!  So in summary, on Cardano, contracts that execute on-chain can only function to accept or reject transactions (submitted to that contract's address), as opposed to on other chains where smart contracts can create transactions.  Is that right?  
> **username_1**: That's close. I think you're using "transaction" slightly wrong. On Cardano, a transaction is literally the proposed state change, and it must be validated to be executed. Whereas on other chains, a transaction is telling a smart contract what you want, and it tries to perform the state changes for you. If that makes sense.  
> **username_0**: That does make sense.  Thanks again @MitchelTurner!  

---

