Summary:
- The updated uplc command-line tool makes Cardano smart contracts smaller and cheaper to run, with a single command.
- On a real sample of Cardano mainnet scripts, the tool cut execution costs by more than 10% on average, with some scripts seeing savings of nearly 50%.
- For ada holders, this means lower fees on every transaction, and savings that compound quickly on high-volume applications.
- For developers, it means more room within Cardano's per-transaction limits, making it easier to ship more capable applications without overflowing the budget.
- The tool also includes formal correctness checks, giving a strong mathematical guarantee that optimization does not change what a script does. That matters most for code handling real value.
- It is included in every Plutus release and works with the formats developers already use, so it fits straight into existing workflows.
Plutus (Untyped Plutus Core) is the on-chain language that several higher-level languages - including Aiken, Plinth, and Plutarch - compile to. The uplc command-line tool works with Untyped Plutus Core and can perform a variety of useful tasks, including printing, optimizing, and evaluating UPLC.
Every Plutus script on Cardano has a cost that users pay for. Larger scripts increase transaction size, which means higher fees. More expensive scripts also eat into the per-transaction execution budget, limiting how much your decentralized application (DApp) can do in a single transaction. For any application that handles real value, optimizing scripts is one of the highest-leverage things you can do.
The uplc command-line tool, included with every Plutus release, makes that optimization a single command away.
Until recently, turning it into part of an everyday development workflow required some glue work. The latest updates changed that.
What's new
- Support for the formats you actually use. The uplc tool now accepts hex-encoded scripts and CIP-57 blueprint JSON as input. Blueprints are the standard packaging format for Plutus contracts and typically contain all validators in your project. With a single command, you can optimize an entire blueprint and emit a fresh one, with all validators optimized and the corresponding hashes recomputed.
- Measure the impact, before and after. Pass a script, and optionally a set of inputs, to uplc, and it will run the script on the CEK machine before and after each optimization pass. It then reports execution cost and script size at each stage, so you can see exactly how many CPU steps, memory units, and bytes you saved.
- Prioritize cost or size, depending on your bottleneck. Sometimes a script is bound by execution units. Sometimes it is bound by size. The uplc tool exposes flags that bias the optimizer toward one or the other, so you can target the constraint that matters most for your application.
- Optimize with confidence. The uplc tool includes certifiers for optimization passes. Each pass is formalized in Agda as a translation relation between pre- and post-terms, together with a procedure that decides whether the relation holds. Each certifier takes the pre- and post-terms of a single pass, and either accepts the transformation as valid or rejects it. It can produce Agda artifacts that encode correctness proofs, or emit a human-readable report that summarizes the optimization passes that ran.
How much does optimization actually save?
To quantify the impact, we ran uplc optimize on every distinct script executed on Cardano mainnet from block 13,370,000 through block 13,372,997, the highest block we indexed at the time of writing. This produced a collection of 809 scripts. For scripts evaluated more than once during that range, we used the inputs from the latest evaluation. We then compared each optimized script against its original version using identical inputs.
On these scripts, optimization reduced execution cost by more than 10% on average and serialized size by around 3%, with substantially larger gains for many individual scripts.
The full breakdown:

These results use the default optimization settings. The tuning flags described above let you bias optimization toward execution cost or script size, depending on which constraint matters more for your application.
Why this belongs in every Cardano smart contract workflow
Lower fees for your users. Smaller, cheaper scripts reduce the cost of every transaction your users sign. For high-volume applications, those savings compound quickly.
More headroom in every transaction. Cardano enforces per-transaction execution and size limits. An optimized validator leaves more of that budget available for the rest of the transaction, which can be the difference between a feature that ships and one that overflows.
Higher assurance for code that has to be right. For validators whose correctness is critical, any change to the script carries risk. Certified optimization gives you a strong guarantee that the optimizer has not changed what your script does — a meaningfully stronger claim than “we ran the test suite.”
Put it to work on your next script
If you are not already running your scripts through uplc optimize, it is worth finding out what you are leaving on the table. Pick the latest release, point uplc at your validators, supply a few realistic inputs, and look at the before-and-after numbers.
Detailed documentation is available in our user guide. We welcome feedback, bug reports, and ideas for further improvements through issues opened in the Plutus repository on GitHub.
The uplc tool reflects a team-wide effort from the Plutus team. We are also grateful to Philip Wadler for his contributions to the certifier.





