Contract Overview
Balance: 0.365218186155655219 Ether
Ether Value: $44.45 (@ $121.72/ETH)
Transactions: 1 txn
Misc:
Address Watch: Add To Watch List
Contract Creator: 0xb5af4138f0f33be0d6414eb25271b9c2dc245fb5at txn 0x253ff91449a2bff21dea26bca774207b47d23b7b2668a335c10d0fc3740f57c2
Token Balance:
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click here To View More View All
ParentTxHash Block Age From To Value
0xff7200a2a4dd39fea338a9e54306bdc823f175f2ee6708800ab75c572d3a6ff5697289620 days 23 hrs ago0x8573f2f5a3bd960eee3d998473e50c75cdbe68280x7fcb8e9bc462f8383f810c5bff52af43d9e36d8d0.125 Ether
0xc438b60e7588471338673b2f339a05d9cc1ca225c7f29fea9b2f4103a38beaa4696981221 days 12 hrs ago0xbf07ff45f14c9ff0571b9fbdc7e2b62d299312240x8573f2f5a3bd960eee3d998473e50c75cdbe68280.125 Ether
0x01d2a24c53537043c8ea474d65c6b8022136c2ddc029a255af521fadef50536e696408022 days 11 hrs ago0xbf07ff45f14c9ff0571b9fbdc7e2b62d299312240x8573f2f5a3bd960eee3d998473e50c75cdbe68280.02 Ether
0x091df432a2aecd668086add5bda4789c4f78830b5547261e62cbceeb8eb0779e696407122 days 11 hrs ago0xbf07ff45f14c9ff0571b9fbdc7e2b62d299312240x8573f2f5a3bd960eee3d998473e50c75cdbe68280.002 Ether
0x47350ec226c33b32de1a973fd7bcd6df2a3641e6c83e64bba7ce4cc222ea6d3b678799051 days 20 hrs ago0x8573f2f5a3bd960eee3d998473e50c75cdbe68280x5b3bc9fa3291f937b1ef2c043ffe82161672c1ff0.00000000000001 Ether
0x0ef5538033512a7e35728cadc85400e5eb4728eea6fefe3d4c5b3739842dc5f2678330352 days 14 hrs ago0xbf07ff45f14c9ff0571b9fbdc7e2b62d299312240x8573f2f5a3bd960eee3d998473e50c75cdbe68280.00000000000001 Ether
0xf60d2ba54a840bdfa327b32a99674bc4f71ecf059f2886f10d821a88e711ccc4678330152 days 14 hrs ago0x8573f2f5a3bd960eee3d998473e50c75cdbe68280x5b3bc9fa3291f937b1ef2c043ffe82161672c1ff0.000000001 Ether
0x215cf3154609d9dcbc08b5cac239b36a1e97138caded92b96b4dbb96e91565a6678200252 days 20 hrs ago0xbf07ff45f14c9ff0571b9fbdc7e2b62d299312240x8573f2f5a3bd960eee3d998473e50c75cdbe68280.000000001 Ether
0x022a32042418ca32a4cb4d78014637994b3b2e40fa00d48c93271f8ddf5e81f8674681858 days 14 hrs ago0x8573f2f5a3bd960eee3d998473e50c75cdbe68280x11ab5ec22ae6772cd3a704717b3c9d7b8224631b0.000000005305795258 Ether
0x10705622bcf518e2689a6e021b84fca0a0d5b154bef912c9e262aaea439aa4fb662604278 days 10 hrs ago0x8573f2f5a3bd960eee3d998473e50c75cdbe68280xc35b7ed7f569e4b23c7f49bc9049869b3dd2bbb40.015 Ether
0xd9c7ff31fc62b8c1d7df9e53bde30aa06566dbb8be50417dea6dced0a5e0999e659897982 days 20 hrs ago0xbf07ff45f14c9ff0571b9fbdc7e2b62d299312240x8573f2f5a3bd960eee3d998473e50c75cdbe68280.000000064 Ether
0xf9dc65de7cd2abcf3f0f0170fcab12685a8aa75e960c701e070781bc07980edd659897882 days 20 hrs ago0xbf07ff45f14c9ff0571b9fbdc7e2b62d299312240x8573f2f5a3bd960eee3d998473e50c75cdbe68282 wei
0xfef383ae9fb98646ca90381f25451a588d1132f37b369a096dacc5364a9fca31654898791 days 26 mins ago0xbf07ff45f14c9ff0571b9fbdc7e2b62d299312240x8573f2f5a3bd960eee3d998473e50c75cdbe68280.015 Ether
0x745a59e494dfb3b1917180876ff5959dbc45f82700d4eaf632deaca0dce2ec8a653767492 days 21 hrs ago0xbf07ff45f14c9ff0571b9fbdc7e2b62d299312240x8573f2f5a3bd960eee3d998473e50c75cdbe68280.0000000000004 Ether
0x33373c28af1bbd9bd5aeea827db5fc8ae4400fc18fe87ec5e2eee62103ac58bc653767492 days 21 hrs ago0xbf07ff45f14c9ff0571b9fbdc7e2b62d299312240x8573f2f5a3bd960eee3d998473e50c75cdbe68280.0002699999996 Ether
0x321fb65981a79fc6e98695e260442061336dcf596372e410a2a7a102e50cc57d653761392 days 21 hrs ago0xbf07ff45f14c9ff0571b9fbdc7e2b62d299312240x8573f2f5a3bd960eee3d998473e50c75cdbe68280.0000000000004 Ether
0x313c8a87e7249eda644d0b6beefd568a712e7c54ef3f4d48df6e8d4b136515486467940104 days 4 hrs ago0xbf07ff45f14c9ff0571b9fbdc7e2b62d299312240x8573f2f5a3bd960eee3d998473e50c75cdbe68280.003 Ether
0x710486cadf019037a3858e8d9a6057615ff347641007add903de913f294525246433109109 days 20 hrs ago0x8573f2f5a3bd960eee3d998473e50c75cdbe68280x7b81aa194de872268e294dede70b2c30a3d347cc0.000004 Ether
0xe9e12ca06925e0b043e278e5d788c8da63895e4d8c3acab027e637c52fcf1c596403610114 days 17 hrs ago0xbf07ff45f14c9ff0571b9fbdc7e2b62d299312240x8573f2f5a3bd960eee3d998473e50c75cdbe68280.000004 Ether
0x676a0b1e8799d2fe545540cce88453eab8084af4f176765ef9dd2ded717d1fb16345669124 days 6 hrs ago0x8573f2f5a3bd960eee3d998473e50c75cdbe68280x6bb740b57627123ecb2debe195ea5b225b4f9ad80.00000000886474197 Ether
0xb78e1e4e90cffaca6e15262ffd79310edb497d4fa1a88865ebf0ec7f02f7f46a6317673128 days 21 hrs ago0xbf07ff45f14c9ff0571b9fbdc7e2b62d299312240x8573f2f5a3bd960eee3d998473e50c75cdbe68280.03 Ether
0xf318fa5d27470e5b5e5e74c0d1052466895cb3dcfc8a0ce5d084d5a8137a46786273444136 days 7 hrs ago0xbf07ff45f14c9ff0571b9fbdc7e2b62d299312240x8573f2f5a3bd960eee3d998473e50c75cdbe68280.00004 Ether
0x251c2294d4f1621942dcadd115e3e86688d1fcfa7f87ab5246b13b3569f8e90a6272814136 days 9 hrs ago0xbf07ff45f14c9ff0571b9fbdc7e2b62d299312240x8573f2f5a3bd960eee3d998473e50c75cdbe68280.01 Ether
0x0d62e9177623ca2046b156d61b1f90748ce8edd5923d207d960cfbace5a974786270957136 days 16 hrs ago0xbf07ff45f14c9ff0571b9fbdc7e2b62d299312240x8573f2f5a3bd960eee3d998473e50c75cdbe682811 wei
0x7a5f5da59ddfd266837f1a9a7947d80eee94e356ee4c9c48a474fb5115d3449b6269482136 days 22 hrs ago0xbf07ff45f14c9ff0571b9fbdc7e2b62d299312240x8573f2f5a3bd960eee3d998473e50c75cdbe68280.000001 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Similar Match)
Note: Displaying Similar Match Verified Source Code At Contract 0x42b486cd262a3b52c69dd8df3e040419531af014(Excluding Constructor Arguments if any)
Contract Name: Minter
Compiler Text: v0.4.18+commit.9cf6e910
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity 0.4.18;

