# Validator Execution Rewards

Ethereum validators are rewarded in two ways -

1. **Consensus rewards**: All validators get rewards for attesting Ethereum blocks that is distributed directly to their withdrawal address
2. **Execution/Block Proposer rewards**: Validators earn this reward as tips paid whenever they get the opportunity to propose a block. The reward address is set by the validator client, and the address can be different from the consensus reward address. The address can be changed by the validator anytime

For Nexus Network, the proposer rewards are directed to the Validator Execution Reward Contract. The contract stores a mapping of rollups and their corresponding validators to determine the rewards generated by each validator. The rollup can claim these rewards whenever their validator proposes a block. The following functions are used for the implementation:

1. **Change Reward Bot Address**: Nexus Network uses this function to set a bot address that fetches information about the incoming rewards and updates the allocation of rewards to particular rollups

   ```solidity
   function changeRewardBotAddress(address _bot_address)
   ```

2. **Update Reward Rollup**: The bot registered in the previous step updates the reward details using this function. It contains all the rollup proposer rewards that have been earned by their validators

   ```solidity
   function updateRewardsRollup(RollupExecutionReward[] calldata rewards)
   ```

3. **Claim Reward**: Rollups can use this function to claim their pending proposer rewards

   ```solidity
   function claimRewards()
   ```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://web3navigators.gitbook.io/product-docs/developer-docs/smart-contracts/validator-execution-rewards.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
