Releases: stakewise/v3-core
Releases · stakewise/v3-core
v3.0.0
What's Changed
- Added the
EthOsTokenVaultEscrow
andGnoOsTokenVaultEscrow
contracts. These contracts allow users to request an exit for staked ETH/GNO without immediately burning osETH/osGNO. This feature supports certain DeFi integrations by enabling users to 1) request an exit from the vault without burning osETH/osGNO, and 2) once the unstaked ETH/GNO is ready to be claimed, burn osETH/osGNO and receive the unstaked ETH/GNO in a single transaction. - Added
OsTokenFlashLoans
. This contract allows to mint and burn osETH in single transaction (up to 100k osETH). For example, leverage strategy usesOsTokenFlashLoans
to mint osETH, supply to Aave, borrow ETH, mint osETH from the vault and return the flashloan. - When user migrates from StakeWise Legacy, we always mint max amount of osTokens to the user in the Genesis Vault.
- Move back to the exit queue processing implemented in V1 vaults
- The
enterExitQueue
function will return maxUINT256
as position ticket in case the vault has no validators and assets vault can be redeemed. - The max possible osToken shares can be minted if max
UINT256
is passed to themintOsToken
. If no osToken shares can be minted, 0 will be returned.
Audit report
The audit was performed by Sigma Prime and is available here.
New Contributors
Full Changelog: v2.0.1...v3.0.0
v2.0.1
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](https://github.com/stakewise/v3-core/blob/v2.0.0/contracts/interfaces/...
- The
v1.1.0
v1.0.0
What's Changed
- Hats fixes by @tsudmi in #69
- Upgrade openzeppelin lib by @tsudmi in #73
- Decouple ostoken by @tsudmi in #76
- Upload latest halborn audit by @tsudmi in #78
- Update license year by @tsudmi in #79
- Update compiler version by @tsudmi in #80
- Add mainnet contracts by @tsudmi in #81
Full Changelog: https://github.com/stakewise/v3-core/commits/v1.0.0