# IAlgebraLimitFarming

Algebra Farming Interface Allows farming nonfungible liquidity tokens in exchange for reward tokens

## Events

### LimitFarmingCreated

`LimitFarmingCreated(contract IERC20Minimal,contract IERC20Minimal,contract IAlgebraPool,uint256,uint256,uint256,uint256,struct IAlgebraFarming.Tiers,address,uint32)`

Event emitted when a liquidity mining incentive has been created

| Name             | Type                         | Description                                                          |
| ---------------- | ---------------------------- | -------------------------------------------------------------------- |
| rewardToken      | contract IERC20Minimal       | The token being distributed as a reward                              |
| bonusRewardToken | contract IERC20Minimal       | The token being distributed as a bonus reward                        |
| pool             | contract IAlgebraPool        | The Algebra pool                                                     |
| startTime        | uint256                      | The time when the incentive program begins                           |
| endTime          | uint256                      | The time when rewards stop accruing                                  |
| reward           | uint256                      | The amount of reward tokens to be distributed                        |
| bonusReward      | uint256                      | The amount of bonus reward tokens to be distributed                  |
| tiers            | struct IAlgebraFarming.Tiers | The amounts of locked token for liquidity multipliers                |
| multiplierToken  | address                      | The address of token which can be locked to get liquidity multiplier |
| enterStartTime   | uint32                       | The time when enter becomes possible                                 |

### RewardAmountsDecreased

`RewardAmountsDecreased(uint256,uint256,bytes32)`

| Name        | Type    | Description |
| ----------- | ------- | ----------- |
| reward      | uint256 |             |
| bonusReward | uint256 |             |
| incentiveId | bytes32 |             |

## Functions

### maxIncentiveDuration

`maxIncentiveDuration()` view external

The max duration of an incentive in seconds

**Returns:**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \[0] | uint256 |             |

### maxIncentiveStartLeadTime

`maxIncentiveStartLeadTime()` view external

The max amount of seconds into the future the incentive startTime can be set

**Returns:**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \[0] | uint256 |             |

### farms

`farms(uint256,bytes32)` view external

Returns information about a farmd liquidity NFT

| Name        | Type    | Description                                          |
| ----------- | ------- | ---------------------------------------------------- |
| tokenId     | uint256 | The ID of the farmd token                            |
| incentiveId | bytes32 | The ID of the incentive for which the token is farmd |

**Returns:**

| Name      | Type    | Description |
| --------- | ------- | ----------- |
| liquidity | uint128 |             |
| tickLower | int24   |             |
| tickUpper | int24   |             |

### createLimitFarming

`createLimitFarming(struct IIncentiveKey.IncentiveKey,struct IAlgebraFarming.Tiers,struct IAlgebraLimitFarming.IncentiveParams)` external

| Name   | Type                                        | Description |
| ------ | ------------------------------------------- | ----------- |
| key    | struct IIncentiveKey.IncentiveKey           |             |
| tiers  | struct IAlgebraFarming.Tiers                |             |
| params | struct IAlgebraLimitFarming.IncentiveParams |             |

**Returns:**

| Name        | Type    | Description |
| ----------- | ------- | ----------- |
| virtualPool | address |             |

### addRewards

`addRewards(struct IIncentiveKey.IncentiveKey,uint256,uint256)` external

| Name        | Type                              | Description |
| ----------- | --------------------------------- | ----------- |
| key         | struct IIncentiveKey.IncentiveKey |             |
| reward      | uint256                           |             |
| bonusReward | uint256                           |             |

### decreaseRewardsAmount

`decreaseRewardsAmount(struct IIncentiveKey.IncentiveKey,uint256,uint256)` external

| Name              | Type                              | Description |
| ----------------- | --------------------------------- | ----------- |
| key               | struct IIncentiveKey.IncentiveKey |             |
| rewardAmount      | uint256                           |             |
| bonusRewardAmount | uint256                           |             |

***


---

# 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://docs.algebra.finance/algebra-integral-documentation/algebra-v1-technical-reference/contracts/api-reference-v1.0/v1.0-tokenomics/ialgebralimitfarming.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.
