Contract 0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd 1

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x4e3163d879bd1417f45823032b5824963be10d68ab47229a229c667184b5922aBuy Bonds303515292023-05-22 14:50:537 days 16 hrs ago0x97538821de8611fda363cd8d728d8a409b4b76fc IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.00590223228
0x9f9eb425446458d96e2ee98f88379c683d2c713047e745077b06358d898a4fd8Buy Bonds301863532023-05-18 17:29:3611 days 13 hrs ago0x97538821de8611fda363cd8d728d8a409b4b76fc IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.00590223228
0x5f12bc46794ade97aae5025f254ecf976a415da5beab9da1dd8b41e353d65051Buy Bonds300105922023-05-14 13:43:0815 days 17 hrs ago0xd89bcf9a80cf367174a83f33aa894e002cc63278 IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.0096125428
0x63c9eabaf18029bac9fc240e644ca08c906010a763cc0d45fe08c1584d33505bBuy Bonds261344312023-02-11 20:29:40107 days 10 hrs ago0xdca6f22d224a25bde912b50458a84ed138fe3b38 IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.005132891 26.5
0x21c79488b2ff431175d1f599457258635b256da2503a862a0c101a4e453f348cAllocate Seignio...260046262023-02-08 18:56:34110 days 12 hrs ago0x1311dbc93f5c37311b42bb039802bb56fd690f86 IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.00835536 26
0xc1f05b273ae8b83d06c94244ab948e36d693fc41f2d68a89df5d47ab42b50b13Buy Bonds245550242023-01-05 15:27:54144 days 15 hrs ago0x0606bc4e4dc0aea7a321fa95bb07a0aeacaba794 IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.00851371643 27.14478155
0xb008d9d6a38a37db337c9a87de8c5d577fd0edd8e99f3400b2cececf19a5d974Buy Bonds233889252022-12-08 23:01:29172 days 8 hrs ago0xa08dd35a881820a990a615680b0c20d9622adbcc IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.00717263127
0xc2bbcba97e30153e0fbe86e4632179a7064e25853b5c6fd17d85e2053527a26eBuy Bonds228284542022-11-25 15:01:51185 days 16 hrs ago0x3cd2bb50b5508f73dd210f66cff6d2723e6ae95f IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.00556770338 26.41
0x9d973597e64370a403cbc54192a739bcf486ea014e9c40b118be0b26461cb1a4Buy Bonds227959552022-11-24 20:19:08186 days 10 hrs ago0x2464c45cb3040821a49773717ae4d375dee3915b IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.00511609238 26.41
0xc0395931dd66c750fac41376bc970d4127e1da8bd06ed8ff59236cda153cef13Buy Bonds227109722022-11-22 19:48:30188 days 11 hrs ago0xdca6f22d224a25bde912b50458a84ed138fe3b38 IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.005132891 26.5
0xa596ce36f3687b52ece49dcc32b32f40a9a24f090c8e0e8b112d14134feb1032Buy Bonds226707872022-11-21 20:52:50189 days 10 hrs ago0xd7ac1f029abd6134cbd544a3e896b62c23bf8cac IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.00527201944 27.213232025
0xd45fca6aea4bc68575ce629ed2c3c45d600204fe9f1d632590dd8063b0ef1841Buy Bonds226395402022-11-21 3:09:12190 days 3 hrs ago0xff99afcb2fc368bb97fa13c9d0ec89da979f5a00 IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.005167815809 26.678656364
0xaf018d27346c0941c380254386610490d92adf4a406cbd7cb9fbeb27ff7b709dBuy Bonds226097542022-11-20 10:04:51190 days 21 hrs ago0x2464c45cb3040821a49773717ae4d375dee3915b IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.0063634185 26.5
0x931c852d97a1629679c7b766685ca326d38b4e96f9f77be036dd7ecb11cf3bf9Buy Bonds224624122022-11-16 20:05:13194 days 10 hrs ago0xdca6f22d224a25bde912b50458a84ed138fe3b38 IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.005132891 26.5
0xfef18392b11e5540268f7f75e47f8cee6344e0a794111d81d714df5e6029bf6eBuy Bonds224502492022-11-16 13:06:07194 days 17 hrs ago0xaebe55c9486fd3d95b8fef0236cb4501e3119e07 IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.00578135455 27.425
0x0c78f60dfc1d1ef56239201f951c9170ce8d8d8a0c3a4a1a504d987bdb9e5850Buy Bonds224465362022-11-16 10:57:09194 days 20 hrs ago0x2464c45cb3040821a49773717ae4d375dee3915b IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.005137209142 26.519007748
0x3b4b9c1c905ccb37d4bb7a7533d6d6630a5a2dac2ed303685c4690a3d9b81395Buy Bonds224327142022-11-16 2:46:55195 days 4 hrs ago0xff99afcb2fc368bb97fa13c9d0ec89da979f5a00 IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.005133527 26.5
0xbc80ce70052f9a822cbcd30a452e4706bcae944f7b5002359b4fe60b5696adc1Buy Bonds223951472022-11-15 5:01:47196 days 2 hrs ago0xdfcecf71eb54931b8475a6b8da714a23c002fb3b IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.005133527 26.5
0xa4fd9ddb1fb3f490dfd305aca5929659df50eb37e7f19356ea16967ea41261fcBuy Bonds223844852022-11-14 22:50:17196 days 8 hrs ago0x2464c45cb3040821a49773717ae4d375dee3915b IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.005185294993 26.768892
0x57cb6571996a0a4236d358df8d8f3e6150e05df671f6c80480ae7521a2261c56Buy Bonds223137712022-11-13 6:31:59198 days 32 mins ago0xd7ac1f029abd6134cbd544a3e896b62c23bf8cac IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.005133845 26.5
0x8c2e4c796c5eb656a911f196d222a58ad3e309085f2256d57e60fdf103850011Buy Bonds223095372022-11-13 4:04:34198 days 3 hrs ago0xff99afcb2fc368bb97fa13c9d0ec89da979f5a00 IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.005298623165 27.35225
0x50a1033662689bc0bded3bf0c4bbec64ea403bf37ff44c2c366f8237d9a00241Buy Bonds222360772022-11-11 10:04:53199 days 21 hrs ago0x2464c45cb3040821a49773717ae4d375dee3915b IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.00511609238 26.41
0xa6d2054de085b94a2511077db229da19d829ee302159afec1582f70d7b2a49dbBuy Bonds221923842022-11-10 9:27:26200 days 21 hrs ago0x2464c45cb3040821a49773717ae4d375dee3915b IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.00503698 26
0xecce8c603842afc153c080c6496a0f74916cf06a00fc8e353c697e6e23aa863fBuy Bonds221806252022-11-10 2:53:31201 days 4 hrs ago0xff99afcb2fc368bb97fa13c9d0ec89da979f5a00 IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.005246354177 27.082430012
0x242e556406dba18c9afff66cbf67fee68e06b80d37b78566c278fd36a3365fa0Buy Bonds221312782022-11-08 23:31:25202 days 7 hrs ago0x2464c45cb3040821a49773717ae4d375dee3915b IN  0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd0 AVAX0.00556770338 26.41
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
Treasury

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 16 : Treasury.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "@openzeppelin/contracts/math/Math.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";

import "./lib/Babylonian.sol";
import "./owner/Operator.sol";
import "./utils/ContractGuard.sol";
import "./interfaces/IBasisAsset.sol";
import "./interfaces/IOracle.sol";
import "./interfaces/IBoardroom.sol";

