Managing Staking and Delegation Operations

This guide outlines how both validators and delegators can manage various aspects of their staking and delegation activities on Starknet. Validators can perform operations such as opening delegation pools and updating commission rates. Delegators can manage their participation by changing their reward addresses associated with delegation pools.

Managing Staking Operations as a Validator

Validators have several functions available to effectively manage their staking and delegation settings.

Prerequisites
  • An existing stake in the staking contract.

  • An existing delegation pool if updating pool-specific settings.

Opening a Delegation Pool

If a validator does not yet have a delegation pool, they can open one by calling the set_open_for_delegation function.

Procedure
  1. Using a Starknet block explorer, navigate to the staking contract.

  2. In the contract interface, locate and select the set_open_for_delegation function.

  3. Enter the following parameter:

    • commission: Enter the commission rate for the delegation pool, expressed as a percentage with precision (where 10000 represents 100%). For example, to set a 5% commission, enter 500.

  4. Submit the transaction to create the delegation pool.

Once created, the delegation pool will be associated with the validator’s staking contract, allowing delegators to delegate their stake to the validator.

Updating Commission Rate

Validators can update the commission rate of their delegation pool using the update_commission function. Note: The commission rate can only be decreased or kept the same; it cannot be increased.

Procedure
  1. Using a Starknet block explorer, navigate to the staking contract.

  2. In the contract interface, locate and select the update_commission function.

  3. Enter the following parameter:

    • commission: Enter the new commission rate, which must be equal to or less than the current rate, expressed as a percentage with precision (where 10000 represents 100%). For example, to set a 5% commission, enter 500.

  4. Submit the transaction to update the commission rate.

Address Management

Both validators and delegators can update their associated addresses within their staking and delegation contracts. This section outlines how to change the reward and operational addresses.

Changing the Operational address (Validators)

Validators can update their operational address using the change_operational_address function.

Procedure
  1. Using a Starknet block explorer, navigate to the Staking contract.

  2. Declare the new operational address:

    1. In the contract interface, locate and select the declare_operational_address function.

    2. Enter the following parameter:

      • staker_address: Enter the your Staker address.

    3. Submit the transaction using your new operational address.

  3. Update the existing operational address:

    1. In the contract interface, locate and select the change_operational_address.

    2. Enter the following parameter:

      • operational_address: Enter the new operational address.

    3. Submit the transaction (using your regular staker address).

Changing the Reward Address (Validators and Delegators)

Both validators and delegators can update their reward address using the change_reward_address function.

Procedure
  1. Using a Starknet block explorer, navigate to the appropriate contract:

    • For validators: Navigate to the staking contract.

    • For delegators: Navigate to the delegation pooling contract.

  2. In the contract interface, locate and select the change_reward_address function.

  3. Enter the following parameter:

    • reward_address: Enter the new reward address.

  4. Submit the transaction to update the reward address.

Additional Information

For more information on how the staking and delegation pooling systems work, refer to the Staking Contract Architecture.