Staking Ethereum with Galaxy Validators
Introduction
This feature takes Ethereum from the address of an account on your uMPC, stakes it to Galaxy's ETH validators, then withdraws those assets to the same account's Impenetrable Vault address.
Only use this feature if your Custody Infrastructure system has an Impenetrable Vault provisioned.
Galaxy operates Ethereum validators (for details, see https://www.galaxy.com/blockchain-infrastructure/ ) and Galaxy's Custody Infrastructure has simplified staking directly from your wallets to those ETH validators.
This article focuses on the CLI staking flow. Update your system before performing the procedures outlined here. See:
This is an API process. Be sure you are comfortable making API calls and interpreting the responses.
This is a staking process. Make sure Custody Infrastructure system policies permit your API user to perform staking transactions.
Summary
Staking, evaluating validator performance, and exiting are three key aspects of staking Ethereum. When you stake your ETH with Galaxy's validators, you can perform all three functions directly from the Custody Infrastructure API.
Article Overview
- Introduction
- Summary
- How it Works
- Operational Latency
- Batching Logic
- System Setup
- Verifying the Setup
- The Staking Procedure
- Process Diagram
- Prerequisites
- Task-by-task Procedures
- Prerequisites
- Veiwing Rewards over Time
- Viewing Withdrawals
- Check Total Validator Utilization
- The Exit Procedure
- Process Diagram
- Prerequisites
- Exiting from a Galaxy Validator
- Endpoint Deep Dive*
- Further Reading
*Endpoint Deep Dive - expanded:
- stakingEthWithGalaxy
- getEthStakeDepositInfo
- updateEthDepositCustomerId
- getEthValidatorInfo
- getAllEthValidatorsInfo
- getEthValidatorRewards
- getEthValidatorWithdrawals
- getEthValidatorsSummary
- ethExitWithGalaxy
- ethExitWithGk8
- ethDerivePreSignedExitMessage

How it Works
Galaxy hosts and administers the validators you use to stake your ETH.
Before you can stake to Galaxy's validators, you need to configure your system. Once prepared, you can stake to up to 250 validators (one stake per validator) with a single command. The Ethereum you stake comes from your accounts' uMPC addresses. Staked validators offer a variety of reporting options so you can track your staked assets' performance.
Custody Infrastructure offers three different ways to exit from Galaxy's validators. When you exit, the assets are returned to your accounts' Impenetrable Vault addresses.
The overall flow of assets when staking to Galaxy's validators is:
%%{
init: {
'theme': 'base',
'themeVariables': {
'darkMode': 'true',
'primaryColor': '#9B69FF',
'primaryTextColor': '#FFFFFF',
'primaryBorderColor': '#9B69FF',
'secondaryBorderColor': '#9B69FF',
'lineColor': '#9B69FF',
'arrowColor': '#9B69FF',
'fontFamily': 'Arial, sans-serif',
'fontSize': '16px',
}
}
}%%
graph LR
A["`**uMPC**
Account 1 Main Wallet`"]
-- "Deposit ETH" --> B["`**EU or US**
Galaxy Validators`"]
-- "Withdraw ETH" --> C["`**Impenetrable Vault**
Account 1 Main Wallet`"]
Staking, reporting, and exiting are all offered directly through the API and are unavailable via the desktop or mobile applications.
Operational Latency
Both staking Ethereum (ETH) and exiting a stake have wait times dynamically determined by the current demands on the chain. You can see the current wait time below:
Galaxy handles validator performance reporting, and thus, running performance reports is not subject to the wait times inherent in staking or exiting operations.
Batching Logic
To ease large-scale operations, all the staking operatings (staking, reporting, and exiting) can be performed for multiple validators with a single API call.
Staking in Batches
When you stake, using stakingEthWithGalaxy, there are 2 options, either choosing the PrePectraFork or PostPectraFork withdrawal type.
The PrePectraFork only allows you to stake 32,000,000,000,000,000,000 Wei, which is 32ETH. The PostPrectraFork allows you to stake from 32 ETH up to 8,000,000,000,000,000,000,000 (eight quadrillion!) Wei, which is 8,000 ETH.
For both withdrawal type you can stake up to 100 validators in one command.
All validators staked together must be staked from the same account; if you choose to give them a customer ID at this time, it must also be shared between all validators in the operation.
Reporting in Batches
All reporting endpoints return results in pages, where each page can hold results for up to 250 validators.
Exiting in Batches
You can exit from up to 250 validators in a single operation. If you choose to exit by the validator's public keys or indexes, you must provide a complete list of validators to exit. When exiting via account ID or customer ID, you only need to tell the system how many validators to exit from.
System Setup
Before you can stake to Galaxy's validators, you need to set up your system and generate API access keys.
Contact Galaxy and follow the instructions they provide to create the keys.
Name the private keys:
- The main key: galaxy_staking_api_key.pem
- The exit key: galaxy_exiting_api_key.pem
Place both private keys in your client machine's /opt/gk8/data/configurationsfolder/ directory.
Send the public keys you created in setp 1, above, to Galaxy.
After placing the keys in the proper directory, you need to create a file called GalaxyApi.
Navigate to the /opt/gk8/data/ApiTokens/ directory.
Create the GalaxyApi file:
Open the new file with the text editor of your choice (Nano is only used for example purposes).
Create a JSON object with the following content:
For Mainnet:
{
"url" : "https://api.staking.abc.def.galaxy.com",
"x_api_key" : "85b43...3587"
}
For Testnet:
{
"url" : "https://api.staking.uat.bci.glxy.com",
"x_api_key" : "00c8b8493c954f1a865ab5f5ad0574d2",
"network" : "hoodi",
"deposit_smart_contract_address" : "0xC5C1D5d24FaAf647749974dcFFC1aA51f617A562"
}
Galaxy will provide you with both the URL and x_api_key to use.
Save the file.
Once the private keys and GalaxyApi file are ready, restart your client:
Verifying the Setup
Run getEthValidatorsSummary. At this point, the systems will either return and error or show that you have no validators. If it returns an error, contact support. If it says you have no validators, your system is ready to start staking with Galaxy's validators.
The Staking Procedure
Staking with Galaxy validators requires configuring your system (as detailed above) then running an API call.
Process Diagram
%%{
init: {
'theme': 'base',
'themeVariables': {
'primaryColor': '#9B69FF',
'primaryTextColor': '#000000',
'primaryBorderColor': '#9B69FF',
'secondaryColor': '#ffffff',
'secondaryBorderColor': '#9B69FF',
'lineColor': '#9B69FF',
'arrowColor': '#9B69FF',
'fontFamily': 'Arial, sans-serif',
'fontSize': '16px',
}
}
}%%
graph LR
A["`**uMPC**
Account 1 Main Wallet`"]
-- Deposit ETH --> B["`**EU or US**
Galaxy Validators`"]
-- Withdraw ETH --> C["`**Impenetrable Vault**
Account 1 Main Wallet`"]
Prerequisites
Before you can use the API to stake ETH with Galaxy, you need to make sure you have properly configured your Custody Infrastructure deployment:
- Have an API client installed with an API user configured
- Have at least 32 ETH available to stake
- Followed the process outlined in System Setup, above
Staking to your Galaxy Validators
Call stakingEthWithGalaxy. Supply the following parameters:
- account_id (int) - The account that holds the ETH to stake. The ETH is deposited to Galaxy's validator(s) from this account's uMPC address, and withdrawn to this account's Impenetrable Vault address.
- gas_price (int) - The gas price to transfer with, in Wei. In London fork currencies, this is the maximum fee to pay per gas unit.
- gas_limit (int) - The gas limit to transfer, in gas units (must be at least 21500).
- max_priority_fee (int) - The max priority fee to tip the miner.
- amount (str) - Whole multiples of 32000000000000000000, up to 8,000,000,000,000,000,000,000 (eight quadrillion!) wei, which stakes to 250 validators.
- customer_id (optional) (string) - The ID of the customer who is staking.
- region (optional) (string) - The geographic area for the validator machines. Must be either "US" or "EU". Defaults to "EU".
- validate_transaction (bool) - If True, validates whether the stake succeeded and provides failure reasons if applicable. Disabling validation saves time but omits failure details. Defaults to True.
The deposit transaction is sent to a smart contract immediately; your stake shows up on-chain when your validator becomes active.
After the waiting period has passed, use the reporting endpoints to see that the stake was successfully reported on chain.
The staking operation's return provides you with the public key and index of each validator your assets are staked to, as well as a reference ID that can be used to follow up on the status of all validators created in this staking operation.
Viewing Validator Reports
We offer reporting options that let you inspect your Galaxy validators without any need to leave your API environment.
Task-by-task Procedures
There are two areas to examine when checking your Galaxy validators:
- Financial performance - This focuses on the initial deposit and rewards. Checking on your validators' financial performance is broken down into two tasks:
- Viewing Withdrawals
- Utilization - This focuses on how your Galaxy validators are being used (deposited, active, exited, etc.). There is one task for this:
Prerequisites
The various reporting options require you to input key information to specify the scope of the reports. Have this information available when you run validator reports.
- pubkey (str) - When this is called for, the endpoint will return results only for the specified validator. If you don't know the validators' public keys, you can retrieve them with getAllEthValidatorsInfo.
- account_id (int) - When this is called for, the endpoint will return results only for the specified account.
- customer_id (str) - Use this to return results for all validators sharing this specific customer ID.
- staking_reference_id (str) - This parameter will pull results for all validators staked in a single, specific call of stakingEthWithGalaxy.
These sorting devices can be used to filter the various reports outlined below.
Checking your Validator(s) Info
You can check your validators individually, as preconfigured sets, or on an account-by-account basis.
Paginating your reporting results: When you run reports, the system can display up to 250 validators' results at a time. To see the results for validator #305, you'll have to use pagination.
Pagination relies on two parameters in your API request: page and size.
Size determines how many validators' results your request will return (up to 250). Page tells the system how far down the list of validators to go before it starts returning results.
(page - 1) x size = The first validator to fetch results for
To ensure you can view information about validator #305, you would want to use something like:
- page=2, size=250 which would display validators #250 - #499, or
- page=3, size=100 to display validators 300-399
Check an individual validator by running getEthValidatorInfo (click to see a breakdown of the endpoint and what information it reports). You must use the validator's public key (pubkey) to specify the validator you want to inspect.
Check all validators for a specific customer by running getAllEthValidatorsInfo (click to see a breakdown of the endpoint and what information it reports) using the customer's ID (customer_id) to specify the set of validators to inspect.
You can assign a customer_id to a validator when initially staking via stakingEthWithGalaxy. A validator's customer ID can be assigned or changed at any time with updateEthDepositCustomerId .
Check all validators on an account by running getAllEthValidatorsInfo (click to see a breakdown of the endpoint and what information it reports) using an account ID (account_id) to specify the set of validators to inspect.
Check all the validators staked at a specific time by running getAllEthValidatorsInfo (click to see a breakdown of the endpoint and what information it reports) using a staking reference ID (staking_reference_id) to specify the staking operation you want to inspect.
Running getAllEthValidatorsInfo without any of the filters outlined above will return the status of all Galaxy validators your system has staked to.
Viewing Rewards over Time
You can check the daily performance of a validator by running getEthValidatorRewards (click to see a breakdown of the endpoint and what information it reports). You can narrow it to specific validators by public key (pubkey), account ID (account_id), or customer ID (customer_id). rollup_type is used to switch between viewing performance by epoch (rolluptype=1) or date and time (rollup_type=2). startand end narrow the report to a specific period.
Viewing Withdrawals
getEthValidatorWithdrawals checks a history of partial and full withdrawals. You can narrow it to specific validators by public key (pubkey), account ID (account_id), or customer ID (customer_id). rollup_type is used to switch between viewing performance by epoch (rolluptype=1) or date and time (rollup_type=2). startand end narrow the report to a specific period.
Checking Total Validator Utilization
You can see the state of all of your validators by running getEthValidatorsSummay The endpoint returns the validators' statuses. Interpret them as follows:
STAKING_INITIATED | A staking request has been successfully received by Galaxy. |  |
|---|---|---|
PENDING_DEPOSIT | The staking request has been processed, and validators are commissioned. Clients are expected to deposit their assets to the relevant address. |  |
 |  |  |
DEPOSITED | The validator has been funded successfully. |  |
DEPOSIT_FAILED | The validator was not funded within the predefined time period. |  |
ACTIVE | The validator is active and earning rewards. |  |
SLASHING | The validator is online, has been identified as malicious, incurred penalties, and is scheduled to exit. |  |
SLASHED | The validator has been removed from the network after reaching the exit epoch due to slashing. |  |
EXIT_INITIATED | An exit request has been successfully received by Galaxy. |  |
EXITING | The validator is currently online and in the process of exiting the network. |  |
EXITED | The validator has been removed from the network. |  |
WITHDRAWABLE | The validator has reached the withdrawable epoch after successfully exiting. |  |
WITHDRAWN | The funds have been returned to the withdrawal address associated with the validator. |  |
The Exit Procedure
Exiting your stake with Galaxy requires first sending a file from your MPC backend to Galaxy and uploading the file they provide in response. To finalize the withdrawal, you need to run a couple of API calls.
Process Diagram
%%{
init: {
'theme': 'base',
'themeVariables': {
'darkMode': 'true',
'primaryColor': '#9B69FF',
'primaryTextColor': '#FFFFFF',
'primaryBorderColor': '#9B69FF',
'secondaryColor': '#111111',
'secondaryTextColor': '#111111',
'secondaryBorderColor': '#9B69FF',
'lineColor': '#9B69FF',
'arrowColor': '#9B69FF',
'fontFamily': 'Arial, sans-serif',
'fontSize': '16px'will,
'textColor': '#111111'
}
}
}%%
sequenceDiagram
participant API User
participant Backend
participant Beacon Chain
API User->>Backend: Calls getAllEthValidatorInfo
Backend-->>API User: Returns validators' data and statuses
API User->>Backend: Calls an "exit" endpoint with filters
Backend->>Beacon Chain: Sends unstaking request
API User->>Backend: Optionally, calls a reporting endpoint (to check state)
Backend-->>API User: Returns updated staking status (exit in progress)
Prerequisites
Before you can use the API to exit your stake, you need to make sure you have properly configured your Custody Infrastructure deployment:
- Have an API client installed with an API user configured
Exiting from a Galaxy Validator
The exit endpoints work by type, where the EthExitSelectType you provide tells the system what parameters you will use to specify the validators to exit from.
Call getAllEthValidatorsInfo to get the specific criteria for the validators to exit. This can be a validator pubic_key list (type 1), a validator_index list (type 2), an account_id and validator_count (type 3), or a customer_id and validator_count (type 8).
call ethExitWithGalaxy or ethExitWithGK8 , and provide the chosen exit criteria, making sure to indicate an exit type.
Your exit is subject to the waiting period outlined in Operational Latency. Once the waiting period is over, your staked assets and reqards will be sent to your account's Impenetrable Vault address, and you can see the exit on chain.
Endpoint Deep Dive
# Stake ETH with Galaxy, specifying gas parameters and optional filters
transaction = stakingEthWithGalaxy(
account_id=12345,
gas_price=50000000000, # 50 Gwei
gas_limit=21000,
max_priority_fee=2000000000, # 2 Gwei
amount="32000000000000000000", # 32 ETH in Wei
customer_id="cust_67890",
region="US",
validate_transaction=True
)
# Print the transaction response
print(transaction)For more information about this endpoint, see stakingEthWithGalaxy.
# Update the customer ID for Ethereum deposit addresses associated with specific validators
update_response = updateEthDepositCustomerId(
customer_id="cust_67890",
public_keys=["0xab28...6776a", "0x9f73...5c2d"]
)
# Print the response from the update request
print(update_response)For more information about this endpoint, see updateEthDepositCustomerId.
# Retrieve Ethereum validator information for a given public key
validator_info = getEthValidatorInfo(
pubkey="0xab28...6776a",
include_presigned_exit=True
)
# Print the retrieved validator information
print(validator_info)For more information about this endpoint, see getEthValidatorInfo.
# Example usage of getAllEthValidatorsInfo
# Retrieve information for all Ethereum validators with optional filters
validators_info = getAllEthValidatorsInfo(
account_id=12345,
page=1,
size=10,
staking_reference_id="8a07...68bc",
customer_id="cust_67890",
include_presigned_exit=True
)
# Print the retrieved validators' information
print(validators_info)For more information about this endpoint, see getAllEthValidatorsInfo.
# Retrieve Ethereum validator rewards with required parameters and optional filters
rewards = getEthValidatorRewards(
account_id=12345,
rollup_type=1,
start="2024-07-10",
end="2024-07-18",
page=1,
size=10,
public_keys=["0xab28...6776a", "0xcd89...1234f"],
customer_id="cust_67890"
)
# Print the retrieved rewards data
print(rewards)For more information about this endpoint, see getEthValidatorRewards.
# Example usage of getEthValidatorWithdrawals
# Case 1: Retrieve Ethereum validator withdrawals using specific public keys
withdrawals_1 = getEthValidatorWithdrawals(
account_id=12345,
rollup_type=1,
start="2024-01-05",
end="2024-01-10",
public_keys=["0xab28...6776a"]
)
# Print the response for the first request
print("Withdrawals by Public Keys:", withdrawals_1)
# Case 2: Retrieve Ethereum validator withdrawals using an account ID
withdrawals_2 = getEthValidatorWithdrawals(
account_id=12345,
rollup_type=1,
start="2024-01-05",
end="2024-01-10"
)
# Print the response for the second request
print("Withdrawals by Account ID:", withdrawals_2)
For more information about this endpoint, see getEthValidatorWithdrawals.
# Retrieve a summary of Ethereum validators for a specific account
validators_summary = getEthValidatorsSummary(account_id=12345)
# Print the retrieved summary
print(validators_summary)For more information about this endpoint, see getEthValidatorsSummary.
# Example usage of ethExitWithGalaxy
# Case 1: Exiting validators using specific public keys
exit_response_1 = ethExitWithGalaxy(
account_id=12345,
type=1,
public_keys=["0xab28...6776a", "0x9f73...5c2d"]
)
# Print the response for the first request
print("Exit by Public Keys:", exit_response_1)
# Case 2: Exiting validators using validator indexes
exit_response_2 = ethExitWithGalaxy(
account_id=12345,
type=2,
validator_indexes=[10000, 10200]
)
# Print the response for the second request
print("Exit by Validator Indexes:", exit_response_2)
# Case 3: Exiting validators using account ID and validator count
exit_response_3 = ethExitWithGalaxy(
account_id=12345,
type=3,
validator_count=2
)
# Print the response for the third request
print("Exit by Account ID:", exit_response_3)
# Case 4: Exiting validators using customer ID and validator count
exit_response_4 = ethExitWithGalaxy(
account_id=12345,
type=8,
customer_id="cust_67890",
validator_count=3
)
# Print the response for the fourth request
print("Exit by Customer ID:", exit_response_4)
For more information about this endpoint, see ethExitWithGalaxy.
ethExitWithGk8(
account_id=12345,
public_key="0xab28...6776a"
)
For more information about this endpoint, see ethExitWithGk8.
# Case 1: Generate pre-signed exit messages using specific public keys
exit_message_1 = ethDerivePreSignedExitMessage(
account_id=12345,
type=1,
public_keys=["0xab28...6776a", "0x9f73...5c2d"]
)
# Print the response for the first request
print("Pre-Signed Exit Message by Public Keys:", exit_message_1)
# Case 2: Generate pre-signed exit messages using account ID and validator count
exit_message_2 = ethDerivePreSignedExitMessage(
account_id=12345,
type=3,
validator_count=2
)
# Print the response for the second request
print("Pre-Signed Exit Message by Account ID:", exit_message_2)For more information about this endpoint, see ethDerivePreSignedExitMessage
Further Reading
To learn the basics of staking, see Staking.
To learn how to stake ETH to non-Galaxy validators, see Impenetrable Vault Staking
Disclaimer
None of the information contained on this Site constitutes a recommendation, solicitation, or offer by Galaxy Digital or its affiliates to buy or sell any securities, futures, options, or other financial instruments or provide any investment advice or service.
Galaxy validators are offered using a validator-as-a-service model. Usage of Galaxy validators is subject to the terms and conditions set forth by Galaxy Digital Holdings.
You can use any validator you wish when staking your assets, including Ethereum and Solana. Streamlining the staking process for a particular validator does not constitute financial advice—stake assets at your own risk.