/*
    https://frozenwalrus.finance
*/
contract Treasury is ContractGuard {
    using SafeERC20 for IERC20;
    using Address for address;
    using SafeMath for uint256;

    /* ========= CONSTANT VARIABLES ======== */

    uint256 public constant PERIOD = 6 hours;

    /* ========== STATE VARIABLES ========== */

    // governance
    address public operator;

    // flags
    bool public initialized = false;

    // epoch
    uint256 public startTime;
    uint256 public epoch = 0;
    uint256 public epochSupplyContractionLeft = 0;

    // exclusions from total supply
    address[] public excludedFromTotalSupply = [
        address(0xe5f8fc77edc96283749764Cd929F49164aEf5fdd),
        address(0x63729b14189177Aac2D809c639BD830a7F2D1f84),
        address(0xA12557cedE66530A0Cd1AA9641b93e173F0eA412),
        address(0x46E06Fe073179Ab774Aa1FB7F6C62bF20b601AA3),
        address(0x2141b624cE8334BECa253297bCD742A0FB142fbA),
        address(0x577f280fa81F1Ac597A4Ccd83Ecff30458EC4f0e),
        address(0x62c9B756Ab5619E7982b46014ee49aab428C50dB),
        address(0xD699D2c3f6D154758267Cac69Ce5d634355B43D0)
    ];

    // core components
    address public wlrs;
    address public wBond;
    address public wShare;

    address public boardroom;
    address public wlrsOracle;

    // price
    uint256 public wlrsPriceOne;
    uint256 public wlrsPriceCeiling;

    uint256 public seigniorageSaved;

    uint256[] public supplyTiers;
    uint256[] public maxExpansionTiers;
    uint256 public minExpansion;
    uint256 public fixedExpansion;
    uint256 public expansionFactor;

    uint256 public maxSupplyExpansionPercent;
    uint256 public bondDepletionFloorPercent;
    uint256 public seigniorageExpansionFloorPercent;
    uint256 public maxSupplyContractionPercent;
    uint256 public maxDebtRatioPercent;

    uint256 public bootstrapEpochs;
    uint256 public bootstrapSupplyExpansionPercent;

    /* =================== Added variables =================== */
    uint256 public previousEpochWlrsPrice;
    uint256 public maxDiscountRate; // when purchasing bond
    uint256 public maxPremiumRate; // when redeeming bond
    uint256 public discountPercent;
    uint256 public premiumThreshold;
    uint256 public premiumPercent;
    uint256 public mintingFactorForPayingDebt; // print extra WLRS during debt phase

    address public daoFund;
    uint256 public daoFundSharedPercent;

    address public devFund;
    uint256 public devFundSharedPercent;

    /* =================== Events =================== */

    event Initialized(address indexed executor, uint256 at);
    event BurnedBonds(address indexed from, uint256 bondAmount);
    event RedeemedBonds(address indexed from, uint256 wlrsAmount, uint256 bondAmount);
    event BoughtBonds(address indexed from, uint256 wlrsAmount, uint256 bondAmount);
    event TreasuryFunded(uint256 timestamp, uint256 seigniorage);
    event BoardroomFunded(uint256 timestamp, uint256 seigniorage);
    event DaoFundFunded(uint256 timestamp, uint256 seigniorage);
    event DevFundFunded(uint256 timestamp, uint256 seigniorage);

    /* =================== Modifier =================== */

    modifier onlyOperator() {
        require(operator == msg.sender, "Treasury: caller is not the operator");
        _;
    }

    modifier checkCondition() {
        require(now >= startTime, "Treasury: not started yet");

        _;
    }

    modifier checkEpoch() {
        require(now >= nextEpochPoint(), "Treasury: not opened yet");

        _;

        epoch = epoch.add(1);
        epochSupplyContractionLeft = (getWlrsPrice() > wlrsPriceCeiling) ? 0 : getWlrsCirculatingSupply().mul(maxSupplyContractionPercent).div(10000);
    }

    modifier checkOperator() {
        require(
            IBasisAsset(wlrs).operator() == address(this) &&
                IBasisAsset(wBond).operator() == address(this) &&
                IBasisAsset(wShare).operator() == address(this) &&
                Operator(boardroom).operator() == address(this),
            "Treasury: need more permission"
        );

        _;
    }

    modifier notInitialized() {
        require(!initialized, "Treasury: already initialized");

        _;
    }

    /* ========== VIEW FUNCTIONS ========== */

    function isInitialized() public view returns (bool) {
        return initialized;
    }

    // epoch
    function nextEpochPoint() public view returns (uint256) {
        return startTime.add(epoch.mul(PERIOD));
    }

    // oracle
    function getWlrsPrice() public view returns (uint256 wlrsPrice) {
        try IOracle(wlrsOracle).consult(wlrs, 1e18) returns (uint144 price) {
            return uint256(price);
        } catch {
            revert("Treasury: failed to consult WLRS price from the oracle");
        }
    }

    function getWlrsUpdatedPrice() public view returns (uint256 _wlrsPrice) {
        try IOracle(wlrsOracle).twap(wlrs, 1e18) returns (uint144 price) {
            return uint256(price);
        } catch {
            revert("Treasury: failed to consult WLRS price from the oracle");
        }
    }

    // budget
    function getReserve() public view returns (uint256) {
        return seigniorageSaved;
    }

    function getBurnableWlrsLeft() public view returns (uint256 _burnableWlrsLeft) {
        uint256 _wlrsPrice = getWlrsPrice();
        if (_wlrsPrice <= wlrsPriceOne) {
            uint256 _wlrsSupply = getWlrsCirculatingSupply();
            uint256 _bondMaxSupply = _wlrsSupply.mul(maxDebtRatioPercent).div(10000);
            uint256 _bondSupply = IERC20(wBond).totalSupply();
            if (_bondMaxSupply > _bondSupply) {
                uint256 _maxMintableBond = _bondMaxSupply.sub(_bondSupply);
                uint256 _maxBurnableWlrs = _maxMintableBond.mul(_wlrsPrice).div(1e18);
                _burnableWlrsLeft = Math.min(epochSupplyContractionLeft, _maxBurnableWlrs);
            }
        }
    }

    function getRedeemableBonds() public view returns (uint256 _redeemableBonds) {
        uint256 _wlrsPrice = getWlrsPrice();
        if (_wlrsPrice > wlrsPriceCeiling) {
            uint256 _totalWlrs = IERC20(wlrs).balanceOf(address(this));
            uint256 _rate = getBondPremiumRate();
            if (_rate > 0) {
                _redeemableBonds = _totalWlrs.mul(1e18).div(_rate);
            }
        }
    }

    function getBondDiscountRate() public view returns (uint256 _rate) {
        uint256 _wlrsPrice = getWlrsPrice();
        if (_wlrsPrice <= wlrsPriceOne) {
            if (discountPercent == 0) {
                // no discount
                _rate = wlrsPriceOne;
            } else {
                uint256 _bondAmount = wlrsPriceOne.mul(1e18).div(_wlrsPrice); // to burn 1 WLRS
                uint256 _discountAmount = _bondAmount.sub(wlrsPriceOne).mul(discountPercent).div(10000);
                _rate = wlrsPriceOne.add(_discountAmount);
                if (maxDiscountRate > 0 && _rate > maxDiscountRate) {
                    _rate = maxDiscountRate;
                }
            }
        }
    }

    function getBondPremiumRate() public view returns (uint256 _rate) {
        uint256 _wlrsPrice = getWlrsPrice();
        if (_wlrsPrice > wlrsPriceCeiling) {
            uint256 _wlrsPricePremiumThreshold = wlrsPriceOne.mul(premiumThreshold).div(100);
            if (_wlrsPrice >= _wlrsPricePremiumThreshold) {
                //Price > 1.10
                uint256 _premiumAmount = _wlrsPrice.sub(wlrsPriceOne).mul(premiumPercent).div(10000);
                _rate = wlrsPriceOne.add(_premiumAmount);
                if (maxPremiumRate > 0 && _rate > maxPremiumRate) {
                    _rate = maxPremiumRate;
                }
            } else {
                // no premium bonus
                _rate = wlrsPriceOne;
            }
        }
    }

    /* ========== GOVERNANCE ========== */

    function initialize(
        address _wlrs,
        address _wBond,
        address _wShare,
        address _wlrsOracle,
        address _boardroom,
        uint256 _startTime
    ) public notInitialized {
        wlrs = _wlrs;
        wBond = _wBond;
        wShare = _wShare;
        wlrsOracle = _wlrsOracle;
        boardroom = _boardroom;
        startTime = _startTime;

        wlrsPriceOne = 10**18; // This is to allow a PEG of 1 WLRS per USDC
        wlrsPriceCeiling = wlrsPriceOne.mul(101).div(100);

        // Dynamic max expansion percent
        supplyTiers = [0 ether, 500_000 ether, 2_000_000 ether, 4_000_000 ether, 8_000_000 ether, 20_000_000 ether];
        maxExpansionTiers = [300, 250, 200, 150, 125, 100];

        maxSupplyExpansionPercent = 400; // Upto 4.0% supply for expansion

        bondDepletionFloorPercent = 10000; // 100% of Bond supply for depletion floor
        seigniorageExpansionFloorPercent = 3500; // At least 35% of expansion reserved for boardroom
        maxSupplyContractionPercent = 300; // Upto 3.0% supply for contraction (to burn WLRS and mint wBOND)
        maxDebtRatioPercent = 4500; // Upto 35% supply of tBOND to purchase

        premiumThreshold = 110;
        premiumPercent = 7000;

        // First 20 epochs with 4% expansion
        bootstrapEpochs = 20;
        bootstrapSupplyExpansionPercent = 400;

        // set seigniorageSaved to it's balance
        seigniorageSaved = IERC20(wlrs).balanceOf(address(this));

        minExpansion = 10000000000000000;
        expansionFactor = 150;

        initialized = true;
        operator = msg.sender;
        emit Initialized(msg.sender, block.number);
    }

    function setOperator(address _operator) external onlyOperator {
        operator = _operator;
    }

    function setBoardroom(address _boardroom) external onlyOperator {
        boardroom = _boardroom;
    }

    function setWlrsOracle(address _wlrsOracle) external onlyOperator {
        wlrsOracle = _wlrsOracle;
    }

    function setWlrsPriceCeiling(uint256 _wlrsPriceCeiling) external onlyOperator {
        require(_wlrsPriceCeiling >= wlrsPriceOne && _wlrsPriceCeiling <= wlrsPriceOne.mul(120).div(100), "out of range"); // [$1.0, $1.2]
        wlrsPriceCeiling = _wlrsPriceCeiling;
    }

    function setMaxSupplyExpansionPercents(uint256 _maxSupplyExpansionPercent) external onlyOperator {
        require(_maxSupplyExpansionPercent >= 10 && _maxSupplyExpansionPercent <= 1000, "_maxSupplyExpansionPercent: out of range"); // [0.1%, 10%]
        maxSupplyExpansionPercent = _maxSupplyExpansionPercent;
    }

    function setSupplyTiersEntry(uint8 _index, uint256 _value) external onlyOperator returns (bool) {
        require(_index >= 0, "Index has to be higher than 0");
        require(_index < supplyTiers.length, "Index has to be lower than count of tiers");
        if (_index > 0) {
            require(_value > supplyTiers[_index - 1]);
        }
        if (_index < supplyTiers.length - 1) {
            require(_value < supplyTiers[_index + 1]);
        }
        supplyTiers[_index] = _value;
        return true;
    }

    function setMaxExpansionTiersEntry(uint8 _index, uint256 _value) external onlyOperator returns (bool) {
        require(_index >= 0, "Index has to be higher than 0");
        require(_index < maxExpansionTiers.length, "Index has to be lower than count of tiers");
        require(_value >= 10 && _value <= 1000, "_value: out of range"); // [0.1%, 10%]
        maxExpansionTiers[_index] = _value;
        return true;
    }

    function setMinExpansion(uint256 _value) external onlyOperator returns (bool) {
        minExpansion = _value;
        return true;
    }

    function setFixedExpansion(uint256 _value) external onlyOperator returns (bool) {
        fixedExpansion = _value;
        return true;
    }

    function setExpansionFactor(uint256 _value) external onlyOperator returns (bool) {
        expansionFactor = _value;
        return true;
    }

    function setBondDepletionFloorPercent(uint256 _bondDepletionFloorPercent) external onlyOperator {
        require(_bondDepletionFloorPercent >= 500 && _bondDepletionFloorPercent <= 10000, "out of range"); // [5%, 100%]
        bondDepletionFloorPercent = _bondDepletionFloorPercent;
    }

    function setMaxSupplyContractionPercent(uint256 _maxSupplyContractionPercent) external onlyOperator {
        require(_maxSupplyContractionPercent >= 100 && _maxSupplyContractionPercent <= 1500, "out of range"); // [0.1%, 15%]
        maxSupplyContractionPercent = _maxSupplyContractionPercent;
    }

    function setMaxDebtRatioPercent(uint256 _maxDebtRatioPercent) external onlyOperator {
        require(_maxDebtRatioPercent >= 1000 && _maxDebtRatioPercent <= 10000, "out of range"); // [10%, 100%]
        maxDebtRatioPercent = _maxDebtRatioPercent;
    }

    function setBootstrap(uint256 _bootstrapEpochs, uint256 _bootstrapSupplyExpansionPercent) external onlyOperator {
        require(_bootstrapEpochs <= 120, "_bootstrapEpochs: out of range"); // <= 1 month
        require(_bootstrapSupplyExpansionPercent >= 100 && _bootstrapSupplyExpansionPercent <= 1000, "_bootstrapSupplyExpansionPercent: out of range"); // [1%, 10%]
        bootstrapEpochs = _bootstrapEpochs;
        bootstrapSupplyExpansionPercent = _bootstrapSupplyExpansionPercent;
    }

    function setExtraFunds(
        address _daoFund,
        uint256 _daoFundSharedPercent,
        address _devFund,
        uint256 _devFundSharedPercent
    ) external onlyOperator {
        require(_daoFund != address(0), "zero");
        require(_daoFundSharedPercent <= 3000, "out of range"); // <= 30%
        require(_devFund != address(0), "zero");
        require(_devFundSharedPercent <= 1000, "out of range"); // <= 10%
        daoFund = _daoFund;
        daoFundSharedPercent = _daoFundSharedPercent;
        devFund = _devFund;
        devFundSharedPercent = _devFundSharedPercent;
    }

    function setMaxDiscountRate(uint256 _maxDiscountRate) external onlyOperator {
        maxDiscountRate = _maxDiscountRate;
    }

    function setMaxPremiumRate(uint256 _maxPremiumRate) external onlyOperator {
        maxPremiumRate = _maxPremiumRate;
    }

    function setDiscountPercent(uint256 _discountPercent) external onlyOperator {
        require(_discountPercent <= 20000, "_discountPercent is over 200%");
        discountPercent = _discountPercent;
    }

    function setPremiumThreshold(uint256 _premiumThreshold) external onlyOperator {
        require(_premiumThreshold >= wlrsPriceCeiling, "_premiumThreshold exceeds wlrsPriceCeiling");
        require(_premiumThreshold <= 150, "_premiumThreshold is higher than 1.5");
        premiumThreshold = _premiumThreshold;
    }

    function setPremiumPercent(uint256 _premiumPercent) external onlyOperator {
        require(_premiumPercent <= 20000, "_premiumPercent is over 200%");
        premiumPercent = _premiumPercent;
    }

    function setMintingFactorForPayingDebt(uint256 _mintingFactorForPayingDebt) external onlyOperator {
        require(_mintingFactorForPayingDebt >= 10000 && _mintingFactorForPayingDebt <= 20000, "_mintingFactorForPayingDebt: out of range"); // [100%, 200%]
        mintingFactorForPayingDebt = _mintingFactorForPayingDebt;
    }

    /* ========== MUTABLE FUNCTIONS ========== */

    function _updateWlrsPrice() internal {
        try IOracle(wlrsOracle).update() {} catch {}
    }

    function getWlrsCirculatingSupply() public view returns (uint256) {
        IERC20 wlrsErc20 = IERC20(wlrs);
        uint256 totalSupply = wlrsErc20.totalSupply();
        uint256 balanceExcluded = 0;
        for (uint8 entryId = 0; entryId < excludedFromTotalSupply.length; ++entryId) {
            balanceExcluded = balanceExcluded.add(wlrsErc20.balanceOf(excludedFromTotalSupply[entryId]));
        }
        return totalSupply.sub(balanceExcluded);
    }

    function buyBonds(uint256 _wlrsAmount, uint256 targetPrice) external onlyOneBlock checkCondition checkOperator {
        require(_wlrsAmount > 0, "Treasury: cannot purchase bonds with zero amount");

        uint256 wlrsPrice = getWlrsPrice();
        require(wlrsPrice == targetPrice, "Treasury: WLRS price moved");
        require(
            wlrsPrice < wlrsPriceOne, // price < $1
            "Treasury: wlrsPrice not eligible for bond purchase"
        );

        require(_wlrsAmount <= epochSupplyContractionLeft, "Treasury: not enough bond left to purchase");

        uint256 _rate = getBondDiscountRate();
        require(_rate > 0, "Treasury: invalid bond rate");

        uint256 _bondAmount = _wlrsAmount.mul(_rate).div(1e18);
        uint256 wlrsSupply = getWlrsCirculatingSupply();
        uint256 newBondSupply = IERC20(wBond).totalSupply().add(_bondAmount);
        require(newBondSupply <= wlrsSupply.mul(maxDebtRatioPercent).div(10000), "over max debt ratio");

        IBasisAsset(wlrs).burnFrom(msg.sender, _wlrsAmount);
        IBasisAsset(wBond).mint(msg.sender, _bondAmount);

        epochSupplyContractionLeft = epochSupplyContractionLeft.sub(_wlrsAmount);
        _updateWlrsPrice();

        emit BoughtBonds(msg.sender, _wlrsAmount, _bondAmount);
    }

    function redeemBonds(uint256 _bondAmount, uint256 targetPrice) external onlyOneBlock checkCondition checkOperator {
        require(_bondAmount > 0, "Treasury: cannot redeem bonds with zero amount");

        uint256 wlrsPrice = getWlrsPrice();
        require(wlrsPrice == targetPrice, "Treasury: WLRS price moved");
        require(
            wlrsPrice > wlrsPriceCeiling, // price > $1.01
            "Treasury: wlrsPrice not eligible for bond purchase"
        );

        uint256 _rate = getBondPremiumRate();
        require(_rate > 0, "Treasury: invalid bond rate");

        uint256 _wlrsAmount = _bondAmount.mul(_rate).div(1e18);
        require(IERC20(wlrs).balanceOf(address(this)) >= _wlrsAmount, "Treasury: treasury has no more budget");

        seigniorageSaved = seigniorageSaved.sub(Math.min(seigniorageSaved, _wlrsAmount));

        IBasisAsset(wBond).burnFrom(msg.sender, _bondAmount);
        IERC20(wlrs).safeTransfer(msg.sender, _wlrsAmount);

        _updateWlrsPrice();

        emit RedeemedBonds(msg.sender, _wlrsAmount, _bondAmount);
    }

    function _sendToBoardroom(uint256 _amount) internal {
        IBasisAsset(wlrs).mint(address(this), _amount);

        uint256 _daoFundSharedAmount = 0;
        if (daoFundSharedPercent > 0) {
            _daoFundSharedAmount = _amount.mul(daoFundSharedPercent).div(10000);
            IERC20(wlrs).transfer(daoFund, _daoFundSharedAmount);
            emit DaoFundFunded(now, _daoFundSharedAmount);
        }

        uint256 _devFundSharedAmount = 0;
        if (devFundSharedPercent > 0) {
            _devFundSharedAmount = _amount.mul(devFundSharedPercent).div(10000);
            IERC20(wlrs).transfer(devFund, _devFundSharedAmount);
            emit DevFundFunded(now, _devFundSharedAmount);
        }

        _amount = _amount.sub(_daoFundSharedAmount).sub(_devFundSharedAmount);

        IERC20(wlrs).safeApprove(boardroom, 0);
        IERC20(wlrs).safeApprove(boardroom, _amount);
        IBoardroom(boardroom).allocateSeigniorage(_amount);
        emit BoardroomFunded(now, _amount);
    }

    function _calculateMaxSupplyExpansionPercent(uint256 _wlrsSupply) internal returns (uint256) {
        for (uint8 tierId = uint8(supplyTiers.length - 1); tierId >= 0; --tierId) {
            if (_wlrsSupply >= supplyTiers[tierId]) {
                maxSupplyExpansionPercent = maxExpansionTiers[tierId];
                break;
            }
        }
        return maxSupplyExpansionPercent;
    }

    function getExpansionPercent() public view returns (uint256) {
        uint256 prevEpochWlrsPrice = getWlrsPrice();
        uint256 _percentage = prevEpochWlrsPrice.sub(wlrsPriceOne);
        uint256 _mse = maxSupplyExpansionPercent.mul(1e14);

        if (fixedExpansion != 0) {
            return fixedExpansion;
        }
        
        if (expansionFactor != 0) {
            _percentage = _percentage.mul(expansionFactor).div(10000);
        }

        if (minExpansion > _percentage) {
            _percentage = minExpansion;
        }

        if (_percentage > _mse) {
            _percentage = _mse;
        }

        return _percentage;
    }

    function allocateSeigniorage() external onlyOneBlock checkCondition checkEpoch checkOperator {
        _updateWlrsPrice();
        previousEpochWlrsPrice = getWlrsPrice();
        uint256 wlrsSupply = getWlrsCirculatingSupply().sub(seigniorageSaved);
        if (epoch < bootstrapEpochs) {
            // 28 first epochs with 4% expansion
            _sendToBoardroom(wlrsSupply.mul(bootstrapSupplyExpansionPercent).div(10000));
        } else {
            if (previousEpochWlrsPrice > wlrsPriceCeiling) {
                // Expansion ($WLRS Price > 1 $USDC): there is some seigniorage to be allocated
                _calculateMaxSupplyExpansionPercent(wlrsSupply);
                uint256 bondSupply = IERC20(wBond).totalSupply();
                uint256 _percentage = getExpansionPercent();
                uint256 _savedForBond;
                uint256 _savedForBoardroom;

                if (seigniorageSaved >= bondSupply.mul(bondDepletionFloorPercent).div(10000)) {
                    // saved enough to pay debt, mint as usual rate
                    _savedForBoardroom = wlrsSupply.mul(_percentage).div(1e18);
                } else {
                    // have not saved enough to pay debt, mint more
                    uint256 _seigniorage = wlrsSupply.mul(_percentage).div(1e18);
                    _savedForBoardroom = _seigniorage.mul(seigniorageExpansionFloorPercent).div(10000);
                    _savedForBond = _seigniorage.sub(_savedForBoardroom);
                    if (mintingFactorForPayingDebt > 0) {
                        _savedForBond = _savedForBond.mul(mintingFactorForPayingDebt).div(10000);
                    }
                }
                if (_savedForBoardroom > 0) {
                    _sendToBoardroom(_savedForBoardroom);
                }
                if (_savedForBond > 0) {
                    seigniorageSaved = seigniorageSaved.add(_savedForBond);
                    IBasisAsset(wlrs).mint(address(this), _savedForBond);
                    emit TreasuryFunded(now, _savedForBond);
                }
            }
        }
    }

    function governanceRecoverUnsupported(
        IERC20 _token,
        uint256 _amount,
        address _to
    ) external onlyOperator {
        // do not allow to drain core tokens
        require(address(_token) != address(wlrs), "wlrs");
        require(address(_token) != address(wBond), "bond");
        require(address(_token) != address(wShare), "share");
        _token.safeTransfer(_to, _amount);
    }

    function boardroomSetOperator(address _operator) external onlyOperator {
        IBoardroom(boardroom).setOperator(_operator);
    }

    function boardroomSetLockUp(uint256 _withdrawLockupEpochs, uint256 _rewardLockupEpochs) external onlyOperator {
        IBoardroom(boardroom).setLockUp(_withdrawLockupEpochs, _rewardLockupEpochs);
    }

    function boardroomAllocateSeigniorage(uint256 amount) external onlyOperator {
        IBoardroom(boardroom).allocateSeigniorage(amount);
    }

    function boardroomGovernanceRecoverUnsupported(
        address _token,
        uint256 _amount,
        address _to
    ) external onlyOperator {
        IBoardroom(boardroom).governanceRecoverUnsupported(_token, _amount, _to);
    }
}

