> For the complete documentation index, see [llms.txt](https://cardano-course.gitbook.io/cardano-course/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cardano-course.gitbook.io/cardano-course/handbook/create-a-stake-pool/stake-snapshots.md).

# 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
}
```
