What you can do
| deposit ETH to a vault | Get vault shares for ETH | CommunityVault.deposit(receiver, referrer) with ETH value; call updateStateAndDeposit when isStateUpdateRequired() is true |
| mint osETH | Borrow osETH against vault shares | CommunityVault.mintOsToken(receiver, osTokenShares, referrer) after checking OsTokenConfig.getConfig and the position health |
| repay osETH | Reduce the osETH position | approve osETH to the vault if needed, then CommunityVault.burnOsToken(shares) |
| exit to ETH via vault | Withdraw vault shares as ETH through the exit queue | CommunityVault.enterExitQueue(shares, receiver) to get a ticket; after processing, CommunityVault.claimExitedAssets(ticket, timestamp, index) |
| redeem osETH | Sell osETH back for ETH through the redeemer | approve osETH to OsTokenRedeemer, then enterExitQueue(amount, receiver); later processExitQueue() and claimExitedAssets(ticket, timestamp) |
Withdrawals are queued. A vault exit can wait for validator exits when the vault has little withdrawable ETH; withdrawableAssets() shows what is available now.
osETH minting creates debt. If the position drifts past the liquidation threshold, it can be liquidated; keep a margin under the LTV limit.
Share price depends on oracle-signed rewards updates. A stale vault needs updateState before deposits or mints use the current price.
Vaults are operated by their admins and node operators. Vault risk (validator slashing, operator behaviour, MEV escrow) is separate from the core protocol.
Contracts
Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).VaultFactoryfactory on ethereum0x7A8cbBf690084E43De778173cfAcf7313c9122DD
write createVault(bytes,bool)
Deploy a new vault proxy from the current implementation. Argument 1: ABI-encoded vault init params (capacity, fee percent, metadata hash; see the v3-core repo). Argument 2: true to deploy a dedicated MEV escrow for the vault. Returns the new vault address. Check the StakeWise docs before sending ETH with the call.
read implementation()
Current vault implementation that new vaults point to.
read ownMevEscrow()
Address of the MEV escrow contract used by vaults created with their own escrow.
read vaultAdmin()
Admin address that the factory assigns to new vaults.
Erc20VaultFactoryfactory on ethereum0x97795DA27138BD8d79204D37F3A2e80fA4d30488
write createVault(bytes,bool)
Deploy a new ERC-20 variant vault from the current ERC-20 implementation. Same arguments as VaultFactory.createVault: encoded init params and the MEV escrow flag. Returns the vault address.
read implementation()
Current ERC-20 vault implementation that new vaults point to.
VaultsRegistryother on ethereum0x3a0008a588772446f6e656133C2D5029CC4FC20E
read vaults(address)
True if the address is a vault registered by the protocol.
read factories(address)
True if the address is an approved vault factory.
read vaultImpls(address)
True if the address is an approved vault implementation.
CommunityVaultvault on ethereum0x154628AC72533aad39aBdcaE2055Dced0b4Eef4D
write deposit(address,address)
Deposit ETH (msg.value) and mint vault shares to receiver. Argument 1: receiver. Argument 2: referrer (zero address if none). Returns the shares minted. Shares track the vault's assets, so the share price rises as rewards are added.
write updateStateAndDeposit(address,address,(bytes32,int160,uint160,bytes32[]))
Apply a signed rewards update first, then deposit. Use this when the vault state is stale. Arguments: receiver, referrer, and the harvest params (rewards root, reward delta, unlocked MEV reward, merkle proof) from the StakeWise rewards API.
write mintOsToken(address,uint256,address)
Mint osETH against your vault shares. Arguments: receiver, osETH amount in osToken shares, referrer. Minting raises the position's debt, so keep it under the vault's LTV limit (see OsTokenConfig.getConfig) or the position can be liquidated.
write burnOsToken(uint128)
Burn osETH held against your position to reduce its debt. Argument: osToken shares to burn. Burn your osETH first.
write enterExitQueue(uint256,address)
Start an exit: burn vault shares into the exit queue and receive a position ticket. Arguments: shares, receiver. Exits are queued, not instant. Claim the ETH with claimExitedAssets after the queue processes the ticket.
write claimExitedAssets(uint256,uint256,uint256)
Claim ETH for a processed exit queue position. Arguments: position ticket, timestamp and exit queue index, taken from the exit queue data. Reverts until the position is processed.
write updateState((bytes32,int160,uint160,bytes32[]))
Apply a signed rewards update (rewards root, reward delta, unlocked MEV reward, merkle proof) so the share price is current. Anyone can submit a valid update.
read totalAssets()
Total ETH controlled by the vault in wei.
read convertToAssets(uint256)
ETH value of a share amount at the current share price.
read convertToShares(uint256)
Shares for an ETH amount at the current share price.
read getShares(address)
Vault shares held by an account.
read osTokenPositions(address)
osETH shares minted against an account's position in this vault.
read withdrawableAssets()
ETH that can be withdrawn now without waiting for validator exits.
read isStateUpdateRequired()
True if the vault needs a rewards update before a deposit or mint gives the current share price.
OsToken (osETH)token on ethereum0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38
read balanceOf(address)
osETH balance of an account (18 decimals).
read totalSupply()
Total osETH in existence.
write transfer(address,uint256)
Transfer osETH.
write approve(address,uint256)
Approve a spender for osETH, for example the redeemer or a DEX router.
write permit(address,address,uint256,uint256,uint8,bytes32,bytes32)
EIP-2612 signed approval for osETH.
read controllers(address)
True if the address may mint and burn osETH (the controller contracts only).
OsTokenVaultControllerother on ethereum0x2A261e60FB14586B474C208b1B7AC6D0f5000306
read convertToAssets(uint256)
ETH value of osToken shares at the current rate.
read convertToShares(uint256)
osToken shares for an ETH amount at the current rate.
read totalAssets()
Total ETH backing the osETH supply.
read totalShares()
Total osToken shares in existence.
read avgRewardPerSecond()
Average osETH reward rate per second used for the osETH rate.
read capacity()
Maximum osETH supply the controller allows.
read feePercent()
Protocol fee percent on osETH rewards (uint64).
write updateState()
Refresh the osETH rate state. Permissionless.
OsTokenConfigother on ethereum0x287d1e2A8dE183A8bf8f2b09Fa1340fBd766eb59
read getConfig(address)
osToken risk config for a vault, returned as a tuple of (uint128, uint64, uint64). Check the v3-core repo for the field names and units before using the values.
read redeemer()
Address of the OsTokenRedeemer contract.
OsTokenRedeemerother on ethereum0x9Fc8C7F3C1ff6d0DF39EcB5870884d59777Ea2Bb
write enterExitQueue(uint256,address)
Queue osETH for redemption into ETH. Per the StakeWise docs, the user sends osETH to the redeemer and receives a ticket. Arguments: amount and receiver (check get_abi for the exact units). Settlement depends on minters' positions and checkpoints.
write processExitQueue()
Process queued redemptions when the queue is ready (see canProcessExitQueue).
read canProcessExitQueue()
True if the exit queue can be processed now.
read getExitQueueData()
Exit queue totals: queued shares, cumulative tickets and the processed amounts (3 values).
write claimExitedAssets(uint256,uint256)
Claim ETH for a processed redemption ticket. Arguments: position ticket and timestamp from the queue entry.
read exitQueueTimestamp()
Timestamp of the last exit queue update.
read exitQueueUpdateDelay()
Minimum seconds between exit queue updates.
read maxRedemptionFeePercent()
Upper bound on the redemption fee percent.
read redemptionFeePercent()
Current redemption fee percent.
Keeperother on ethereum0x6B5815467da09DaA7DC83Db21c9239d98Bb487b5
read canHarvest(address)
True if the vault can harvest its rewards now.
read isHarvestRequired(address)
True if the vault's state is stale and a harvest is needed.
read isCollateralized(address)
True if the vault is collateralized for its osETH position.
read rewardsRoot()
Merkle root of the latest rewards update (bytes32).
read rewardsNonce()
Nonce of the latest rewards update.
read lastRewardsTimestamp()
Timestamp of the latest rewards update (uint64).
read rewardsDelay()
Minimum delay between rewards updates.