File 2 of 16 : Math.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}

File 3 of 16 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 4 of 16 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 5 of 16 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 6 of 16 : Babylonian.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

library Babylonian {
    function sqrt(uint256 y) internal pure returns (uint256 z) {
        if (y > 3) {
            z = y;
            uint256 x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
        // else z = 0
    }
}

File 7 of 16 : Operator.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "@openzeppelin/contracts/GSN/Context.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract Operator is Context, Ownable {
    address private _operator;

    event OperatorTransferred(address indexed previousOperator, address indexed newOperator);

    constructor() internal {
        _operator = _msgSender();
        emit OperatorTransferred(address(0), _operator);
    }

    function operator() public view returns (address) {
        return _operator;
    }

    modifier onlyOperator() {
        require(_operator == msg.sender, "operator: caller is not the operator");
        _;
    }

    function isOperator() public view returns (bool) {
        return _msgSender() == _operator;
    }

    function transferOperator(address newOperator_) public onlyOwner {
        _transferOperator(newOperator_);
    }

    function _transferOperator(address newOperator_) internal {
        require(newOperator_ != address(0), "operator: zero address given for new operator");
        emit OperatorTransferred(address(0), newOperator_);
        _operator = newOperator_;
    }
}

File 8 of 16 : ContractGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

