In the (e)UTxO model, discussed in the 1st lecture of PPP#3, I am trying to understand the differences between the UTxO model of Bitcoin and the (e)UTxO model of Cardano.

From what I understand, the "script" in Cardano is similar to the locking script (ScriptPubKey) used in Bitcoin, and "redeemer" is similar to the unlocking script (ScriptSig). The main difference being that Cardano script is Turing Complete. Is this a correct assumption ?

And what is the new "Datum" used in Cardano and how large is it ? I assume that "Datum" is stored "on-chain"?

2 Answers 2


One way to think of it is that:

  • The Datum is a piece of data that's attached to the UTXO by the producer,
  • The Redeemer is a piece of data that's provided by the consumer,
  • When the UTXO is consumed, the script is run with both the Datum and the Redeemer as arguments and it can thus verify its spent in the right context.

The Datum can be "arbitrarily" large subject to the Tx size limits. What's get stored in the UTXO is actually not the Datum itself but its hash. The spending transaction has to provide the actual Datum, of course matching the hashes stored in the UTXO.

I think your analogy is correct but I am not knowledgeable enough with Bitcoin to be sure.



It might help understand from where do these inputs of the functions come from:

  • the Redeemer is a piece of data constructed at the moment the user wants to interact with e smart contract, this piece of data is only available for the running transaction and is often used to allow the same smart contract to execute different logic based on the requested action of the user

  • the ScriptContext is passed by the node that is running the script, it passes transaction-related pieces of information such as who is giving the inputs and where those inputs are going (outputs), along with other transaction information such as the time the transaction is being executed

  • the Datum is what allows for the Turing completeness in the (e)UTxO model. It is attached to an UtxO belonging to the smart contract, in particular, the Datum is often used to encode the state of the script and it can be useful to store variables that can change. More in general the Datum allows the script to have some memory of the past of the script, and this is the reason the Datum makes Cardano smart contracts Turing complete

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.