Withdrawal

🚧

Warning

Attempting to first remove the validator from the cluster will cause an inability to initiate the validator exit via SSV protocol. Please, follow the steps as indicated in this guide.

The withdrawal process on the Ethereum network using the DVT Staking API can be done following these steps:

  1. Create a request to initiate the validator's exit.
  2. Create a request to remove the validator from the cluster.

After each of these operations, 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/goerli/ssv/tx/exit-validator/3fa85f64-5717-4562-b3fc-2c963f66afa5 \
         --header 'accept: application/json'
         --header 'Authorization: Bearer <Token>'
    
    • id — UUID of the SSV request.

    Example response:

    {
      "result": {
        "list": [
          {
            "serializeTx":    "0x02f9078605010210830f424094c3cd9a0ae89fff83b71b58b6512d43f8a41f363d80b9076406e8fb9c00000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000016c7ded605b5c0000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000046f3111b30000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000016c7ded605b5c0000000000000000000000000000000000000000000000000000000000000000030b4b5f251eac53f34eb1da2b6659d35db303e408c4c830156cf090441564474f356abd023a0e679aa97cefeed850abb2700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000520971aade51840b84fc5b88fee2ef1ed80ce57c2ea9a8fb610d2fdb3a287589a87c421b845e3f1cb4ef5a84eaba6c31d4c159ead3c818758d6fc988a207ea467ff35fb90ab502805569f8ff94042d870ebedc327ea0778476559c95076a99c7cd1b78b94bb2a5098c10b50000c7419476f295e0d1e94b17c1f985c76adfad8b7897bdf34b58388b6b201104616e179e93888016e92ab60b4bf5d844b1a8fd9fdd97e3dba2cfadbe65f1bc3b66aeed8b1be8407a150ae6a028fe72e50d70121e7eab424e02922422ce66fb45c5878eb0d307fae5b5b0637cee897a119563d18082c33fe5ac017d3cfd3a42e2f5f7d8bece98e679000fb7cfd339fbc1470177963d5cd73b6b4001e77f3dcb348cb07797b25fd3b6811e4dfbafe78a4a9d70861fd27001d88253500347ba8ff907bd647b83aa6b5bf727929ee35ce5360a0b7810b355f8e524426e8a6db75e240af29527b398c2d5a926e4867f04483ec61338d7f413cd419d17bc572a0b3ecd98e04426964a8350d1545493e2fe039828f8e74fb48da7f4ee26166b4c2b2b05fa94bf4721a0b6888a8065062ed45bd23f9d3fcbb80ecf3febfb8c90522b20ae724a94f12fb9de80c95dd7b1762d6b15312c3bbde291224fb7b809384404bde5d78bd36801a67154addc466d20c6e6146eda1e263167a96a9d21a1b4fef6d532957cfca20d3311ac2f5bfd6c4601df0eebec49b5a74adce8c1b7fbf82c5333d25c499f72928d3bfe47fa9c54ec9f55c63586758af8a256683952376b4feef745bbc2280e66bb475e48edc4a90eb128bfb3322b30065f3fedf6dcd3180798375eee05abc20433f79e3d6e73948a84057ca7b72b6ba756f257ca1a11f2fa3b130bcf28d9ef80cb946bf11e6008815ee6c100ab1527f13c064bac2b67a8f832ab70c98d39d77940f975c35c8dea26f2e25a5e706da368fa0dd08958ea11904b1b51ca40aab37e581e58a5c60ea1caa08063461b3319e6c8ff21b75f2ff9358ddccf27abea55e7dbad4f474741ff14fe9e63d9c001eec990531a5bc6b2196269cfa0050beced2e2ce55f9dfea48c0c81f3d1a1f4f6548e29de76b085f83f9399c29b89880a15b80e049de2fa9eef3eab7a1a15cd1d6ae2bc8fdc9837f59baf56c11ed7405bda5d2cd2de6fd80c7b7461abfb757c742b3216ef79d8268501cb3531a5fcf9d46b58e828e6aaea4bef8484cc8945912ac611827463d4a3dabe56f608181dfba8ffc7cb1cfdef5a09a9f107652b44d290fc42b0d5e3e16634342af07f205153b0c7d095e0d418f1d0aef8a7e00d41e5af183ceed36d5832169bdd91810b4ad686b85130ec07aeaccfbc26d440684ac34c8005c12b38caa41d18ecd51167afaba0aae2b605cb0cefcae1b4f64ff220167d1f93b73abd75368dd67c3a6ad48448021c66086daf62419d6de350ee3f25aef4784340c0932362da25cff3f1ed7316afce3034d264f1206322c6510aacddb9315f8b532516a52f2483d0a191caa38a10cb40d00494c43ddcc49b54349fd809409a8d6131746ef7adc57a9f7feea9bb3a4142d418e5b1f89ccde686a1627c9a9d5ac9bc6a06685017b15eb549e9bc2e7cf98720b616d8bea14b5b9194280bb1386154be5fd31dc6f64cfe5bbf80fff95e2a82a2a803e579e302c0db931470b78fb32fb1774840002417b86c4ad621e43ec36d2496a7f6b63d470fae3edb863f909ee0e4ce43ca293770a229cbcbd542c9bd123889298c3a6e32c2e5c5f4861afa640a16d5c5089373d3e6ddfdebc223a2d966c3e37d135f3f8805eb3432ff46befac6c41aff89739b1bab6ccee383fb524ff985b5054091fed2d351bff38ec78800200c0",
            "to": "0xC3CD9A0aE89Fff83b71b58b6512D43F8a41f363D",
            "gasLimit": "0.000000000001",
            "data":    "0x06e8fb9c00000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000016c7ded605b5c0000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000046f3111b30000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000016c7ded605b5c0000000000000000000000000000000000000000000000000000000000000000030b4b5f251eac53f34eb1da2b6659d35db303e408c4c830156cf090441564474f356abd023a0e679aa97cefeed850abb2700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000520971aade51840b84fc5b88fee2ef1ed80ce57c2ea9a8fb610d2fdb3a287589a87c421b845e3f1cb4ef5a84eaba6c31d4c159ead3c818758d6fc988a207ea467ff35fb90ab502805569f8ff94042d870ebedc327ea0778476559c95076a99c7cd1b78b94bb2a5098c10b50000c7419476f295e0d1e94b17c1f985c76adfad8b7897bdf34b58388b6b201104616e179e93888016e92ab60b4bf5d844b1a8fd9fdd97e3dba2cfadbe65f1bc3b66aeed8b1be8407a150ae6a028fe72e50d70121e7eab424e02922422ce66fb45c5878eb0d307fae5b5b0637cee897a119563d18082c33fe5ac017d3cfd3a42e2f5f7d8bece98e679000fb7cfd339fbc1470177963d5cd73b6b4001e77f3dcb348cb07797b25fd3b6811e4dfbafe78a4a9d70861fd27001d88253500347ba8ff907bd647b83aa6b5bf727929ee35ce5360a0b7810b355f8e524426e8a6db75e240af29527b398c2d5a926e4867f04483ec61338d7f413cd419d17bc572a0b3ecd98e04426964a8350d1545493e2fe039828f8e74fb48da7f4ee26166b4c2b2b05fa94bf4721a0b6888a8065062ed45bd23f9d3fcbb80ecf3febfb8c90522b20ae724a94f12fb9de80c95dd7b1762d6b15312c3bbde291224fb7b809384404bde5d78bd36801a67154addc466d20c6e6146eda1e263167a96a9d21a1b4fef6d532957cfca20d3311ac2f5bfd6c4601df0eebec49b5a74adce8c1b7fbf82c5333d25c499f72928d3bfe47fa9c54ec9f55c63586758af8a256683952376b4feef745bbc2280e66bb475e48edc4a90eb128bfb3322b30065f3fedf6dcd3180798375eee05abc20433f79e3d6e73948a84057ca7b72b6ba756f257ca1a11f2fa3b130bcf28d9ef80cb946bf11e6008815ee6c100ab1527f13c064bac2b67a8f832ab70c98d39d77940f975c35c8dea26f2e25a5e706da368fa0dd08958ea11904b1b51ca40aab37e581e58a5c60ea1caa08063461b3319e6c8ff21b75f2ff9358ddccf27abea55e7dbad4f474741ff14fe9e63d9c001eec990531a5bc6b2196269cfa0050beced2e2ce55f9dfea48c0c81f3d1a1f4f6548e29de76b085f83f9399c29b89880a15b80e049de2fa9eef3eab7a1a15cd1d6ae2bc8fdc9837f59baf56c11ed7405bda5d2cd2de6fd80c7b7461abfb757c742b3216ef79d8268501cb3531a5fcf9d46b58e828e6aaea4bef8484cc8945912ac611827463d4a3dabe56f608181dfba8ffc7cb1cfdef5a09a9f107652b44d290fc42b0d5e3e16634342af07f205153b0c7d095e0d418f1d0aef8a7e00d41e5af183ceed36d5832169bdd91810b4ad686b85130ec07aeaccfbc26d440684ac34c8005c12b38caa41d18ecd51167afaba0aae2b605cb0cefcae1b4f64ff220167d1f93b73abd75368dd67c3a6ad48448021c66086daf62419d6de350ee3f25aef4784340c0932362da25cff3f1ed7316afce3034d264f1206322c6510aacddb9315f8b532516a52f2483d0a191caa38a10cb40d00494c43ddcc49b54349fd809409a8d6131746ef7adc57a9f7feea9bb3a4142d418e5b1f89ccde686a1627c9a9d5ac9bc6a06685017b15eb549e9bc2e7cf98720b616d8bea14b5b9194280bb1386154be5fd31dc6f64cfe5bbf80fff95e2a82a2a803e579e302c0db931470b78fb32fb1774840002417b86c4ad621e43ec36d2496a7f6b63d470fae3edb863f909ee0e4ce43ca293770a229cbcbd542c9bd123889298c3a6e32c2e5c5f4861afa640a16d5c5089373d3e6ddfdebc223a2d966c3e37d135f3f8805eb3432ff46befac6c41aff89739b1bab6ccee383fb524ff985b5054091fed2d351bff38ec78800200",
            "value": "0.0",
            "chainId": "5",
            "type": "2",
            "maxFeePerGas": "0.000000000000000016",
            "maxPriorityFeePerGas": "2"
          }
        ]
      },
      "error": {}
    }
    
    • 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.

  3. Create the serialized transaction initiating the process of removing validator from the cluster by sending a GET request to /api/v1/eth/staking/{network}/ssv/tx/remove-validator/{id}.

    ❗️

    Important

    Send a request only after the validator has completed its exit on the Ethereum Beacon chain. If called before, the validator would stop performing its duties and will be getting penalties for that.

    Example request:

    curl --request GET \
         --url https://api.p2p.org/api/v1/eth/staking/goerli/ssv/tx/remove-validator/3fa85f64-5717-4562-b3fc-2c963f66afa5 \
         --header 'accept: application/json'
         --header 'Authorization: Bearer <Token>'
    
    • id — UUID of the SSV request.

    Example response is the same as for step 2.

  4. Use serializeTx to sign and send the signed transaction to the Ethereum network.

What's Next?