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.

Think of it as

Instead of mailing the full instruction manual with every order, you mail a URL pointing to where the manual lives.

In depth

Pre-Babbage, every transaction spending from a script address had to include the full script bytes in its witness set. With CIP-33, a script can live on a UTxO at any address (typically a special "reference" output) and other transactions just reference its location. The script body is not consumed; the UTxO holding it remains spendable. Massively reduces transaction size and fees for popular validators (DEX scripts, lending protocols, etc.).

Example

A Minswap pool tx references the swap validator script that lives in a known reference UTxO, transactions shrink from ~15 KB to ~2 KB.

Next on this path

  1. Reference input A UTxO the transaction can read but not spend. Used to look at on-chain data (or a script) without consuming it.
  2. Validity range A slot interval during which a transaction is considered valid. Outside the window, the chain rejects it.