/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
  uint256 public totalSupply;
  function balanceOf(address who) public view returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender) public view returns (uint256);
  function transferFrom(address from, address to, uint256 value) public returns (bool);
  function approve(address spender, uint256 value) public returns (bool);
  event Approval(address indexed owner, address indexed spender, uint256 value);
}

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address public owner;


  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  function Ownable() public {
    owner = msg.sender;
  }


  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }


  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) public onlyOwner {
    require(newOwner != address(0));
    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}

/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is Ownable {
    event Pause();
    event Unpause();

    bool public paused = false;


    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     */
    modifier whenNotPaused() {
        require(!paused);
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     */
    modifier whenPaused() {
        require(paused);
        _;
    }

    /**
     * @dev called by the owner to pause, triggers stopped state
     */
    function pause() onlyOwner whenNotPaused public {
        paused = true;
        Pause();
    }

    /**
     * @dev called by the owner to unpause, returns to normal state
     */
    function unpause() onlyOwner whenPaused public {
        paused = false;
        Unpause();
    }
}

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0) {
      return 0;
    }
    uint256 c = a * b;
    assert(c / a == b);
    return c;
  }

  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return c;
  }

  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}

library MathUtils {
    using SafeMath for uint256;

    // Divisor used for representing percentages
    uint256 public constant PERC_DIVISOR = 1000000;

    /*
     * @dev Returns whether an amount is a valid percentage out of PERC_DIVISOR
     * @param _amount Amount that is supposed to be a percentage
     */
    function validPerc(uint256 _amount) internal pure returns (bool) {
        return _amount <= PERC_DIVISOR;
    }

    /*
     * @dev Compute percentage of a value with the percentage represented by a fraction
     * @param _amount Amount to take the percentage of
     * @param _fracNum Numerator of fraction representing the percentage
     * @param _fracDenom Denominator of fraction representing the percentage
     */
    function percOf(uint256 _amount, uint256 _fracNum, uint256 _fracDenom) internal pure returns (uint256) {
        return _amount.mul(percPoints(_fracNum, _fracDenom)).div(PERC_DIVISOR);
    }

    /*
     * @dev Compute percentage of a value with the percentage represented by a fraction over PERC_DIVISOR
     * @param _amount Amount to take the percentage of
     * @param _fracNum Numerator of fraction representing the percentage with PERC_DIVISOR as the denominator
     */
    function percOf(uint256 _amount, uint256 _fracNum) internal pure returns (uint256) {
        return _amount.mul(_fracNum).div(PERC_DIVISOR);
    }

    /*
     * @dev Compute percentage representation of a fraction
     * @param _fracNum Numerator of fraction represeting the percentage
     * @param _fracDenom Denominator of fraction represeting the percentage
     */
    function percPoints(uint256 _fracNum, uint256 _fracDenom) internal pure returns (uint256) {
        return _fracNum.mul(PERC_DIVISOR).div(_fracDenom);
    }
}