contract ContractGuard {
    mapping(uint256 => mapping(address => bool)) private _status;

    function checkSameOriginReentranted() internal view returns (bool) {
        return _status[block.number][tx.origin];
    }

    function checkSameSenderReentranted() internal view returns (bool) {
        return _status[block.number][msg.sender];
    }

    modifier onlyOneBlock() {
        require(!checkSameOriginReentranted(), "ContractGuard: one block, one function");
        require(!checkSameSenderReentranted(), "ContractGuard: one block, one function");

        _;

        _status[block.number][tx.origin] = true;
        _status[block.number][msg.sender] = true;
    }
}

File 9 of 16 : IBasisAsset.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

interface IBasisAsset {
    function mint(address recipient, uint256 amount) external returns (bool);

    function burn(uint256 amount) external;

    function burnFrom(address from, uint256 amount) external;

    function isOperator() external returns (bool);

    function operator() external view returns (address);

    function transferOperator(address newOperator_) external;
}

File 10 of 16 : IOracle.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IOracle {
    function update() external;

    function consult(address _token, uint256 _amountIn) external view returns (uint144 amountOut);

    function twap(address _token, uint256 _amountIn) external view returns (uint144 _amountOut);
}

File 11 of 16 : IBoardroom.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IBoardroom {
    function balanceOf(address _member) external view returns (uint256);

    function earned(address _member) external view returns (uint256);

    function canWithdraw(address _member) external view returns (bool);

    function canClaimReward(address _member) external view returns (bool);

    function epoch() external view returns (uint256);

    function nextEpochPoint() external view returns (uint256);

    function getBombPrice() external view returns (uint256);

    function setOperator(address _operator) external;

    function setLockUp(uint256 _withdrawLockupEpochs, uint256 _rewardLockupEpochs) external;

    function stake(uint256 _amount) external;

    function withdraw(uint256 _amount) external;

    function exit() external;

    function claimReward() external;

    function allocateSeigniorage(uint256 _amount) external;

    function governanceRecoverUnsupported(
        address _token,
        uint256 _amount,
        address _to
    ) external;
}

File 12 of 16 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 13 of 16 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 14 of 16 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../utils/Context.sol";

