StakeWise V3 Exit Queue
An assisted adapter that reports the assets owed to an account in StakeWise V3's exit queue, fed onchain by the owner Safe.
An assisted adapter that reports the assets owed to an account in StakeWise V3's exit queue. When shares enter the queue, their value is invisible to NAV: a position is identified only by the positionTicket that enterExitQueue returns, and there is no per-account enumeration. The owner submits each (vault, positionTicket, timestamp) tuple, and the adapter values it from live onchain reads.
Type: Assisted adapter, permissionless and keyed on
msg.senderprotocolSubId:
keccak256("stakewise-v3-exit")Source:
StakeWiseV3ExitQueueAssistedBalanceAdapter.solAssistant:
StakeWiseV3ExitQueueAssistant.sol
Positions returned
Up to two legs per exit ticket, split by claimability. Both are Supplied, not debt, denominated in the staking asset (native ETH on mainnet), with positionInstanceId = bytes32(positionTicket).
Claimable
false
Exited assets past the claim delay, withdrawable now
Locked
true
Still-queued shares, and exited assets still inside the claim delay
A zero leg is omitted. The position is dropped if the staking asset is not registered in the NAV Calculator, if no live tickets are cached, or if assetFilter excludes it.
Feed surface
The surface is permissionless, with no roles and no account argument. Each coordinate is a tuple.
submit(address vault, uint256 positionTicket, uint256 timestamp)
Track one of the caller's exit positions. Reverts if the vault is not StakeWise-registered, the tuple is not owed to the caller, or the cache holds 256 tuples
remove(address vault, uint256 positionTicket, uint256 timestamp)
Stop tracking a position once it is claimed. Reverts while the position is still owed
positionsOf(address account)
View the cached tuples for an account (display only)
clearAccount()
Drop all of the caller's cached tuples
Exit positions have no ownerOf, so ownership is proven by calculateExitedAssets(account, ...) > 0: a tuple that is not the caller's resolves to zero and is rejected on submit.
The assistant
Use the assistant instead of calling the vault directly. It is delegatecalled by the Safe, forwards the same StakeWise call, and keeps the adapter in step in the same transaction.
enterExitQueue(vault, shares)
Enters the queue with the Safe as receiver and returns a ticket
submit(vault, positionTicket, block.timestamp)
claimExitedAssets(vault, positionTicket, timestamp, exitQueueIndex)
Claims exited assets to the Safe
remove(vault, positionTicket, timestamp)
Under delegatecall the vault sees the Safe as msg.sender, which StakeWise's claim path requires. Removal on claim is best effort and never blocks the claim: a partial claim leaves the ticket tracked, and an untracked ticket is ignored.


Balance calculation


For each cached tuple the adapter calls the vault with receiver = account and splits the position:
A ticket that is not yet checkpointed is fully pending and is reported as locked. Each tuple is valued in isolation, so one bad tuple never drops the rest.
Identity
positionId:
abi.encode(vault), one per vaultpositionKind:
SuppliedpositionInstanceId:
bytes32(positionTicket), shared by both legs of a ticketLabels:
["Exit Queue", "<receiptSymbol>"], for example["Exit Queue", "osETH"], shown on the verbose reads
The reconciliation key excludes isLocked and positionInstanceId, so all of an account's tickets for a vault reconcile into one coordinate and sum. Read isLocked per leg for the claimable and locked split.
Constructor
vaultsRegistry_
StakeWise VaultsRegistry, which gates the vaults the cache accepts
underlyingToken_
Staking asset the queue pays out: native ETH on mainnet. All accepted vaults must settle in it
receiptSymbol_
Receipt token symbol for the label ("osETH" on mainnet, "osGNO" on Gnosis). May be empty
navCalculator_
NAV Calculator, used for asset-registry metadata
exitClaimDelay_
StakeWise's post-checkpoint claim delay in seconds (86400 on V3 mainnet)
There is no admin or assistant argument. The assistant is deployed separately and pinned to this adapter. On mainnet every StakeWise V3 vault settles in ETH, so do not deploy against a non-ETH underlyingToken on a chain with a different staking asset.
Registration
Register with addBalanceAdapters([adapter]) and remove with removeBalanceAdapters([adapter]). The owner's own transactions then keep the cache current, typically through the assistant.
Last updated