> ## Documentation Index
> Fetch the complete documentation index at: https://berachain-422fce37-docs-staking-pool-install-cli.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Incentives Commission

> Set and change the validator incentives commission rate (0–20%) via BeraChef; queue and activation delay.

A validator can configure the commission taken on Incentives distributed to its delegators — users who delegate to a validator with \$sWBERA. In this guide, you'll walk through the process of changing a validator's commission.

<Frame>
  ```mermaid theme={null}
  ---
  title: Change Validator Commission Rate Process
  ---
  flowchart LR
  VAL(["👤 Validator"]):::actor
  ANY(["👥 Anyone"]):::actor
  Q["Queued<br/><small>7%</small>"]:::queued
  R["Ready"]:::ready
  A["Active<br/><small>New rate 7%</small>"]:::active

  VAL -- "Set rate" --> Q
  Q -- "⏱️ Wait block delay" --> R
  ANY -- "Activate" --> R
  R --> A

  classDef actor fill:none,stroke:none,color:#3d3d3a,font-weight:bold
  classDef queued fill:#f2b01e,stroke:#ba7517,stroke-width:2px,color:#5a3a10
  classDef ready fill:#5e2f16,stroke:#3a1c0a,stroke-width:2px,color:#ffffff
  classDef active fill:#3a9e4e,stroke:#27700a,stroke-width:2px,color:#ffffff
  ```
</Frame>

## Requirements

Before you begin, ensure you have the following:

* An RPC endpoint to Berachain
* \$BERA to process the transaction
* `Operator Address` of the validator wanting to change their commission
* [Foundry](https://book.getfoundry.sh/getting-started/installation)
* BeraChef Contract Address: `0xdf960E8F3F19C481dDE769edEDD439ea1a63426a`

## How validator commissions are updated

When Incentives are activated, all commission rates for Validator Incentives are defaulted to **5%** — meaning Validators receive 5% of all Incentives. This is defined by `DEFAULT_COMMISSION_RATE` in `BeraChef.sol`.

For a validator to change their commission rate, they must first queue the change, wait for the `commissionChangeDelay` (which has a maximum of **16,382 blocks**), and then activate the new commission. If a commission rate is already queued, it must be activated before a new commission rate can be proposed.

<Tip>
  **Anyone** can activate a queued commission rate, not just the validator.
</Tip>

## Option A - Change validator commission using Foundry

The following walks you through updating the Validator Commission rate via Foundry's CLI `cast`.

### Step 1 - Get current validator commission rate

```bash theme={null}
# Env Vars
BERACHEF_CONTRACT_ADDRESS=0xdf960E8F3F19C481dDE769edEDD439ea1a63426a
RPC_URL=https://rpc.berachain.com/
VALIDATOR_PUBKEY_KEY=<0xYOUR_VALIDATOR_PUBKEY>

# Command
cast call $BERACHEF_CONTRACT_ADDRESS \
    "getValCommissionOnIncentiveTokens(bytes)(uint96)" \
    $VALIDATOR_PUBKEY_KEY \
    --rpc-url $RPC_URL;
```

### Step 2 - Queue new validator commission rate

Determine the amount you would like to queue:

```bash theme={null}
# Env Vars
BERACHEF_CONTRACT_ADDRESS=0xdf960E8F3F19C481dDE769edEDD439ea1a63426a
RPC_URL=https://rpc.berachain.com/
OPERATOR_WALLET_PRIVATE_KEY=<0xYOUR_OPERATOR_WALLET_PRIVATE_KEY>
VALIDATOR_PUBKEY_KEY=<0xYOUR_VALIDATOR_PUBKEY>
COMMISSION_RATE=0.05e4 # 5% = 0.05e4 or 500, 100% = 1e4 or 10000

# Command
cast send $BERACHEF_CONTRACT_ADDRESS \
    "queueValCommission(bytes,uint96)" \
    $VALIDATOR_PUBKEY_KEY \
    $COMMISSION_RATE \
    --private-key $OPERATOR_WALLET_PRIVATE_KEY \
    --rpc-url $RPC_URL;
```

### Step 3 - Verify queued validator commission rate

```bash theme={null}
# Env Vars
BERACHEF_CONTRACT_ADDRESS=0xdf960E8F3F19C481dDE769edEDD439ea1a63426a
RPC_URL=https://rpc.berachain.com/
VALIDATOR_PUBKEY_KEY=<0xYOUR_VALIDATOR_PUBKEY>

# Command
cast call $BERACHEF_CONTRACT_ADDRESS \
    "getValQueuedCommissionOnIncentiveTokens(bytes)((uint96,uint64))" \
    $VALIDATOR_PUBKEY_KEY \
    --rpc-url $RPC_URL;
```

### Step 4 - Activate queued validator commission rate

<Info>
  This can only be done after the **`commissionChangeDelay`** has passed, and this **can be executed by anyone**.
</Info>

```bash theme={null}
# Env Vars
BERACHEF_CONTRACT_ADDRESS=0xdf960E8F3F19C481dDE769edEDD439ea1a63426a
RPC_URL=https://rpc.berachain.com/
WALLET_PRIVATE_KEY=<0xYOUR_WALLET_PRIVATE_KEY>
VALIDATOR_PUBKEY_KEY=<0xVALIDATOR_PUBKEY>

# Command
cast send $BERACHEF_CONTRACT_ADDRESS \
    "activateQueuedValCommission(bytes)" \
    $VALIDATOR_PUBKEY_KEY \
    --private-key $WALLET_PRIVATE_KEY \
    --rpc-url $RPC_URL;
```
