Collateral.

A reserved input the network collects as a fee if a Plutus script fails on-chain.

Think of it as

A small deposit the network keeps if your script throws an error on-chain. Like a no-show fee that only fires when something actually goes wrong.

In depth

Plutus transactions declare a collateral input (a key-locked UTxO worth at least 150% of the fee, the `collateralPercentage` protocol parameter). Every node validates in two phases: phase-1 checks (signatures, fees, balance) are cheap, and a failing transaction is simply rejected at no cost; phase-2 runs the scripts. If a script unexpectedly fails in phase-2, the transaction is still added to the chain so the network is paid for the work, and the collateral is forfeited into the fee pot (not burned). Since the Babbage era, a transaction can also declare a `collateralReturn` output; the collateral input may then even hold native tokens, only the required ada is taken and the rest comes back, you don't lose the whole input UTxO.

Example

If another trade consumed the pool UTxO first, the swap fails phase-1 (its input is already spent) and is dropped without taking collateral. Collateral is only lost when a script itself fails in phase-2, for example because a wallet skipped local evaluation. Wallets usually declare a small separate UTxO as collateral, and with a collateral return output (CIP-40) only the required amount is kept, so the loss is that amount rather than the funds being swapped.

Next on this path

  1. Inline datum A datum stored directly inside the UTxO it belongs to, instead of as a hash that the spender has to resolve.
  2. Reference script A script body stored on-chain in a UTxO so transactions can use it by reference instead of bundling the whole script every time.