[SWIP-34] Upgrade Vault Factory to v4 and Enable Pectra Functionality

Executive summary

In this proposal, we put forward smart contract changes that enable Vaults to benefit from Pectra functionality, and seek to introduce additional Vault customization features, including admin role, fees, deposit routing, and more. This upgrade affects StakeWise implementations on both Ethereum and Gnosis Chain. The proposed additions and changes have been audited by ABDK.

Motivation

Introduced on May 7th, Ethereum’s Pectra fork has brought novel ways to add and withdraw funds from validators in the Beacon Chain. The upgrade was pretty monumental in that it has the potential to speed up deposits and withdrawals of ETH from Vaults, dramatically improving staking and Boost UX under the right network conditions (e.g. short execution layer withdrawal queue).

Following a rigorous development & review process, we are now proposing changes to the VaultFactory contract that would introduce support for Pectra-related functionality, alongside adding many additional UX and protocol improvements.

The proposed upgrade seeks to allow Vaults to create 0x02 validators, consolidate 0x01 validators into 0x02 validators, process unstaking and unboosting requests using partial withdrawals via the execution layer, top-up 0x02 validators up to 2048 ETH, change Vault fees, and Vault admin wallet, donate assets to Vault stakers, and more.

On top of support for Pectra, this SWIP seeks to introduce MetaVault functionality that enables programmable routing of ETH deposits into multiple Vaults at once. It is also looking to add functionality to the optional RewardSplitter contract.

In short, it’s perhaps the largest upgrade to Vaults since the introduction of the Vault architecture itself.

To see the full list of changes suggested by this SWIP, see this changelog.

All the proposed additions and changes have been audited by ABDK.

Specification

