# Tip Distribution Program

#### Tip Distribution

<figure><img src="https://1867740203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ffrb9MGTK6eZJlEQJyylq%2Fuploads%2Ft552GoHAT6I11FlY5g1r%2Fimage.png?alt=media&#x26;token=8a8d7d9a-0194-41c5-8e89-4da05cef67dd" alt=""><figcaption></figcaption></figure>

The tip distribution program is responsible for collecting and distributing MEV to validators and stakers.

Every epoch, the validator client creates a unique TipDistributionAccount derived by the epoch and vote account public key. The validator client then uses this TipDistributionAccount to aggregate MEV paid out to their account over the entire epoch.&#x20;

Once the epoch is over, a validator (or delegate denoted by the merkle root upload authority) takes a snapshot of the last slot in the previous epoch, generates a merkle tree containing the claims for each validator and stake account, and uploads the root on-chain. Then validators and stakers can claim MEV (or have others claim on their behalf) in the form of an airdrop.

### MEV Airdrops In Depth

At the end of an epoch, the MEV funds for a given validator are stored at a PDA derived by the validators vote account and epoch. At the end of every epoch, the following happens:

* A state snapshot is taken of the last slot in an epoch
* A script runs which outputs the stake account information on a per-validator basis with the MEV collected in the account.
* Another script runs which generates a merkle tree which contains information about the amount of MEV distributed to a validator and their stakers on a pro-rata basis.
  * This script can also upload the merkle root to the tip distribution account which allows stakers to claim.

## Snapshot Storage

The following links are URLs containing end-of-epoch snapshots. The foundation will add more parties when they become available. Use these snapshots at your own risk:

* [Jito Labs](https://console.cloud.google.com/storage/browser/jito-mainnet;tab=objects?forceOnBucketsSortingFiltering=false\&project=mev-distribution\&prefix=\&forceOnObjectsSortingFiltering=false)
