Skip to content

Commit 198cc78

Browse files
authored
Added how to withdraw using Delegation contract (#252)
1 parent 914cefe commit 198cc78

File tree

4 files changed

+90
-4
lines changed

4 files changed

+90
-4
lines changed

docs/eigenlayer/restakers/restaking-guides/1-restaking-developer-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
sidebar_position: 3
3-
title: Restaking Smart Contract Developer
2+
sidebar_position: 4
3+
title: Restaking smart contract developer
44
---
55

66
Smart Contract Restaking allows the user to interact directly with the EigenLayer core contracts. The following sections describe how to setup your Restaking integration with the EigenLayer contracts directly with no reliance on the EigenLayer Web App.

docs/eigenlayer/restakers/restaking-guides/claim-rewards-app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
sidebar_position: 2
3-
title: Claim Rewards using EigenLayer App
3+
title: Claim rewards using EigenLayer app
44
---
55

66
For information on Rewards concepts, refer to [Rewards Overview](../../concepts/rewards/rewards-concept.md).

docs/eigenlayer/restakers/restaking-guides/testnet/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
sidebar_position: 4
3-
title: Testnet Restaking
3+
title: Testnet restaking
44
---
55

66
## Testing Restaking on the Holesky Testnet
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
sidebar_position: 3
3+
title: Withdraw using contract
4+
---
5+
6+
:::caution Manual withdrawals
7+
If you’re having issues withdrawing your funds using the EigenLayer app, you can manually complete the process using the
8+
Delegation Contract on Etherscan.
9+
10+
The manual withdrawal:
11+
* Involves interacting directly with the Delegation contract on Etherscan. Only proceed if you’re comfortable
12+
using smart contracts.
13+
* Requires spending ETH in gas.
14+
:::
15+
16+
Find the Delegation manager contract here: [EigenLayer Core Contracts](https://docs.eigencloud.xyz/products/eigenlayer/developers/concepts/eigenlayer-contracts/core-contracts).
17+
18+
:::note
19+
For native ETH , your full ETH balance must already be available in your Eigenpod contract. Any validators being stopped
20+
must have fully exited and the funds swept to the Execution layer. A checkpoint must be completed or
21+
the withdrawal attempt will fail.
22+
:::
23+
24+
## Withdraw funds using Delegation contract
25+
26+
1. Open the Delegation Contract by going to the EigenLayer Delegation contract on Etherscan at
27+
`0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A`.
28+
29+
2. Read your queued withdrawals:
30+
1. Navigate to the _Contract_ tab.
31+
2. Select *Read as Proxy*.
32+
3. Find function 19: `getQueuedWithdrawals`. Note that it's `Withdrawals`, with an S at the end.
33+
4. Click on the arrow to the right.
34+
5. In the _staker (address)_ field, enter your wallet address and click *Query*.
35+
36+
3. Save the Withdrawal Data.
37+
38+
You receive a response similar to:
39+
```
40+
[getQueuedWithdrawals(address) Response]
41+
withdrawals (array) : [
42+
{
43+
staker (address) : 0x[YOUR ADDRESS]
44+
delegatedTo (address) : 0x[OPERATOR]
45+
withdrawer (address) : 0x[YOUR ADDRESS]
46+
nonce (uint256) : 15
47+
startBlock (uint32) : 24246024
48+
strategies (array) : [
49+
0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0
50+
scaledShares (array) : [
51+
13636298239000000000
52+
]
53+
}
54+
]
55+
```
56+
57+
Save these values, you need them in the next step.
58+
59+
:::note
60+
The timestamp shows the block when your withdrawal was queued. If that block is less than 14 days old, the withdrawal attempt will fail.
61+
:::
62+
63+
4. Complete the Withdrawal:
64+
1. Switch to the _Write as Proxy_ tab.
65+
2. Connect your wallet.
66+
3. Find the function completeQueuedWithdrawal. Note that it's `Withdrawal`, no S at the end.
67+
4. Fill in the inputs using the data you saved in the previous step:
68+
```
69+
staker: <staker address>
70+
delegatedTo: <delegated address>
71+
withdrawer: <withdrawer address>
72+
nonce: <nonce number>
73+
startBlock: <start block number>
74+
strategies: [<strategy address>]
75+
scaledShares: [<scaledShares number>]
76+
tokens: [<token address you want to withdraw. For Native ETH withdrawals, enter 0x0000000000000000000000000000000000000000>]
77+
receiveAsTokens: true
78+
```
79+
80+
You can specify `receiveAsTokens: false` to cancel a completable withdrawal and return the assets to fully restaked status eligible to earn rewards.
81+
82+
5. Submit the Transaction
83+
1. Click *Write*.
84+
Your wallet prompts a transaction.
85+
2. Review the simulation carefully, then confirm.
86+
Once confirmed, you’ll receive your tokens directly in your wallet.

0 commit comments

Comments
 (0)