Ethereum
{
  "transactions": [
    {
      "data": "0xaff7947d00000000000000000000000078c3d2f86307ea55f9335eadd63519e8dda7cb9a",
      "method": "addVaultImpl(address)",
      "operation": "0",
      "params": [
        "0x78C3d2F86307EA55f9335EadD63519E8dDa7CB9a"
      ],
      "to": "0x3a0008a588772446f6e656133C2D5029CC4FC20E",
      "value": "0.0"
    },
    {
      "data": "0xaff7947d000000000000000000000000540168c0a0f73f1bad9cf2c67fda57d0d484f896",
      "method": "addVaultImpl(address)",
      "operation": "0",
      "params": [
        "0x540168C0a0F73F1Bad9CF2C67fda57d0D484F896"
      ],
      "to": "0x3a0008a588772446f6e656133C2D5029CC4FC20E",
      "value": "0.0"
    },
    {
      "data": "0xaff7947d0000000000000000000000009aed69ad8ee8dc0d4c278fa6f0f47ae61dd516de",
      "method": "addVaultImpl(address)",
      "operation": "0",
      "params": [
        "0x9AED69Ad8eE8dc0D4C278Fa6F0f47ae61DD516de"
      ],
      "to": "0x3a0008a588772446f6e656133C2D5029CC4FC20E",
      "value": "0.0"
    },
    {
      "data": "0xaff7947d0000000000000000000000008eab7febbf4af379843897b1f05c0c9aa2794d47",
      "method": "addVaultImpl(address)",
      "operation": "0",
      "params": [
        "0x8Eab7fEBBF4AF379843897b1f05c0c9aa2794D47"
      ],
      "to": "0x3a0008a588772446f6e656133C2D5029CC4FC20E",
      "value": "0.0"
    },
    {
      "data": "0xaff7947d00000000000000000000000055cea594761a134e2bd4f379de83120938901e7c",
      "method": "addVaultImpl(address)",
      "operation": "0",
      "params": [
        "0x55CEa594761a134e2bd4f379De83120938901e7c"
      ],
      "to": "0x3a0008a588772446f6e656133C2D5029CC4FC20E",
      "value": "0.0"
    },
    {
      "data": "0xaff7947d000000000000000000000000f652f1aec694f9448c870f478190700205c10630",
      "method": "addVaultImpl(address)",
      "operation": "0",
      "params": [
        "0xF652F1AEc694F9448c870f478190700205c10630"
      ],
      "to": "0x3a0008a588772446f6e656133C2D5029CC4FC20E",
      "value": "0.0"
    },
    {
      "data": "0xaff7947d000000000000000000000000f9ace671cf05651069258ae3b6eeb89f8f1a5323",
      "method": "addVaultImpl(address)",
      "operation": "0",
      "params": [
        "0xF9ACe671cF05651069258AE3B6eEb89f8f1a5323"
      ],
      "to": "0x3a0008a588772446f6e656133C2D5029CC4FC20E",
      "value": "0.0"
    },
    {
      "data": "0xaff7947d0000000000000000000000002ad8f7ad6a3e1b5ffb1274c45df574da5515b75a",
      "method": "addVaultImpl(address)",
      "operation": "0",
      "params": [
        "0x2ad8F7aD6A3e1b5ffB1274C45Df574dA5515B75A"
      ],
      "to": "0x3a0008a588772446f6e656133C2D5029CC4FC20E",
      "value": "0.0"
    },
    {
      "data": "0x29ce1ec5000000000000000000000000bb4e0ec6bcebd583dc1a1c1123557eeadc4f8769",
      "method": "addFactory(address)",
      "operation": "0",
      "params": [
        "0xbb4e0ec6BcEbD583DC1A1c1123557eeadC4f8769"
      ],
      "to": "0x3a0008a588772446f6e656133C2D5029CC4FC20E",
      "value": "0.0"
    },
    {
      "data": "0x29ce1ec50000000000000000000000001669875a4f9f549c5f878cf5d2d5d5a01cba162d",
      "method": "addFactory(address)",
      "operation": "0",
      "params": [
        "0x1669875a4f9f549C5F878cf5d2d5D5a01cbA162d"
      ],
      "to": "0x3a0008a588772446f6e656133C2D5029CC4FC20E",
      "value": "0.0"
    },
    {
      "data": "0x29ce1ec5000000000000000000000000e0766385879f16ff626c2651d254131a4675db43",
      "method": "addFactory(address)",
      "operation": "0",
      "params": [
        "0xE0766385879F16Ff626C2651d254131A4675DB43"
      ],
      "to": "0x3a0008a588772446f6e656133C2D5029CC4FC20E",
      "value": "0.0"
    },
    {
      "data": "0x29ce1ec5000000000000000000000000ec739f8de9576c342cd16a0ffbd58a8d5d72e5e4",
      "method": "addFactory(address)",
      "operation": "0",
      "params": [
        "0xEC739F8DE9576c342Cd16A0FfBd58A8d5D72E5e4"
      ],
      "to": "0x3a0008a588772446f6e656133C2D5029CC4FC20E",
      "value": "0.0"
    },
    {
      "data": "0x29ce1ec5000000000000000000000000bb91b06c6038f9be3e0ce9c4192f152837da5f55",
      "method": "addFactory(address)",
      "operation": "0",
      "params": [
        "0xbb91b06C6038F9be3E0CE9C4192f152837dA5F55"
      ],
      "to": "0x3a0008a588772446f6e656133C2D5029CC4FC20E",
      "value": "0.0"
    },
    {
      "data": "0x29ce1ec5000000000000000000000000886a7ca996003f77b70890a94c2c1ca9d64099c0",
      "method": "addFactory(address)",
      "operation": "0",
      "params": [
        "0x886A7Ca996003F77b70890a94c2C1ca9d64099C0"
      ],
      "to": "0x3a0008a588772446f6e656133C2D5029CC4FC20E",
      "value": "0.0"
    },
    {
      "data": "0x29ce1ec50000000000000000000000005cbae77c8c1769cb980ac85e194b04d03495a9ba",
      "method": "addFactory(address)",
      "operation": "0",
      "params": [
        "0x5Cbae77C8C1769cb980ac85E194B04d03495A9BA"
      ],
      "to": "0x3a0008a588772446f6e656133C2D5029CC4FC20E",
      "value": "0.0"
    }
  ]
}
Gnosis Chain
{
  "transactions": [
    {
      "data": "0xaff7947d0000000000000000000000006162e3bc0321c1d2eed5af3e70c2d70c96d8b649",
      "method": "addVaultImpl(address)",
      "operation": "0",
      "params": [
        "0x6162E3BC0321C1D2eEd5Af3e70C2d70C96D8b649"
      ],
      "to": "0x7d014B3C6ee446563d4e0cB6fBD8C3D0419867cB",
      "value": "0.0"
    },
    {
      "data": "0xaff7947d000000000000000000000000857049dd92d140996af5da49076508c47236368e",
      "method": "addVaultImpl(address)",
      "operation": "0",
      "params": [
        "0x857049Dd92d140996AF5da49076508c47236368E"
      ],
      "to": "0x7d014B3C6ee446563d4e0cB6fBD8C3D0419867cB",
      "value": "0.0"
    },
    {
      "data": "0xaff7947d000000000000000000000000e86863f85c6d7f9b416f0ed93fedbee5e6b574cb",
      "method": "addVaultImpl(address)",
      "operation": "0",
      "params": [
        "0xe86863F85C6d7F9B416F0eD93FEDbeE5E6b574cb"
      ],
      "to": "0x7d014B3C6ee446563d4e0cB6fBD8C3D0419867cB",
      "value": "0.0"
    },
    {
      "data": "0xaff7947d0000000000000000000000003c607d1faa6a7af0fd0ccd60c68dab5def6b4e33",
      "method": "addVaultImpl(address)",
      "operation": "0",
      "params": [
        "0x3c607d1FAa6a7AF0fD0CCd60c68Dab5DEf6b4E33"
      ],
      "to": "0x7d014B3C6ee446563d4e0cB6fBD8C3D0419867cB",
      "value": "0.0"
    },
    {
      "data": "0xaff7947d000000000000000000000000a6bc2b470f60713979121f8b8ca5523004fc079d",
      "method": "addVaultImpl(address)",
      "operation": "0",
      "params": [
        "0xa6bc2B470f60713979121f8b8cA5523004Fc079D"
      ],
      "to": "0x7d014B3C6ee446563d4e0cB6fBD8C3D0419867cB",
      "value": "0.0"
    },
    {
      "data": "0xaff7947d0000000000000000000000006c2b6137017c4cd99ee7f3015ee7925d45b54ca0",
      "method": "addVaultImpl(address)",
      "operation": "0",
      "params": [
        "0x6C2b6137017C4Cd99ee7f3015eE7925d45B54Ca0"
      ],
      "to": "0x7d014B3C6ee446563d4e0cB6fBD8C3D0419867cB",
      "value": "0.0"
    },
    {
      "data": "0xaff7947d000000000000000000000000352b36a954badc6a299a4c0adc61c2e9a161db91",
      "method": "addVaultImpl(address)",
      "operation": "0",
      "params": [
        "0x352B36A954baDc6a299A4c0Adc61C2E9A161dB91"
      ],
      "to": "0x7d014B3C6ee446563d4e0cB6fBD8C3D0419867cB",
      "value": "0.0"
    },
    {
      "data": "0xaff7947d0000000000000000000000008f3abffa399d2810f727d9376f3b55df71b25373",
      "method": "addVaultImpl(address)",
      "operation": "0",
      "params": [
        "0x8f3abFFA399D2810F727D9376F3b55DF71b25373"
      ],
      "to": "0x7d014B3C6ee446563d4e0cB6fBD8C3D0419867cB",
      "value": "0.0"
    },
    {
      "data": "0x29ce1ec5000000000000000000000000944f90f17fe3be136ccbe57f5e92e594f058ec62",
      "method": "addFactory(address)",
      "operation": "0",
      "params": [
        "0x944f90F17FE3BE136cCBE57F5E92e594f058eC62"
      ],
      "to": "0x7d014B3C6ee446563d4e0cB6fBD8C3D0419867cB",
      "value": "0.0"
    },
    {
      "data": "0x29ce1ec50000000000000000000000000d712429f3cff24580b599a5273de83713aad6b9",
      "method": "addFactory(address)",
      "operation": "0",
      "params": [
        "0x0D712429F3cfF24580B599a5273DE83713aAd6B9"
      ],
      "to": "0x7d014B3C6ee446563d4e0cB6fBD8C3D0419867cB",
      "value": "0.0"
    },
    {
      "data": "0x29ce1ec5000000000000000000000000e541e55c8299423baf81d81088f5d8cbbcd430a7",
      "method": "addFactory(address)",
      "operation": "0",
      "params": [
        "0xe541e55C8299423BAF81D81088f5D8CBbCd430a7"
      ],
      "to": "0x7d014B3C6ee446563d4e0cB6fBD8C3D0419867cB",
      "value": "0.0"
    },
    {
      "data": "0x29ce1ec5000000000000000000000000df6189b37cd830c99e5bedcdebaf507b40eac3dc",
      "method": "addFactory(address)",
      "operation": "0",
      "params": [
        "0xdf6189B37CD830C99e5BEdcDebaF507B40EAC3dC"
      ],
      "to": "0x7d014B3C6ee446563d4e0cB6fBD8C3D0419867cB",
      "value": "0.0"
    },
    {
      "data": "0x29ce1ec5000000000000000000000000e2c17ae51545f7a8e0f5ad58c32da7601afdb7bc",
      "method": "addFactory(address)",
      "operation": "0",
      "params": [
        "0xe2c17Ae51545F7a8E0F5AD58C32da7601AfDB7BC"
      ],
      "to": "0x7d014B3C6ee446563d4e0cB6fBD8C3D0419867cB",
      "value": "0.0"
    },
    {
      "data": "0x29ce1ec5000000000000000000000000ef3191ec95945760aca4c344facbccecc358353c",
      "method": "addFactory(address)",
      "operation": "0",
      "params": [
        "0xeF3191EC95945760Aca4C344FACBcCECC358353C"
      ],
      "to": "0x7d014B3C6ee446563d4e0cB6fBD8C3D0419867cB",
      "value": "0.0"
    },
    {
      "data": "0x29ce1ec5000000000000000000000000634b567ffe82c01c8c467674755fcf13a8e20db6",
      "method": "addFactory(address)",
      "operation": "0",
      "params": [
        "0x634B567ffE82c01C8C467674755Fcf13A8e20dB6"
      ],
      "to": "0x7d014B3C6ee446563d4e0cB6fBD8C3D0419867cB",
      "value": "0.0"
    }
  ]
}

Considerations

This upgrade carries no changes to the Vaults that don’t seek to upgrade their Vault versions and receive new capabilities. However, it grants massive new capabilities to the Vaults that seek to make use of Pectra-related functionality, and gives more customization options to Vault owners. We expect stakers in most Vaults to be affected by these upgrades eventually; we think it’s for the best given the UX improvements enabled by this SWIP, and recommend all Vaults to undergo an upgrade if this proposal is approved by the DAO.

Discussion & voting

The Snapshot for this proposal is live for both Ethereum and Gnosis Chain:

If anything in the proposal remains unclear, or you have questions or comments, please leave them below - let’s discuss!

1 Like