What Cardano keeps and returns when a script fails

Explainer3 min read

Read Cardano collateral inputs, total collateral and collateral return in one fictional Conway transaction. See when a Plutus script failure costs ADA.

Brokzi operates a receipt press that separates a fictional 10 ADA Cardano collateral input into a 3 ADA charge and a 7 ADA return.
AI-assisted editorial illustration · Brokzi
On this page

A Cardano transaction can list 10 ADA in collateral inputs and still charge only 3 ADA if its Plutus script fails. In a transaction with a 7 ADA collateral return, the ledger can consume the 10 ADA input and create a new 7 ADA output for the specified return address. To tell whether any of that happened, first check the transaction’s outcome.

Three fields in one Cardano transaction

A Cardano transaction input references a specific unspent output, or UTxO. The input record points to an earlier transaction and output index. The ADA value comes from that referenced output. Collateral inputs are the outputs the transaction names as backing for a phase-2 script failure.

Total collateral is the declared amount of ADA to collect on that failure path when the field is present. Collateral return is a separate output specified in the transaction body. It says what can be returned and to which address on that same path. CIP-40 describes adding the return output to the collateral model. The fields were introduced in Babbage and are present in the Conway transaction format.

A 10 ADA input with a 7 ADA return

Imagine a Conway-era transaction with one ADA-only collateral input and an ordinary spending input that refers to a different output. The example skips the other transaction fields. Treat the amounts as figures from a fictional record.

Record fieldExample valueWhat to read from it
Collateral inputsOne prior output worth 10 ADAThis output backs the collateral and is consumed in full if the ledger applies the failure path.
Total collateral3 ADAThis is the net amount collected in the failure path.
Collateral return7 ADA to the stated return addressThis separate output is created in the failure path.

With an accepted phase-2 failure, the old 10 ADA output disappears from the unspent set, and the 7 ADA return appears as a new output. The difference is 10 − 7 = 3 ADA. The Babbage UTXO rule removes the collateral inputs, adds the collateral return and credits the net collateral to fees. The original 10 ADA output is spent in full in this example. Its 7 ADA remainder lives at a new output reference.

When does Cardano actually take the collateral?

The key distinction is between a transaction accepted into a block with a phase-2 script failure and a transaction rejected before inclusion. The Conway script rule routes the phase-2-invalid case through the Babbage failure check. When that path applies, ordinary spending inputs and regular outputs are left out of the state change. A phase-1 rejection alone creates no collateral charge onchain. When the script succeeds, the ordinary transaction path applies, and the collateral fields do not themselves take collateral or create a return.

For a read-only check, compare the referenced collateral output, the declared total, the return address and the onchain outcome. A return listed in the transaction body describes a conditional output. Look for the actual output in the resulting ledger record before calling it a credit. The transaction record guide covers the broader difference between a submitted transaction and a settled result.

Sources

See something wrong? Brokzi logs material changes. Prepare a correction note.

About the byline

Brokzi Editorial

The accountable byline for Brokzi’s explainers, definitions, news notes, and corrections.

Editorial responsibility →