contract ILivepeerToken is ERC20, Ownable {
    function mint(address _to, uint256 _amount) public returns (bool);
    function burn(uint256 _amount) public;
}

contract IController is Pausable {
    event SetContractInfo(bytes32 id, address contractAddress, bytes20 gitCommitHash);

    function setContractInfo(bytes32 _id, address _contractAddress, bytes20 _gitCommitHash) external;
    function updateController(bytes32 _id, address _controller) external;
    function getContract(bytes32 _id) public view returns (address);
}

contract IManager {
    event SetController(address controller);
    event ParameterUpdate(string param);

    function setController(address _controller) external;
}

contract Manager is IManager {
    // Controller that contract is registered with
    IController public controller;

    // Check if sender is controller
    modifier onlyController() {
        require(msg.sender == address(controller));
        _;
    }

    // Check if sender is controller owner
    modifier onlyControllerOwner() {
        require(msg.sender == controller.owner());
        _;
    }

    // Check if controller is not paused
    modifier whenSystemNotPaused() {
        require(!controller.paused());
        _;
    }

    // Check if controller is paused
    modifier whenSystemPaused() {
        require(controller.paused());
        _;
    }

    function Manager(address _controller) public {
        controller = IController(_controller);
    }

    /*
     * @dev Set controller. Only callable by current controller
     * @param _controller Controller contract address
     */
    function setController(address _controller) external onlyController {
        controller = IController(_controller);

        SetController(_controller);
    }
}

/*
 * @title Interface for BondingManager
 */
