v2.0.0
What's Changed
Gnosis vaults
- New Gnosis vaults were deployed to the Gnosis network. They use the new VaultGnoStaking module. The main differences from the Ethereum vaults are as follows:
- Deposits are made in GNO tokens, and ERC-20 approval must be done before the call.
- Partial and full withdrawals are stored in the contract used to register the validators. They are pulled by the vault during user withdrawals, validator registrations, and state updates.
- 1 GNO, instead of 32 ETH, must be staked for the validator to activate.
- Rewards from transaction fees are received in xDAI and must be swapped using the swapXdaiToGno function. This function performs the transaction through the Balancer pool (which can be updated by the DAO) and uses oracles to verify the correct swap price in the XdaiExchange contract.
Restake vaults
- New Restake vaults were deployed to the Ethereum network. They use the new VaultEthRestaking module. The main differences from the regular Ethereum vaults are as follows:
- The new createEigenPod function creates EigenPod and EigenPodOwner contracts and emits the EigenPodCreated event. The
EigenPodOwner
contract is the owner of theEigenPod
and stores the functions to manage it. All the eigen pods can be retrieved using the getEigenPods function. - The new restakeOperatorsManager role was added to the vault. The address assigned to this role can create new eigen pods and delegate or undelegate eigen operators to the eigen pods. This role is assigned to the vault admin by default and can be updated by the vault admin using the setRestakeOperatorsManager function, which emits the RestakeOperatorsManagerUpdated event.
- The new restakeWithdrawalsManager role was added to the vault. The address assigned to this role can verifyWithdrawalCredentials for the eigen pod validators, enter the exit queue in the Eigenlayer using queueWithdrawal, and complete queued withdrawals from the Eigenlayer using completeQueuedWithdrawal. This role is assigned to the vault admin by default and can be updated by the vault admin using the setRestakeWithdrawalsManager function, which emits the RestakeWithdrawalsManagerUpdated event. This role must be assigned to the v3-operator hot wallet to manage the EigenLayer withdrawals.
- The validators registered for the vault must include a withdrawal address that matches one of the eigen pods created for the vault. The withdrawal address is then converted to the withdrawal credentials as seen here.
- The new createEigenPod function creates EigenPod and EigenPodOwner contracts and emits the EigenPodCreated event. The
Blocklist vaults
- New blocklist vaults were deployed to Ethereum and Gnosis. These vaults use the VaultBlocklist module, which keeps track of accounts that cannot stake to the vault. For example, you can block all sanctioned addresses from depositing to your vault.
- The account with the blocklistManager role can manage the blocklist. This role is assigned to the vault admin by default. The vault admin can update the role using the setBlocklistManager function, which emits the BlocklistManagerUpdated event.
- You can use blockedAccounts to check whether an account is blocked. The
blocklistManager
can update the list using the updateBlocklist function. Blocklist updates emit the BlocklistUpdated event.
Exit queue
- The enterExitQueue function now locks the conversion rate between assets and shares at the time of the call, rather than during the
updateState
call. Shares are burned immediately. The locked assets will not receive rewards after the call but will incur penalties if the vault APY is negative. These penalties will be distributed proportionally to all assets in the vault. Exit positions created before the upgrade will be processed according to the Vault’s V1 logic. - All newly created exit positions now emit the V2ExitQueueEntered event.
- The ExitingAssetsPenalized event is emitted during the updateState call if the vault incurs a penalty. The penalty will be proportionally distributed among all currently exiting assets.
- The claimExitedAssets will not return anything after the upgrade.
- The claimExitedAssets must be used for the exit positions created before and after the vault upgrade to V2.
- The
redeem
function was removed. All the exits must be submitted using enterExitQueue. - The totalExitingAssets function was added to the vault. It returns the total amount of assets in the exit queue after the upgrade to V2.
- For exit positions created after the upgrade, the getExitQueueIndex function is not needed. You can pass
0
to both the calculateExitedAssets and claimExitedAssets functions.
Validators management
- All the logic for managing the vault’s deposit data has been moved to the immutable DepositDataRegistry contract:
- The
validatorsRoot
was moved to depositDataRoots. - The
validatorIndex
was moved to depositDataIndexes. - The
keysManager
was moved to getDepositDataManager. - The
setKeysManager
was moved to setDepositDataManager. - The
registerValidator
was moved to registerValidator. - The
registerValidators
was moved to registerValidators.
- The
- During the vault upgrade, all current values for the variables above are migrated to the
DepositDataRegistry
contract, so no extra actions are needed. - The new validatorsManager role has been added to the vault. The address assigned to this role can register validator(s) and defaults to the
DepositDataRegistry
contract. ThevalidatorsManager
role can be updated by the admin using the setValidatorsManager function. This function emits the ValidatorsManagerUpdated event on every update. - The new registerValidators function has been added to the vault. This function allows for the registration of both single and multiple validators. It can only be called by the
validatorsManager
or by providing the signature of thevalidatorsManager
over the validator registration data (see example here).
Private vaults
- The ERC-20 private vaults, on token transfer, check that both the sender and recipient are whitelisted.
- Both ERC-20 and non-ERC-20 private vaults, on mintOsToken, check that the caller is still whitelisted.
Vault osToken
- The depositAndMintOsToken and updateStateAndDepositAndMintOsToken functions have been added to all the Ethereum vault contracts. These functions can be used to batch deposit, mint
osToken
, and update the vault state in a single call. If theosTokenShares
argument is set to2^256 - 1
, the maximum osToken shares will be minted based on the deposit amount. - The OsTokenConfig was updated:
- Replaced
redeemFromLtvPercent
andredeemToLtvPercent
variables with the redeemer role that can redeem assets from the vaults whereosToken
was minted. An equal amount ofosToken
must be burned during the call. This role is managed by the DAO through the setRedeemer function, which emits the RedeemerUpdated event. - The DAO can set the default configuration for all vaults or override the configuration for a specific vault using the updateConfig function. By setting the
liqThresholdPercent
parameter to2^64 - 1
, liquidations will be disabled for the vault.
- Replaced
RewardSplitter
- The
redeem
function was removed from the RewardSplitter contract. - The totalRewards function was added. It returns the total amount of accumulated unclaimed rewards.
Full Changelog: v1.1.0...v2.0.0