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

# ADA Staking

> Register, delegate, withdraw rewards and unregister ADA through the Digital Asset Service Desk API, and track your staking position with the ADA staking dashboard.

Zodia Custody enables you to stake ADA from a DeFi custody wallet directly through the Digital Asset Service Desk API, and to track your staked amount and rewards with a dashboard endpoint. For ETH staking, see [the ETH staking guide](https://docs.zodia-custody.com/staking-guide.md).

## How ADA Staking Works

ADA staking is made of four separate operations, each submitted as its own service request:

| Operation | Service ID | What it does |
| - | - | - |
| Register | `0x0020-020` | Opens a stake account for the wallet. |
| Delegate | `0x0020-021` | Delegates the wallet's stake to a stake pool. |
| Reward Withdrawal | `0x0020-022` | Withdraws the rewards you have earned to the wallet. |
| Unregister | `0x0020-023` | Closes the stake account. |

Your ADA stays in your wallet while it is staked: it isn't locked, there is no lock-up period, and delegation applies to the wallet's whole balance. A wallet has to be registered before it can delegate, and delegated before it earns rewards.

## Wallets

All four operations require a DeFi wallet that holds ADA. Otherwise the request is rejected with `ER-259` for a wallet that isn't a DeFi wallet, or `ER-3016` for a wallet that doesn't hold ADA.

To find the wallets you can use, filter [Retrieve wallets](https://docs.zodia-custody.com/api-reference/custody-v3/retrieve-wallets.md) by type. Each wallet in the response carries its `walletType`:

```json theme={null}
{
  "currencies": ["ADA"],
  "walletTypes": ["DEFI"]
}
```

## Staking Operations

Every ADA staking operation is submitted the same way as any other Digital Asset Service Desk product: create the instruction with `POST /v3/api/servicedesk/create` and a `{"serviceId": ..., "payload": ...}` body, then submit, confirm and approve it following the same steps described in [Signing the Payload](https://docs.zodia-custody.com/authentication/signing-payload.md) and demonstrated end-to-end in [Wallet Creation](https://docs.zodia-custody.com/service-desk-guide/wallet-creation.md). What follows is what's specific to each ADA operation; see [Products & Services](https://docs.zodia-custody.com/service-desk-guide/products-and-services.md) for the exact payload template of each one.

The checks on the wallet's registration status run when you create the request and again when you submit it, so a request that was valid when created can still be rejected at submit if the wallet's status changed in between.

### Register (`0x0020-020`)

Registering opens a stake account for `walletId`. The payload is the wallet ID only.

* **Registering again:** a wallet that has unregistered can register again.
* **Already registered:** if the wallet is already registered, or a request is still pending for it, the request is rejected with `ER-617`.
* **Deposit:** registering requires a refundable stake-key deposit, which is returned when you unregister. In the wallet's transactions, the deposit appears as a transfer to your own wallet.

### Delegate (`0x0020-021`)

Delegating sends the wallet's stake to the stake pool in `stakePoolAddress`.

* **Pool:** `stakePoolAddress` is a stake pool ID, which starts with `pool1`, not a wallet address. Use a pool Zodia has set up for your account. A pool that isn't one of yours is rejected with `ER-3015`, and a pool that can't be found on Cardano with `ER-3014`.
* **Registered wallet:** the wallet must be registered. A wallet that has never registered is rejected with `ER-621`, and one that has unregistered, or has an unregister request pending, with `ER-618`.
* **Changing pool:** a delegated wallet can delegate again to move to another pool.

### Reward Withdrawal (`0x0020-022`)

A Reward Withdrawal moves the rewards you have earned to your wallet. There is no `amount`: everything available is withdrawn, and the [dashboard](#tracking-your-position) shows what that is.

* **Minimum:** the rewards must be at least 1 ADA, otherwise the request is rejected with `ER-625`.
* **Checks:** a request is checked in this order: registered (`ER-621`), not unregistered (`ER-618`), delegated (`ER-623`), then the 1 ADA minimum (`ER-625`).
* **Signing:** `POST /v3/api/servicedesk/pending` returns an array of instructions for a Reward Withdrawal, even when it holds a single one, and you send the whole array back when you approve. See [Multiple pending instructions for a single service request](https://docs.zodia-custody.com/authentication/signing-payload.md#multiple-pending-instructions-for-a-single-service-request).

### Unregister (`0x0020-023`)

Unregistering closes the stake account. The deposit paid when registering is returned to the wallet, and appears in the wallet's transactions as a transfer to your own wallet.

* **Rewards first:** a wallet with rewards still to withdraw can't unregister, and the request is rejected with `ER-624`. Withdraw the rewards first with a Reward Withdrawal.
* **Small rewards:** while rewards are below 1 ADA they can't be withdrawn yet. Once they reach 1 ADA, withdraw them, then unregister.
* **Registered wallet:** a wallet that has never registered is rejected with `ER-621`, and one that has already unregistered, or has an unregister request pending, with `ER-618`.

## Tracking Your Position

[Get ADA Staking Dashboard](https://docs.zodia-custody.com/api-reference/staking-v3/get-ada-staking-dashboard) returns the staking position of an ADA wallet: the staked amount and the rewards available to withdraw. It takes the wallet ID only:

```json theme={null}
{
  "walletId": "Wallet_ID"
}
```

Here is an example response for a registered wallet that has delegated:

```json theme={null}
{
  "currency": "ADA",
  "stakedAmount": {
    "amount": "10,000.00000000",
    "fiatValue": "4,500.00",
    "fiatCurrency": "USD"
  },
  "rewards": {
    "amount": "125.00000000",
    "fiatValue": "56.25",
    "fiatCurrency": "USD"
  }
}
```

| Field | Meaning |
| - | - |
| `stakedAmount` | The wallet's ADA balance while its stake account is registered, and `0` otherwise. Delegating isn't required: a registered wallet that hasn't delegated yet shows its balance as staked. |
| `rewards` | The rewards you have earned and can withdraw with a Reward Withdrawal. It goes back to `0` once they are withdrawn. |

* **Amounts:** `amount` is a string in ADA with 8 decimals and comma thousands separators. `fiatValue` is a string with 2 decimals and comma thousands separators, expressed in `fiatCurrency`, the fiat currency configured for your account.
* **No staking activity:** a wallet that has never registered, or has unregistered, returns `0` amounts, not an error.
* **Up to date:** the figures reflect the position at the time of the call. If the position can't be retrieved at that moment, the call fails with a `500` and you can retry.

## Notifications

Each ADA operation results in an on-chain transaction. If you have [webhooks](https://docs.zodia-custody.com/webhooks.md) configured, you receive Transfer notifications when it is posted on chain and when it is confirmed. To follow your position over time, use the dashboard.

## Errors

See [Staking Error Codes](https://docs.zodia-custody.com/working-with-apis/staking-error-codes.md) for the errors specific to ADA staking.

## FAQs

### How long does it take to start earning rewards?

Cardano applies a delegation at an epoch boundary, and rewards start to accrue a few epochs later, typically around 15 days after you delegate. Use the dashboard to follow your rewards.

### Why does my dashboard show a staked amount but no rewards?

`stakedAmount` shows the wallet's balance as soon as it is registered, but rewards only accrue once the wallet has delegated and the first rewards have been earned. A Reward Withdrawal is rejected with `ER-623` until the wallet has delegated, and with `ER-625` while its rewards are below 1 ADA.

### Why can't I withdraw my rewards or unregister?

A Reward Withdrawal needs rewards of at least 1 ADA, and an Unregister needs no rewards left. If your rewards are below 1 ADA, wait until they reach 1 ADA, withdraw them, then unregister.

### Can I register again after unregistering?

Yes. A wallet that has unregistered can register again, and then delegate again.

## Contact

If you're a Zodia client and want to learn more about this feature or enable it, contact our customer service team.

Email us at [customerservice@zodia.io](mailto:customerservice@zodia.io). We're here to answer questions, provide more details, or help activate the feature. Our team is ready to assist you with quick and effective support.
