Idle funds in vaults

Hi everyone,

I was looking at the various yearn vaults and noticed there are quite a lot of idle funds. For example, at writing time :

On top of that those fund could be withdrawn without paying the withdrawal fees (0.5%). In such a case the yearn protocol would be missing $165k. I know there are currently discussions on how to implement fees (management vs performance - fees level - …) but currently those fees are paying for a few people salary + gitcoin grants for example so would be good to have a way to make sure the protocol does earn what it’s supposed to earn.

Currently one can interact with the vault and call the earn() method that deposits funds to the strategy but calling the function can be expensive (tried myself on etherscan a couple of time and the cost was ~$30/$50).

I was wondering what would be to best solution to this, eg we could make sure to not miss fees like that ?

For example we could have an external script (written in python for example ?) regularly monitoring the vaults’ balances and call earn() whenever the amount is greater than X. For example if X=$1M, the withdrawal fees would be $5k and calling earn() would cost $50, so 1% of the fees. Looks like a very good tradeoff. The only issue with this solution if that I can’t code that kind of script myself but would be more than happy to learn how to do so !

Who should be paying for the fees associated with calling earn() ? Definitively the treasury so if the script were to be ran by an individual we should expect the treasury to regularly reimburse the cost.

Happy to hear your comments on this !

1 Like

I was thinking awhile back about gas costs and harvest() and brought up how we can have a sliding fee to incentivize people calling strategy functions. It was ultimately absorbed into a proposal for revamping the treasury contracts. Borrowing @banteg’s graphics to show the planned governance contract in regards to gas:

I do think that there could be a combo function that calls harvest() and earn() and have it subsidize the caller’s gas fee by using that sliding gas fee. This way, anyone can call it and there won’t be issues with determining how much to budget for gas.


Tldr: the vaults are working as intended and do not just allocated all funds right when they enter the vaults.

First, the majority of this, TUSD, holdings weren’t there 2 days ago and the vault just allocated 10m. Also, the other vaults keep a buffer for withdrawals, this buffer is different for different vaults based on the strategy it is using. The vaults are being monitored by Andre and team and they allocate funds at the opportune time for the best yields with the correct amount of funds. This is automated to a big extent thanks to our devs so what you’re suggesting is already happening. Also the YFI vault is not active (0% APR) because there is currently no strategy that will beat staking in gov for the 9% APY it currently gives to stakers, so withdrawals are free for the YFI vault as of now, and I encourage anyone in the vault to move to staking asap. The fees for calling and deploying contracts gets paid back to Andre and the team from the treasury. There are threads up now that are discussing changing the fee structure so I would post your comments on the matter in those.


Hi @Dark,

TL;DR but I still read everything :wink:

Much appreciated that you took the time to explain in details - first time I see such a precise answer on the subject !

Not sure how I can close the topic but definitively this can be closed