> For the complete documentation index, see [llms.txt](https://docs.vesper.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vesper.finance/vesper-2/yield-generation.md).

# Yield Generation

Vesper 2 generates yield through onchain strategies operating underneath each product. Deposited assets are managed by the corresponding Treasury, which allocates available capital into YieldVaults while maintaining liquidity for redemptions.

#### How Yield Is Generated

YieldVaults deploy capital across configured DeFi strategies, which can interact with protocols such as Aave, Morpho, Compound, Curve, and Pendle.

Depending on the strategy, returns can come from lending, liquidity provision, fixed-yield positions, or other supported onchain activities.

Users do not need to select or manage individual strategies. Capital allocation happens underneath the Vesper token, enaabling strategies to be adjusted or replaced without requiring users to migrate their positions.

As strategies generate returns, the value of the Treasury's underlying YieldVault positions can increase. When the Treasury holds more reserve value than is required to back the outstanding supply of USDv or ETHv, this excess represents yield available for harvesting and distribution to stakers.

#### Harvesting & Yield Distribution

Vesper 2 uses a YieldManager to coordinate the harvesting and distribution of yield generated by the underlying strategies.

When excess reserves are available, an authorized keeper can trigger the YieldManager to perform the following operations:

1. **Harvest:** Retrieve excess underlying assets from the Treasury.
2. **Mint:** Deposit the harvested assets through the Gateway to mint the corresponding Vesper tokens.
3. **Distribute:** Transfer the newly minted Vesper tokens to the YieldDistributor.

Rather than transferring harvested yield directly into the StakingVault in a single transaction, the YieldDistributor releases it progressively over a configurable period.

This smooths the effect of individual harvest events on the value of sUSDv and sETHv. It also reduces opportunities for users to stake immediately before a large harvest, capture an instantaneous increase in share value, and exit shortly afterwards.

If additional yield is harvested while a distribution is still active, the remaining undistributed balance is combined with the new yield and incorporated into an updated distribution schedule.

When a StakingVault has no shares outstanding, yield distribution is paused and the remaining schedule is shifted forward.

#### Distribution Accounting

At the contract level, the rate at which yield is distributed is calculated as:

**rewardRate = (remainingYield + newYield) / yieldDuration**

The amount accrued since the previous update is:

**accruedSinceLastPull = rewardRate × (current time − lastUpdateTime)**

Accrual is limited to the active distribution period and pauses when the StakingVault has no shares outstanding.

The StakingVault retrieves accrued yield from the YieldDistributor through `pullYield`.

Once transferred, this yield becomes part of the assets held by the StakingVault, increasing the underlying value represented by each existing staked share.

As explained in [**Tokens & Staking**](https://docs.vesper.finance/vesper-2/tokens-and-staking.md), distributed yield increases the value of sUSDv and sETHv shares rather than increasing the number of tokens held by users. Share value remains subject to underlying strategy performance and potential losses.
