Skip to content

Delegate Tezos staking validation rights with the API

In Tezos, token holders can delegate their validation rights to other token holders (called validators or bakers) without transferring ownership of their tokens. Unlike other DPoS protocols, the account as a whole is delegated. However, the liquidity is maintained and the tokens can still be transferred, as no freezing periods apply to a delegation.

You can perform the following tasks:

  • Delegate validation rights
  • Undelegate validation rights

Prerequisites

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

PrerequisiteAdditional information
An account on a Tezos 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

Delegate or undelegate validation rights

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 delegate or undelegate validation rights, follow the steps in Manage intents and approvals, with a payload similar to one of the following examples.

Payload examples

Delegate validation rights

{
"payload": {
    "id": "953d75b2-e384-46e9-8a72-a1ce753a50e2",
    "accountId": "953d75b2-e384-46e9-8a72-a1ce753a50e2",
    "parameters": {
        "operation": {
			"destination": {
				"address": "tz1b9jT9tp1XxNe8n2WgxnWKwup4rxGaHLhV",
				"type": "Address"
					},
			"type": "Delegation"
				},
        "feeStrategy": {
            "priority": "Low",
            "type": "Priority"
        },
        "maximumFee": "4000",
        "type": "Tezos"
    },
    "description": "",
    "customProperties": {},
    "type": "v0_CreateTransactionOrder"
		}
}

Fields of the payload block to note are as follows:

FieldDescription
accountIdInternal account ID of a Tezos account in Ripple Custody.
operation.destinationAddress to which to delegate validation rights.
operation.typeDelegation
parameters.feeStrategyThe fee strategy to use for the transaction. For Tezos, the Priority strategy applies. For more information, see Fee strategy and maximum fee.
parameters.maximumFeeThe maximum fee, in micro tez. For more information, see Fee strategy and maximum fee.
parameters.typeLedger type, in this case Tezos.
typev0_CreateTransactionOrder

Undelegate validation rights

{
    "payload": {
        "id": "953d75b2-e384-46e9-8a72-a1ce753a50e2",
        "accountId": "953d75b2-e384-46e9-8a72-a1ce753a50e2",
        "parameters": {
            "operation": {
			    "type": "Undelegation"
            },
            "feeStrategy": {
                "priority": "Low",
                "type": "Priority"
            },
            "maximumFee": "4000",
            "type": "Tezos"
        },
        "customProperties": {},
        "type": "v0_CreateTransactionOrder"
    }
}

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

  • Creates a transaction, to broadcast the details and delegate staking to or undelegate staking from the staking pool 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.