Mangrove
Mangrove
Mangrove
  • START HERE
    • What is Mangrove?
      • Smart offers
      • Bounty
      • Makers, Takers, Keepers
        • Makers
        • Takers
        • Keepers
    • Why Mangrove?
    • Who is the Mangrove dApp for?
    • Audits
    • FAQ
    • Glossary
    • Terms & Conditions
  • Strategies
    • Kandel
      • What is Kandel?
      • How does Kandel Work?
        • Step-by-step visual explanation
        • Parameters
        • Choosing Kandel parameters
        • Published Liquidity
        • More on failing offers
      • Potential risks
  • DAPP GUIDE
    • Swap
    • Trade
      • How to make an order
        • Market Order
        • Limit Order
        • Amplified Order
        • More on order types
      • Approvals
      • Minimum Volume
      • How to Track and Manage Orders
    • Earn
    • Rewards
    • Bridge
    • Wrap
  • MGV INCENTIVES
    • Fee Rewards
      • How the programs Work
      • Current programs
    • Vault LP programs
      • How the Programs Work
      • Current programs
      • Earning rewards
      • Example
      • Previous programs
    • MS2 Program (closed)
      • How Rewards Are Calculated
        • Reward Rate ρ
        • Takers Rewards
        • Adjusted Volume for Makers
        • How to Maximize Your Score
      • MGV Token Allocation per User Type
        • Specific Allocation for Kandel users and vault managers
        • Community Contributors
        • Incentives with a custom strategy
      • Epochs and Updates
    • MS1 Program (closed)
      • Intro
      • Trading Points
      • Boost
      • Referral Points
      • Community Points
      • Parameters
      • Technical Insights
      • MS1 FAQ
      • Disclaimer
  • Governance
    • General Governance
      • Key Stakeholders
        • Token Holders
          • Builders
        • Builders
        • Pods
      • Guardians
      • Governance Process
        • Initial Discussions
        • Proposals
        • Voting
        • Execution
    • Councils
      • Responsibilities
      • Elections
      • Budgets
    • Guides and resources
      • How to vote on a governance proposal
      • How to delegate my voting power
      • How to access the Builders’ directory
      • How to access the Pods’ directory
      • Snapshot configuration & membership
      • Links and adresses
  • QUICK LINKS
    • Whitepaper
    • Website
    • Feedback
    • Blog
    • GitHub
    • X
    • Discord
    • Telegram
    • Deployment adresses
Powered by GitBook
On this page
  • MangrovePoints
  • How to Use
  • Mangrove's Role
  1. MGV INCENTIVES
  2. MS2 Program (closed)
  3. MGV Token Allocation per User Type

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:

// 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);
}
import {IMangrovePoints} from "./IMangrovePoints.sol";
  1. Call the setOperator method directly from your contract:

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.

PreviousCommunity ContributorsNextEpochs and Updates

Last updated 6 months ago