# Incentives with a custom strategy

With mangrove you can write your own contracts in order to create offers and bring liquidity programmatically. In order to track ownership for the length of the incentive program, use the API from `MangrovePoints.sol`.

## MangrovePoints

MangrovePoints is a smart contract designed to keep track of the custom maker contract links with their owners. This contract allows for the management of operators for accounts, providing a flexible and secure way to handle permissions.

`MangrovePoints` is deployed on Arbitrum at `0x26e9e34839b5f150B66eA30cd8B503FFa1B4BFd4`.

### How to Use

To use the `MangrovePoints` contract in your custom maker contract, follow these steps:

1. Include the IMangrovePoints interface in your contract:

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

/**
 * @title IMangrovePoints
 * @notice Interface for the MangrovePoints contract
 */
interface IMangrovePoints {
  /**
   * @notice Emitted when an operator is set for an account
   * @param account The account for which the operator is set
   * @param operator The address of the operator
   */
  event OperatorSet(address indexed account, address indexed operator);

  /**
   * @notice Sets the operator for an account
   * @param account The account for which to set the operator
   * @param operator The address to set as the operator
   */
  function setOperator(address account, address operator) external;

  /**
   * @notice Returns the operator for a given account
   * @param account The account to check
   * @return The address of the operator for the given account
   */
  function operators(address account) external view returns (address);
}
```

```solidity
import {IMangrovePoints} from "./IMangrovePoints.sol";
```

2. Call the `setOperator` method directly from your contract:

```solidity
IMangrovePoints mangrovePoints = IMangrovePoints(MANGROVE_POINTS_ADDRESS);
mangrovePoints.setOperator(address(this), OPERATOR_ADDRESS);
```

Replace `MANGROVE_POINTS_ADDRESS` with the deployed address of the MangrovePoints contract, and `OPERATOR_ADDRESS` with the address you want to set as the operator for your contract.

### Mangrove's Role

While the primary method for setting operators is through the custom maker contracts themselves, Mangrove also has the ability to add operators in cases where the contract may have missed calling this function. However, this is subject to certain conditions:

* There must be a proof linking the custom maker contract to the admin, deployer, or other authorized entity.
* It will be at Mangrove's discretion to accept or refuse any requests for operator assignment.

This feature ensures that legitimate contracts are not left without operators due to oversight or technical issues, while maintaining the integrity of the system.


---

# 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.mangrove.exchange/mgv-incentives/ms2-program-closed/mgv-token-allocation-per-user-type/incentives-with-a-custom-strategy.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.
