Withdrawal

The withdrawal process on the Ethereum network using the SSV On-chain flow can be done by simply:

  1. Creating a request to initiate the validator's exit.

After this step, you need to sign and send the transaction to the Ethereum network. Request examples are provided using cURL.

To start the withdrawal process:

  1. Create a serialized transaction initiating the validator exit by sending a GET request to /api/v1/eth/staking/{network}/ssv/tx/exit-validator/{id}.

    Example request:

    curl --request GET \
         --url https://api.p2p.org/api/v1/eth/staking/ssv/p2p/withdraw?withdrawalAddress=0x368F823e4dfe271dc820f4Ea14689917bf8e4a21&pubkeys[]=0x95458df5f24a5354e0fe11fbd36fcf4665e205ecf37264f75b96c04c28f7e8eee732f8b204ead89326277ca693460bfe' \
         --header 'accept: application/json'
         --header 'Authorization: Bearer <Token>'
    
    • withdrawalAddress — UUID of the SSV request.
    • pubkeys — list of validators public keys.

    Example response:

    {
      "error": null,
      "result": {
        "list": [
    {
            "serializeTx": "0x02f9021982426880840622063d84062206518398968094e9dfc1850110dadf68402ec6ad2b9bdfb79807338903782dace9d9000000b901e4746bd1000100000000000000000000003202b5b0602274197ccb22b8c02cec9539990c7c000000000000000000000000000000000000000000000003782dace9d9000000000000000000000000000000000000000000000000000000000000000000251c0000000000000000000000003202b5b0602274197ccb22b8c02cec9539990c7c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000c3b22ead56c5ebdedefa48bd3b494c6af1e97f4f760bcfccf74afd103fa7aeb9da44088fd6ffe5f4bbc085315675c25419b8c85eea02b53d9c48845eb74c0619e4a4f1e606a0229ddf61c40b7931cfdeca72c335632667534489f9076c880d0dd0125db16567e84d0b1dfaa1219c991c4316ddd30ab049b0f9bb9d6a5ff55b370e64b3f607ca826cb804c6378659b3fd9094eafe29eb2527c9d4abe7e717e7c8f2c2fbf57bba3cc35c09f1fa0d33f35e3d3d74f304f93407350089733aed910660e2a9ad0000000000000000000000000000000000000000000000000000000000c0",
            "to": "0xE9DfC1850110DadF68402Ec6AD2B9bDfB7980733",
            "gasLimit": "10000000",
            "data": "0x746bd1000100000000000000000000003202b5b0602274197ccb22b8c02cec9539990c7c000000000000000000000000000000000000000000000003782dace9d9000000000000000000000000000000000000000000000000000000000000000000251c0000000000000000000000003202b5b0602274197ccb22b8c02cec9539990c7c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000c3b22ead56c5ebdedefa48bd3b494c6af1e97f4f760bcfccf74afd103fa7aeb9da44088fd6ffe5f4bbc085315675c25419b8c85eea02b53d9c48845eb74c0619e4a4f1e606a0229ddf61c40b7931cfdeca72c335632667534489f9076c880d0dd0125db16567e84d0b1dfaa1219c991c4316ddd30ab049b0f9bb9d6a5ff55b370e64b3f607ca826cb804c6378659b3fd9094eafe29eb2527c9d4abe7e717e7c8f2c2fbf57bba3cc35c09f1fa0d33f35e3d3d74f304f93407350089733aed910660e2a9ad0000000000000000000000000000000000000000000000000000000000",
            "value": "64000000000000000000",
            "chainId": 17000,
            "type": 2,
            "maxFeePerGas": "102893137",
            "maxPriorityFeePerGas": "102893117"
        }
        ]
      }
    }
    
    • list includes a list of data fields that contain the following data:
    • serializeTx — serialized unsigned transaction.
    • to — recipient address for this transaction.
    • gasLimit — maximum gas limit for this block.
    • data — transaction data.
    • value — amount this transaction is sending in Wei.
    • chainId — chain ID this transaction is authorized on, as specified by EIP-155.
    • typeEIP-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. Use serializeTx to sign and send the signed transaction to the Ethereum network.

What's Next?