> ## Documentation Index
> Fetch the complete documentation index at: https://tech.ramses.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# FeeDistributor

Periodized fee and incentive distributor for a single pool's voting market.

Each active gauge has an associated `FeeDistributor`. Rewards are tracked by **owner address**, not by veNFT token ID.

## Core Functions

### getReward

```solidity theme={null}
function getReward(address owner, address[] memory tokens) external
```

Claims all finalized rewards for `owner` across the provided token list. The caller must be `owner` or an approved admin in `VoteModule`.

### getPeriodReward

```solidity theme={null}
function getPeriodReward(uint256 period, address owner, address token) external
```

Claims a single reward token for one finalized period.

### notifyRewardAmount

```solidity theme={null}
function notifyRewardAmount(address token, uint256 amount) external
```

Queues new rewards for the **next** period. This can only be called by the configured `feeRecipient` address, which is the fee-routing source for that market.

### incentivize

```solidity theme={null}
function incentivize(address token, uint256 amount) external
```

Lets third parties add whitelisted incentive tokens for the next period.

### getRewardForOwner

```solidity theme={null}
function getRewardForOwner(address owner, address[] memory tokens) external
```

Claims all finalized rewards on behalf of `owner`, sending them to the `owner` address. Only callable by the Voter contract.

#### Parameters:

| Name     | Type       | Description                            |
| :------- | :--------- | :------------------------------------- |
| `owner`  | address    | The owner address to claim rewards for |
| `tokens` | address\[] | The reward token addresses to claim    |

### getRewardForOwnerTo

```solidity theme={null}
function getRewardForOwnerTo(address owner, address[] memory tokens, address destination) external
```

Claims all finalized rewards on behalf of `owner`, sending them to a specified `destination` address. Only callable by the Voter contract.

#### Parameters:

| Name          | Type       | Description                            |
| :------------ | :--------- | :------------------------------------- |
| `owner`       | address    | The owner address to claim rewards for |
| `tokens`      | address\[] | The reward token addresses to claim    |
| `destination` | address    | The address to send claimed rewards to |

### earned

```solidity theme={null}
function earned(address token, address owner) external view returns (uint256 reward)
```

Returns the claimable amount for `owner` across finalized periods, net of prior claims.

## Key Concepts

* Rewards are period-based and typically queued into `getPeriod() + 1`.
* `Voter` updates each user's balance in the fee distributor when votes are cast, reset, or recalculated.
* A distributor can hold multiple reward tokens at once.
* `notifyRewardAmount()` is used for fee routing, while `incentivize()` is used for vote incentives and bribes.
* Claims are permissioned through `VoteModule.isAdminFor()`, which is why admin relationships matter even outside direct voting.
