a7e2e2
Harvest on Deposit: How Vaults Price New Shares
What harvest on deposit means in a yield vault: the strategy compounds pending rewards before shares are minted, so new deposits use the updated share price.
Block Times Newsroom5 min read

Harvest on deposit means the strategy harvests and compounds pending rewards during a deposit, before minting the depositor’s shares. That order prices the new shares against the vault’s updated holdings, so the depositor does not receive a share of rewards earned before they arrived.
You may encounter the setting while comparing vault strategies or tracing a deposit transaction. The Beefy app is one interface for multichain yield strategies where this distinction can matter. The setting belongs to the strategy’s deposit flow, so the strategy contract is where to verify it.
Harvest on deposit updates the share price before minting
With harvestOnDeposit enabled, a vault calls the strategy’s beforeDeposit() hook as part of processing a deposit, and the hook triggers a harvest before shares are minted. The harvest swaps reward tokens and adds the proceeds back to the farm; then the vault calculates the depositor’s shares using the post-harvest getPricePerFullShare.
The sequence is deposit call → beforeDeposit() → harvest and compound → share calculation and mint. The flag is a public getter on the strategy contract. It describes whether this deposit path forces a harvest; it is not itself a separate vault or a kind of share.
Consider an illustrative vault with rewards accrued since its previous harvest. Before the deposit, those rewards are part of the strategy’s pending rewards, rather than the assets already reflected in the share price. With harvestOnDeposit on, the deposit transaction processes the rewards first. The vault then mints shares at the updated price per share. The same vault and pending rewards are involved before and after; what changes is that the rewards are compounded before the new depositor’s shares are priced.
Without that harvest, a just-in-time depositor could receive shares based on the older price, then benefit when the pending rewards are harvested and added to the vault. Existing depositors earned those rewards before the newcomer entered. Harvesting first closes that timing gap by making the newcomer buy in at the updated price.
The flag trades a fairer entry price for deposit gas
Harvest on deposit makes each qualifying deposit transaction carry the harvest’s gas cost. That adds work beyond transferring a token: the strategy may need to claim rewards, swap them, and put the proceeds back into the farm before the vault can finish minting shares. The size of that extra cost depends on the transaction and chain; the flag is used mostly on low-gas chains.
In Beefy strategy code, enabling harvestOnDeposit also sets the withdrawal fee to zero. The forced harvest already blocks the deposit-then-withdraw reward sniping that the fee was meant to deter. That withdrawal fee is distinct from the gas cost: it is a strategy setting, while gas is paid for executing the transaction. A zero withdrawal fee does not make a harvest-on-deposit transaction free.
The nearby term beforeDeposit is easy to confuse with harvestOnDeposit. beforeDeposit() is the hook the vault calls in the deposit flow; harvestOnDeposit is a strategy setting that makes the hook harvest. The hook can be present even when the flag is false. For integrators, that distinction matters when tracing whether a deposit actually triggers reward processing, and for depositors, it helps explain why two strategies may have different transaction costs.
The main effects to keep separate are:
- Entry price: the harvest updates the vault’s assets before the new shares are calculated.
- Transaction gas: the depositor’s transaction includes the harvest work, so it can cost more than a token transfer.
- Withdrawal fee: in the described Beefy strategy pattern, enabling the flag also sets this fee to zero because the forced harvest addresses the sniping risk.
Read the strategy setting and compare the transaction
You can verify harvestOnDeposit by opening the strategy address from the vault page and reading the public getter under Read Contract. That confirms the strategy’s setting; it does not estimate the gas for your specific deposit. To predict the cost, inspect the transaction path and its gas estimate as well as the flag.
For a practical comparison, keep the same vault and deposit amount in view. With the flag on, pending rewards are harvested before shares are minted, and the depositor pays for that extra execution. With it off, the deposit avoids that forced harvest, but a newcomer may enter before older rewards are reflected in the share price. The trade-off is therefore visible in both the entry price and the transaction cost.
Related
What is a harvest call fee in a yield vault?
A harvest call fee usually refers to a fee or incentive associated with triggering a harvest, while harvest-on-deposit refers to when the strategy runs one. In the deposit flow described here, the immediate cost to watch is the gas charged for the depositor’s transaction. Check the strategy’s fee settings and transaction details rather than treating gas and a harvest fee as interchangeable.
Why does a vault deposit use more gas than a token transfer?
A vault deposit can do more than move tokens: when harvestOnDeposit is enabled, it also runs the beforeDeposit() hook and harvest path before minting shares. A plain token transfer does not perform those strategy steps. Read the strategy getter and the deposit’s gas estimate to decide whether the extra work is part of the transaction you are about to make.
Before depositing, check harvestOnDeposit on the strategy and review the transaction’s gas estimate; together they tell you whether the deposit will include a harvest and what cost to expect.