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
  • Gas price and oracle
  • Other governance controlled setters
  1. Contracts
  2. Technical references
  3. Governance parameters

Global variables

Protocol wide governance parameters.

Last updated 2 years ago

Gas price and oracle

Gas price (given is GWEI units) is a key parameter of Mangrove that of takers for removing a failing offer from a list. In order to make sure takers are consistently over-compensated for the gas used, it should be kept well above average tx.gasprice.

Gas price can be read from an outside Monitoring Contract. When the governance wishes to do so, it must enable this feature by letting the monitor (if any) act as a gas price oracle. This can be done using the governance restricted function setUseOracle of Mangrove.

If monitoring the gas price is not enabled, or if the value returned by the monitor is ill formed, Mangrove will use its global parameter as fallback.

// Governance lets the monitor determine gasprice
function setUseOracle(bool useOracle) public;

// Governance sets the fallback gasprice value (in GWEI)
function setGasprice(uint gasprice) public;

// Governance sets a new monitor
function setMonitor(address monitor) public;
event SetGasprice(uint gasprice); // emitted when gas price is updated
event SetMonitor(address monitor); // emitted when a new monitor is set
event SetUseOracle(bool value); // logs `true` if Mangrove is set to use an external monitor to read gasprice. Logs `false` otherwise

Important point

If allowing the monitor to act as a gas price Oracle, Governance must have previously deployed a Monitor Contract and set its address in Mangrove's configuration.

Other governance controlled setters

// Governance sets maximum allowed gas per offer
function setGasmax(uint gasmax) public;
// Changing governance address
function setGovernance(address value);
// Changing treasury address
function setVault(address value);
// (de)activates sending trade notification to governance contract (e.g. for rewards programs)
function setNotify(bool value);
// set maximum gas amount an offer may require to execute
function setGasmax(uint value);
// permanently puts mangrove into a killed state (Mangrove rejects all taker and maker orders, only retracting offer is possible)
function kill();
gasprice
determines the remuneration