Back to Overview

Yearn ytranche

Quotation mark icon

About ytranche

Yearn implements ytranche, a tranche layer over a shared Yearn V3 vault. A central controller pools deposits from several ERC-4626 tranche strategies into one main vault and allocates target yield, excess profit, and losses across the tranches through a configurable priority waterfall.

Summary

The most critical subjects covered in our audit are the correctness of the profit and loss waterfall, rounding, and access control. Security regarding all the aforementioned subjects is satisfactory. The issues we uncovered are limited to low-severity edge cases. These include rounding effects whose impact is bounded by the trust assumption that vault share prices cannot be manipulated, see Withdraw Rounding Leaks Surplus Vault Assets to the Withdrawing Tranche and Reserve Deposits Can Freeze Settlement. The reserve-deposit issue was corrected, while the withdraw-rounding risk was accepted.

We also identified low-severity timing and lifecycle issues around loss realization, fresh-ranche donations, and heavily impaired tranches, see Losses Can Be Front-Run Before Tranche Settlement, A Donation Enables a Bounded First-Depositor Attack on a Fresh Tranche, and Tranche Losses Can Drive Share Price to Dust, Bricking or Inflating the Tranche. The timing and donation risks were accepted. The impaired-tranche issue was partially corrected, with the remaining risk being accepted.

The general subjects covered are documentation, events, and gas efficiency. Security regarding all the aforementioned subjects is high.

In summary, we find that the codebase provides a satisfactory level of security.

It is important to note that security audits are time-boxed and cannot uncover all vulnerabilities. They complement but don't replace other vital measures to secure a project.