<p>Yes, but the Bitcoin blockchain does not store a datum on-chain. So the concept is similar but you are very limited what you can do with those scripts.</p>

CC BY-SA 4.0
2022-07-24T19:18:24.370Z
2022-07-24T19:18:24.370Z
Will
<p>EUTXO stands for (<strong>Extended</strong> Unspent Transaction Output), the mechanism is, in spirit, the same as Bitcoin UTXO (Unspent Transaction Output) but very much improved.</p>
<p>The first difference is between scripting languages, Bitcoin uses <a href="https://en.bitcoin.it/wiki/Script" rel="nofollow noreferrer">Script</a> which is a very primitive scripting language and has around 90 available <a href="https://wiki.bitcoinsv.io/index.php/Opcodes_used_in_Bitcoin_Script" rel="nofollow noreferrer">OP Codes</a> for use. Cardano uses Plutus which is essentially Haskell, a very powerful functional programming language.</p>
<p>The second difference is the information the script has to work with, Bitcoin script does not have access to the context information of the transaction, the user locking funds in a Bitcoin UTXO provides a partial Bitcoin Script, and the spender must complete the Script in a way that the Script leaves the value true on the stack after the execution ends, but the script is blind to the details of the transaction (the script has access to the signatures, but not the details about how the value is being transferred between parties), for example:</p>
<pre><code>OP_HASH256 6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000 OP_EQUAL
</code></pre>
<p>This script will hash twice the given data with SHA-256 (see <a href="https://wiki.bitcoinsv.io/index.php/Opcodes_used_in_Bitcoin_Script" rel="nofollow noreferrer">OP_HASH256</a>) and compare the result to the embedded hash (in this case the data is Genesis block header).</p>
<p>A Cardano Plutus script on the other hand has full access to everything that is going on in the transaction, how the ADA is moving, signatures etc:</p>
<pre><code>-- | A pending transaction. This is the view as seen by validator scripts, so some details are stripped out.
data TxInfo = TxInfo
    { txInfoInputs      :: [TxInInfo] -- ^ Transaction inputs
    , txInfoOutputs     :: [TxOut] -- ^ Transaction outputs
    , txInfoFee         :: Value -- ^ The fee paid by this transaction.
    , txInfoMint        :: Value -- ^ The 'Value' minted by this transaction.
    , txInfoDCert       :: [DCert] -- ^ Digests of certificates included in this transaction
    , txInfoWdrl        :: [(StakingCredential, Integer)] -- ^ Withdrawals
    , txInfoValidRange  :: POSIXTimeRange -- ^ The valid range for the transaction.
    , txInfoSignatories :: [PubKeyHash] -- ^ Signatures provided with the transaction, attested that they all signed the tx
    , txInfoData        :: [(DatumHash, Datum)]
    , txInfoId          :: TxId
    -- ^ Hash of the pending transaction (excluding witnesses)
    } deriving stock (Generic, Haskell.Show, Haskell.Eq)
</code></pre>
<p>And the third difference is the introduction of the concept of Datum and Reedemer, Datums are linked to EUTXOs and are useful to keep track of state, and Reedemer is data that can be provided to the EUTXO when we want to unlock it, both Datums and Redeemers can be arbitrary data structures.</p>
<p>This is a good resource from the Plutus Pioneer Program that goes into detail on how the EUTXO model work:</p>
<p><a href="https://www.youtube.com/watch?v=bfofA4MM0QE" rel="nofollow noreferrer">https://www.youtube.com/watch?v=bfofA4MM0QE</a></p>
<p>The EUTXO in general it's more expensive and powerful.</p>

CC BY-SA 4.0
2022-07-25T06:26:10.427Z
Very good explainer. I still think that the text I quoted is misleading; UTXOs in the UTXO model can be locked with scripts. I think it would be better if the Cardano docs were rewritten to explain how much more powerful Cardano's scripts are rather than claim that the difference is the possibility of using scripts.

I guess the EUTXO definition they use comes from a time when bitcoin did not support locking UTXOs with scripts, only (hashed) public keys.
The Unfun Cat
CC BY-SA 4.0
2022-07-25T05:39:18.740Z
2022-07-25T05:44:42.770Z
2022-07-25T05:44:42.770Z
AngelCastillo
<p>In the <a href="https://docs.cardano.org/plutus/eutxo-explainer" rel="nofollow noreferrer">EUTXO explainer</a> it says that</p>
<blockquote>
<p>[The EUTXO model] generalizes the concept of ‘address’ by using the lock-and-key analogy. Instead of restricting locks to public keys and keys to signatures, addresses in the EUTXO model can contain arbitrary logic in the form of scripts. For example, when a node validates a transaction, the node determines whether or not the transaction is allowed to use a certain output as an input. The transaction will look up the script provided by the output's address and will execute the script if the transaction can use the output as an input.</p>
</blockquote>
<p>But isn't this the same as locking/unlocking scripts as used in Bitcoin? I understand Cardano's scripts are more sophisticated, but that is a difference of degree.</p>

