Unstake
Unstake Ether from Stakewise V3 vaults
To withdraw your ether from the vault, you need to use the exit queue module.
1. Enter to the exit queue
First you need to lock assets in the exit queue. The shares to assets rate will be locked at the moment of the call.
Parameters
Return Values
2. Claim assets
Claims assets that were withdrawn by the Vault. It can be called only after the enterExitQueue
call by the receiver
.
Parameters
Return Values
Smart contracts
v2 vaults(current)
v1 vaults(legacy)
Vaults exit requests
You can fetch current vault exit requests from the Stakewise Graph service.
GraphQL request example
Return Values
withdrawalTimestamp values
null
- request has not been processed yet0 - ether can be claimed from the vault
int
- UTC Unix timestamp, the time when Ether will be available for claim.
Check detail in the Withdrawal timestamp calculation section
GraphQL response example
Withdrawal timestamp calculation
The withdrawal timestamp is an estimated time when Ether can be claimed. It isn't taken from contracts directly but is periodically calculated by the StakeWise backend service.
Ether withdrawal is initially taken from the free ether in the vault:
Ether that is not yet locked in validators.
New deposits are first used to cover the exit queue, and then for registration of new validators.
If this ether is insufficient, ether withdrawal from active validators in the vault is initiated. The exit of validators is triggered by the Stakewise oracle network.
To calculate the time for ether to be withdrawn from validators:
Fetch validators with status ACTIVE_EXITING or higher.
Iterate through them until enough ether has been accumulated.
Use validator's withdrawable epoch considering current network withdrawals queue length.
The vault may not have sufficient free funds, or there might be less than needed to initiate validator withdrawal. In such cases, use an average time based on rewards accumulation:
10.5 days for Mainnet
One month for Holesky
In any case, there is a delay of 24 hours after entering the Exit Queue before claiming can occur.
Exit Request Withdrawal Timestamp Processing
New requests are processed after block finalization (approximately 15 minutes for Mainnet).
The queue is recalculated every hour as new deposits may speed up request processing.
SDK
The official Javascript SDK designed for effortless data retrieval from the StakeWise platform. This SDK provides a streamlined interface over GraphQL requests and contract interactions.
Check Exit requests sections
Last updated