contract IBondingManager {
    event TranscoderUpdate(address indexed transcoder, uint256 pendingRewardCut, uint256 pendingFeeShare, uint256 pendingPricePerSegment, bool registered);
    event TranscoderEvicted(address indexed transcoder);
    event TranscoderResigned(address indexed transcoder);
    event TranscoderSlashed(address indexed transcoder, address finder, uint256 penalty, uint256 finderReward);
    event Reward(address indexed transcoder, uint256 amount);
    event Bond(address indexed delegate, address indexed delegator);
    event Unbond(address indexed delegate, address indexed delegator);
    event WithdrawStake(address indexed delegator);
    event WithdrawFees(address indexed delegator);

    // External functions
    function setActiveTranscoders() external;
    function updateTranscoderWithFees(address _transcoder, uint256 _fees, uint256 _round) external;
    function slashTranscoder(address _transcoder, address _finder, uint256 _slashAmount, uint256 _finderFee) external;
    function electActiveTranscoder(uint256 _maxPricePerSegment, bytes32 _blockHash, uint256 _round) external view returns (address);

    // Public functions
    function transcoderTotalStake(address _transcoder) public view returns (uint256);
    function activeTranscoderTotalStake(address _transcoder, uint256 _round) public view returns (uint256);
    function isRegisteredTranscoder(address _transcoder) public view returns (bool);
    function getTotalBonded() public view returns (uint256);
}

/**
 * @title RoundsManager interface
 */
contract IRoundsManager {
    // Events
    event NewRound(uint256 round);

    // External functions
    function initializeRound() external;

    // Public functions
    function blockNum() public view returns (uint256);
    function blockHash(uint256 _block) public view returns (bytes32);
    function currentRound() public view returns (uint256);
    function currentRoundStartBlock() public view returns (uint256);
    function currentRoundInitialized() public view returns (bool);
    function currentRoundLocked() public view returns (bool);
}

/**
 * @title Minter interface
 */
contract IMinter {
    // Events
    event SetCurrentRewardTokens(uint256 currentMintableTokens, uint256 currentInflation);

    // External functions
    function createReward(uint256 _fracNum, uint256 _fracDenom) external returns (uint256);
    function trustedTransferTokens(address _to, uint256 _amount) external;
    function trustedBurnTokens(uint256 _amount) external;
    function trustedWithdrawETH(address _to, uint256 _amount) external;
    function depositETH() external payable returns (bool);
    function setCurrentRewardTokens() external;

    // Public functions
    function getController() public view returns (IController);
}

/**
 * @title Minter
 * @dev Manages inflation rate and the minting of new tokens for each round of the Livepeer protocol
 */
