1/ I spent some time reading through the @iearnfinance Vault V2 contracts that are WIP by @fubuloubu and @bantg 🤓 Yearn's core team keep on buidling despite the CT noise, and what I found made me excited about the future of $YFI and the Yearn ecosystem 🚀

👇 A thread 👇
2/ We all know V2 brings multi-strategy support, but going deeper, the mechanism by which the Vault deploys and manages capital across active strategies is very cool. When a Strategy is first deployed, it is given an activation block, a debt limit and a rate limit by Governance.
3/ The debt limit is the maximum amount of token that the Vault *may* provide to that Strategy. This initial number is not fixed and is actively managed by the Vault based on the Strategy's realised vs expected performance at each Strategy.harvest().
4/ The *actual* amount of token the Vault provides to the Strategy is throttled by the rate limit when the Strategy's total debt < debt limit. Each Strategy.harvest() converts available rewards into the desired token and then reports its earnings to the Vault with Vault.sync().
5/ Each Vault.sync() is specific to the Strategy that called it. Syncing is the beating heart of the Vault and does a few key tasks. If the Strategy's realised performance > expected performance, then the Strategy's debt limit will go up, or otherwise, down.
6/ Next, if the Strategy's available credit (which expands up to the debt limit at the rate limit/block) is greater than earnings, then earnings are kept by the Strategy, and additional tokens up to the available credit are transferred to the Strategy for investment.
7/ If however the Strategy's total debt > debt limit, the Vault will sweep earnings to pay down the Strategy's debt. So, when extending credit, the rate limit throttles capital deployment. When repaying debt, this happens at the rate at which earnings are generated (harvests).
8/ This mechanism is elegant because it constantly rebalances capital allocation across active Strategies to balance capital deployed with yield generated and wider market conditions. This equilibrium should maximise yield for the entire Vault AUM.
9/ There are many other exciting things coming with V2 including: management and strategist fees as Vault dilution/share issuance (gas efficient and aligns incentives), merging the Controller contract into the Vault (simpler cognitive model)
10/ 2-phase-commit for governance changeover (safer), Strategy.tend() for position management, Strategy harvestTrigger and tendTrigger function views, a new StrategyUpdate event on Vault.sync(), a Guardian role capable of emergency shutdown, and much more!
11/ With permissionless Strategy contributions and a strong Strategist rev-share, @iearnfinance will likely become a black hole for big-brain Strategists. Other protocols will find the $1.1B+ AUM difficult to compete with (and would need to have much higher fees on lower AUMs).
12/ Finally, a disclaimer on this thread. It was assembled after reading the WIP V2 contracts. These are undergoing constant development and this thread may already be out of date. Furthermore, this thread is my interpretation, and may very well be wrong and/or half-baked. DYOR.
You can follow @undefinedza.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: