Integrating Shared ETH Staking: A Developer’s Guide

·

Ethereum staking has evolved significantly since the network transitioned to proof-of-stake, and Shared ETH Staking is one of the most accessible innovations for developers and users alike. With Shared ETH Staking, users can stake any amount of ETH—no minimums required—making it ideal for decentralized applications (dApps), wallets, and platforms aiming to onboard more participants into the staking ecosystem.

This guide walks through integrating Shared ETH Staking using the Coinbase SDK, covering both external address and wallet address models. Whether you're building a custodial service or integrating staking into a non-custodial interface, this resource provides the technical foundation and best practices you need.


Core Keywords


Understanding Address Models

Before diving into staking operations, it's essential to understand the two primary address models supported by the Coinbase SDK: External Address and Wallet Address. Each serves different security and operational needs.

External Address Model

In the external address model, private keys are not managed by the Coinbase SDK. Instead, developers must "bring their own wallet," meaning all transaction signing occurs off-platform. This model is ideal for non-custodial applications where users retain full control over their keys.

👉 Discover how to integrate secure, non-custodial staking with minimal setup

Key Requirements

Supported Operations

Stake
Build a staking transaction and forward it to the user’s wallet (e.g., MetaMask) for approval. The SDK prepares the operation; the user signs and broadcasts.

Unstake
Initiate an exit request from the beacon chain. Note: This process typically takes 1–3 days to finalize.

Claim Stake
After the network processes the exit, users can claim their staked ETH. This is the second step in the withdrawal flow.

View Staking Rewards
Use the stakingRewards method to retrieve accrued rewards for a given address. Rewards may take up to 24 hours to appear post-staking.

For full method references, consult the ExternalAddress documentation.


Wallet Address Model

In contrast, the wallet address model allows the Coinbase SDK to manage private keys—ideal for custodial platforms or backend-controlled staking services. For production environments, Coinbase recommends using a server-signer setup to enhance security.

Sample Workflow: Staking with Wallet Address

import { Coinbase, Wallet, StakeOptionsMode } from "@coinbase/coinbase-sdk";

// Create a wallet on Ethereum Hoodi testnet
let wallet = await Wallet.create({ networkId: Coinbase.networks.EthereumHoodi });

// Check available balance for staking
let stakeableBalance = await wallet.stakeableBalance(Coinbase.assets.Eth, StakeOptionsMode.PARTIAL);

// Initiate a partial stake (e.g., 0.0001 ETH)
let stakeOperation = await wallet.createStake(0.0001, Coinbase.assets.Eth, StakeOptionsMode.PARTIAL);

Once executed, the operation completes automatically—no user signing required.

Unstaking and Claiming

Just like with external addresses, unstaking is a two-phase process:

  1. Unstake – Submit an exit request:

    let unstakeableBalance = await wallet.unstakeableBalance(Coinbase.assets.Eth, StakeOptionsMode.PARTIAL);
    let unstakeOperation = await wallet.createUnstake(0.0001, Coinbase.assets.Eth, StakeOptionsMode.PARTIAL);
  2. Claim Stake – After 1–3 days, withdraw funds:

    let claimableBalance = await wallet.claimableBalance(Coinbase.assets.Eth, StakeOptionsMode.PARTIAL);
    let claimStakeOperation = await wallet.createClaimStake(claimableBalance, Coinbase.assets.Eth, StakeOptionsMode.PARTIAL);

This ensures safe and compliant withdrawal flows aligned with Ethereum’s consensus rules.


Viewing Staking Rewards

One of the key benefits of staking is earning passive income through network rewards. The Coinbase SDK provides flexible methods to query these earnings.

Retrieve Rewards for a Single Wallet

let rewards = await wallet.stakingRewards(Coinbase.assets.Eth);

rewards.forEach(reward => console.log(reward.toString()));

By default, this returns rewards from the last seven days. New rewards may take up to 24 hours to reflect.

Fetch Rewards for Multiple Addresses

Ideal for platforms managing multiple stakers:

let rewards = await StakingReward.list(
  Coinbase.networks.EthereumMainnet,
  Coinbase.assets.Eth,
  ["ADDRESS1", "ADDRESS2"],
  tenDaysAgo.toISOString(),
  now.toISOString()
);

View USD Value of Rewards

Monetize staking performance with real-time fiat conversion:

rewards.forEach(reward => {
  console.log(
    `USD value: ${reward.usdValue()},
     Conversion price: ${reward.conversionPrice().toString()},
     Conversion time: ${reward.conversionTime().toISOString()}`
  );
});

This feature is crucial for dashboards, tax reporting, and user-facing reward summaries.

👉 Learn how to track real-time staking returns across networks


Signing and Broadcasting Transactions

For external address integrations, developers must handle transaction signing independently. The SDK generates the operation; your app handles the rest.

Use libraries like Ethers.js to sign and broadcast transactions client-side. This ensures private keys never leave the user’s device—maintaining decentralization and trust.

Example steps:

  1. Build staking operation via SDK.
  2. Extract raw transaction data.
  3. Pass to user’s wallet (e.g., via WalletConnect).
  4. Broadcast upon approval.

Refer to the Signing and Broadcasting Transactions guide for implementation details.


Frequently Asked Questions

Q: Can I stake less than 32 ETH?

Yes! Shared ETH Staking removes the traditional 32 ETH minimum, allowing users to stake any amount—ideal for retail investors and dApp integrations.

Q: How long does unstaking take?

The unstaking process involves two steps: submitting an exit request (instant) and claiming funds (after 1–3 days, depending on network conditions).

Q: Are staking rewards compounded automatically?

No. Rewards accrue on-chain but are not automatically reinvested. Developers can build auto-compounding features using reward tracking APIs.

Q: Is the wallet address model safe for production?

Yes, but always use a server-side signer in production to protect private keys from exposure.

Q: Can I check staking rewards across mainnet and testnet?

Absolutely. The StakingReward.list() method supports both EthereumMainnet and test networks like EthereumHoodi.

Q: What happens if I lose access to my external wallet?

Since private keys are self-managed in the external model, recovery depends on your wallet’s backup mechanism (e.g., seed phrase). Always advise users to back up securely.


Final Thoughts

Shared ETH Staking democratizes access to Ethereum validation rewards, enabling developers to offer seamless staking experiences regardless of user balance. By leveraging the Coinbase SDK’s dual address models, you can build both custodial and non-custodial solutions with robust security and clear reward visibility.

Whether you're launching a staking dashboard, integrating rewards into a DeFi protocol, or enabling micro-staking for new users, the tools are now available to do so efficiently and securely.

👉 Start building your staking integration with powerful developer tools