contract Minter is Manager, IMinter {
    using SafeMath for uint256;

    // Per round inflation rate
    uint256 public inflation;
    // Change in inflation rate per round until the target bonding rate is achieved
    uint256 public inflationChange;
    // Target bonding rate
    uint256 public targetBondingRate;

    // Current number of mintable tokens. Reset every round
    uint256 public currentMintableTokens;
    // Current number of minted tokens. Reset every round
    uint256 public currentMintedTokens;

    // Checks if caller is BondingManager
    modifier onlyBondingManager() {
        require(msg.sender == controller.getContract(keccak256("BondingManager")));
        _;
    }

    // Checks if caller is RoundsManager
    modifier onlyRoundsManager() {
        require(msg.sender == controller.getContract(keccak256("RoundsManager")));
        _;
    }

    // Checks if caller is either BondingManager or JobsManager
    modifier onlyBondingManagerOrJobsManager() {
        require(msg.sender == controller.getContract(keccak256("BondingManager")) || msg.sender == controller.getContract(keccak256("JobsManager")));
        _;
    }

    // Checks if caller is either the currently registered Minter or JobsManager
    modifier onlyMinterOrJobsManager() {
        require(msg.sender == controller.getContract(keccak256("Minter")) || msg.sender == controller.getContract(keccak256("JobsManager")));
        _;
    }

    /**
     * @dev Minter constructor
     * @param _inflation Base inflation rate as a percentage of current total token supply
     * @param _inflationChange Change in inflation rate each round (increase or decrease) if target bonding rate is not achieved
     * @param _targetBondingRate Target bonding rate as a percentage of total bonded tokens / total token supply
     */
    function Minter(address _controller, uint256 _inflation, uint256 _inflationChange, uint256 _targetBondingRate) public Manager(_controller) {
        // Inflation must be valid percentage
        require(MathUtils.validPerc(_inflation));
        // Inflation change must be valid percentage
        require(MathUtils.validPerc(_inflationChange));
        // Target bonding rate must be valid percentage
        require(MathUtils.validPerc(_targetBondingRate));

        inflation = _inflation;
        inflationChange = _inflationChange;
        targetBondingRate = _targetBondingRate;
    }

    /**
     * @dev Set targetBondingRate. Only callable by Controller owner
     * @param _targetBondingRate Target bonding rate as a percentage of total bonded tokens / total token supply
     */
    function setTargetBondingRate(uint256 _targetBondingRate) external onlyControllerOwner {
        // Must be valid percentage
        require(MathUtils.validPerc(_targetBondingRate));

        targetBondingRate = _targetBondingRate;

        ParameterUpdate("targetBondingRate");
    }

    /**
     * @dev Set inflationChange. Only callable by Controller owner
     * @param _inflationChange Inflation change as a percentage of total token supply
     */
    function setInflationChange(uint256 _inflationChange) external onlyControllerOwner {
        // Must be valid percentage
        require(MathUtils.validPerc(_inflationChange));

        inflationChange = _inflationChange;

        ParameterUpdate("inflationChange");
    }

    /**
     * @dev Migrate to a new Minter by transferring ownership of the token as well
     * as the current Minter's token balance to the new Minter. Only callable by Controller when system is paused
     * @param _newMinter Address of new Minter
     */
    function migrateToNewMinter(IMinter _newMinter) external onlyControllerOwner whenSystemPaused {
        // New Minter cannot be the current Minter
        require(_newMinter != this);
        // Check for null address
        require(address(_newMinter) != address(0));

        IController newMinterController = _newMinter.getController();
        // New Minter must have same Controller as current Minter
        require(newMinterController == controller);
        // New Minter's Controller must have the current Minter registered
        require(newMinterController.getContract(keccak256("Minter")) == address(this));

        // Transfer ownership of token to new Minter
        livepeerToken().transferOwnership(_newMinter);
        // Transfer current Minter's token balance to new Minter
        livepeerToken().transfer(_newMinter, livepeerToken().balanceOf(this));
        // Transfer current Minter's ETH balance to new Minter
        _newMinter.depositETH.value(this.balance)();
    }

    /**
     * @dev Create reward based on a fractional portion of the mintable tokens for the current round
     * @param _fracNum Numerator of fraction (active transcoder's stake)
     * @param _fracDenom Denominator of fraction (total active stake)
     */
    function createReward(uint256 _fracNum, uint256 _fracDenom) external onlyBondingManager whenSystemNotPaused returns (uint256) {
        // Compute and mint fraction of mintable tokens to include in reward
        uint256 mintAmount = MathUtils.percOf(currentMintableTokens, _fracNum, _fracDenom);
        // Update amount of minted tokens for round
        currentMintedTokens = currentMintedTokens.add(mintAmount);
        // Minted tokens must not exceed mintable tokens
        require(currentMintedTokens <= currentMintableTokens);
        // Mint new tokens
        livepeerToken().mint(this, mintAmount);

        // Reward = minted tokens
        return mintAmount;
    }

    /**
     * @dev Transfer tokens to a receipient. Only callable by BondingManager - always trusts BondingManager
     * @param _to Recipient address
     * @param _amount Amount of tokens
     */
    function trustedTransferTokens(address _to, uint256 _amount) external onlyBondingManager whenSystemNotPaused {
        livepeerToken().transfer(_to, _amount);
    }

    /**
     * @dev Burn tokens. Only callable by BondingManager - always trusts BondingManager
     * @param _amount Amount of tokens to burn
     */
    function trustedBurnTokens(uint256 _amount) external onlyBondingManager whenSystemNotPaused {
        livepeerToken().burn(_amount);
    }

    /**
     * @dev Withdraw ETH to a recipient. Only callable by BondingManager or JobsManager - always trusts these two contracts
     * @param _to Recipient address
     * @param _amount Amount of ETH
     */
    function trustedWithdrawETH(address _to, uint256 _amount) external onlyBondingManagerOrJobsManager whenSystemNotPaused {
        _to.transfer(_amount);
    }

    /**
     * @dev Deposit ETH to this contract. Only callable by the currently registered Minter or JobsManager
     */
    function depositETH() external payable onlyMinterOrJobsManager whenSystemNotPaused returns (bool) {
        return true;
    }

    /**
     * @dev Set inflation and mintable tokens for the round. Only callable by the RoundsManager
     */
    function setCurrentRewardTokens() external onlyRoundsManager whenSystemNotPaused {
        setInflation();

        // Set mintable tokens based upon current inflation and current total token supply
        currentMintableTokens = MathUtils.percOf(livepeerToken().totalSupply(), inflation);
        currentMintedTokens = 0;

        SetCurrentRewardTokens(currentMintableTokens, inflation);
    }

    /**
     * @dev Returns Controller interface
     */
    function getController() public view returns (IController) {
        return controller;
    }

    /**
     * @dev Set inflation based upon the current bonding rate and target bonding rate
     */
    function setInflation() internal {
        uint256 currentBondingRate = 0;
        uint256 totalSupply = livepeerToken().totalSupply();

        if (totalSupply > 0) {
            uint256 totalBonded = bondingManager().getTotalBonded();
            currentBondingRate = MathUtils.percPoints(totalBonded, totalSupply);
        }

        if (currentBondingRate < targetBondingRate) {
            // Bonding rate is below the target - increase inflation
            inflation = inflation.add(inflationChange);
        } else if (currentBondingRate > targetBondingRate) {
            // Bonding rate is above the target - decrease inflation
            if (inflationChange > inflation) {
                inflation = 0;
            } else {
                inflation = inflation.sub(inflationChange);
            }
        }
    }

    /**
     * @dev Returns LivepeerToken interface
     */
    function livepeerToken() internal view returns (ILivepeerToken) {
        return ILivepeerToken(controller.getContract(keccak256("LivepeerToken")));
    }

    /**
     * @dev Returns BondingManager interface
     */
    function bondingManager() internal view returns (IBondingManager) {
        return IBondingManager(controller.getContract(keccak256("BondingManager")));
    }
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"_inflationChange","type":"uint256"}],"name":"setInflationChange","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newMinter","type":"address"}],"name":"migrateToNewMinter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"trustedWithdrawETH","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"currentMintedTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getController","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_targetBondingRate","type":"uint256"}],"name":"setTargetBondingRate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_fracNum","type":"uint256"},{"name":"_fracDenom","type":"uint256"}],"name":"createReward","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"targetBondingRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_controller","type":"address"}],"name":"setController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"currentMintableTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"inflationChange","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"inflation","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"trustedBurnTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"trustedTransferTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"setCurrentRewardTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"depositETH","outputs":[{"name":"","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"controller","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_controller","type":"address"},{"name":"_inflation","type":"uint256"},{"name":"_inflationChange","type":"uint256"},{"name":"_targetBondingRate","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"currentMintableTokens","type":"uint256"},{"indexed":false,"name":"currentInflation","type":"uint256"}],"name":"SetCurrentRewardTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"controller","type":"address"}],"name":"SetController","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"param","type":"string"}],"name":"ParameterUpdate","type":"event"}]

  Contract Creation Code Switch To Opcodes View
