> ## Documentation Index
> Fetch the complete documentation index at: https://solana.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# Stake Programming

> Manage stake programmatically with the Solana Foundation Delegation Program and stake pools.

To maximize stake distribution, decentralization, and censorship resistance on
the Solana network, staking can be performed programmatically. The team and
community have developed several onchain and offchain programs to make stakes
easier to manage.

## Solana Foundation Delegation Program

The
[Solana Foundation Delegation Program](https://solana.org/delegation-program) is
designed to serve the needs of the network by targeting the following goals:

1. Maximize decentralization, reliability, and performance of Solana
2. Maximize the number of validators who have diverse sources of stake
3. Sustain a large and representative testnet

## Stake Pools

This onchain program pools together SOL to be staked by a manager, allowing SOL
holders to stake and earn rewards without managing stakes. Users deposit SOL in
exchange for SPL tokens (staking derivatives) that represent their ownership in
the stake pool. The pool manager stakes deposited SOL according to their
strategy, perhaps using an automated delegation strategy.
As stakes earn rewards, the pool and pool tokens grow proportionally in value.
Finally, pool token holders can send SPL tokens back to the stake pool to redeem
SOL, thereby participating in decentralization with much less work required.
More information can be found at the
[Stake Pool documentation](https://www.solana-program.com/docs/stake-pool).