File 15 of 16 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../utils/Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 16 of 16 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"seigniorage","type":"uint256"}],"name":"BoardroomFunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"wlrsAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bondAmount","type":"uint256"}],"name":"BoughtBonds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"bondAmount","type":"uint256"}],"name":"BurnedBonds","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"seigniorage","type":"uint256"}],"name":"DaoFundFunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"seigniorage","type":"uint256"}],"name":"DevFundFunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"uint256","name":"at","type":"uint256"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"wlrsAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bondAmount","type":"uint256"}],"name":"RedeemedBonds","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"seigniorage","type":"uint256"}],"name":"TreasuryFunded","type":"event"},{"inputs":[],"name":"PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allocateSeigniorage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"boardroom","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"boardroomAllocateSeigniorage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"boardroomGovernanceRecoverUnsupported","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_withdrawLockupEpochs","type":"uint256"},{"internalType":"uint256","name":"_rewardLockupEpochs","type":"uint256"}],"name":"boardroomSetLockUp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"boardroomSetOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bondDepletionFloorPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bootstrapEpochs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bootstrapSupplyExpansionPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_wlrsAmount","type":"uint256"},{"internalType":"uint256","name":"targetPrice","type":"uint256"}],"name":"buyBonds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"daoFund","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"daoFundSharedPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"devFund","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"devFundSharedPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"discountPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epochSupplyContractionLeft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"excludedFromTotalSupply","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"expansionFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fixedExpansion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBondDiscountRate","outputs":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBondPremiumRate","outputs":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBurnableWlrsLeft","outputs":[{"internalType":"uint256","name":"_burnableWlrsLeft","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getExpansionPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRedeemableBonds","outputs":[{"internalType":"uint256","name":"_redeemableBonds","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWlrsCirculatingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWlrsPrice","outputs":[{"internalType":"uint256","name":"wlrsPrice","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWlrsUpdatedPrice","outputs":[{"internalType":"uint256","name":"_wlrsPrice","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"governanceRecoverUnsupported","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wlrs","type":"address"},{"internalType":"address","name":"_wBond","type":"address"},{"internalType":"address","name":"_wShare","type":"address"},{"internalType":"address","name":"_wlrsOracle","type":"address"},{"internalType":"address","name":"_boardroom","type":"address"},{"internalType":"uint256","name":"_startTime","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isInitialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxDebtRatioPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxDiscountRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"maxExpansionTiers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPremiumRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupplyContractionPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupplyExpansionPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minExpansion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintingFactorForPayingDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextEpochPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"premiumPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"premiumThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"previousEpochWlrsPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bondAmount","type":"uint256"},{"internalType":"uint256","name":"targetPrice","type":"uint256"}],"name":"redeemBonds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"seigniorageExpansionFloorPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"seigniorageSaved","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_boardroom","type":"address"}],"name":"setBoardroom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bondDepletionFloorPercent","type":"uint256"}],"name":"setBondDepletionFloorPercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bootstrapEpochs","type":"uint256"},{"internalType":"uint256","name":"_bootstrapSupplyExpansionPercent","type":"uint256"}],"name":"setBootstrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_discountPercent","type":"uint256"}],"name":"setDiscountPercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setExpansionFactor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_daoFund","type":"address"},{"internalType":"uint256","name":"_daoFundSharedPercent","type":"uint256"},{"internalType":"address","name":"_devFund","type":"address"},{"internalType":"uint256","name":"_devFundSharedPercent","type":"uint256"}],"name":"setExtraFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setFixedExpansion","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxDebtRatioPercent","type":"uint256"}],"name":"setMaxDebtRatioPercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxDiscountRate","type":"uint256"}],"name":"setMaxDiscountRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_index","type":"uint8"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setMaxExpansionTiersEntry","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPremiumRate","type":"uint256"}],"name":"setMaxPremiumRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupplyContractionPercent","type":"uint256"}],"name":"setMaxSupplyContractionPercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupplyExpansionPercent","type":"uint256"}],"name":"setMaxSupplyExpansionPercents","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setMinExpansion","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintingFactorForPayingDebt","type":"uint256"}],"name":"setMintingFactorForPayingDebt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_premiumPercent","type":"uint256"}],"name":"setPremiumPercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_premiumThreshold","type":"uint256"}],"name":"setPremiumThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_index","type":"uint8"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setSupplyTiersEntry","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wlrsOracle","type":"address"}],"name":"setWlrsOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_wlrsPriceCeiling","type":"uint256"}],"name":"setWlrsPriceCeiling","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"supplyTiers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wBond","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wShare","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wlrs","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wlrsOracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wlrsPriceCeiling","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wlrsPriceOne","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

