[SWIP-22] Upgrade Vault Factory To v2 & Reassign Restaking Ownership

Summary

In this proposal, we suggest an upgrade to the Vaults Factory smart contracts, called version 2.0.

The proposed upgrade features revamped validator management tools, improved exit queue mechanics, and custom LTV management on a per-Vault basis.

If approved, this proposal will bring support for more validator registration setups, a more efficient exit process from Vaults, and more capital utility to stakers in select Vaults when minting osETH.

Note that your approval of this upgrade does not automatically mean that all Vaults in the StakeWise network will be upgraded. The upgrade to version 2.0 is optional for every existing Vault; only the newly created Vaults will automatically use version 2.0.

This proposal also seeks to assign ownership of the new restaking functionality (still in development) to the team to allow deployment of experimental restaking Vaults for the closest partners in a permissioned manner.

Motivation

StakeWise V3 in its current form has a ton of functionality for various categories of stakers, and continues to grow its user numbers and TVL. However, it can always be better, and this is what Vaults Factory version 2.0 is meant to address.

Broadly, the upgrade seeks to introduce three main changes:

  • Allow node operators more flexibility in how they prefer to register validators for their Vaults. Specifically, the logic for checking and managing the deposit data for various Vaults has been externalized to a standalone DepositDataRegistry.sol contract, and a new ValidatorsManager role has been created. As a result, upgraded Vaults will support dynamic validator registration and other, more complex registration setups, making it more convenient for sophisticated node operators to integrate Vaults in their services.

  • Cease paying rewards to the users who have entered the exit queue at the expense of other users in the Vault. The new exit queue implementation fixes the exchange rate between Vault shares and Total Assets of the Vault at the moment of entering the exit queue rather after completing it, mirroring the exit queue dynamics in the Beacon Chain, and making it fairer for all stakers in the Vault.

  • Enable StakeWise DAO to customize max LTV settings for different Vaults based on their perceived risk parameters. Current max LTV for osETH is set to 90% across all Vaults, without regard to their risk level. A more granular control over max LTV on a Vault-by-Vault basis enables StakeWise to build more integrations on top of Vaults, increase the usability of Vaults for the closest partners, and potentially weave SWISE ownership into LTV considerations.

Taken together, Vaults Factory version 2.0 offers tangible improvements in functionality for stakers of all kinds, and allows StakeWise DAO to pursue various growth options that were not available before.

Note that this upgrade does not automatically trigger the addition of new functionality to all the existing Vaults in the StakeWise network. The Vault Admins can upgrade their Vault proxy contract to the v2 implementation if they so desire. Only the newly created Vaults will automatically use version 2.0.

This proposal also includes the transfer of ownership for the still-in-development native restaking functionality to the team multisig. This grants the team the power to deploy Vaults for native restaking as a pilot for certain close partners without deploying a new Oracle network and other necessary infra. It poses no risk to the existing protocol and has no bearing on any of the existing staking functionality.

Specification

A rather long specification included below:

Vault Factory v2

