# Deposit Stake

The Othentic CLI allows you to deposit stake to EigenLayer staking contracts ([strategies](https://docs.eigenlayer.xyz/developers/HowTo/build/avs-permissionlesss)).&#x20;

You can choose one of these options:

1. [Deposit native ETH](#option-1-deposit-native-eth)
2. [Deposit a supported staking contract](#option-2-deposit-a-supported-staking-contract)
3. [Deposit a custom staking contract](#option-3-deposit-a-custom-staking-contract)
4. [Deposit manually](#option-4-deposit-manually)

### Prerequisites

1. [Registered Operator on EigenLayer](https://docs.othentic.xyz/main/user-guide/operator-management/register-to-eigenlayer)
2. Asset balance to deposit
3. Sufficient funds to cover gas costs

{% hint style="info" %}
If depositing a custom asset, note its **staking contract address (**[**strategy address**](https://github.com/Layr-Labs/eigenlayer-contracts?tab=readme-ov-file#strategies)**)**
{% endhint %}

***

### Option 1: Deposit native ETH

{% stepper %}
{% step %}

### Run the deposit command

```
otcli operator deposit
```

{% endstep %}

{% step %}

### Enter your private key

{% hint style="info" %}
Make sure to input the raw 32-byte private key that controls the Operator Account, **without** leading `0x`.
{% endhint %}
{% endstep %}

{% step %}

### Choose stETH as the staking contract

Choose **stETH**, the first option in the list, and press **Enter**.
{% endstep %}

{% step %}

### Enter the amount

For example: `0.1` to deposit 0.1 ETH.
{% endstep %}

{% step %}

### Choose "YES" to convert amount

When prompted with the following query:

```
? Convert ETH to get the amount to deposit (Y/n) 
```

Enter "Y" and press **Enter.**
{% endstep %}
{% endstepper %}

***

### Option 2: Deposit a supported staking contract

{% hint style="warning" %}
Make sure the operator account has the required balance in the selected asset before depositing.
{% endhint %}

{% stepper %}
{% step %}

### Run the deposit command

```
otcli operator deposit
```

{% endstep %}

{% step %}

### Enter your private key

{% hint style="info" %}
Make sure to input the raw 32-byte private key that controls the Operator Account, **without** leading `0x`.
{% endhint %}
{% endstep %}

{% step %}

### Choose the supported asset from the list&#x20;

If you can't find it, refer to [Option 3: Deposit to a custom staking contract](#option-3-deposit-a-custom-staking-contract).
{% endstep %}

{% step %}

### Enter the amount

For example: `0.1` to deposit 0.1 ETH.
{% endstep %}
{% endstepper %}

***

### Option 3: Deposit a custom staking contract

{% stepper %}
{% step %}

### Find your custom staking contract address

{% hint style="info" %}
For help, please contact the AVS team or the [Othentic team](https://discord.gg/QgTaNSMece).
{% endhint %}
{% endstep %}

{% step %}

### Run the deposit command with the required option

```
otcli operator deposit --staking-contract-address <staking_contract_address>
```

Provide the staking contract address.
{% endstep %}

{% step %}

### Enter your private key

{% hint style="info" %}
Make sure to input the raw 32-byte private key that controls the Operator Account, **without** leading `0x`.
{% endhint %}
{% endstep %}

{% step %}

### Enter the amount to deposit in ETH units

For example: `0.1` to deposit 0.1 ETH.
{% endstep %}
{% endstepper %}

***

### Option 4: Deposit Manually

{% stepper %}
{% step %}

### Find the Staking Contract and Strategy contract addresses

You can find the addresses in [eigenlayer-contracts. ](https://github.com/Layr-Labs/eigenlayer-contracts/tree/main?tab=readme-ov-file#strategies)

For eg:

`stETH` Staking Contract address on Holesky is [0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034](https://holesky.etherscan.io/address/0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034#writeProxyContract)

`stETH` Strategy Address on Holesky is&#x20;

[`0x93c4b944D05dfe6df7645A86cd2206016c51564D`](https://etherscan.io/address/0x93c4b944D05dfe6df7645A86cd2206016c51564D)
{% endstep %}

{% step %}

### Get the Staking Token

To generate `stETH` on Holesky, simply transfer any ETH amount to the Staking contract.

![](https://4144525652-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYlSi30nrcEOossIDFFua%2Fuploads%2F7c2dDNa8mfCf4Vu8MVxk%2Fimage.png?alt=media\&token=22365d31-b7cd-47fb-96bd-ef7d811a4dcc)<br>

See the example transaction [here](https://holesky.etherscan.io/tx/0x0b78c4e8ad93f968d754f840c10f838e9c7f533d08f11ac046757ddcf1ce694e).
{% endstep %}

{% step %}

### Approve Strategy Manager as spender

To stake with EigenLayer using **a staking contract**, **Approve** the EigenLayer **StrategyManager** to spend **maximum allowance** of tokens from a **Staking Contract**.&#x20;

Execute `approve` method in the Staking Contract with below values:

* `_spender`: **Strategy Manager**\
  For e&#x67;**.** 0xA744429bf286789225308a81A5a4b8049562A362
* `_amount`: 115792089237316195423570985008687907853269984665640564039457584007913129639935

<figure><img src="https://4144525652-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYlSi30nrcEOossIDFFua%2Fuploads%2FD8lBowOkVyhiQ08lEzEz%2Fimage.png?alt=media&#x26;token=71943e78-3e11-4c23-8fe7-22512a67e863" alt=""><figcaption><p>approve</p></figcaption></figure>
{% endstep %}

{% step %}

### Deposit into the Staking Contract

Execute the `depositIntoStrategy` function on the `StrategyManager` contract and call it with the amount you'd like to restake:

The parameters to pass should be:

* `strategy`: Strategy address 0x96D47307C2844fb46792BcEFC903855440b4b2ad
* `token`: Staking contract address 0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034
* `amount`: amount you'd like to re-stake

<figure><img src="https://4144525652-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYlSi30nrcEOossIDFFua%2Fuploads%2FmlE2xHkmr7sjWavycDju%2Fimage.png?alt=media&#x26;token=fdeb4b6c-56eb-4264-8fd5-5cb42830c1c8" alt=""><figcaption><p>deposit</p></figcaption></figure>
{% endstep %}

{% step %}

### Verify Your Deposit

To ensure your tokens were successfully deposited, go to the **Strategy Contract (**[**stETH**](https://holesky.etherscan.io/address/0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034#readProxyContract#F45)**)** and call the `sharesOf(address)` function.
{% endstep %}
{% endstepper %}
