Managing Staking and Delegation Operations (WIP) ๐Ÿšง

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, updating commission rates, and changing operational and reward addresses. 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.

Changing the Operational Address

Validators can change their operational address by interacting with the change_operational_address function.

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

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

  3. Enter the following parameter:

    • operational_address: Enter the new operational address.

  4. Submit the transaction to update the operational address.

Changing the Reward Address

Validators can update the reward address associated with their staking contract using the change_reward_address function.

Procedure
  1. Using a Starknet block explorer, navigate to the staking 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 change the reward address.

Managing Delegation Settings as a Delegator

Changing the Reward Address

Delegators can change their reward address by interacting with the change_reward_address function in the delegation pooling contract.

Procedure
  1. Using a Starknet block explorer, navigate to the delegation pooling contract associated with your delegation.

  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.