606060405234156200001057600080fd5b604051608080620018db8339810160405280805191906020018051919060200180519190602001805160008054600160a060020a031916600160a060020a038816179055915062000071905083640100000000620000da81026200145b1704565b15156200007d57600080fd5b62000096826401000000006200145b620000da82021704565b1515620000a257600080fd5b620000bb816401000000006200145b620000da82021704565b1515620000c757600080fd5b60019290925560025560035550620000e4565b620f424090111590565b6117e780620000f46000396000f3006060604052600436106100d75763ffffffff60e060020a600035041663010e3c1c81146100dc57806318d217ad146100f457806320283da9146101135780632de22cdb146101355780633018205f1461015a57806377bde142146101895780637dbedad51461019f578063821b771f146101b857806392eefe9b146101cb5780639ae6309a146101ea578063a7c83514146101fd578063be0522e014610210578063c7ee98c214610223578063e7a49c2b14610239578063ece2064c1461025b578063f6326fb31461026e578063f77c47911461028a575b600080fd5b34156100e757600080fd5b6100f260043561029d565b005b34156100ff57600080fd5b6100f2600160a060020a03600435166103a1565b341561011e57600080fd5b6100f2600160a060020a03600435166024356107d0565b341561014057600080fd5b6101486109d3565b60405190815260200160405180910390f35b341561016557600080fd5b61016d6109d9565b604051600160a060020a03909116815260200160405180910390f35b341561019457600080fd5b6100f26004356109e8565b34156101aa57600080fd5b610148600435602435610aec565b34156101c357600080fd5b610148610cc8565b34156101d657600080fd5b6100f2600160a060020a0360043516610cce565b34156101f557600080fd5b610148610d51565b341561020857600080fd5b610148610d57565b341561021b57600080fd5b610148610d5d565b341561022e57600080fd5b6100f2600435610d63565b341561024457600080fd5b6100f2600160a060020a0360043516602435610ede565b341561026657600080fd5b6100f2611078565b610276611265565b604051901515815260200160405180910390f35b341561029557600080fd5b61016d61144c565b60008054600160a060020a031690638da5cb5b90604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156102e657600080fd5b6102c65a03f115156102f757600080fd5b50505060405180519050600160a060020a031633600160a060020a031614151561032057600080fd5b6103298161145b565b151561033457600080fd5b60028190557f9f5033568d78ae30f29f01e944f97b2216493bd19d1b46d429673acff3dcd6746040516020808252600f908201527f696e666c6174696f6e4368616e676500000000000000000000000000000000006040808301919091526060909101905180910390a150565b60008054600160a060020a0316638da5cb5b82604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156103e957600080fd5b6102c65a03f115156103fa57600080fd5b50505060405180519050600160a060020a031633600160a060020a031614151561042357600080fd5b60008054600160a060020a031690635c975abb90604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561046c57600080fd5b6102c65a03f1151561047d57600080fd5b50505060405180519050151561049257600080fd5b30600160a060020a031682600160a060020a0316141515156104b357600080fd5b600160a060020a03821615156104c857600080fd5b81600160a060020a0316633018205f6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561050e57600080fd5b6102c65a03f1151561051f57600080fd5b5050506040518051600054909250600160a060020a03808416911614905061054657600080fd5b30600160a060020a031681600160a060020a031663e16c7d986040517f4d696e74657200000000000000000000000000000000000000000000000000008152600601604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156105cf57600080fd5b6102c65a03f115156105e057600080fd5b50505060405180519050600160a060020a03161415156105ff57600080fd5b610607611465565b600160a060020a031663f2fde38b8360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b151561065457600080fd5b6102c65a03f1151561066557600080fd5b505050610670611465565b600160a060020a031663a9059cbb83610687611465565b600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156106dd57600080fd5b6102c65a03f115156106ee57600080fd5b5050506040518051905060006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561074457600080fd5b6102c65a03f1151561075557600080fd5b505050604051805190505081600160a060020a031663f6326fb330600160a060020a0316316000604051602001526040518263ffffffff1660e060020a0281526004016020604051808303818588803b15156107b057600080fd5b6125ee5a03f115156107c157600080fd5b50505050604051805150505050565b600054600160a060020a031663e16c7d9860405160008051602061179c8339815191528152600e01604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561083f57600080fd5b6102c65a03f1151561085057600080fd5b50505060405180519050600160a060020a031633600160a060020a031614806109255750600054600160a060020a031663e16c7d986040517f4a6f62734d616e616765720000000000000000000000000000000000000000008152600b01604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156108f557600080fd5b6102c65a03f1151561090657600080fd5b50505060405180519050600160a060020a031633600160a060020a0316145b151561093057600080fd5b60008054600160a060020a031690635c975abb90604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561097957600080fd5b6102c65a03f1151561098a57600080fd5b505050604051805115905061099e57600080fd5b600160a060020a03821681156108fc0282604051600060405180830381858888f1935050505015156109cf57600080fd5b5050565b60055481565b600054600160a060020a031690565b60008054600160a060020a031690638da5cb5b90604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610a3157600080fd5b6102c65a03f11515610a4257600080fd5b50505060405180519050600160a060020a031633600160a060020a0316141515610a6b57600080fd5b610a748161145b565b1515610a7f57600080fd5b60038190557f9f5033568d78ae30f29f01e944f97b2216493bd19d1b46d429673acff3dcd67460405160208082526011908201527f746172676574426f6e64696e67526174650000000000000000000000000000006040808301919091526060909101905180910390a150565b600080548190600160a060020a031663e16c7d9860405160008051602061179c8339815191528152600e01604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610b5e57600080fd5b6102c65a03f11515610b6f57600080fd5b50505060405180519050600160a060020a031633600160a060020a0316141515610b9857600080fd5b60008054600160a060020a031690635c975abb90604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610be157600080fd5b6102c65a03f11515610bf257600080fd5b5050506040518051159050610c0657600080fd5b610c136004548585611506565b600554909150610c29908263ffffffff61153d16565b6005819055600454901115610c3d57600080fd5b610c45611465565b600160a060020a03166340c10f19308360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610ca157600080fd5b6102c65a03f11515610cb257600080fd5b50505060405180519050508091505b5092915050565b60035481565b60005433600160a060020a03908116911614610ce957600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790557f4ff638452bbf33c012645d18ae6f05515ff5f2d1dfb0cece8cbf018c60903f7081604051600160a060020a03909116815260200160405180910390a150565b60045481565b60025481565b60015481565b600054600160a060020a031663e16c7d9860405160008051602061179c8339815191528152600e01604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610dd257600080fd5b6102c65a03f11515610de357600080fd5b50505060405180519050600160a060020a031633600160a060020a0316141515610e0c57600080fd5b60008054600160a060020a031690635c975abb90604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610e5557600080fd5b6102c65a03f11515610e6657600080fd5b5050506040518051159050610e7a57600080fd5b610e82611465565b600160a060020a03166342966c688260405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b1515610ec757600080fd5b6102c65a03f11515610ed857600080fd5b50505050565b600054600160a060020a031663e16c7d9860405160008051602061179c8339815191528152600e01604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515610f4d57600080fd5b6102c65a03f11515610f5e57600080fd5b50505060405180519050600160a060020a031633600160a060020a0316141515610f8757600080fd5b60008054600160a060020a031690635c975abb90604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610fd057600080fd5b6102c65a03f11515610fe157600080fd5b5050506040518051159050610ff557600080fd5b610ffd611465565b600160a060020a031663a9059cbb838360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561105957600080fd5b6102c65a03f1151561106a57600080fd5b505050604051805150505050565b600054600160a060020a031663e16c7d986040517f526f756e64734d616e61676572000000000000000000000000000000000000008152600d01604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156110f957600080fd5b6102c65a03f1151561110a57600080fd5b50505060405180519050600160a060020a031633600160a060020a031614151561113357600080fd5b60008054600160a060020a031690635c975abb90604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561117c57600080fd5b6102c65a03f1151561118d57600080fd5b50505060405180511590506111a157600080fd5b6111a9611553565b61121c6111b4611465565b600160a060020a03166318160ddd6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156111f957600080fd5b6102c65a03f1151561120a57600080fd5b505050604051805190506001546116a5565b600481905560006005556001547f39567a366345edf17f50c1967a31b597745186c4632f34c4f8ebe06b6890784d919060405191825260208201526040908101905180910390a1565b60008054600160a060020a031663e16c7d986040517f4d696e74657200000000000000000000000000000000000000000000000000008152600601604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156112e757600080fd5b6102c65a03f115156112f857600080fd5b50505060405180519050600160a060020a031633600160a060020a031614806113cd5750600054600160a060020a031663e16c7d986040517f4a6f62734d616e616765720000000000000000000000000000000000000000008152600b01604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561139d57600080fd5b6102c65a03f115156113ae57600080fd5b50505060405180519050600160a060020a031633600160a060020a0316145b15156113d857600080fd5b60008054600160a060020a031690635c975abb90604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561142157600080fd5b6102c65a03f1151561143257600080fd5b505050604051805115905061144657600080fd5b50600190565b600054600160a060020a031681565b620f424090111590565b60008054600160a060020a031663e16c7d986040517f4c69766570656572546f6b656e000000000000000000000000000000000000008152600d01604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156114e757600080fd5b6102c65a03f115156114f857600080fd5b505050604051805191505090565b6000611535620f424061152961151c86866116be565b879063ffffffff6116d716565b9063ffffffff61170216565b949350505050565b60008282018381101561154c57fe5b9392505050565b6000808061155f611465565b600160a060020a03166318160ddd6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156115a457600080fd5b6102c65a03f115156115b557600080fd5b50505060405180519250506000821115611640576115d1611719565b600160a060020a0316635c50c3566000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561161657600080fd5b6102c65a03f1151561162757600080fd5b50505060405180519050905061163d81836116be565b92505b6003548310156116675760025460015461165f9163ffffffff61153d16565b6001556116a0565b6003548311156116a05760015460025411156116875760006001556116a0565b60025460015461169c9163ffffffff61178916565b6001555b505050565b600061154c620f4240611529858563ffffffff6116d716565b600061154c8261152985620f424063ffffffff6116d716565b6000808315156116ea5760009150610cc1565b508282028284828115156116fa57fe5b041461154c57fe5b600080828481151561171057fe5b04949350505050565b60008054600160a060020a031663e16c7d9860405160008051602061179c8339815191528152600e01604051809103902060006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156114e757600080fd5b60008282111561179557fe5b509003905600426f6e64696e674d616e61676572000000000000000000000000000000000000a165627a7a723058203c09df31724f13ee9a43289804c31b45cfcfd6a9df4b3a67d85543eb2a5fdbe90029000000000000000000000000a94e49bdbb0bfdb920ec1e441b1c408ead94c9bc00000000000000000000000000000000000000000000000000000000000000890000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000007a120

   Swarm Source:
bzzr://3c09df31724f13ee9a43289804c31b45cfcfd6a9df4b3a67d85543eb2a5fdbe9

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.