Skip to content
docs

default

Defined in: protocol-staking-ssv-evm/src/ssv-protocol-evm.ts:222

SSV Network token staking for EVM wallet accounts.

SSV Network is the distributed validator (DVT) infrastructure a large share of Ethereum staking runs on; SSV is its ERC-20 token, and cluster operators pay the network’s fees in ETH. Staking SSV mints cSSV 1:1 — a transferable, non-rebasing receipt token — and entitles the holder to a pro-rata share of those ETH fees, tracked through an ETH-per-share index and claimable at any time without unstaking. Getting the SSV back is a two-phase exit: a requestUnstake burns the cSSV into a cooldown entry (7 days at launch, DAO-tunable, not cancellable) and withdrawUnlocked pays out every entry whose cooldown has ended.

That two-phase shape is exactly the proposed StakingProtocol interface: stake → requestWithdrawal → getWithdrawalRequests → claimWithdrawals. Two honest differences from the Lido implementation are documented on the methods: the withdrawal pays SSV (the staked token, not the chain’s native token), and the claim call is all-or-nothing (ids are informational).

Neither SSV nor cSSV supports EIP-2612 permit, so the first stake is two transactions: approve (awaited to a mined receipt — stake’s gas estimate reverts against an unmined allowance) and then stake. Every write is proven with an eth_call before broadcasting, so a revert surfaces as the named custom error instead of burned gas.

new default(account, config?): SsvProtocolEvm

Defined in: protocol-staking-ssv-evm/src/ssv-protocol-evm.ts:234

Creates a new interface to the SSV Network staking protocol for evm blockchains.

StakingWalletAccount

The wallet account to use to interact with the protocol (a @anywalletkit/wallet-evm account, or a read-only / minimal { getAddress } account for views).

SsvProtocolConfig = {}

The protocol’s configuration.

SsvProtocolEvm

StakingProtocol.constructor

protected readonly _account: IWalletAccountReadOnly | IWalletAccount

Defined in: core/dist/index-QWdcwE6y.d.ts:309

StakingProtocol._account


protected readonly _config: SsvProtocolConfig

Defined in: core/dist/index-QWdcwE6y.d.ts:310

StakingProtocol._config

claimRewards(): Promise<ClaimWithdrawalsResult>

Defined in: protocol-staking-ssv-evm/src/ssv-protocol-evm.ts:567

Claims the accrued ETH rewards — ETH lands on the account, the staked position is untouched.

Promise<ClaimWithdrawalsResult>

The claim’s result.


claimWithdrawals(_options?): Promise<ClaimWithdrawalsResult>

Defined in: protocol-staking-ssv-evm/src/ssv-protocol-evm.ts:461

Pays out every cooldown entry that has unlocked — SSV lands on the account. withdrawUnlocked is all-or-nothing on the network side, so options.ids cannot narrow the claim; they are accepted for interface parity and the call refuses only when nothing at all is unlocked.

ClaimWithdrawalsOptions

The claim’s options.

Promise<ClaimWithdrawalsResult>

The claim’s result.

StakingProtocol.claimWithdrawals


describeActivity(tx, ctx): ActivityItem | null

Defined in: protocol-staking-ssv-evm/src/ssv-protocol-evm.ts:650

Recognize this deployment’s SSV staking transactions offline (stake, requestUnstake, withdrawUnlocked, claimEthRewards on SSVNetwork). See ssv-activity.ts for the rule.

ChainTx

DescribeActivityContext

ActivityItem | null

StakingProtocol.describeActivity


getApr(): Promise<number>

Defined in: protocol-staking-ssv-evm/src/ssv-protocol-evm.ts:502

The current APR in percent, from SSV Network’s API — the same number stake.ssv.network shows. It is ETH-denominated on an SSV-denominated stake, so it moves with SSV’s price.

Promise<number>

The APR.

StakingProtocol.getApr


getAprHistory(options?): Promise<AprSample[]>

Defined in: protocol-staking-ssv-evm/src/ssv-protocol-evm.ts:620

Daily APR samples from SSV Network’s API, oldest first, with the SSV and ETH prices the API priced them at. Decoration: failures return an empty array, never throw.

The history’s options.

number = 7

Promise<AprSample[]>

Samples (timestamp unix seconds, apr percent).


getClaimableRewards(): Promise<bigint>

Defined in: protocol-staking-ssv-evm/src/ssv-protocol-evm.ts:546

ETH rewards accrued to the account and not yet claimed. Claims round down to ETH_CLAIM_UNIT; below it the network refuses the claim.

Promise<bigint>

ETH in wei.


getCooldown(): Promise<number>

Defined in: protocol-staking-ssv-evm/src/ssv-protocol-evm.ts:592

