Published in


Fund in the Shell: a transplant approach to upgradable Enzyme portfolios

Non-upgradable funds are a user experience nightmare

  • how to communicate the move with mostly pseudo-anonymous investors
  • funnel drop-off between investors redeeming shares and re-investing
  • gas and protocol fee costs of this multi-step process

Upgrading Enzyme funds in a way that allows user agency is extremely complicated

  1. Complexity of code base
  2. Coupling of contracts
  3. Desire to allow users to optionally upgrade

Fund in the shell: finding the “soul” of Enzyme funds

  • asset holdings
  • shares
  • ownership and access
  • mandate (what the fund is and is not allowed to do)
  • fees
  • accounting and valuation logic
  • strategies
  • other configuration

Upgrading funds via transplant migration

A rough diagram to conceptualize the varying lifespans, dependencies, and control pathways in the Enzyme Protocol

The ghost and the shell: VaultProxy and VaultLib

The transplant surgeon: Dispatcher

  • The next VaultLib
  • The next accessor (an abstract reference to the account that is allowed to change VaultProxy state)
The only necessary architectural components of new releases is a broadly-defined top-level contract to interact with the `Dispatcher` , and the new `VaultLib`
  1. The manager signals that they will upgrade to the newest release
  2. The manager must wait for a timelock to expire (currently 48 hours)
  3. The manager executes the upgrade, finalizing the move

Protocol upgrades that fit the soul



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sean Casey

Head of Smart Contracts at Avantgarde Finance (Enzyme Protocol, formerly Melon)