> ## Documentation Index
> Fetch the complete documentation index at: https://docs.p2p.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Ethereum

> Unified API + Ethereum Integration Workflow

In the following guide, the integration process for the `eth-ssv` chain is covered. The Ethereum SSV On-Chain integration aligns with the general [Unified API process](/docs/unified-api-getting-started) but with network-specific parameters.

[Get an authentication token](/docs/authentication) to start using the Unified API.

Request examples are provided using [cURL](https://curl.se/).

> To check the integration guides for other chains, refer to the [Networks Supported](/docs/unified-api-networks) section.

<Note>
  **Key Ethereum-specific details**

  * `chain`— always set to `eth_ssv` for Ethereum-related requests.
  * `network` — environment in which the transaction is processed: `testnet` or `mainnet`.
  * `stakerAddress` — account address initiating staking, unstaking or withdrawal transactions.
</Note>

## Staking flow

### 1. Create staking request

Send a POST request to [/api/v1/unified/staking/stake](/reference/unified-create-stake-transaction).

Example request (for `testnet` network):

<CodeGroup>
  ```bash bash theme={null}
  curl --request POST \
       --url https://api-test.p2p.org/api/v1/unified/staking/stake \
       --header 'Content-Type: application/json' \
       --header 'Authorization: Bearer <token>' \
       --data '{
      "chain": "eth_ssv",
      "network": "testnet",
      "stakerAddress": "0x136c861fC99d1624155F5FC8A06BAC79eD8547b1",
      "amount": 32,
      "extra": {
          "withdrawalAddress": "0x136c861fC99d1624155F5FC8A06BAC79eD8547b1",
          "amountPerValidator": "32000000000",
          "withdrawalCredentialsType": "0x02"
      }
  }'
  ```
</CodeGroup>

* `chain`— blockchain network, always set to `eth_ssv` for Ethereum-related requests.

* `network` — environment in which the transaction is processed: `testnet` or `mainnet`.

* `stakerAddress` — account address initiating the staking transaction.

* `amount` — amount of tokens to stake in ETH.

* `extra`— additional parameters:

  * `withdrawalAddress`— withdrawal address for the validators.
  * `amountPerValidator`— amount of tokens to stake in Gwei per validator.
  * `withdrawalCredentialsType`— withdrawal credentials preferred format: `0x01` or `0x02`.

Example response:

<CodeGroup>
  ```json JSON theme={null}
  {
      "error": null,
      "result": {
          "amount": "32000000000000000000",
          "stakerAddress": "0x136c861fC99d1624155F5FC8A06BAC79eD8547b1",
          "unsignedTransactionData": "0x02f9023882426880830f42408463aeabb88398968094e9dfc1850110dadf68402ec6ad2b9bdfb79807338901bc16d674ec800000b90204746bd1000100000000000000000000003202b5b0602274197ccb22b8c02cec9539990c7c000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000000000000000000000000000000000000000000251c0000000000000000000000003202b5b0602274197ccb22b8c02cec9539990c7c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000e8ffb2afa84510d1814e8d74478b71041c42db7fe128144fdd7a268bf448ba856345ad5b70b23bae824295c393fa1df1d3dcc203112022ca0cfe23b069877d20ea1e5dd64fffec475f7b0d0200182525b28bf76e1e6110ba0db5edd87b39799b7d01bceefe4af93f0a94fac12291a9f0b5b093fb11c220581de0ff2e20f126105918e2b27ed42c9bccda8e949d0bc0ff8be8c4a57741db21c30ff2fefdce7ecf8722ea53db9800d6612c4f0a81a54334b6ab08f52dd6c28f5f363dd5a59a1bab46e2a2fc30bf2c83ae388fa15e0faf4a3d2da85b1b8a180b77906286eaf4443d9e4825a7df8a7cf940000000000000000000000000000000000000000000000000c0",
          "extraData": {
              "to": "0xE9DfC1850110DadF68402Ec6AD2B9bDfB7980733",
              "gasLimit": "10000000",
              "data": "0x746bd1000100000000000000000000003202b5b0602274197ccb22b8c02cec9539990c7c000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000000000000000000000000000000000000000000251c0000000000000000000000003202b5b0602274197ccb22b8c02cec9539990c7c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000e8ffb2afa84510d1814e8d74478b71041c42db7fe128144fdd7a268bf448ba856345ad5b70b23bae824295c393fa1df1d3dcc203112022ca0cfe23b069877d20ea1e5dd64fffec475f7b0d0200182525b28bf76e1e6110ba0db5edd87b39799b7d01bceefe4af93f0a94fac12291a9f0b5b093fb11c220581de0ff2e20f126105918e2b27ed42c9bccda8e949d0bc0ff8be8c4a57741db21c30ff2fefdce7ecf8722ea53db9800d6612c4f0a81a54334b6ab08f52dd6c28f5f363dd5a59a1bab46e2a2fc30bf2c83ae388fa15e0faf4a3d2da85b1b8a180b77906286eaf4443d9e4825a7df8a7cf940000000000000000000000000000000000000000000000000",
              "chainId": 560048,
              "type": 2,
              "maxFeePerGas": "1672391608",
              "maxPriorityFeePerGas": "1000000"
          }
      }
  }
  ```
</CodeGroup>

* `amount` — amount of tokens to stake denominated in Gwei (1 ETH = 10⁻⁹ Gwei)

* `stakerAddress` — staking account address receiving the staked tokens.

* `unsignedTransactionData` — raw transaction hex string. To be signed and broadcasted.

* `extraData` — additional transaction details:

  * `to` — recipient address for this transaction.
  * `gasLimit` — maximum <Tooltip tip="A measure of computational effort required to execute a transaction or smart contract on a blockchain. Users must pay a gas fee, usually in the native token, to have their transactions processed by the network.">gas</Tooltip> limit for this block.
  * `data` — transaction data.
  * `chainId` — chain ID this transaction is authorized on, as specified by [EIP-155](https://eips.ethereum.org/EIPS/eip-155).
  * `type` — [EIP-2718](https://eips.ethereum.org/EIPS/eip-2718) type of this transaction envelope.
  * `maxFeePerGas` — maximum price per unit of gas this transaction will pay for the combined [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) block's base fee and this transaction's priority fee in Wei.
  * `maxPriorityFeePerGas` — price per unit of gas in Wei, which is added to the [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) block's base fee. This added fee is used to incentivize miners to prioritize this transaction.

### 2. Sign and send transaction

Use `unsignedTransactionData` to [sign](/docs/unified-api-signing-transaction) the transaction, following the Ethereum-specific signing logic.

To broadcast the signed transaction to the Ethereum network, send a POST request to [/api/v1/eth/transactions](/reference/broadcast-eth-transaction).

<CodeGroup>
  ```bash bash theme={null}
  curl --request POST \
    --url 'https://api-test.p2p.org/api/v1/unified/transaction/broadcast' \
    --header 'accept: application/json' \
    --header 'authorization: Bearer <token>' \
    --header 'content-type: application/json' \
    --data '{
      "chain": "eth_ssv",
      "network": "testnet",
      "signedTransaction": "0x02f9...",
      "stakerAddress": "0xeE6FFB3fEf95AdA9b4FA606C2Ef90A31D37b6AdB"
    }'
  ```
</CodeGroup>

* `network` — environment in which the transaction is processed: `testnet` or `mainnet`.
* `signedTransaction`— signed transaction which needs to be broadcast to the network.

Example response:

<CodeGroup>
  ```json JSON theme={null}
  {
      "error": null,
      "result": {
          "status": "pending",
          "extraData": {
              "broadcastedAt": "2026-03-02T07:34:18.278Z",
              "transactionHash": "0x27b0cb18f0001e9d10aea41a4bcf5cb8e77d97d1b48d7319d21aea7250cea12a",
              "gas": {}
          }
      }
  }
  ```
</CodeGroup>

* `status` — transaction status: `pending`, `success`.

* `extraData` — additional transaction details:

  * `broadcastedAt`— time of transaction being broadcasted.
  * `transactionHash`— hash of the transaction.
  * `gas`— gas consumed to broadcast transaction.

## Unstaking flow

### 1. Create withdrawal request

Send a POST request to [/api/v1/unified/staking/withdraw](/reference/unified-create-withdraw-transaction).

Example request (for `testnet` network):

<CodeGroup>
  ```bash bash theme={null}
  curl --request POST \
       --url https://api-test.p2p.org/api/v1/unified/staking/withdraw \
       --header 'Content-Type: application/json' \
       --header 'Authorization: Bearer <token>' \
       --data '{
      "chain": "eth_ssv",
      "network": "testnet",
      "stakerAddress": "0x136c861fC99d1624155F5FC8A06BAC79eD8547b1",
      "extra": {
          "publicKeys": [   "0x88D461F02A8CBD2B81E39A98318E11724C6CDAA05A7AE8AD318AD29989AB693034209B37B7150BCE00D268163F58360D"
          ],
  				"withdrawalAddress": "0x136c861fC99d1624155F5FC8A06BAC79eD8547b1"
      }
  }'
  ```
</CodeGroup>

* `chain`— blockchain network.

* `network` — environment in which the transaction is processed: `testnet` or `mainnet`.

* `stakerAddress` — account address initiated the staking transaction.

* `extra` — additional request parameters:

  * `publicKeys` — list of validators public keys.
  * `withdrawalAddress`— withdrawal address for the validators.

Example response:

<CodeGroup>
  ```json JSON theme={null}
  {
    "error": null,
    "result": {
      "extraData": {
        "list": [
          {
            "serializeTx": "0x02f901ae82426880830f4240830f432c83989680947d5a8de7e3721f6692d88a8d30b9c927fffcdbb480b9018432afd02f000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003083340b237f8f07cc3569b94d66e1c1616c5d96ec1f57c75bb81d824eead70f1aa4ffae2dbb32b7aebe8e6bc9dc40eb9c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000050d000000000000000000000000000000000000000000000000000000000000051000000000000000000000000000000000000000000000000000000000000005130000000000000000000000000000000000000000000000000000000000000516c0",
            "to": "0x7D5a8De7E3721F6692d88A8D30B9C927fffcDBb4",
            "gasLimit": "10000000",
            "data": "0x32afd02f000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003083340b237f8f07cc3569b94d66e1c1616c5d96ec1f57c75bb81d824eead70f1aa4ffae2dbb32b7aebe8e6bc9dc40eb9c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000050d000000000000000000000000000000000000000000000000000000000000051000000000000000000000000000000000000000000000000000000000000005130000000000000000000000000000000000000000000000000000000000000516",
            "value": "0",
            "chainId": 560048,
            "type": 2,
            "maxFeePerGas": "1000236",
            "maxPriorityFeePerGas": "1000000"
          }
        ]
      }
    }
  }
  ```
</CodeGroup>

* `serializeTx` — raw transaction hex string. To be signed and broadcasted.
* `to` — recipient address for this transaction.
* `gasLimit` — maximum gas limit for this block.
* `data` — transaction data.
* `value` — transaction value.
* `chainId` — chain ID this transaction is authorized on, as specified by EIP-155.
* `type` — EIP-2718 type of this transaction envelope.
* `maxFeePerGas` — maximum price per unit of gas this transaction will pay for the combined EIP-1559 block's base fee and this transaction's priority fee in Wei.
* `maxPriorityFeePerGas` — price per unit of gas in Wei, which is added to the EIP-1559 block's base fee. This added fee is used to incentivize miners to prioritize this transaction.

### 2. Sign and send transaction

Use `serializeTx` to [sign and send](/docs/unified-api-signing-transaction) the transaction via the `stakerAddress` used at deposit, following the Ethereum-specific signing logic.

## Smart contracts

[Mainnet](https://etherscan.io/address/0x7F12A9904bA021AE3ecE106e10f476b7AfBd830C) `0x7F12A9904bA021AE3ecE106e10f476b7AfBd830C`

[Hoodi](https://hoodi.etherscan.io/address/0xb7576038C090355625469af1eE9F1F0d22bb0e65) `0xb7576038C090355625469af1eE9F1F0d22bb0e65`

[Source](https://github.com/p2p-org/p2p-ssv-proxy/blob/v3.1-audited/src/p2pSsvProxyFactory/P2pSsvProxyFactory.sol)

[Audit](https://github.com/mixbytes/audits_public/tree/master/P2P.org/SSV%20Integration%20Diff%20Audit%20\(v1\))


## Related topics

- [Unified API Reference](/reference/unified-create-stake-transaction.md)
- [Integration Workflow Example](/docs/unified-api-getting-started.md)
- [Networks](/docs/unified-api-networks.md)