[
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0x4b37c73f000000000000000000000000dada5a8e3703b1e3ea2bae5ab704627eb2659fcc”,
“method”: “removeFactory(address)”,
“params”: [
“0xDada5a8E3703B1e3EA2bAe5Ab704627eb2659fCC”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0x29ce1ec5000000000000000000000000faa05900019f6e465086bce16bb3f06992715d53”,
“method”: “addFactory(address)”,
“params”: [
“0xfaa05900019f6E465086bcE16Bb3F06992715D53”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xaff7947d00000000000000000000000035dc754f157b32ba0941ffcd89d16d3d0b2ca6cf”,
“method”: “addVaultImpl(address)”,
“params”: [
“0x35dC754f157b32Ba0941ffCD89d16d3D0B2cA6CF”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0x4b37c73f000000000000000000000000170618936cd96b1ed8112ec3d3778374b38dfe5e”,
“method”: “removeFactory(address)”,
“params”: [
“0x170618936cd96B1eD8112eC3D3778374B38DFe5e”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0x29ce1ec5000000000000000000000000b7832c9e93e54661354c8b88f3ce7c0915f4c896”,
“method”: “addFactory(address)”,
“params”: [
“0xb7832C9e93e54661354C8B88F3Ce7c0915f4C896”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xaff7947d00000000000000000000000081ab00dd782492d62105b8fa9b03e82d4b57798c”,
“method”: “addVaultImpl(address)”,
“params”: [
“0x81Ab00dD782492D62105B8fa9B03E82d4B57798C”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0x29ce1ec50000000000000000000000004e3d8197c2cb9bcd29e3dceae3670d3d5e774017”,
“method”: “addFactory(address)”,
“params”: [
“0x4E3D8197c2cb9bCd29e3DCeAE3670d3d5e774017”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xaff7947d00000000000000000000000000e3af59e2496d030e5b2c629784db284fd4cd3c”,
“method”: “addVaultImpl(address)”,
“params”: [
“0x00e3af59e2496d030E5B2c629784Db284FD4CD3c”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0x4b37c73f0000000000000000000000006ddc10eeeebbbcf00e784ba44fe4b038af26cb53”,
“method”: “removeFactory(address)”,
“params”: [
“0x6DDc10eEeEBbBcF00E784bA44Fe4B038af26cB53”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0x29ce1ec50000000000000000000000007a4f9912a812d932da57d73cb5e5784b2c1cba4a”,
“method”: “addFactory(address)”,
“params”: [
“0x7a4F9912a812d932da57d73Cb5E5784B2c1cBA4A”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xaff7947d000000000000000000000000ca866585ecfdfcc98348ef2717b811626ed98207”,
“method”: “addVaultImpl(address)”,
“params”: [
“0xca866585EcFdfCc98348ef2717B811626ED98207”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0x4b37c73f000000000000000000000000e84183effbcc76d022cccc31b95eaa332bb5bb11”,
“method”: “removeFactory(address)”,
“params”: [
“0xe84183EfFbcc76D022Cccc31b95EAa332bB5Bb11”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0x29ce1ec500000000000000000000000058fdd303ab66722130c01533e7a1177f2b3a2949”,
“method”: “addFactory(address)”,
“params”: [
“0x58FDD303ab66722130C01533e7A1177f2b3a2949”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xaff7947d000000000000000000000000f5f20572186d2fab233dadd753c053ab581ba69a”,
“method”: “addVaultImpl(address)”,
“params”: [
“0xF5F20572186d2FAB233dADD753C053ab581ba69A”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0x29ce1ec50000000000000000000000001be3ad178d85ce1b6a7fcf5baefe68f26541b07c”,
“method”: “addFactory(address)”,
“params”: [
“0x1bE3Ad178d85CE1b6a7fCF5baEFe68F26541b07C”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xaff7947d000000000000000000000000c25529b4ee01cc6262146433b6509e9e6e30f14a”,
“method”: “addVaultImpl(address)”,
“params”: [
“0xc25529B4ee01cc6262146433B6509E9e6e30F14a”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xaff7947d0000000000000000000000002d491bb32610a0ef1de017e49f949b3799135f31”,
“method”: “addVaultImpl(address)”,
“params”: [
“0x2D491bb32610A0ef1DE017e49f949b3799135F31”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0x29ce1ec500000000000000000000000032634dec69d4523d2f980be92494dc03bd4c9fce”,
“method”: “addFactory(address)”,
“params”: [
“0x32634dEc69D4523D2f980Be92494dC03bD4C9fce”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0x29ce1ec5000000000000000000000000807305c086a99cbdbff07cb4256ce556d9d6f0af”,
“method”: “addFactory(address)”,
“params”: [
“0x807305c086A99cbDBff07cB4256cE556d9d6F0af”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0x29ce1ec5000000000000000000000000f63666399aa1af203bfc9171147edcb21a6bf3a2”,
“method”: “addFactory(address)”,
“params”: [
“0xF63666399aA1af203BfC9171147EDcB21A6Bf3A2”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0x29ce1ec500000000000000000000000044ecc30bcc64b832a2cb5d1ff44260b1fcc565e1”,
“method”: “addFactory(address)”,
“params”: [
“0x44ECC30Bcc64b832A2cB5d1ff44260B1fCC565e1”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0x29ce1ec5000000000000000000000000026df36ec050e7f473cbfc30aa42946d3ed11b2c”,
“method”: “addFactory(address)”,
“params”: [
“0x026dF36Ec050E7f473cbfc30aA42946D3Ed11b2c”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0x29ce1ec50000000000000000000000006a2835087c6809902a2f39b86fe64ef5dacc31e1”,
“method”: “addFactory(address)”,
“params”: [
“0x6a2835087C6809902a2f39b86fe64Ef5daCc31e1”
]
}
]

Reassign Restaking Ownership

[
{
“to”: “0x32634dEc69D4523D2f980Be92494dC03bD4C9fce”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xf2fde38b000000000000000000000000f91aa4a655b6f43243ed4c2853f3508314daa2ab”,
“method”: “transferOwnership(address)”,
“params”: [“0xf91AA4a655B6F43243ed4C2853F3508314DaA2aB”]
},
{
“to”: “0x807305c086A99cbDBff07cB4256cE556d9d6F0af”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xf2fde38b000000000000000000000000f91aa4a655b6f43243ed4c2853f3508314daa2ab”,
“method”: “transferOwnership(address)”,
“params”: [“0xf91AA4a655B6F43243ed4C2853F3508314DaA2aB”]
},
{
“to”: “0xF63666399aA1af203BfC9171147EDcB21A6Bf3A2”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xf2fde38b000000000000000000000000f91aa4a655b6f43243ed4c2853f3508314daa2ab”,
“method”: “transferOwnership(address)”,
“params”: [“0xf91AA4a655B6F43243ed4C2853F3508314DaA2aB”]
},
{
“to”: “0x44ECC30Bcc64b832A2cB5d1ff44260B1fCC565e1”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xf2fde38b000000000000000000000000f91aa4a655b6f43243ed4c2853f3508314daa2ab”,
“method”: “transferOwnership(address)”,
“params”: [“0xf91AA4a655B6F43243ed4C2853F3508314DaA2aB”]
},
{
“to”: “0x026dF36Ec050E7f473cbfc30aA42946D3Ed11b2c”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xf2fde38b000000000000000000000000f91aa4a655b6f43243ed4c2853f3508314daa2ab”,
“method”: “transferOwnership(address)”,
“params”: [“0xf91AA4a655B6F43243ed4C2853F3508314DaA2aB”]
},
{
“to”: “0x6a2835087C6809902a2f39b86fe64Ef5daCc31e1”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xf2fde38b000000000000000000000000f91aa4a655b6f43243ed4c2853f3508314daa2ab”,
“method”: “transferOwnership(address)”,
“params”: [“0xf91AA4a655B6F43243ed4C2853F3508314DaA2aB”]
}
]

The proposed code changes have been audited by Sigma Prime - the report can be found here.

Discussion

We welcome your comments and thoughts on the proposal. If you support the proposed upgrade, vote with your SWISE in this Snapshot: Snapshot