<utxo><eutxo>
Is the fact that EUTXO can use scripts to lock/unlock UTXOs really a difference from the UTXO model?
# Is the fact that EUTXO can use scripts to lock/unlock UTXOs really a difference from the UTXO model?

(Asked by: username_0 on 2022-07-24)

In the [EUTXO explainer](https://docs.cardano.org/plutus/eutxo-explainer) it says that

> [The EUTXO model] generalizes the concept of ‘address’ by using the lock-and-key analogy. Instead of restricting locks to public keys and keys to signatures, addresses in the EUTXO model can contain arbitrary logic in the form of scripts. For example, when a node validates a transaction, the node determines whether or not the transaction is allowed to use a certain output as an input. The transaction will look up the script provided by the output's address and will execute the script if the transaction can use the output as an input.

But isn't this the same as locking/unlocking scripts as used in Bitcoin? I understand Cardano's scripts are more sophisticated, but that is a difference of degree.

**Tags:** utxo, eutxo

---

## 2 answers

### Answer by username_2 on 2022-07-25. Score: 2 | Accepted answer

EUTXO stands for (Extended Unspent Transaction Output), the mechanism is, in spirit, the same as Bitcoin UTXO (Unspent Transaction Output) but very much improved.
The first difference is between scripting languages, Bitcoin uses Script which is a very primitive scripting language and has around 90 available OP Codes for use. Cardano uses Plutus which is essentially Haskell, a very powerful functional programming language.
The second difference is the information the script has to work with, Bitcoin script does not have access to the context information of the transaction, the user locking funds in a Bitcoin UTXO provides a partial Bitcoin Script, and the spender must complete the Script in a way that the Script leaves the value true on the stack after the execution ends, but the script is blind to the details of the transaction (the script has access to the signatures, but not the details about how the value is being transferred between parties), for example:
OP_HASH256 6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000 OP_EQUAL

This script will hash twice the given data with SHA-256 (see OP_HASH256) and compare the result to the embedded hash (in this case the data is Genesis block header).
A Cardano Plutus script on the other hand has full access to everything that is going on in the transaction, how the ADA is moving, signatures etc:
-- | A pending transaction. This is the view as seen by validator scripts, so some details are stripped out.
data TxInfo = TxInfo
    { txInfoInputs      :: [TxInInfo] -- ^ Transaction inputs
    , txInfoOutputs     :: [TxOut] -- ^ Transaction outputs
    , txInfoFee         :: Value -- ^ The fee paid by this transaction.
    , txInfoMint        :: Value -- ^ The 'Value' minted by this transaction.
    , txInfoDCert       :: [DCert] -- ^ Digests of certificates included in this transaction
    , txInfoWdrl        :: [(StakingCredential, Integer)] -- ^ Withdrawals
    , txInfoValidRange  :: POSIXTimeRange -- ^ The valid range for the transaction.
    , txInfoSignatories :: [PubKeyHash] -- ^ Signatures provided with the transaction, attested that they all signed the tx
    , txInfoData        :: [(DatumHash, Datum)]
    , txInfoId          :: TxId
    -- ^ Hash of the pending transaction (excluding witnesses)
    } deriving stock (Generic, Haskell.Show, Haskell.Eq)

And the third difference is the introduction of the concept of Datum and Reedemer, Datums are linked to EUTXOs and are useful to keep track of state, and Reedemer is data that can be provided to the EUTXO when we want to unlock it, both Datums and Redeemers can be arbitrary data structures.
This is a good resource from the Plutus Pioneer Program that goes into detail on how the EUTXO model work:
https://www.youtube.com/watch?v=bfofA4MM0QE
The EUTXO in general it's more expensive and powerful.

> **Comments:**
> **username_0**: Very good explainer. I still think that the text I quoted is misleading; UTXOs in the UTXO model can be locked with scripts. I think it would be better if the Cardano docs were rewritten to explain how much more powerful Cardano's scripts are rather than claim that the difference is the possibility of using scripts.  I guess the EUTXO definition they use comes from a time when bitcoin did not support locking UTXOs with scripts, only (hashed) public keys.  

---

### Answer by username_1 on 2022-07-24. Score: 1

Yes, but the Bitcoin blockchain does not store a datum on-chain. So the concept is similar but you are very limited what you can do with those scripts.


---

