| name | cardano-protocol-params |
| description | Protocol parameters: fetch pparams, understand fees, min-UTxO, execution budgets. Read-only diagnostics. |
| allowed-tools | ["Bash(cardano-cli:*)","Read"] |
| context | ["!cardano-cli version 2>&1 | head -5"] |
cardano-protocol-params
When to use
- Fetching fresh protocol parameters
- Understanding fee calculation inputs
- Debugging min-UTxO or execution budget issues
- Comparing params across networks
Operating rules (must follow)
- Always fetch fresh params for the target network
- Never assume mainnet params apply to testnets
- Keep pparams.json with tx artifacts for reproducibility
Key parameters explained
Fee calculation
minFeeA: 44 # lovelace per byte
minFeeB: 155381 # base fee in lovelace
Formula: fee = minFeeA * txSize + minFeeB
Min UTxO
coinsPerUTxOByte: 4310 # lovelace per byte of UTxO
Minimum ADA required = size of UTxO (including datum) × coinsPerUTxOByte
Execution units (Plutus)
maxTxExecutionUnits:
steps: 10000000000 # CPU budget
memory: 10000000 # Memory budget
executionUnitPrices:
priceSteps: 0.0000721 # lovelace per step
priceMemory: 0.0577 # lovelace per memory unit
Reference scripts
minFeeRefScriptCostPerByte: 15 # Cost for using reference scripts
Workflow
Fetch parameters
cardano-cli conway query protocol-parameters \
--testnet-magic 1 \
--out-file pparams-preprod.json
cardano-cli conway query protocol-parameters \
--mainnet \
--out-file pparams-mainnet.json
Extract key values
cat pparams.json | jq '{
minFeeA: .txFeePerByte,
minFeeB: .txFeeFixed,
coinsPerUTxOByte: .utxoCostPerByte,
maxTxSize: .maxTxSize,
maxValSize: .maxValueSize
}'
Calculate min-UTxO for output
Examples
Example: Debug "UTxO too small" error
Problem: Transaction fails with min-UTxO error
Response:
cardano-cli conway query protocol-parameters \
--testnet-magic 1 \
--out-file pparams.json
cat pparams.json | jq .utxoCostPerByte
Example: Estimate script execution cost
Problem: Need to budget for Plutus script
Response:
cat pparams.json | jq '{
priceSteps: .executionUnitPrices.priceSteps,
priceMemory: .executionUnitPrices.priceMemory
}'
Network magic reference
Mainnet: (no flag, use --mainnet)
Preprod: --testnet-magic 1
Preview: --testnet-magic 2
Safety / key handling
- Protocol params are public, no secrets involved
- Always verify you're querying the intended network
- Store pparams with tx artifacts for debugging
References