Skip to main content

Restaking Smart Contract Developer (Testnet)

The following instructions include an overview of the changes to Smart Contract Restaking per the Slashing and Operator Set release. All existing instructions on Restaking Smart Contract Developer remain unchanged for this update, except where noted below.

The following is not a complete description of the Slashing and Operator Sets upgrade and is qualified in its entirety by reference to the Unique Stake Allocation & Deallocation ELIP-002.

Key EigenLayer Protocol references for this guide:

Withdraw (Unstake) Liquid Tokens

  1. Invoke DelegationManager.getWithdrawableShares() to determine the Staker’s withdrawable shares, which represent deposited shares minus slashed shares. withdrawable shares, which represent deposited shares minus slashed shares.
  2. Prepare the 'depositShares' parameter for the queueWithdrawals() function.
    • Pass the number of withdrawable shares as input to the convertToDepositShares() function.
    • The resulting value represents the amount to be used in the 'depositShares' parameter in the queueWithdrawals() function.
  3. Queue Withdrawal: invoke DelegationManager.queueWithdrawals() to trigger the escrow period.
    • Please see the QueuedWithdrawalParams struct documentation for more details on how to construct the input parameters.
    • Please see further detail here on the escrow period.
  4. Complete Withdrawal as Tokens: invoke DelegationManager.completeQueuedWithdrawal() to complete the withdrawal and return assets to the withdrawer's wallet.

Delegation

The Delegation steps remain unchanged for the Slashing and Operator Set release.

Note: For a given asset, if the Operator has been slashed 100% for that Strategy, then no new Stakers can delegate to the Operator if they hold this Strategy asset. This was designed to avoid smart contract division by zero (0) errors.

Withdraw Native ETH Balance

This process is intended to allow users to withdraw their Native beacon chain balance from the EigenPod.

  1. Validator Exit
    • Fully exit the Validator. You may monitor its activity via beaconcha.in/validator/[yourvalidatorid] .
    • Wait for the final beacon chain withdrawal to be deposited to your EigenPod. There can be a lag of up to 24 hours to 7 days between the validator appearing as "exited" and the withdrawal amount deposited to EigenPod. Please see the "Withdrawals" tab and "Time" column for your validator via beaconcha.in/validator/[yourvalidatorid]#withdrawals . The ETH will then be recognized in the EigenPod.
  2. Generate checkpoint proof via eigenpod-proofs-generation CLI in order to initiate and complete a checkpoint.
  3. Determine the number of withdrawable shares.
    • Invoke DelegationManager.getWithdrawableShares() to determine the Staker’s withdrawable shares, which represent deposited shares minus slashed shares.
    • Invoke [YourEigenPod].withdrawableRestakedExecutionLayerGwei() to get the amount of withdrawable execution layer ETH in gwei. Convert the gwei to wei (multiply by by 10^9 or 1,000,000,000).
    • Confirm the number of withdrawable shares is less than withdrawableRestakedExecutionLayerGwei. Otherwise, the withdrawal will not be completable after it is queued.
  4. Prepare the depositShares parameter for the queueWithdrawals() function.
    • Pass the number of withdrawable shares as input to the convertToDepositShares() function.
    • The resulting value represents the amount to be used in the depositShares parameter in the queueWithdrawals() function.
  5. Invoke the DelegationManager.queueWithdrawals() function.
    • This function can only be invoked by the EigenPod Owner wallet.
    • Please see the QueuedWithdrawalParams struct documentation for more details on how to construct the input parameters.
    • strategies - use the Beacon chain ETH strategy (0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0).
  6. Wait for the Escrow Period to complete.
  7. Invoke DelegationManager.completeQueuedWithdrawal().

Withdraw Yield Only

This process is intended to allow users to withdraw yield (beacon chain consensus rewards, execution fees, and ETH) from the EigenPod.

  1. Generate checkpoint proof via eigenpod-proofs-generation CLI in order to initiate and complete a checkpoint.
  2. Determine the number of withdrawable shares.
    • Invoke DelegationManager.getWithdrawableShares() to determine the Staker’s withdrawable shares, which represent deposited shares minus slashed shares.
    • Invoke [YourEigenPod].withdrawableRestakedExecutionLayerGwei() to get the amount of withdrawable execution layer ETH in gwei. Convert the gwei to wei (multiply by by 10^9 or 1,000,000,000).
    • Confirm the number of withdrawable shares is less than withdrawableRestakedExecutionLayerGwei. Otherwise, the withdrawal will not be completable after it is queued.
  3. Prepare the depositShares parameter for the queueWithdrawals() function.
    • Pass the number of withdrawable shares as input to the convertToDepositShares() function.
    • The resulting value represents the amount to be used in the depositShares parameter in the queueWithdrawals() function.
  4. Invoke the DelegationManager.queueWithdrawals() function.
    • This function can only be invoked by the EigenPod Owner wallet.
    • Please see the QueuedWithdrawalParams struct documentation for more details on how to construct the input parameters.
    • strategies - use the Beacon chain ETH strategy (0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0).
  5. Wait for the Escrow Period to complete.
  6. Invoke DelegationManager.completeQueuedWithdrawal().