A Plutus script that lives on-chain attached to a transaction output, which any later transaction can use by pointing to that output instead of carrying the script's bytecode itself; the ledger resolves it by script hash. Before reference scripts (introduced in the Vasil hard fork via CIP-33), every transaction that used a script had to carry the full bytecode again, inflating transaction size and fees.
With reference scripts, a popular validator is published once and then costs far less to reuse than re-including its full bytecode each time. Each use still pays a small fee proportional to the script's size (the minFeeRefScriptCostPerByte parameter, 15 lovelace per byte on mainnet), so it is cheap rather than free. This is a big reason modern Cardano dApps feel lightweight per transaction.
Explore next
- Smart ContractSelf-executing code stored on a blockchain that automatically enforces and executes agreement terms when predefined conditions are met.View term
- eUTXOCardano's extension of the UTXO accounting model; each output can carry datum and script logic, so smart contracts express rules without the shared mutable state used by account-based chains.View term
- VasilThe hard fork on September 22, 2022 that improved smart contract efficiency and network performance.View term
- Reference InputAn input a transaction reads without consuming, letting a smart contract look at on-chain state without locking it out of other transactions.View term