[SWIP-28] Fix Corner Case Related To Exit Queue In Vaults v3

Executive summary

In this proposal, we are requesting the DAO’s approval for minor changes to the exit queue logic to fix a corner case in the exit queue index calculation. In some cases, exit queue positions that were processed but not claimed in v2 vaults may become unclaimable in v3 vaults. These changes have been approved by Sigma Prime, who previously audited most of the StakeWise smart contracts.

Motivation

The release of Vaults v3 has introduced a return to the exit queue mechanics seen in v1, whereby the exchange rate between total assets and vault shares is no longer fixed when entering the exit queue. This change resulted in a corner case whereby some assets cannot be claimed from the queue despite having exited the network. In this proposal, we’re pushing for a change to the Vault exit queue logic that would fix the corner case.

The proposed changes have been reviewed by Sigma Prime, a key auditor for StakeWise.

Specification

Json

[
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xaff7947d000000000000000000000000decb606ee9140f229df78f9e40041ead61610f8f”,
“method”: “addVaultImpl(address)”,
“params”: [
“0xDecb606ee9140f229Df78F9E40041EAD61610F8f”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xaff7947d000000000000000000000000135f45e0179dd928e73422b40bdc6c5d7047a035”,
“method”: “addVaultImpl(address)”,
“params”: [
“0x135f45e0179dd928E73422B40Bdc6C5d7047a035”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xaff7947d000000000000000000000000d19e4b1d680a6aa672b08ebf483381bc0c9c8478”,
“method”: “addVaultImpl(address)”,
“params”: [
“0xd19E4B1d680a6aA672b08ebf483381bc0C9c8478”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xaff7947d0000000000000000000000007e5198df09fed891e7aecd623cd2231443ceb5d5”,
“method”: “addVaultImpl(address)”,
“params”: [
“0x7E5198DF09fED891e7AecD623cD2231443cEb5d5”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xaff7947d0000000000000000000000009488a7dd178f0d927707eec61a7d8c0ae9558c88”,
“method”: “addVaultImpl(address)”,
“params”: [
“0x9488A7dd178F0D927707eEc61A7D8C0ae9558c88”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xaff7947d00000000000000000000000084d44a696539b3ef4162184fb8ab97596a311e9e”,
“method”: “addVaultImpl(address)”,
“params”: [
“0x84d44A696539B3eF4162184fb8ab97596A311e9E”
]
},
{
“to”: “0x3a0008a588772446f6e656133C2D5029CC4FC20E”,
“operation”: “0”,
“value”: “0.0”,
“data”: “0xaff7947d0000000000000000000000009481a47c5650a868839c6511f0eef8bf962fabd7”,
“method”: “addVaultImpl(address)”,
“params”: [
“0x9481A47c5650A868839c6511f0Eef8bF962FABD7”
]
}
]

Discussion

We welcome your comments on this proposal, but are keeping the timeline for its approval short to get rid of the corner case quickly.

Vote

Link to Snapshot: Snapshot