Skip to content

To set up staking on a Cardano ledger, you need to do the following:

  1. Register a staking address.
  2. Delegate staking to a stake pool.

You can also do the following:

  • Unregister a staking address.
  • Withdraw staking rewards: The accumulated rewards are automatically delegated. You can withdraw the rewards without affecting your staking amount, which still stays in the stake pool. However, you cannot withdraw rewards if the address does not have a minimum amount of non-rewarded currency.

Prerequisites

To perform staking tasks on Cardano, you need the following:

PrerequisiteAdditional information
An account on a Cardano ledger from which to initiate the transactionsView account details
Enough funds in the account to cover the transaction fees and the amountCheck account balances
The following new IDs, in a standard UUID format:
  • A transaction order ID
  • An intent ID

Perform staking tasks

System change process

All new requests to change the system state follow the same process. To familiarize yourself with this process first, see Manage intents and approvals.

To perform staking tasks on Cardano, follow the steps in Manage intents and approvals, with a payload similar to one of the following examples.

Payload examples

Register a staking address

{
    "payload": {
        "id": "f49a4914-a590-4977-b340-205f07f5bc6a",
        "accountId": "416dcc47-b60c-49fb-be8e-ca7b8a8144ba",
        "parameters": {
            "operation": {
                "type": "RegisterStaking"
            },
            "feeStrategy": {
                "priority": "Medium",
                "type": "Priority"
            },
            "maximumFee": "10000",
            "type": "Cardano"
        },
        "description": "Cardano register staking",
        "customProperties": {},
        "type": "v0_CreateTransactionOrder"
    }
}

Fields of the payload block to note are as follows:

FieldDescription
accountIdInternal account ID of an existing Cardano account in Ripple Custody.
parameters.operation.typeRegisterStaking
parameters.feeStrategyThe fee strategy to use for the transaction. For more information, see Fee strategy and maximum fee.
parameters.maximumFeeThe maximum fee, in lovelace. For more information, see Fee strategy and maximum fee.
parameters.typeLedger type, in this case Cardano.
typev0_CreateTransactionOrder

Unregister a staking address

{
    "payload": {
        "id": "f49a4914-a590-4977-b340-205f07f5bc6a",
        "accountId": "416dcc47-b60c-49fb-be8e-ca7b8a8144ba",
        "parameters": {
            "operation": {
                "type": "UnregisterStaking"
            },
            "feeStrategy": {
                "priority": "Medium",
                "type": "Priority"
            },
            "maximumFee": "10000",
            "type": "Cardano"
        },
        "description": "Cardano unregister staking",
        "customProperties": {},
        "type": "v0_CreateTransactionOrder"
    }
}

Delegate staking to a staking pool

{
    "payload": {
        "id": "f49a4914-a590-4977-b340-205f07f5bc6a",
        "accountId": "416dcc47-b60c-49fb-be8e-ca7b8a8144ba",
        "parameters": {
            "operation": {
                "poolId": "pool1vf8ukuvdn7kv0hxgm23utjkkw5ugdhwfdrxy56l2t6wvxezspyu",
                "type": "DelegateStaking"
            },
            "feeStrategy": {
                "priority": "Medium",
                "type": "Priority"
            },
            "maximumFee": "10000",
            "type": "Cardano"
        },
        "description": "Cardano delegate staking",
        "customProperties": {},
        "type": "v0_CreateTransactionOrder"
    }
}

Fields of the payload block to note are as follows:

FieldDescription
accountIdInternal account ID of an existing Cardano account in Ripple Custody.
operation.poolIdID of the pool to which to delegate staking. Must be in Bech32 format.
operation.typeDelegateStaking
parameters.feeStrategyThe fee strategy to use for the transaction. For more information, see Fee strategy and maximum fee.
parameters.maximumFeeThe maximum fee, in lovelace. For more information, see Fee strategy and maximum fee.
parameters.typeLedger type, in this case Cardano.
typev0_CreateTransactionOrder

Withdraw staking rewards

{
    "payload": {
        "id": "f49a4914-a590-4977-b340-205f07f5bc6a",
        "accountId": "416dcc47-b60c-49fb-be8e-ca7b8a8144ba",
        "parameters": {
            "operation": {
                "amount": "100000",
                "type": "WithdrawRewards"
            },
            "feeStrategy": {
                "priority": "Medium",
                "type": "Priority"
            },
            "maximumFee": "10000",
            "type": "Cardano"
        },
        "description": "Cardano withdraw rewards",
        "customProperties": {},
        "type": "v0_CreateTransactionOrder"
    }
}

When the transaction order is successfully approved, Ripple Custody does the following:

  • Creates a transaction, to broadcast the details on the blockchain.
  • Creates one or more transfers, to represent the separate amounts associated with the transaction, such as the cryptocurrency amount and the fees.