# Stake snapshots

At every epoch transition, the system performs a stake distribution snapshot. These snapshots are used for the slot leader election process and consist of:

* *Stake*: a mapping of credentials to lovelace
* *Delegations*: a mapping of credentials to stake pools
* *Pool parameters*: each stake pool's parameters storage

At any given time, the system must store the last three snapshots. To keep track of snapshots, `Mark, Set, and Go` naming is used. `Mark` is the most recent one, which becomes `Set` after an epoch and `Go` after another epoch.

A snapshot **Mark** at epoch transition from *EpochN* to *EpochN+1* will be used for the slot leader election process during *EpochN+2*, when it becomes **Set**. Finally, it is employed for rewards calculation during *Epoch N+3* when it becomes **Go**.

<figure><img src="/files/DCACHGqpQfbUuFNZpKvL" alt=""><figcaption></figcaption></figure>

On any current epoch, **Mark** is not actively used, **Set** is used for the slot leader election process, and **Go** is used for the rewards calculation:

<figure><img src="/files/UnIsVGOLLwqwnbkimsXa" alt=""><figcaption></figcaption></figure>

For more details, please see section 11.1 of the [Shelley ledger specification](https://github.com/input-output-hk/cardano-ledger/releases/latest/download/shelley-ledger.pdf).

<figure><img src="/files/CelPImRcpcO1KmVSIwNo" alt=""><figcaption></figcaption></figure>

You can query the stake snapshots:

{% code overflow="wrap" %}

```
cardano-cli query stake-snapshot --testnet-magic 2 --stake-pool-id <POOL_ID>
```

{% endcode %}

```
{
    "activeStakeGo": 145769691498797,
    "activeStakeMark": 147258956481483,
    "activeStakeSet": 146034637994668,
    "poolStakeGo": 9497641630,
    "poolStakeMark": 9497641630,
    "poolStakeSet": 9497641630
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cardano-course.gitbook.io/cardano-course/handbook/create-a-stake-pool/stake-snapshots.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
