Global variables

Protocol wide governance parameters.

Gas price and oracle

Gas price (given is GWEI units) is a key parameter of Mangrove that determines the remuneration 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 gasprice 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;

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();

Last updated