
🔍 1. Overview
Cardano uses staking certificates to manage the lifecycle of stake keys and their association with stake pools. These certificates are CBOR-encoded structures embedded in the transaction body metadata.
Three main certificate types:
- stake_key_registration_certificate Registers a stake key on-chain so it can participate in delegation or staking rewards.
- stake_delegation_certificate Delegates the registered stake key to a specific stake pool.
- stake_deregistration_certificate Deregisters a stake key from the ledger, which effectively ceases its staking capabilities and may refund the deposit.
🔧 2. Sample: Generating a Delegation Certificate
cardano-cli stake-address delegation-certificate \
--stake-verification-key-file stake.vkey \
--cold-verification-key-file pool.vkey \
--out-file delegation.cert
This generates a CBOR-encoded file (delegation.cert) containing:
- The hash of the stake key (derived from
stake.vkey) - The pool ID (hash of the pool’s cold key from
pool.vkey) - The network ID (mainnet/testnet identifier)
📦 3. CBOR Serialization Format
Internally, the certificate is serialized according to Cardano’s CBOR format, as specified in Cardano Ledger specifications (Shelley Era).
For a stake delegation certificate, the CBOR structure is typically:
[
2, // Certificate type: Delegation
[
0, // Credential type: KeyHash (as opposed to ScriptHash)
<28-byte Stake Key Hash> // Hash of the stake verification key
],
<28-byte Pool Key Hash> // Pool ID (cold key hash)
]
For reference:
| Certificate Type | CBOR Tag |
|---|---|
| stake key registration | 0 |
| stake key deregistration | 1 |
| stake delegation | 2 |
Each of these structures is embedded in the transaction body, which itself is CBOR-encoded and includes:
- Inputs
- Outputs
- Fee
- TTL (time-to-live)
- [Certificates] (array of staking certificates)
- Withdrawals (optional)
- Auxiliary data hash (optional)
🛠️ 4. Important Metadata Fields in Delegation Certificate
| Field | Description |
|---|---|
| Stake Key Hash | 28-byte Blake2b-224 hash of the stake key |
| Pool ID | 28-byte Blake2b-224 hash of the pool’s cold key |
| Network ID | Distinguishes mainnet (1) from testnet (0) |
⚠️ 5. Additional Notes:
- cardano-cli abstracts the complexity of generating this CBOR structure.
- When submitting a transaction with this certificate, the transaction must also be signed by the corresponding stake key (for proof of ownership) and by the payment key funding the transaction (to pay fees).
- These certificates are essential for controlling staking rights and rewards without transferring ADA.
Here’s a real example showing how to generate a stake delegation certificate, then inspect and decode its CBOR structure manually to understand what’s inside.

Do you know what staking is ? Staking on the blockchain refers to the process where participants lock up a certain amount of cryptocurrency to support the operations and security of a blockchain network. In return, they earn rewards, typically in the form of additional cryptocurrency. Staking is often associated with proof-of-stake (PoS) or similar consensus mechanisms used by many blockchains.