The network’s current unstake cooldown, in seconds (DAO-tunable — read it, never hardcode 7 days).

Promise<number>

Cooldown seconds.


getNetworkStats(): Promise<NetworkStats>

Defined in: protocol-staking-ssv-evm/src/ssv-protocol-evm.ts:601

Network-wide staking figures.

Promise<NetworkStats>

Total cSSV supply (SSV base unit), the ETH pool backing claims (wei), and the cumulative ETH-per-share index (1e18 precision).


getStakedBalance(): Promise<StakedBalance>

Defined in: protocol-staking-ssv-evm/src/ssv-protocol-evm.ts:487

The account’s staked position. cSSV is the only staked form and it is 1:1 with SSV, so wrappedBalance is 0 and rate is exactly 1e18.

Promise<StakedBalance>

The staked balances.

StakingProtocol.getStakedBalance


getTokenBalance(): Promise<bigint>

Defined in: protocol-staking-ssv-evm/src/ssv-protocol-evm.ts:533

The account’s liquid (unstaked, stakeable) SSV balance.

Promise<bigint>

SSV in base unit.


getWithdrawalRequests(): Promise<WithdrawalRequestsView>

Defined in: protocol-staking-ssv-evm/src/ssv-protocol-evm.ts:412

The account’s open cooldown entries. Ids are the entries’ positions in the network’s per-account list — stable until a withdrawal removes the unlocked ones, so re-read after every write rather than caching them. timestamp is derived (unlockTime − current cooldown); unlockTime is the on-chain value. Amounts are SSV: the exit pays the staked token, not ETH.

Promise<WithdrawalRequestsView>

The queue view.

StakingProtocol.getWithdrawalRequests


quoteClaimRewards(): Promise<Omit<ClaimWithdrawalsResult, "hash">>

Defined in: protocol-staking-ssv-evm/src/ssv-protocol-evm.ts:580

Quotes the costs of a rewards claim.

Promise<Omit<ClaimWithdrawalsResult, "hash">>

The claim’s costs.


quoteClaimWithdrawals(_options?): Promise<Omit<ClaimWithdrawalsResult, "hash">>

Defined in: protocol-staking-ssv-evm/src/ssv-protocol-evm.ts:475

Quotes the costs of a withdraw operation.

ClaimWithdrawalsOptions

The claim’s options.

Promise<Omit<ClaimWithdrawalsResult, "hash">>

The claim’s costs.

StakingProtocol.quoteClaimWithdrawals


quoteRequestWithdrawal(options): Promise<Omit<WithdrawalRequestResult, "hash" | "approveHash">>

Defined in: protocol-staking-ssv-evm/src/ssv-protocol-evm.ts:397

Quotes the costs of an unstake request.

WithdrawalRequestOptions

The request’s options.

Promise<Omit<WithdrawalRequestResult, "hash" | "approveHash">>

The request’s costs.

StakingProtocol.quoteRequestWithdrawal


quoteStake(options): Promise<Omit<StakeResult, "hash">>

Defined in: protocol-staking-ssv-evm/src/ssv-protocol-evm.ts:366

Quotes the costs of a stake operation, assuming the network already holds an allowance (without one the estimate itself reverts).

StakeOptions

The stake’s options.

Promise<Omit<StakeResult, "hash">>

The stake’s costs.

StakingProtocol.quoteStake


requestWithdrawal(options): Promise<WithdrawalRequestResult>

Defined in: protocol-staking-ssv-evm/src/ssv-protocol-evm.ts:382

Burns cSSV into a cooldown entry. Irreversible: the entry cannot be cancelled and stops earning immediately; the SSV unlocks after the network’s cooldown (see getCooldown). There is a single staked-token form, so token is accepted for interface parity and ignored.

WithdrawalRequestOptions

The request’s options (amount in cSSV base unit).

Promise<WithdrawalRequestResult>

The request’s result (approveHash is always null — burning needs no approval).

StakingProtocol.requestWithdrawal


protected requireSigningAccount(methodName): IWalletAccount

Defined in: core/dist/index-QWdcwE6y.d.ts:322

The account, narrowed to a signing one, or a ReadOnlyAccountError naming the caller.

string

IWalletAccount

StakingProtocol.requireSigningAccount


stake(options): Promise<StakeResult & object>

Defined in: protocol-staking-ssv-evm/src/ssv-protocol-evm.ts:326

Stakes SSV — cSSV lands on the account 1:1 and ETH rewards start accruing at once. Approves first when the allowance is short (the approval is awaited to a mined receipt), then proves and sends stake.

StakeOptions

The stake’s options (amount in SSV base unit).

Promise<StakeResult & object>

The stake’s result; fee includes the approval when one ran.

StakingProtocol.stake