ETH withdrawals | Tech Explainer

ETH withdrawals | Tech Explainer

About Stader

Stader is a multi-chain, non-custodial liquid staking protocol on six chains, including Polygon, Fantom, BNB, NEAR, Hedera, and Terra 2.0. With over $120 Mn in TVL across chains, Stader is trusted by 70K+ wallets and a community of 150K+ members.

Stader’s mission is to unlock a passive income opportunity for 1Bn+ people through staking and DeFi. We aim to achieve this by simplifying staking & offering the best yield opportunities with our liquid staking solution across multiple blockchains.

ETHx (following Stader’s convention of an x-for-suffix for liquid tokens) is the liquid staking token for staked Ethereum offered by Stader. ETHx aims to provide Stakers with a decentralized and scalable solution with diverse DeFi integrations.

This blog series aims to give the reader an understanding of the inner workings of ETHx, covering the architecture through a series of posts outlined below

  1. Node Operator onboarding
  2. Deposit workflow
  3. Rewards management
  4. Oracle updates
  5. ETH withdrawals
  6. Security

ETH Withdrawals

This specific post focuses on redeeming ETHx tokens for ETH. An ETHx token holder can exchange their ETHx tokens for ETH via two options.

1. Swap through DEX

First, they can use a decentralized exchange (DEX) with ETHx-ETH liquidity. On a DEX, ETHx tokens are swapped for ETH at the pool’s exchange rate. Users receive ETH instantly in the same transaction but typically pay a small premium for this instant liquidity.

ETHx holders can also use DEX aggregators like 1inch or Cowswap to find the best rates across multiple DEXes.

Overall, redeeming via DEX is preferred because it saves gas and provides an (almost) equal value compared to the ETHx smart contract exchange rate. Only in extreme market volatility do DEX rates diverge from ETHx smart contract rates.

2. Redemption via ETHx smart contracts

The second option is to redeem ETH directly through the ETHx smart contracts. Stakers can request redemptions in a 3-step process using their ETHx tokens.

  1. Provide ETHx tokens
    Stakers transfer ETHx tokens to UserWithdrawalManager contract proportionate to the expected ETH they want to redeem based on the current exchange rate. User requests are queued to be processed in the next step.
  2. Finalize Withdraw Requests
    Finalization is a protocol declaration that a user-requested ETH is available to claim. This call is permissionless and processes user requests from the queue in Step 1 on a first-come, first-serve basis. Each user withdrawal request undergoes a mandatory delay that avoids sandwich attacks and acts as a guardrail against malicious behaviors. ETHx tokens are burned, and ETH is moved from the deposit pool to make it available for claiming.
  3. Claim
    A user request that is finalized can immediately be claimed by its recipient on making a transaction to the ETHx smart contracts. Claim sends the ETH back to the recipient’s address to conclude the redemption process.

Given that the latter option provides the latest exchange rate (& often better than through option1), redemption via ETHx smart contracts is suitable whenever a guaranteed rate is necessary. The redemption time depends on factors like the ETH amount requested, the availability of ETH in the deposit pool, the exit queue length, etc. We expect smaller amounts (<1000 ETH) to be redeemable in a few hours (less than a day), while larger redemptions (>100,000 ETH) can take 1–2 weeks, depending on the exit queue length.

How are redemptions facilitated?

ETH to support redemption can come from various sources

  1. ETH in the Deposit pool that has not been staked
  2. Staking Rewards from ETHx validators
  3. Staked ETH released by withdrawn validators.

Solely exiting validators to facilitate redemptions is a standard method for bookkeeping. However, validator exit timelines are subject to exit queue congestion and impose opportunity costs for Stakers and Node operators for staking rewards and gas fees, respectively. So, ETHx treats exiting validators as a last resort. Instead, ETHx smart contracts leverage all idle ETH available in contracts before queuing validators for exits.

Determining the quickest time for ETH redemption is challenging due to the unpredictable rate deposits, redemptions, and the exit queue. The validator exit algorithm considers the following parameters to provide a heuristic estimate for the number of validators to exit to meet the current redemption demand.

  1. Validators that are in the exit queue
  2. Validators that are slashed
  3. Anticipated deposit demand
  4. Anticipated redemption demand
  5. Anticipated Ethereum rewards per day
  6. Time to exit new validators.

The output of the heuristic algorithm is used to exit just the correct number of validators. Exits can happen in multiple ways.

  1. A Node operator can sign and broadcast an exit message for any of their validators in a permissionless manner.
  2. A Node operator could be slashed and be in the exit queue. After exiting, the Oracle committee settles the funds based on the penalty incurred between Stakers and Node Operators.
  3. Stader broadcasts a validator’s exit message once sufficient proof accrues that the Node Operator acted maliciously, specifically, loss of rewards and MEV misappropriation.
  4. Stader broadcasts a validator’s exit message if the above redemption algorithm determines that validators be exited to meet redemption demand. The order for validator exits is currently determined in a FIFO order. However, this order will be upgraded to a combination of performance, collateralization, and penalties.

Once exited, the unstaked ETH is deposited into ETHx smart contracts and moved to the Deposit pool for redemptions or staking.

This post covered how ETH can be redeemed via ETHx contracts. In subsequent posts, we will cover the security measures undertaken for ETHx smart contracts to provide a safe & reliable experience for users.

For any questions you may have, please reach out to us here.

Join 17,000+ ETHx early birds now! Get launch alpha and early access to $1M in SD rewards.