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 :
- YFI Vault / $14.4M : https://etherscan.io/address/0xba2e7fed597fd0e3e70f5130bcdbbfe06bb94fe1
- TUSD Vault / $14.5M : https://etherscan.io/address/0x37d19d1c4e1fa9dc47bd1ea12f742a0887eda74a
- USDC Vault / $3.1M : https://etherscan.io/address/0x597ad1e0c13bfe8025993d9e79c69e1c0233522e
- USDT Vault / $1.1M : https://etherscan.io/address/0x2f08119c6f07c006695e079aafc638b8789faf18
meaning there are currently $33.1M uninvested.
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 !