UFragments Policy Contract

contract UFragmentsPolicyis Ownable

This contract is an implementation of the uFragments Ideal Money protocol. uFragments operates symmetrically on expansion and contraction. It will both split and combine coins to maintain a stable unit price. This component regulates the token supply of the uFragments ERC20 token in response to market oracles. Source: UFragmentsPolicy.sol

Index


Events

  • LogRebase
    event LogRebase(uint256 epoch, uint256 exchangeRate, uint256 volume24hrs, int256 appliedSupplyAdjustment)

    Parameters:
    epoch - uint256
    exchangeRate - uint256
    volume24hrs - uint256
    appliedSupplyAdjustment - int256

Functions

  • initialize
    function initialize(address owner, UFragments _uFrags, IMarketOracle _marketOracle) public

    ZOS upgradable contract initialization method, called at the time of contract creation. This is where parent class initializers are invloked and contract storage variables are set with initial values.

    Modifiers:
    isInitializer
    Parameters:
    owner - address
    _uFrags - UFragments
    _marketOracle - IMarketOracle
  • rebase
    function rebase() external

    Anyone may call this function to initiate a new rebase operation, provided the minimum time period has elapsed.

  • setDeviationThreshold
    function setDeviationThreshold(uint128 _deviationThreshold) external

    Allows setting the Deviation Threshold. If the exchange rate given by the market oracle is within this threshold, then no supply modifications are made.

    Modifiers:
    onlyOwner
    Parameters:
    _deviationThreshold - TThe new exchange rate threshold.
  • setMinRebaseTimeIntervalSec
    function setMinRebaseTimeIntervalSec(uint128 _minRebaseTimeIntervalSec) external

    Allows setting the minimum time period that must elapse between rebase cycles.

    Modifiers:
    onlyOwner
    Parameters:
    _minRebaseTimeIntervalSec - The new minimum time interval, in seconds.
  • setRebaseLag
    function setRebaseLag(uint32 _rebaseLag) external

    The rebase lag parameter controls how long it takes, in cycles, to approach an absolute supply correction. If the lag equals the smallest value of 1, then we apply full supply correction at each rebase cycle. If it is greater than 1, say n, then we apply a correction of 1/n at every cycle so that by the end of n cycles we would have approached an absolute supply correction.

    Modifiers:
    onlyOwner
    Parameters:
    _rebaseLag - The new lag period for rebasing.