6001805460ff60a01b191690556000600381905560045561018060405273e5f8fc77edc96283749764cd929f49164aef5fdd60809081527363729b14189177aac2d809c639bd830a7f2d1f8460a05273a12557cede66530a0cd1aa9641b93e173f0ea41260c0527346e06fe073179ab774aa1fb7f6c62bf20b601aa360e052732141b624ce8334beca253297bcd742a0fb142fba6101005273577f280fa81f1ac597a4ccd83ecff30458ec4f0e610120527362c9b756ab5619e7982b46014ee49aab428c50db6101405273d699d2c3f6d154758267cac69ce5d634355b43d061016052620000f290600590600862000107565b503480156200010057600080fd5b5062000192565b8280548282559060005260206000209081019282156200015f579160200282015b828111156200015f57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000128565b506200016d92915062000171565b5090565b5b808211156200016d5780546001600160a01b031916815560010162000172565b6148dd80620001a26000396000f3fe608060405234801561001057600080fd5b50600436106104755760003560e01c8063670e0cdd11610257578063b3ab15fb11610146578063cecce38e116100c3578063dae5ca2111610087578063dae5ca2114610a5f578063e90b245414610a67578063f14698de14610a6f578063f8cd4d7214610a77578063fcb6f00814610a9a57610475565b8063cecce38e14610a04578063d4b1494414610a21578063d5c1ffd614610a47578063d98f249514610a4f578063da3ed41914610a5757610475565b8063bcc81f191161010a578063bcc81f19146109aa578063c5967c26146109e4578063c8412d02146109ec578063c8f987f3146109f4578063cddb0c9d146109fc57610475565b8063b3ab15fb14610946578063b3ffc7771461096c578063b4d1d79514610992578063b8a878f91461099a578063bc48283d146109a257610475565b806391bbfed5116101d4578063a0487eea11610198578063a0487eea14610893578063a204452b146108b0578063a3ec30fe146108cd578063b06ce14a14610903578063b219ad7d1461092957610475565b806391bbfed5146107c4578063940e6064146107e757806395b6ef0c1461080d57806398b762a114610859578063998200251461087657610475565b806382cad8381161021b57806382cad83814610772578063874106cc1461078f5780638c664db6146107975780638d934f74146107b4578063900cf0cf146107bc57610475565b8063670e0cdd1461074a57806370251b8d1461075257806372c054f91461075a57806378e979251461076257806381d11eaf1461076a57610475565b80634013a08e1161037357806355ebdeef116102f05780635a0fc79c116102b45780635a0fc79c1461070d5780635b756179146107155780635e02c51e1461071d578063612301e7146107255780636396a1281461074257610475565b806355ebdeef146106d0578063570ca735146106d857806357eaf54f146106e0578063591663e1146106e857806359bf5d391461070557610475565b8063499f3f1911610337578063499f3f191461064a5780634a5b94b8146106675780635006da731461066f57806354575af41461067757806354f04a11146106ad57610475565b80634013a08e146105f857806340af7ba514610600578063428c07d91461061d5780634390d2a81461062557806347a0fd4d1461062d57610475565b806316828d47116104015780632e9c7b65116103c55780632e9c7b651461059f57806333d50f02146105a757806334c2a10f146105cb578063381ce143146105d3578063392e53cd146105f057610475565b806316828d471461055957806317bb6289146105615780631af839e31461058757806322f832cd1461058f57806329ef19191461059757610475565b80630cf60175116104485780630cf60175146104ed5780630db7eb0b146104f5578063118ebbf9146104fd578063154ec2db14610520578063158ef93e1461053d57610475565b806301a937831461047a57806303be7e761461049957806304e5c7b1146104b35780630b5bcec7146104d0575b600080fd5b6104976004803603602081101561049057600080fd5b5035610aa2565b005b6104a1610b53565b60408051918252519081900360200190f35b610497600480360360208110156104c957600080fd5b5035610b59565b610497600480360360208110156104e657600080fd5b5035610c28565b6104a1610cc4565b6104a1610d76565b6104976004803603604081101561051357600080fd5b5080359060200135610e18565b6104976004803603602081101561053657600080fd5b5035611475565b61054561151a565b604080519115158252519081900360200190f35b6104a161152a565b6104976004803603602081101561057757600080fd5b50356001600160a01b0316611606565b6104a1611671565b6104a1611677565b6104a161167d565b6104a1611683565b6105af611689565b604080516001600160a01b039092168252519081900360200190f35b6104a1611698565b610545600480360360208110156105e957600080fd5b503561169e565b6105456116f3565b6104a1611703565b6104976004803603602081101561061657600080fd5b5035611709565b6104a16117ae565b6105af6118b5565b6105456004803603602081101561064357600080fd5b50356118c4565b6104976004803603602081101561066057600080fd5b5035611919565b6104a16119b6565b6104a16119bc565b6104976004803603606081101561068d57600080fd5b506001600160a01b03813581169160208101359160409091013516611b04565b610497600480360360408110156106c357600080fd5b5080359060200135611c49565b6104a1612388565b6105af61238e565b6104a161239d565b610497600480360360208110156106fe57600080fd5b5035612442565b6104a16124e4565b6104a16124ea565b6104976124f0565b6105af612b7f565b6104976004803603602081101561073b57600080fd5b5035612b8e565b6105af612c48565b6104a1612c57565b6105af612c5d565b6104a1612c6c565b6104a1612d24565b6104a1612d2a565b6105af6004803603602081101561078857600080fd5b5035612d30565b6104a1612d57565b610497600480360360208110156107ad57600080fd5b5035612d5d565b6105af612dff565b6104a1612e0e565b610497600480360360408110156107da57600080fd5b5080359060200135612e14565b610545600480360360408110156107fd57600080fd5b5060ff8135169060200135612f0c565b610497600480360360c081101561082357600080fd5b506001600160a01b0381358116916020810135821691604082013581169160608101358216916080820135169060a0013561302e565b6104976004803603602081101561086f57600080fd5b50356132dd565b6104a16004803603602081101561088c57600080fd5b503561332b565b6104a1600480360360208110156108a957600080fd5b5035613349565b610497600480360360208110156108c657600080fd5b5035613356565b610497600480360360608110156108e357600080fd5b506001600160a01b038135811691602081013591604090910135166133a4565b6104976004803603602081101561091957600080fd5b50356001600160a01b0316613467565b6105456004803603602081101561093f57600080fd5b50356134fe565b6104976004803603602081101561095c57600080fd5b50356001600160a01b0316613553565b6104976004803603602081101561098257600080fd5b50356001600160a01b03166135be565b6104a1613629565b6104a161362f565b6104a1613635565b610497600480360360808110156109c057600080fd5b506001600160a01b0381358116916020810135916040820135169060600135613697565b6104a161382c565b6104a1613856565b6104a161385c565b6105af613862565b61049760048036036020811015610a1a57600080fd5b5035613871565b61054560048036036040811015610a3757600080fd5b5060ff8135169060200135613912565b6104a1613a0d565b6104a1613a13565b6104a1613a19565b6104a1613a1f565b6104a1613a25565b6104a1613a2b565b61049760048036036040811015610a8d57600080fd5b5080359060200135613a31565b6104a1613aea565b6001546001600160a01b03163314610aeb5760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b600954604080516397ffe1d760e01b81526004810184905290516001600160a01b03909216916397ffe1d79160248082019260009290919082900301818387803b158015610b3857600080fd5b505af1158015610b4c573d6000803e3d6000fd5b5050505050565b60245481565b6001546001600160a01b03163314610ba25760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b600c54811015610be35760405162461bcd60e51b815260040180806020018281038252602a81526020018061460c602a913960400191505060405180910390fd5b6096811115610c235760405162461bcd60e51b81526004018080602001828103825260248152602001806146366024913960400191505060405180910390fd5b601e55565b6001546001600160a01b03163314610c715760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b600a8110158015610c8457506103e88111155b610cbf5760405162461bcd60e51b815260040180806020018281038252602881526020018061471f6028913960400191505060405180910390fd5b601355565b600080610ccf613635565b9050600b548111610d7257601d54610ceb57600b549150610d72565b6000610d1482610d0e670de0b6b3a7640000600b54613af090919063ffffffff16565b90613b50565b90506000610d3f612710610d0e601d54610d39600b5487613bb790919063ffffffff16565b90613af0565b600b54909150610d4f9082613c14565b93506000601b54118015610d645750601b5484115b15610d6f57601b5493505b50505b5090565b600080610d81613635565b9050600c54811115610d72576000610dab6064610d0e601e54600b54613af090919063ffffffff16565b9050808210610e0d576000610dd7612710610d0e601f54610d39600b5488613bb790919063ffffffff16565b600b54909150610de79082613c14565b93506000601c54118015610dfc5750601c5484115b15610e0757601c5493505b50610e13565b600b5492505b505090565b610e20613c6e565b15610e5c5760405162461bcd60e51b81526004018080602001828103825260268152602001806147be6026913960400191505060405180910390fd5b610e64613c8d565b15610ea05760405162461bcd60e51b81526004018080602001828103825260268152602001806147be6026913960400191505060405180910390fd5b600254421015610ef3576040805162461bcd60e51b8152602060048201526019602482015278151c99585cdd5c9e4e881b9bdd081cdd185c9d1959081e595d603a1b604482015290519081900360640190fd5b6006546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015610f3757600080fd5b505afa158015610f4b573d6000803e3d6000fd5b505050506040513d6020811015610f6157600080fd5b50516001600160a01b0316148015610fef57506007546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015610fb857600080fd5b505afa158015610fcc573d6000803e3d6000fd5b505050506040513d6020811015610fe257600080fd5b50516001600160a01b0316145b801561107157506008546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b15801561103a57600080fd5b505afa15801561104e573d6000803e3d6000fd5b505050506040513d602081101561106457600080fd5b50516001600160a01b0316145b80156110f357506009546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b1580156110bc57600080fd5b505afa1580156110d0573d6000803e3d6000fd5b505050506040513d60208110156110e657600080fd5b50516001600160a01b0316145b611144576040805162461bcd60e51b815260206004820152601e60248201527f54726561737572793a206e656564206d6f7265207065726d697373696f6e0000604482015290519081900360640190fd5b600082116111835760405162461bcd60e51b815260040180806020018281038252602e8152602001806145ac602e913960400191505060405180910390fd5b600061118d613635565b90508181146111e3576040805162461bcd60e51b815260206004820152601a60248201527f54726561737572793a20574c5253207072696365206d6f766564000000000000604482015290519081900360640190fd5b600c5481116112235760405162461bcd60e51b81526004018080602001828103825260328152602001806145da6032913960400191505060405180910390fd5b600061122d610d76565b905060008111611284576040805162461bcd60e51b815260206004820152601b60248201527f54726561737572793a20696e76616c696420626f6e6420726174650000000000604482015290519081900360640190fd5b600061129c670de0b6b3a7640000610d0e8785613af0565b600654604080516370a0823160e01b8152306004820152905192935083926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b1580156112ec57600080fd5b505afa158015611300573d6000803e3d6000fd5b505050506040513d602081101561131657600080fd5b505110156113555760405162461bcd60e51b81526004018080602001828103825260258152602001806146806025913960400191505060405180910390fd5b61136d611364600d5483613cac565b600d5490613bb7565b600d556007546040805163079cc67960e41b81523360048201526024810188905290516001600160a01b03909216916379cc67909160448082019260009290919082900301818387803b1580156113c357600080fd5b505af11580156113d7573d6000803e3d6000fd5b50506006546113f392506001600160a01b031690503383613cc2565b6113fb613d14565b6040805182815260208101879052815133927f51e0d16595cabc591e64da08e45bb223577e5b9a39cd947b4ddc3472b2dd8878928290030190a25050436000908152602081815260408083203284529091528082208054600160ff1991821681179092553384529190922080549091169091179055505050565b6001546001600160a01b031633146114be5760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b614e20811115611515576040805162461bcd60e51b815260206004820152601d60248201527f5f646973636f756e7450657263656e74206973206f7665722032303025000000604482015290519081900360640190fd5b601d55565b600154600160a01b900460ff1681565b600a5460065460408051630d01142560e31b81526001600160a01b039283166004820152670de0b6b3a7640000602482015290516000939290921691636808a12891604480820192602092909190829003018186803b15801561158c57600080fd5b505afa9250505080156115b157506040513d60208110156115ac57600080fd5b505160015b6115ec5760405162461bcd60e51b81526004018080602001828103825260368152602001806148446036913960400191505060405180910390fd5b71ffffffffffffffffffffffffffffffffffff1690505b90565b6001546001600160a01b0316331461164f5760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b600b5481565b60155481565b601d5481565b601c5481565b6006546001600160a01b031681565b601a5481565b6001546000906001600160a01b031633146116ea5760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b50601155600190565b600154600160a01b900460ff1690565b60205481565b6001546001600160a01b031633146117525760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b614e208111156117a9576040805162461bcd60e51b815260206004820152601c60248201527f5f7072656d69756d50657263656e74206973206f766572203230302500000000604482015290519081900360640190fd5b601f55565b6000806117b9613635565b9050600b548111610d725760006117ce6119bc565b905060006117ed612710610d0e60175485613af090919063ffffffff16565b90506000600760009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561183f57600080fd5b505afa158015611853573d6000803e3d6000fd5b505050506040513d602081101561186957600080fd5b50519050808211156118ae5760006118818383613bb7565b9050600061189b670de0b6b3a7640000610d0e8489613af0565b90506118a960045482613cac565b965050505b5050505090565b6023546001600160a01b031681565b6001546000906001600160a01b031633146119105760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b50601055600190565b6001546001600160a01b031633146119625760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b61271081101580156119765750614e208111155b6119b15760405162461bcd60e51b81526004018080602001828103825260298152602001806146f66029913960400191505060405180910390fd5b602055565b60105481565b600654604080516318160ddd60e01b815290516000926001600160a01b031691839183916318160ddd916004808301926020929190829003018186803b158015611a0557600080fd5b505afa158015611a19573d6000803e3d6000fd5b505050506040513d6020811015611a2f57600080fd5b505190506000805b60055460ff82161015611af157611ae7846001600160a01b03166370a0823160058460ff1681548110611a6657fe5b60009182526020918290200154604080516001600160e01b031960e086901b1681526001600160a01b0390921660048301525160248083019392829003018186803b158015611ab457600080fd5b505afa158015611ac8573d6000803e3d6000fd5b505050506040513d6020811015611ade57600080fd5b50518390613c14565b9150600101611a37565b50611afc8282613bb7565b935050505090565b6001546001600160a01b03163314611b4d5760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b6006546001600160a01b0384811691161415611b99576040805162461bcd60e51b81526020600480830191909152602482015263776c727360e01b604482015290519081900360640190fd5b6007546001600160a01b0384811691161415611be5576040805162461bcd60e51b81526020600480830191909152602482015263189bdb9960e21b604482015290519081900360640190fd5b6008546001600160a01b0384811691161415611c30576040805162461bcd60e51b8152602060048201526005602482015264736861726560d81b604482015290519081900360640190fd5b611c446001600160a01b0384168284613cc2565b505050565b611c51613c6e565b15611c8d5760405162461bcd60e51b81526004018080602001828103825260268152602001806147be6026913960400191505060405180910390fd5b611c95613c8d565b15611cd15760405162461bcd60e51b81526004018080602001828103825260268152602001806147be6026913960400191505060405180910390fd5b600254421015611d24576040805162461bcd60e51b8152602060048201526019602482015278151c99585cdd5c9e4e881b9bdd081cdd185c9d1959081e595d603a1b604482015290519081900360640190fd5b6006546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015611d6857600080fd5b505afa158015611d7c573d6000803e3d6000fd5b505050506040513d6020811015611d9257600080fd5b50516001600160a01b0316148015611e2057506007546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015611de957600080fd5b505afa158015611dfd573d6000803e3d6000fd5b505050506040513d6020811015611e1357600080fd5b50516001600160a01b0316145b8015611ea257506008546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015611e6b57600080fd5b505afa158015611e7f573d6000803e3d6000fd5b505050506040513d6020811015611e9557600080fd5b50516001600160a01b0316145b8015611f2457506009546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015611eed57600080fd5b505afa158015611f01573d6000803e3d6000fd5b505050506040513d6020811015611f1757600080fd5b50516001600160a01b0316145b611f75576040805162461bcd60e51b815260206004820152601e60248201527f54726561737572793a206e656564206d6f7265207065726d697373696f6e0000604482015290519081900360640190fd5b60008211611fb45760405162461bcd60e51b81526004018080602001828103825260308152602001806146c66030913960400191505060405180910390fd5b6000611fbe613635565b9050818114612014576040805162461bcd60e51b815260206004820152601a60248201527f54726561737572793a20574c5253207072696365206d6f766564000000000000604482015290519081900360640190fd5b600b5481106120545760405162461bcd60e51b81526004018080602001828103825260328152602001806145da6032913960400191505060405180910390fd5b6004548311156120955760405162461bcd60e51b815260040180806020018281038252602a81526020018061481a602a913960400191505060405180910390fd5b600061209f610cc4565b9050600081116120f6576040805162461bcd60e51b815260206004820152601b60248201527f54726561737572793a20696e76616c696420626f6e6420726174650000000000604482015290519081900360640190fd5b600061210e670de0b6b3a7640000610d0e8785613af0565b9050600061211a6119bc565b905060006121a283600760009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561217057600080fd5b505afa158015612184573d6000803e3d6000fd5b505050506040513d602081101561219a57600080fd5b505190613c14565b90506121bf612710610d0e60175485613af090919063ffffffff16565b811115612209576040805162461bcd60e51b81526020600482015260136024820152726f766572206d6178206465627420726174696f60681b604482015290519081900360640190fd5b6006546040805163079cc67960e41b8152336004820152602481018a905290516001600160a01b03909216916379cc67909160448082019260009290919082900301818387803b15801561225c57600080fd5b505af1158015612270573d6000803e3d6000fd5b5050600754604080516340c10f1960e01b81523360048201526024810188905290516001600160a01b0390921693506340c10f1992506044808201926020929091908290030181600087803b1580156122c857600080fd5b505af11580156122dc573d6000803e3d6000fd5b505050506040513d60208110156122f257600080fd5b50506004546123019088613bb7565b60045561230c613d14565b6040805188815260208101859052815133927f73017f1b70789e2e66759eeb3c7ec11f59e6eedb55d921cfaec5410dd42a4799928290030190a25050436000908152602081815260408083203284529091528082208054600160ff19918216811790925533845291909220805490911690911790555050505050565b60225481565b6001546001600160a01b031681565b6000806123a8613635565b905060006123c1600b5483613bb790919063ffffffff16565b905060006123e0655af3107a4000601354613af090919063ffffffff16565b90506011546000146123f9576011549350505050611603565b6012541561241f5761241c612710610d0e60125485613af090919063ffffffff16565b91505b81601054111561242f5760105491505b8082111561243b578091505b5091505090565b6001546001600160a01b0316331461248b5760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b6103e8811015801561249f57506127108111155b6124df576040805162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b604482015290519081900360640190fd5b601755565b600d5490565b600d5481565b6124f8613c6e565b156125345760405162461bcd60e51b81526004018080602001828103825260268152602001806147be6026913960400191505060405180910390fd5b61253c613c8d565b156125785760405162461bcd60e51b81526004018080602001828103825260268152602001806147be6026913960400191505060405180910390fd5b6002544210156125cb576040805162461bcd60e51b8152602060048201526019602482015278151c99585cdd5c9e4e881b9bdd081cdd185c9d1959081e595d603a1b604482015290519081900360640190fd5b6125d361382c565b421015612627576040805162461bcd60e51b815260206004820152601860248201527f54726561737572793a206e6f74206f70656e6564207965740000000000000000604482015290519081900360640190fd5b6006546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b15801561266b57600080fd5b505afa15801561267f573d6000803e3d6000fd5b505050506040513d602081101561269557600080fd5b50516001600160a01b031614801561272357506007546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b1580156126ec57600080fd5b505afa158015612700573d6000803e3d6000fd5b505050506040513d602081101561271657600080fd5b50516001600160a01b0316145b80156127a557506008546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b15801561276e57600080fd5b505afa158015612782573d6000803e3d6000fd5b505050506040513d602081101561279857600080fd5b50516001600160a01b0316145b801561282757506009546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b1580156127f057600080fd5b505afa158015612804573d6000803e3d6000fd5b505050506040513d602081101561281a57600080fd5b50516001600160a01b0316145b612878576040805162461bcd60e51b815260206004820152601e60248201527f54726561737572793a206e656564206d6f7265207065726d697373696f6e0000604482015290519081900360640190fd5b612880613d14565b612888613635565b601a55600d546000906128a39061289d6119bc565b90613bb7565b905060185460035410156128d9576128d46128cf612710610d0e60195485613af090919063ffffffff16565b613d78565b612b03565b600c54601a541115612b03576128ee816140bb565b50600754604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b15801561293457600080fd5b505afa158015612948573d6000803e3d6000fd5b505050506040513d602081101561295e57600080fd5b50519050600061296c61239d565b905060008061298c612710610d0e60145487613af090919063ffffffff16565b600d54106129b1576129aa670de0b6b3a7640000610d0e8786613af0565b9050612a1d565b60006129c9670de0b6b3a7640000610d0e8887613af0565b90506129e6612710610d0e60155484613af090919063ffffffff16565b91506129f28183613bb7565b60205490935015612a1b57612a18612710610d0e60205486613af090919063ffffffff16565b92505b505b8015612a2c57612a2c81613d78565b8115612afe57600d54612a3f9083613c14565b600d55600654604080516340c10f1960e01b81523060048201526024810185905290516001600160a01b03909216916340c10f19916044808201926020929091908290030181600087803b158015612a9657600080fd5b505af1158015612aaa573d6000803e3d6000fd5b505050506040513d6020811015612ac057600080fd5b5050604080514281526020810184905281517ff705142bf09f04297640495ddf7c59b7fd6f51894c5aea9602d631cf05f0efc2929181900390910190a15b505050505b50600354612b12906001613c14565b600355600c54612b20613635565b11612b3e57612b39612710610d0e601654610d396119bc565b612b41565b60005b600455436000908152602081815260408083203284529091528082208054600160ff1991821681179092553384529190922080549091169091179055565b6009546001600160a01b031681565b6001546001600160a01b03163314612bd75760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b600b548110158015612c035750612bff6064610d0e6078600b54613af090919063ffffffff16565b8111155b612c43576040805162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b604482015290519081900360640190fd5b600c55565b600a546001600160a01b031681565b60115481565b6008546001600160a01b031681565b600080612c77613635565b9050600c54811115610d7257600654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015612cce57600080fd5b505afa158015612ce2573d6000803e3d6000fd5b505050506040513d6020811015612cf857600080fd5b505190506000612d06610d76565b90508015610d6f57611afc81610d0e84670de0b6b3a7640000613af0565b60025481565b60145481565b60058181548110612d3d57fe5b6000918252602090912001546001600160a01b0316905081565b60195481565b6001546001600160a01b03163314612da65760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b6101f48110158015612dba57506127108111155b612dfa576040805162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b604482015290519081900360640190fd5b601455565b6021546001600160a01b031681565b60035481565b6001546001600160a01b03163314612e5d5760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b6078821115612eb3576040805162461bcd60e51b815260206004820152601e60248201527f5f626f6f74737472617045706f6368733a206f7574206f662072616e67650000604482015290519081900360640190fd5b60648110158015612ec657506103e88111155b612f015760405162461bcd60e51b815260040180806020018281038252602e81526020018061487a602e913960400191505060405180910390fd5b601891909155601955565b6001546000906001600160a01b03163314612f585760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b600e5460ff841610612f9b5760405162461bcd60e51b81526004018080602001828103825260298152602001806147476029913960400191505060405180910390fd5b60ff831615612fcd57600e6001840360ff1681548110612fb757fe5b90600052602060002001548211612fcd57600080fd5b600e546000190160ff8416101561300757600e8360010160ff1681548110612ff157fe5b9060005260206000200154821061300757600080fd5b81600e8460ff168154811061301857fe5b6000918252602090912001555060015b92915050565b600154600160a01b900460ff161561308d576040805162461bcd60e51b815260206004820152601d60248201527f54726561737572793a20616c726561647920696e697469616c697a6564000000604482015290519081900360640190fd5b600680546001600160a01b03199081166001600160a01b0389811691909117909255600780548216888416179055600880548216878416179055600a80548216868416179055600980549091169184169190911790556002819055670de0b6b3a7640000600b81905561310890606490610d0e906065613af0565b600c556040805160c081018252600081526969e10de76676d080000060208201526a01a784379d99db42000000918101919091526a034f086f3b33b68400000060608201526a069e10de76676d0800000060808201526a108b2a2c2802909400000060a082015261317d90600e9060066144ff565b506040805160c08101825261012c815260fa602082015260c89181019190915260966060820152607d6080820152606460a08201526131c090600f906006614555565b5061019060138190556127106014908155610dac60155561012c601655611194601755606e601e55611b58601f55601855601955600654604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561323f57600080fd5b505afa158015613253573d6000803e3d6000fd5b505050506040513d602081101561326957600080fd5b5051600d55662386f26fc100006010556096601255600180546001600160a01b031960ff60a01b19909116600160a01b1716339081179091556040805143815290517f25ff68dd81b34665b5ba7e553ee5511bf6812e12adb4a7e2c0d9e26b3099ce799181900360200190a2505050505050565b6001546001600160a01b031633146133265760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b601b55565b600e818154811061333857fe5b600091825260209091200154905081565b600f818154811061333857fe5b6001546001600160a01b0316331461339f5760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b601c55565b6001546001600160a01b031633146133ed5760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b60095460408051631515d6bd60e21b81526001600160a01b038681166004830152602482018690528481166044830152915191909216916354575af491606480830192600092919082900301818387803b15801561344a57600080fd5b505af115801561345e573d6000803e3d6000fd5b50505050505050565b6001546001600160a01b031633146134b05760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b6009546040805163b3ab15fb60e01b81526001600160a01b0384811660048301529151919092169163b3ab15fb91602480830192600092919082900301818387803b158015610b3857600080fd5b6001546000906001600160a01b0316331461354a5760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b50601255600190565b6001546001600160a01b0316331461359c5760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146136075760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b600980546001600160a01b0319166001600160a01b0392909216919091179055565b61546081565b601b5481565b600a5460065460408051633ddac95360e01b81526001600160a01b039283166004820152670de0b6b3a7640000602482015290516000939290921691633ddac95391604480820192602092909190829003018186803b15801561158c57600080fd5b6001546001600160a01b031633146136e05760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b6001600160a01b038416613724576040805162461bcd60e51b815260206004808301919091526024820152637a65726f60e01b604482015290519081900360640190fd5b610bb883111561376a576040805162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b604482015290519081900360640190fd5b6001600160a01b0382166137ae576040805162461bcd60e51b815260206004808301919091526024820152637a65726f60e01b604482015290519081900360640190fd5b6103e88111156137f4576040805162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b604482015290519081900360640190fd5b602180546001600160a01b03199081166001600160a01b03968716179091556022939093556023805490931691909316179055602455565b6000613851613848615460600354613af090919063ffffffff16565b60025490613c14565b905090565b601f5481565b601e5481565b6007546001600160a01b031681565b6001546001600160a01b031633146138ba5760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b606481101580156138cd57506105dc8111155b61390d576040805162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b604482015290519081900360640190fd5b601655565b6001546000906001600160a01b0316331461395e5760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b600f5460ff8416106139a15760405162461bcd60e51b81526004018080602001828103825260298152602001806147476029913960400191505060405180910390fd5b600a82101580156139b457506103e88211155b6139fc576040805162461bcd60e51b81526020600482015260146024820152735f76616c75653a206f7574206f662072616e676560601b604482015290519081900360640190fd5b81600f8460ff168154811061301857fe5b600c5481565b60135481565b60175481565b60125481565b60165481565b60185481565b6001546001600160a01b03163314613a7a5760405162461bcd60e51b81526004018080602001828103825260248152602001806147706024913960400191505060405180910390fd5b60095460408051632ffaaa0960e01b8152600481018590526024810184905290516001600160a01b0390921691632ffaaa099160448082019260009290919082900301818387803b158015613ace57600080fd5b505af1158015613ae2573d6000803e3d6000fd5b505050505050565b60045481565b600082613aff57506000613028565b82820282848281613b0c57fe5b0414613b495760405162461bcd60e51b81526004018080602001828103825260218152602001806146a56021913960400191505060405180910390fd5b9392505050565b6000808211613ba6576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381613baf57fe5b049392505050565b600082821115613c0e576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015613b49576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b4360009081526020818152604080832032845290915290205460ff1690565b4360009081526020818152604080832033845290915290205460ff1690565b6000818310613cbb5781613b49565b5090919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611c4490849061411e565b600a60009054906101000a90046001600160a01b03166001600160a01b031663a2e620456040518163ffffffff1660e01b8152600401600060405180830381600087803b158015613d6457600080fd5b505af1925050508015613d75575060015b50565b600654604080516340c10f1960e01b81523060048201526024810184905290516001600160a01b03909216916340c10f19916044808201926020929091908290030181600087803b158015613dcc57600080fd5b505af1158015613de0573d6000803e3d6000fd5b505050506040513d6020811015613df657600080fd5b505060225460009015613ee157613e1e612710610d0e60225485613af090919063ffffffff16565b6006546021546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101859052905193945091169163a9059cbb916044808201926020929091908290030181600087803b158015613e7957600080fd5b505af1158015613e8d573d6000803e3d6000fd5b505050506040513d6020811015613ea357600080fd5b5050604080514281526020810183905281517fcb3f34aaa3445b461e6da5492dc89e5c257a59fa598131f3b6bbc97a3638e409929181900390910190a15b60245460009015613fca57613f07612710610d0e60245486613af090919063ffffffff16565b6006546023546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101859052905193945091169163a9059cbb916044808201926020929091908290030181600087803b158015613f6257600080fd5b505af1158015613f76573d6000803e3d6000fd5b505050506040513d6020811015613f8c57600080fd5b5050604080514281526020810183905281517fdc8b715b18523e58b7fd0da53259dfa91efd91df4a854d94b136e3333a3b9395929181900390910190a15b613fd88161289d8585613bb7565b600954600654919450613ff9916001600160a01b03908116911660006141cf565b600954600654614016916001600160a01b039182169116856141cf565b600954604080516397ffe1d760e01b81526004810186905290516001600160a01b03909216916397ffe1d79160248082019260009290919082900301818387803b15801561406357600080fd5b505af1158015614077573d6000803e3d6000fd5b5050604080514281526020810187905281517f03ca7276ab7799bf73fb79d27ff0610cd7049574f2508ef8445162833d439aea9450908190039091019150a1505050565b600e54600090600019015b600e8160ff16815481106140d657fe5b9060005260206000200154831061410b57600f8160ff16815481106140f757fe5b600091825260209091200154601355614114565b600019016140c6565b5050601354919050565b6060614173826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166142e29092919063ffffffff16565b805190915015611c445780806020019051602081101561419257600080fd5b5051611c445760405162461bcd60e51b815260040180806020018281038252602a815260200180614794602a913960400191505060405180910390fd5b801580614255575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561422757600080fd5b505afa15801561423b573d6000803e3d6000fd5b505050506040513d602081101561425157600080fd5b5051155b6142905760405162461bcd60e51b81526004018080602001828103825260368152602001806147e46036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052611c4490849061411e565b60606142f184846000856142f9565b949350505050565b60608247101561433a5760405162461bcd60e51b815260040180806020018281038252602681526020018061465a6026913960400191505060405180910390fd5b61434385614455565b614394576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106143d35780518252601f1990920191602091820191016143b4565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614435576040519150601f19603f3d011682016040523d82523d6000602084013e61443a565b606091505b509150915061444a82828661445b565b979650505050505050565b3b151590565b6060831561446a575081613b49565b82511561447a5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156144c45781810151838201526020016144ac565b50505050905090810190601f1680156144f15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b828054828255906000526020600020908101928215614549579160200282015b8281111561454957825182906affffffffffffffffffffff1690559160200191906001019061451f565b50610d72929150614596565b828054828255906000526020600020908101928215614549579160200282015b82811115614549578251829061ffff16905591602001919060010190614575565b5b80821115610d72576000815560010161459756fe54726561737572793a2063616e6e6f742072656465656d20626f6e64732077697468207a65726f20616d6f756e7454726561737572793a20776c72735072696365206e6f7420656c696769626c6520666f7220626f6e642070757263686173655f7072656d69756d5468726573686f6c64206578636565647320776c727350726963654365696c696e675f7072656d69756d5468726573686f6c6420697320686967686572207468616e20312e35416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c54726561737572793a20747265617375727920686173206e6f206d6f726520627564676574536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7754726561737572793a2063616e6e6f7420707572636861736520626f6e64732077697468207a65726f20616d6f756e745f6d696e74696e67466163746f72466f72506179696e67446562743a206f7574206f662072616e67655f6d6178537570706c79457870616e73696f6e50657263656e743a206f7574206f662072616e6765496e6465782068617320746f206265206c6f776572207468616e20636f756e74206f6620746965727354726561737572793a2063616c6c6572206973206e6f7420746865206f70657261746f725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564436f6e747261637447756172643a206f6e6520626c6f636b2c206f6e652066756e6374696f6e5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e636554726561737572793a206e6f7420656e6f75676820626f6e64206c65667420746f20707572636861736554726561737572793a206661696c656420746f20636f6e73756c7420574c52532070726963652066726f6d20746865206f7261636c655f626f6f747374726170537570706c79457870616e73696f6e50657263656e743a206f7574206f662072616e6765a264697066735822122064e5f042e91aceb99dc27f088cc0e0467f461be9e361e5290bc7718d48c4bdb264736f6c634300060c0033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.