Proposal: Change vault harvest() function to reward function caller


This proposal aims to include a dynamic gas reward for harvest() callers to align the interests of the Function Callers, vault LP, and the YFI Governance.

There is also a competing proposal that implements changes to the TreasuryVault contract to subsidize gas faster. Though the harvest() proposal might help in the future, we do need gas now.


Implement a dynamic gas reward pot as part of the harvest() function to incentivize Callers. This ensures vault LP never pay above fair market value for gas and resolves the conflict of interest between LP and Governance while determining gas budgets.


With gas prices constantly changing, it is hard to allocate a fixed monthly/daily gas fee budget to call functions. It is also hard to figure out the optimal frequency to call the harvest function.

A dynamic gas reward will align the interests of the Function Callers, vault LP, and the YFI Governance. Since:

  • The Function Callers can determine when to call functions based on the reward.
    • Since anyone can call harvest(), Function Callers will need to compete with each other for the reward, resulting in a fair market price. This will optimize the frequency of harvest() calls at the same time.
  • The vault LP will always be paying market rate for harvest() to be called. While still retaining the advantage of gas savings as a pool.
  • The Governance will never over or under-allocate budget needed for gas. And can still claim the 5% fee on gas saved for the LP. Resolving the conflict of interest when determining gas fees.


Change the harvest function by:

  • Implementing a dynamic pot for gas reward that grows over time, proportional to the profit of the pool. Claimable when other current conditions for harvest() are met.
  • Retain the 5% fee on gas saved to be reserved for YFI Governance and development.

Further Considerations

Since this proposal assumes the pool doesn’t incur losses before harvest is called (part of the condition for harvest() to be called), a different strategy might be needed if that is no longer the case.

Implementing a variable for how fast the gas reward grows (most likely as a percentage of profit) for Governance to experiment or control in case things go wrong might be a good idea. But the method of funding the pot should be up for discussion in this thread.

It might also be a good idea for other functions (draw, deposit, pay, etc.) to also have their own separate gas pots that are funded when harvest() is called. This ensures only profit will ever be spent on gas fees, protecting the principal. However, this should be submitted as a separate proposal and is not part of this proposal.

Include a dynamic gas reward pot for the havest() function of vaults.

No change.


  • For
  • Against

0 voters


The reward pot seems entirely redundant, especially since it is proportional to vault profit anyway. Simply giving the caller a percentage of the harvested profit achieves the goal. This is the approach taken by DFI (YFII) where the reward is 1% of the harvest. Additionally, this simple, market-driven rule frees governance and the core team from having to determine conditions where harvest is allowed.

1 Like

Yeah, I’d agree that a separate contract will be redundant. I was thinking maybe just a readable variable for the amount to be rewarded in the existing strategy. Or maybe that’s still redundant and the Callers should try to calculate the rewards they’ll get themselves.

Overall I’m for, but I have a counter-proposal which can be implemented faster. Will post the spec shortly.

The difference:

  • It solves for gas spent on failed transactions
  • It also solves the gitcoin distribution
  • It only requires redeploying TreasuryVault contract instead of redeploying/migrating all strategies

Please take a look

I agree that a percentage of the harvest() call is the way to go. It may be beneficial to make it a fuction of time since last call, just so the less profitable strategies won’t stay unharvested for too long, in periods with high gas fees.

1 Like