Contract 0x25430E2ACb1255453135b2c64436C6b1Ff8153C5

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x1a944f0ed7c4bc72181694079e23b64385e02f8654b8b5b66e1eeac1d8a9a9f6Allocate Seignio...458960222022-08-29 1:17:0338 days 6 hrs ago0x484d662ecb2670fef662728473bbc2243c684595 IN  Based Finance: Treasury0 FTM0.007533864692
0x448b5185dedb0fe8349b9772610252c63759073a162f8734fc7708d42aaac104Allocate Seignio...456881692022-08-26 0:30:0941 days 7 hrs ago0xdb9d71e2236e5c678f432a270e85d41daf0ed46e IN  Based Finance: Treasury0 FTM0.00227315349
0xa88b0a42da4266fb67be423b227ec5d4351c2e4494b4d9717c30abc5249237e1Allocate Seignio...456740422022-08-25 19:37:3841 days 12 hrs ago0x611c55361c50f12c3c95693ec9d1b02f1dc8d3da IN  Based Finance: Treasury0 FTM0.000477816173
0x062e0b3a18eaa02d2de2601fb4b0185e2adadc80a1b3f11b2805efe04c5ad295Allocate Seignio...456172272022-08-25 0:17:0042 days 7 hrs ago0xf74d5baebe0401b75722318a2daaad9ba026bdc3 IN  Based Finance: Treasury0 FTM0.0004678375
0xdfd35bd11d2cd14788a865dcb5b3c59289c1ab6ae6de0574090ee4c7329a1198Buy Bonds455004972022-08-23 8:25:5443 days 23 hrs ago0xc0d10db453af8ddbabd24ee9cbc2c3e26c41e063 IN  Based Finance: Treasury0 FTM0.000513371477
0x00ed5377c8f34ebab16aa561b72cc6469aba01bb2262c2d15d67dc3e057aefd6Allocate Seignio...454670342022-08-22 20:20:5144 days 11 hrs ago0x857f8bef9fd10203e9a95a099f93fe7979bf7029 IN  Based Finance: Treasury0 FTM0.000479716661
0xfebd2e13debe5e5edde2afe78a51c27d80db571f6b0e1a4c3da217dfe715fb0fAllocate Seignio...454518742022-08-22 15:07:3144 days 16 hrs ago0x857f8bef9fd10203e9a95a099f93fe7979bf7029 IN  Based Finance: Treasury0 FTM0.010055631038
0x44d89f5850f3b600874af745860e8874aa52161ce5db74fba8cca817ae4811c3Buy Bonds453374102022-08-21 0:10:5146 days 7 hrs ago0xbe855c1a9c40518106ff665401931f988cdf2ea0 IN  Based Finance: Treasury0 FTM0.004952221459
0x0df8123fa377653625722615dae9339c28a886c19f1f2abd35a124e93efa0db4Buy Bonds453373602022-08-21 0:09:4446 days 7 hrs ago0xbe855c1a9c40518106ff665401931f988cdf2ea0 IN  Based Finance: Treasury0 FTM0.0009069324
0xc9b58f1ad4c458e811726675b388fe48f0c3f79525ba2fcd03821f3256faa9c9Allocate Seignio...452660512022-08-19 23:39:3847 days 8 hrs ago0x585e7d50dcfb319e16b15900827453e9aefbfa21 IN  Based Finance: Treasury0 FTM0.001116780032
0x9e4c350428e4ac6629946bfce9d613120d8ec6110f4df9a2fa11daf95d9c4656Buy Bonds451343392022-08-18 1:12:3349 days 6 hrs ago0xd13911d2eeb1d02bc9f4a358fc4c660aa60a9adc IN  Based Finance: Treasury0 FTM0.000720949021
0x787ec5e29b069d1de8061c164807fb5ee1eca26365b375dc5df455bf66e76337Buy Bonds450825332022-08-17 6:55:5850 days 1 hr ago0xbe855c1a9c40518106ff665401931f988cdf2ea0 IN  Based Finance: Treasury0 FTM0.000221954884
0x48ea1239caa13d01cc9a8ba293bfdea7121dfcb7024a36907096731f9ee445a0Allocate Seignio...450777222022-08-17 5:17:4150 days 2 hrs ago0x2baf8bd8441a0372cafc3fc4e61b99cde2bc498b IN  Based Finance: Treasury0 FTM0.000214750414
0x40aefcef7bbbb75f4a0106e018c3323f4ba2826f32dc33effc9ff5b454998ce7Buy Bonds450309932022-08-16 13:46:5750 days 18 hrs ago0xd13911d2eeb1d02bc9f4a358fc4c660aa60a9adc IN  Based Finance: Treasury0 FTM0.00064247227
0xaa0d335852a654c26d9ae522378c82a202e6b48834148aea3c19af4a856ccde6Buy Bonds450259222022-08-16 11:48:2850 days 20 hrs ago0x4325c590dd27437f08aced052608fc3db9b50cd5 IN  Based Finance: Treasury0 FTM0.00613539
0xffa1ab1f334c1c04f2d6b4ab6a79668ddbab9486b20478fc900f757648f77b06Allocate Seignio...449817952022-08-15 20:36:5251 days 11 hrs ago0x1e074738d2ab24c37bf360ea7db09a2c59e99d38 IN  Based Finance: Treasury0 FTM0.000512005497
0x593d410f79d541950610fbe427d740b5c6cd7c256341cdd0ff7bc3872223073fAllocate Seignio...449448342022-08-15 7:53:2952 days 13 mins ago0x66b2ec111eb3d4cf361323c648bfb5177e53721b IN  Based Finance: Treasury0 FTM0.001343001961
0xd4e5aaa035718f1010bbef173012796e6e1d2df8c83f93562ff15071f13a5422Allocate Seignio...449352862022-08-15 4:30:0652 days 3 hrs ago0x2baf8bd8441a0372cafc3fc4e61b99cde2bc498b IN  Based Finance: Treasury0 FTM0.000911891396
0x93a8e33bfc48c5eb12bf8e7b749af1fe4f31ccbfce4773190188d415ef9b6590Allocate Seignio...449351052022-08-15 4:26:3752 days 3 hrs ago0x2baf8bd8441a0372cafc3fc4e61b99cde2bc498b IN  Based Finance: Treasury0 FTM0.000395759949
0x33b82cbe39d17ca177d2a36ef8a33cb68bd9027b5a1531e25ee81b33dc0553a7Allocate Seignio...448922172022-08-14 13:44:0252 days 18 hrs ago0x89b5e2bb9574c46d4aca2b3f1686c5c7b1b646d9 IN  Based Finance: Treasury0 FTM0.001554539664
0xb8f0ecde500b894cd354bb03e2999c2ed82c2e752a4cac2cf983845fdc849027Allocate Seignio...448921972022-08-14 13:43:3952 days 18 hrs ago0x89b5e2bb9574c46d4aca2b3f1686c5c7b1b646d9 IN  Based Finance: Treasury0 FTM0.001554539664
0xd0f4b4828fc0a7cc88263ecfbebc6ad5c0a7cf951b2d8486cfa25481abf00f83Allocate Seignio...448921782022-08-14 13:43:1452 days 18 hrs ago0x89b5e2bb9574c46d4aca2b3f1686c5c7b1b646d9 IN  Based Finance: Treasury0 FTM0.001554539664
0xb2fe8e563172e8b641b653f7864db9ff3ef37788df6388e092521741249f7c8eAllocate Seignio...448921632022-08-14 13:42:5852 days 18 hrs ago0x89b5e2bb9574c46d4aca2b3f1686c5c7b1b646d9 IN  Based Finance: Treasury0 FTM0.001554539664
0xbe5a8c2f21685b8a107723b97ec913bbfcdd933d1cf6964635626f29cb10f15fAllocate Seignio...448921402022-08-14 13:42:2552 days 18 hrs ago0x89b5e2bb9574c46d4aca2b3f1686c5c7b1b646d9 IN  Based Finance: Treasury0 FTM0.001625174549
0xed2ecac614343f87e817d3a6a6b5f71016b6bcefc5e4b5d22044300a166b8065Buy Bonds448767902022-08-14 8:29:1652 days 23 hrs ago0xd13911d2eeb1d02bc9f4a358fc4c660aa60a9adc IN  Based Finance: Treasury0 FTM0.000126416847
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x7a4f0db5449fef778c85599000500e59735fc9295bb43a86651585ca625fe852301008922022-02-05 19:11:32242 days 12 hrs ago Based Finance: Deployer  Contract Creation0 FTM
[ Download CSV Export 
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.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 50 runs

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

pragma solidity ^0.8.0;

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

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

/*
__________                             .___   ___________.__
\______   \_____     ______  ____    __| _/   \_   _____/|__|  ____  _____     ____    ____   ____
 |    |  _/\__  \   /  ___/_/ __ \  / __ |     |    __)  |  | /    \ \__  \   /    \ _/ ___\_/ __ \
 |    |   \ / __ \_ \___ \ \  ___/ / /_/ |     |     \   |  ||   |  \ / __ \_|   |  \\  \___\  ___/
 |______  /(____  //____  > \___  >\____ |     \___  /   |__||___|  /(____  /|___|  / \___  >\___  >
        \/      \/      \/      \/      \/         \/             \/      \/      \/      \/     \/
*/
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(0x9Ec66B9409d4cD8D4a4C90950Ff0fd26bB39ad84)    // BasedGenesisPool
    ];

    // core components
    address public based;
    address public bbond;
    address public bshare;

    address public acropolis;
    address public basedOracle;

    // price
    uint256 public basedPriceOne;
    uint256 public basedPriceCeiling;

    uint256 public seigniorageSaved;

    uint256[] public supplyTiers;
    uint256[] public maxExpansionTiers;

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

    // 14 first epochs (0.5 week) with 4.5% expansion regardless of BASED price
    uint256 public bootstrapEpochs;
    uint256 public bootstrapSupplyExpansionPercent;

    /* =================== Added variables =================== */
    uint256 public previousEpochBasedPrice;
    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 BASED during debt phase

    address public daoFund;
    uint256 public daoFundSharedPercent;

    //=================================================//

    address public devFund;
    uint256 public devFundSharedPercent;
    address public teamFund;
    uint256 public teamFundSharedPercent;

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

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

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

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

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

        _;
    }

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

        _;

        epoch = epoch.add(1);
        epochSupplyContractionLeft = (getBasedPrice() > basedPriceCeiling) ? 0 : getBasedCirculatingSupply().mul(maxSupplyContractionPercent).div(10000);
    }

    modifier checkOperator {
        require(
                IBasisAsset(based).operator() == address(this) &&
                IBasisAsset(bbond).operator() == address(this) &&
                IBasisAsset(bshare).operator() == address(this) &&
                Operator(acropolis).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 getBasedPrice() public view returns (uint256 basedPrice) {
        try IOracle(basedOracle).consult(based, 1e18) returns (uint144 price) {
            return uint256(price);
        } catch {
            revert("Treasury: failed to consult BASED price from the oracle");
        }
    }

    function getBasedUpdatedPrice() public view returns (uint256 _basedPrice) {
        try IOracle(basedOracle).twap(based, 1e18) returns (uint144 price) {
            return uint256(price);
        } catch {
            revert("Treasury: failed to consult BASED price from the oracle");
        }
    }

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

    function getBurnableBasedLeft() public view returns (uint256 _burnableBasedLeft) {
        uint256 _basedPrice = getBasedPrice();
        if (_basedPrice <= basedPriceOne) {
            uint256 _basedSupply = getBasedCirculatingSupply();
            uint256 _bondMaxSupply = _basedSupply.mul(maxDebtRatioPercent).div(10000);
            uint256 _bondSupply = IERC20(bbond).totalSupply();
            if (_bondMaxSupply > _bondSupply) {
                uint256 _maxMintableBond = _bondMaxSupply.sub(_bondSupply);
                uint256 _maxBurnableBased = _maxMintableBond.mul(_basedPrice).div(1e18);
                _burnableBasedLeft = Math.min(epochSupplyContractionLeft, _maxBurnableBased);
            }
        }
    }

    function getRedeemableBonds() public view returns (uint256 _redeemableBonds) {
        uint256 _basedPrice = getBasedPrice();
        if (_basedPrice > basedPriceCeiling) {
            uint256 _totalBased = IERC20(based).balanceOf(address(this));
            uint256 _rate = getBondPremiumRate();
            if (_rate > 0) {
                _redeemableBonds = _totalBased.mul(1e18).div(_rate);
            }
        }
    }

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

    function getBondPremiumRate() public view returns (uint256 _rate) {
        uint256 _basedPrice = getBasedPrice();
        if (_basedPrice > basedPriceCeiling) {
            uint256 _basedPricePremiumThreshold = basedPriceOne.mul(premiumThreshold).div(100);
            if (_basedPrice >= _basedPricePremiumThreshold) {
                //Price > 1.10
                uint256 _premiumAmount = _basedPrice.sub(basedPriceOne).mul(premiumPercent).div(10000);
                _rate = basedPriceOne.add(_premiumAmount);
                if (maxPremiumRate > 0 && _rate > maxPremiumRate) {
                    _rate = maxPremiumRate;
                }
            } else {
                // no premium bonus
                _rate = basedPriceOne;
            }
        }
    }

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

    function initialize(
        address _based,
        address _bbond,
        address _bshare,
        address _basedOracle,
        address _acropolis,
        uint256 _startTime
    ) public notInitialized {
        based = _based;
        bbond = _bbond;
        bshare = _bshare;
        basedOracle = _basedOracle;
        acropolis = _acropolis;
        startTime = _startTime;

        basedPriceOne = 10**18;
        basedPriceCeiling = basedPriceOne.mul(101).div(100);

        // Dynamic max expansion percent
        supplyTiers = [0 ether, 206000 ether, 386000 ether, 530000 ether, 1300000 ether, 5000000 ether, 10000000 ether];
        maxExpansionTiers = [600, 500, 450, 400, 200, 100, 50];

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

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

        premiumThreshold = 110;
        premiumPercent = 7000;

        // First 28 epochs with 4.5% expansion
        bootstrapEpochs = 14;
        bootstrapSupplyExpansionPercent = 600;

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

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

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

    function setAcropolis(address _acropolis) external onlyOperator {
        acropolis = _acropolis;
    }

    function setBasedOracle(address _basedOracle) external onlyOperator {
        basedOracle = _basedOracle;
    }

    function setBasedPriceCeiling(uint256 _basedPriceCeiling) external onlyOperator {
        require(_basedPriceCeiling >= basedPriceOne && _basedPriceCeiling <= basedPriceOne.mul(120).div(100), "out of range"); // [$1.0, $1.2]
        basedPriceCeiling = _basedPriceCeiling;
    }

    function setMaxSupplyExpansionPercents(uint256 _maxSupplyExpansionPercent) external onlyOperator {
        require(_maxSupplyExpansionPercent >= 10 && _maxSupplyExpansionPercent <= 1000, "_maxSupplyExpansionPercent: out of range"); // [0.1%, 10%]
        maxSupplyExpansionPercent = _maxSupplyExpansionPercent;
    }
    // =================== ALTER THE NUMBERS IN LOGIC!!!! =================== //
    function setSupplyTiersEntry(uint8 _index, uint256 _value) external onlyOperator returns (bool) {
        require(_index >= 0, "Index has to be higher than 0");
        require(_index <7, "Index has to be lower than count of tiers");
        if (_index > 0) {
            require(_value > supplyTiers[_index - 1]);
        }
        if (_index < 6) {
            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 < 7, "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 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(
        // DAO FUND - 12%
        // DEVS WALLET - 3%
        // TEAM WALLET - 5%
        address _daoFund,
        uint256 _daoFundSharedPercent,
        address _devFund,
        uint256 _devFundSharedPercent,
        address _teamFund,
        uint256 _teamFundSharedPercent
    ) external onlyOperator {
        require(_daoFund != address(0), "zero");
        require(_daoFundSharedPercent <= 1500, "out of range"); // <= 15%
        require(_devFund != address(0), "zero");
        require(_devFundSharedPercent <= 350, "out of range"); // <= 3.5%
        require(_teamFund != address(0), "zero");
        require(_teamFundSharedPercent <= 550, "out of range"); // <= 5.5%

        daoFund = _daoFund;
        daoFundSharedPercent = _daoFundSharedPercent;
        devFund = _devFund;
        devFundSharedPercent = _devFundSharedPercent;
        teamFund = _teamFund;
        teamFundSharedPercent = _teamFundSharedPercent;
    }

    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 >= basedPriceCeiling, "_premiumThreshold exceeds basedPriceCeiling");
        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 _updateBasedPrice() internal {
        try IOracle(basedOracle).update() {} catch {}
    }

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

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

        uint256 basedPrice = getBasedPrice();
        require(basedPrice == targetPrice, "Treasury: BASED price moved");
        require(
            basedPrice < basedPriceOne, // price < $1
            "Treasury: basedPrice not eligible for bond purchase"
        );

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

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

        uint256 _bondAmount = _basedAmount.mul(_rate).div(1e18);
        uint256 basedSupply = getBasedCirculatingSupply();
        uint256 newBondSupply = IERC20(bbond).totalSupply().add(_bondAmount);
        require(newBondSupply <= basedSupply.mul(maxDebtRatioPercent).div(10000), "over max debt ratio");

        IBasisAsset(based).burnFrom(msg.sender, _basedAmount);
        IBasisAsset(bbond).mint(msg.sender, _bondAmount);

        epochSupplyContractionLeft = epochSupplyContractionLeft.sub(_basedAmount);
        _updateBasedPrice();

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

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

        uint256 basedPrice = getBasedPrice();
        require(basedPrice == targetPrice, "Treasury: BASED price moved");
        require(
            basedPrice > basedPriceCeiling, // price > $1.01
            "Treasury: basedPrice not eligible for bond purchase"
        );

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

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

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

        IBasisAsset(bbond).burnFrom(msg.sender, _bondAmount);
        IERC20(based).safeTransfer(msg.sender, _basedAmount);

        _updateBasedPrice();

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

    function _sendToAcropolis(uint256 _amount) internal {
        IBasisAsset(based).mint(address(this), _amount);

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

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

        uint256 _teamFundSharedAmount = 0;
        if (teamFundSharedPercent > 0) {
            _teamFundSharedAmount = _amount.mul(teamFundSharedPercent).div(10000);
            IERC20(based).transfer(teamFund, _teamFundSharedAmount);
            emit TeamFundFunded(block.timestamp, _teamFundSharedAmount);
        }

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

        IERC20(based).safeApprove(acropolis, 0);
        IERC20(based).safeApprove(acropolis, _amount);
        IAcropolis(acropolis).allocateSeigniorage(_amount);
        emit AcropolisFunded(block.timestamp, _amount);
    }

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

    function allocateSeigniorage() external onlyOneBlock checkCondition checkEpoch checkOperator {
        _updateBasedPrice();
        previousEpochBasedPrice = getBasedPrice();
        uint256 basedSupply = getBasedCirculatingSupply().sub(seigniorageSaved);
        if (epoch < bootstrapEpochs) {
            // 14 first epochs with 6% expansion
            _sendToAcropolis(basedSupply.mul(bootstrapSupplyExpansionPercent).div(10000));
        } else {
            if (previousEpochBasedPrice > basedPriceCeiling) {
                // Expansion ($BASED Price > 1 $FTM): there is some seigniorage to be allocated
                uint256 bondSupply = IERC20(bbond).totalSupply();
                uint256 _percentage = previousEpochBasedPrice.sub(basedPriceOne);
                uint256 _savedForBond;
                uint256 _savedForAcropolis;
                uint256 _mse = _calculateMaxSupplyExpansionPercent(basedSupply).mul(1e14);
                if (_percentage > _mse) {
                    _percentage = _mse;
                }
                if (seigniorageSaved >= bondSupply.mul(bondDepletionFloorPercent).div(10000)) {
                    // saved enough to pay debt, mint as usual rate
                    _savedForAcropolis = basedSupply.mul(_percentage).div(1e18);
                } else {
                    // have not saved enough to pay debt, mint more
                    uint256 _seigniorage = basedSupply.mul(_percentage).div(1e18);
                    _savedForAcropolis = _seigniorage.mul(seigniorageExpansionFloorPercent).div(10000);
                    _savedForBond = _seigniorage.sub(_savedForAcropolis);
                    if (mintingFactorForPayingDebt > 0) {
                        _savedForBond = _savedForBond.mul(mintingFactorForPayingDebt).div(10000);
                    }
                }
                if (_savedForAcropolis > 0) {
                    _sendToAcropolis(_savedForAcropolis);
                }
                if (_savedForBond > 0) {
                    seigniorageSaved = seigniorageSaved.add(_savedForBond);
                    IBasisAsset(based).mint(address(this), _savedForBond);
                    emit TreasuryFunded(block.timestamp, _savedForBond);
                }
            }
        }
    }
    //===================================================================================================================================

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

    function acropolisSetOperator(address _operator) external onlyOperator {
        IAcropolis(acropolis).setOperator(_operator);
    }

    function acropolisSetLockUp(uint256 _withdrawLockupEpochs, uint256 _rewardLockupEpochs) external onlyOperator {
        IAcropolis(acropolis).setLockUp(_withdrawLockupEpochs, _rewardLockupEpochs);
    }

    function acropolisAllocateSeigniorage(uint256 amount) external onlyOperator {
        IAcropolis(acropolis).allocateSeigniorage(amount);
    }

    function acropolisGovernanceRecoverUnsupported(
        address _token,
        uint256 _amount,
        address _to
    ) external onlyOperator {
        IAcropolis(acropolis).governanceRecoverUnsupported(_token, _amount, _to);
    }
}

File 2 of 15 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/Math.sol)

pragma solidity ^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.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a / b + (a % b == 0 ? 0 : 1);
    }
}

File 3 of 15 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
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) {
        unchecked {
            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) {
        unchecked {
            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) {
        unchecked {
            // 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) {
        unchecked {
            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) {
        unchecked {
            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) {
        return a + b;
    }

    /**
     * @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) {
        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) {
        return a * b;
    }

    /**
     * @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.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        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) {
        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) {
        unchecked {
            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.
     *
     * 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) {
        unchecked {
            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) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 4 of 15 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^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 5 of 15 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.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 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'
        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) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _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
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 6 of 15 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^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() {
        _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 making 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 7 of 15 : Babylonian.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.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 8 of 15 : Operator.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/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() {
        _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 9 of 15 : ContractGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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 10 of 15 : IBasisAsset.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.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 11 of 15 : IOracle.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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 12 of 15 : IAcropolis.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IAcropolis {
    function balanceOf(address _andras) external view returns (uint256);

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

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

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

    function epoch() external view returns (uint256);

    function nextEpochPoint() external view returns (uint256);

    function getTombPrice() 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 13 of 15 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^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;
        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");

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

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

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

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 14 of 15 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^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 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) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 15 of 15 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^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() {
        _transferOwnership(_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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"seigniorage","type":"uint256"}],"name":"AcropolisFunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"basedAmount","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":"basedAmount","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":"TeamFundFunded","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":"acropolis","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"acropolisAllocateSeigniorage","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":"acropolisGovernanceRecoverUnsupported","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_withdrawLockupEpochs","type":"uint256"},{"internalType":"uint256","name":"_rewardLockupEpochs","type":"uint256"}],"name":"acropolisSetLockUp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"acropolisSetOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allocateSeigniorage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"based","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"basedOracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"basedPriceCeiling","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"basedPriceOne","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bbond","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":[],"name":"bshare","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_basedAmount","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":"getBasedCirculatingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBasedPrice","outputs":[{"internalType":"uint256","name":"basedPrice","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBasedUpdatedPrice","outputs":[{"internalType":"uint256","name":"_basedPrice","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":"getBurnableBasedLeft","outputs":[{"internalType":"uint256","name":"_burnableBasedLeft","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":[{"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":"_based","type":"address"},{"internalType":"address","name":"_bbond","type":"address"},{"internalType":"address","name":"_bshare","type":"address"},{"internalType":"address","name":"_basedOracle","type":"address"},{"internalType":"address","name":"_acropolis","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":"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":"previousEpochBasedPrice","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":"_acropolis","type":"address"}],"name":"setAcropolis","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_basedOracle","type":"address"}],"name":"setBasedOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_basedPriceCeiling","type":"uint256"}],"name":"setBasedPriceCeiling","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":"address","name":"_daoFund","type":"address"},{"internalType":"uint256","name":"_daoFundSharedPercent","type":"uint256"},{"internalType":"address","name":"_devFund","type":"address"},{"internalType":"uint256","name":"_devFundSharedPercent","type":"uint256"},{"internalType":"address","name":"_teamFund","type":"address"},{"internalType":"uint256","name":"_teamFundSharedPercent","type":"uint256"}],"name":"setExtraFunds","outputs":[],"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":"_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":[],"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":"teamFund","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"teamFundSharedPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

6001805460ff60a01b191681556000600381905560045560a0604052739ec66b9409d4cd8d4a4c90950ff0fd26bb39ad84608090815262000044916005919062000059565b503480156200005257600080fd5b50620000da565b828054828255906000526020600020908101928215620000b1579160200282015b82811115620000b157825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906200007a565b50620000bf929150620000c3565b5090565b5b80821115620000bf5760008155600101620000c4565b61414d80620000ea6000396000f3fe608060405234801561001057600080fd5b50600436106103be5760003560e01c806372c054f9116101f6578063b3ab15fb1161011b578063cebc0abd116100b3578063cebc0abd14610793578063cecce38e146107a6578063d4b14944146107b9578063d98f2495146107cc578063da3ed419146107d5578063dbf88c36146107de578063e90b2454146107f1578063f14698de146107fa578063f732b28214610803578063fcb6f0081461080c57600080fd5b8063b3ab15fb14610730578063b49739d214610743578063b4d1d7951461074c578063b8a878f914610755578063be00a5381461075e578063c473e02114610766578063c5967c2614610779578063c8412d0214610781578063c8f987f31461078a57600080fd5b806391bbfed51161018e57806391bbfed514610685578063940e60641461069857806395b6ef0c146106ab57806398b762a1146106be57806399820025146106d157806399fea377146106e45780639beb31df146106f7578063a0487eea1461070a578063a204452b1461071d57600080fd5b806372c054f91461060d57806378e979251461061557806381d11eaf1461061e57806382cad83814610627578063874106cc1461063a57806389c84c4f146106435780638c664db6146106565780638d934f7414610669578063900cf0cf1461067c57600080fd5b8063392e53cd116102e75780635495699f1161027f5780635495699f1461057957806354f04a111461058c57806355ebdeef1461059f578063570ca735146105a8578063591663e1146105bb57806359bf5d39146105ce5780635a0fc79c146105d65780635ab673b1146105df5780635b756179146105f25780636b08bd67146105fa57600080fd5b8063392e53cd146104ee5780634013a08e1461050057806340af7ba5146105095780634390d2a81461051c57806344e032ef1461052f578063499f3f19146105375780634c109ce01461054a57806353c20c0c1461055357806354575af41461056657600080fd5b8063158ef93e1161035a578063158ef93e146104595780631b0fb35f1461047d5780631bede0f21461049057806322f832cd1461049857806325938620146104a157806329ef1919146104a95780632e06de7a146104b25780632e9c7b65146104c55780633517c29e146104ce57600080fd5b806303be7e76146103c357806304e5c7b1146103df57806307494935146103f45780630b5bcec7146104075780630cf601751461041a5780630db7eb0b14610422578063118ebbf91461042a57806313ad28251461043d578063154ec2db14610446575b600080fd5b6103cc60215481565b6040519081526020015b60405180910390f35b6103f26103ed366004613c71565b610815565b005b6103f2610402366004613adf565b610910565b6103f2610415366004613c71565b61095c565b6103cc6109fb565b6103cc610aab565b6103f2610438366004613ca3565b610b4b565b6103cc600c5481565b6103f2610454366004613c71565b6110f5565b60015461046d90600160a01b900460ff1681565b60405190151581526020016103d6565b6103f261048b366004613bd4565b611176565b6103cc6112c7565b6103cc60125481565b6103cc6113cb565b6103cc601a5481565b6103f26104c0366004613c71565b611539565b6103cc60195481565b600a546104e1906001600160a01b031681565b6040516103d69190613d13565b600154600160a01b900460ff1661046d565b6103cc601d5481565b6103f2610517366004613c71565b6115c5565b6020546104e1906001600160a01b031681565b6103cc611646565b6103f2610545366004613c71565b611688565b6103cc60235481565b6009546104e1906001600160a01b031681565b6103f2610574366004613b92565b611729565b6022546104e1906001600160a01b031681565b6103f261059a366004613ca3565b61183f565b6103cc601f5481565b6001546104e1906001600160a01b031681565b6103f26105c9366004613c71565b611ed5565b600d546103cc565b6103cc600d5481565b6006546104e1906001600160a01b031681565b6103f2611f34565b6103f2610608366004613ca3565b61257d565b6103cc612610565b6103cc60025481565b6103cc60115481565b6104e1610635366004613c71565b6126d2565b6103cc60165481565b6103f2610651366004613adf565b6126fc565b6103f2610664366004613c71565b612756565b601e546104e1906001600160a01b031681565b6103cc60035481565b6103f2610693366004613ca3565b6127b5565b61046d6106a6366004613cc5565b6128b1565b6103f26106b9366004613b19565b6129ae565b6103f26106cc366004613c71565b612c60565b6103cc6106df366004613c71565b612c8f565b6103f26106f2366004613b92565b612cb0565b6008546104e1906001600160a01b031681565b6103cc610718366004613c71565b612d4d565b6103f261072b366004613c71565b612d5d565b6103f261073e366004613adf565b612d8c565b6103cc600b5481565b6103cc61546081565b6103cc60185481565b6103cc612dd8565b6103f2610774366004613c71565b612eeb565b6103cc612f62565b6103cc601c5481565b6103cc601b5481565b6103f26107a1366004613adf565b612f8c565b6103f26107b4366004613c71565b612fd8565b61046d6107c7366004613cc5565b613036565b6103cc60105481565b6103cc60145481565b6007546104e1906001600160a01b031681565b6103cc60135481565b6103cc60155481565b6103cc60175481565b6103cc60045481565b6001546001600160a01b031633146108485760405162461bcd60e51b815260040161083f90613ef4565b60405180910390fd5b600c548110156108ae5760405162461bcd60e51b815260206004820152602b60248201527f5f7072656d69756d5468726573686f6c6420657863656564732062617365645060448201526a726963654365696c696e6760a81b606482015260840161083f565b609681111561090b5760405162461bcd60e51b8152602060048201526024808201527f5f7072656d69756d5468726573686f6c6420697320686967686572207468616e60448201526320312e3560e01b606482015260840161083f565b601b55565b6001546001600160a01b0316331461093a5760405162461bcd60e51b815260040161083f90613ef4565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146109865760405162461bcd60e51b815260040161083f90613ef4565b600a811015801561099957506103e88111155b6109f65760405162461bcd60e51b815260206004820152602860248201527f5f6d6178537570706c79457870616e73696f6e50657263656e743a206f7574206044820152676f662072616e676560c01b606482015260840161083f565b601055565b600080610a06611646565b9050600b548111610aa757601a54610a20575050600b5490565b6000610a4982610a43670de0b6b3a7640000600b546130f390919063ffffffff16565b90613106565b90506000610a74612710610a43601a54610a6e600b548761311290919063ffffffff16565b906130f3565b600b54909150610a84908261311e565b93506000601854118015610a99575060185484115b15610aa45760185493505b50505b5090565b600080610ab6611646565b9050600c54811115610aa7576000610ae06064610a43601b54600b546130f390919063ffffffff16565b9050808210610b41576000610b0c612710610a43601c54610a6e600b548861311290919063ffffffff16565b600b54909150610b1c908261311e565b93506000601954118015610b31575060195484115b15610aa457601954935050505090565b600b549250505090565b610b5361312a565b15610b705760405162461bcd60e51b815260040161083f90613f38565b610b78613149565b15610b955760405162461bcd60e51b815260040161083f90613f38565b600254421015610bb75760405162461bcd60e51b815260040161083f90613f7e565b6006546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015610bfb57600080fd5b505afa158015610c0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c339190613afc565b6001600160a01b0316148015610ccb57506007546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015610c8857600080fd5b505afa158015610c9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc09190613afc565b6001600160a01b0316145b8015610d5957506008546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015610d1657600080fd5b505afa158015610d2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4e9190613afc565b6001600160a01b0316145b8015610de757506009546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015610da457600080fd5b505afa158015610db8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddc9190613afc565b6001600160a01b0316145b610e035760405162461bcd60e51b815260040161083f90613dfb565b60008211610e6a5760405162461bcd60e51b815260206004820152602e60248201527f54726561737572793a2063616e6e6f742072656465656d20626f6e647320776960448201526d1d1a081e995c9bc8185b5bdd5b9d60921b606482015260840161083f565b6000610e74611646565b9050818114610e955760405162461bcd60e51b815260040161083f90613da8565b600c548111610eb65760405162461bcd60e51b815260040161083f90613e58565b6000610ec0610aab565b905060008111610ee25760405162461bcd60e51b815260040161083f90613d73565b6000610efa670de0b6b3a7640000610a4387856130f3565b6006546040516370a0823160e01b815291925082916001600160a01b03909116906370a0823190610f2f903090600401613d13565b60206040518083038186803b158015610f4757600080fd5b505afa158015610f5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7f9190613c8a565b1015610fdb5760405162461bcd60e51b815260206004820152602560248201527f54726561737572793a20747265617375727920686173206e6f206d6f726520626044820152641d5919d95d60da1b606482015260840161083f565b610ff3610fea600d5483613168565b600d5490613112565b600d5560075460405163079cc67960e41b81526001600160a01b03909116906379cc6790906110289033908990600401613d27565b600060405180830381600087803b15801561104257600080fd5b505af1158015611056573d6000803e3d6000fd5b505060065461107292506001600160a01b03169050338361317e565b61107a6131d4565b604080518281526020810187905233917f51e0d16595cabc591e64da08e45bb223577e5b9a39cd947b4ddc3472b2dd8878910160405180910390a25050436000908152602081815260408083203284529091528082208054600160ff1991821681179092553384529190922080549091169091179055505050565b6001546001600160a01b0316331461111f5760405162461bcd60e51b815260040161083f90613ef4565b614e208111156111715760405162461bcd60e51b815260206004820152601d60248201527f5f646973636f756e7450657263656e74206973206f7665722032303025000000604482015260640161083f565b601a55565b6001546001600160a01b031633146111a05760405162461bcd60e51b815260040161083f90613ef4565b6001600160a01b0386166111c65760405162461bcd60e51b815260040161083f90613ddd565b6105dc8511156111e85760405162461bcd60e51b815260040161083f90613e32565b6001600160a01b03841661120e5760405162461bcd60e51b815260040161083f90613ddd565b61015e8311156112305760405162461bcd60e51b815260040161083f90613e32565b6001600160a01b0382166112565760405162461bcd60e51b815260040161083f90613ddd565b6102268111156112785760405162461bcd60e51b815260040161083f90613e32565b601e80546001600160a01b03199081166001600160a01b0398891617909155601f9590955560208054861694871694909417909355602191909155602280549093169316929092179055602355565b600a54600654604051630d01142560e31b81526000926001600160a01b0390811692636808a128926113099290911690670de0b6b3a764000090600401613d27565b60206040518083038186803b15801561132157600080fd5b505afa925050508015611351575060408051601f3d908101601f1916820190925261134e91810190613c48565b60015b6113bd5760405162461bcd60e51b815260206004820152603760248201527f54726561737572793a206661696c656420746f20636f6e73756c742042415345604482015276442070726963652066726f6d20746865206f7261636c6560481b606482015260840161083f565b6001600160901b0316919050565b600654604080516318160ddd60e01b815290516000926001600160a01b031691839183916318160ddd916004808301926020929190829003018186803b15801561141457600080fd5b505afa158015611428573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144c9190613c8a565b90506000805b60055460ff8216101561152657611514846001600160a01b03166370a0823160058460ff1681548110611487576114876140ec565b6000918252602090912001546040516001600160e01b031960e084901b1681526114bd916001600160a01b031690600401613d13565b60206040518083038186803b1580156114d557600080fd5b505afa1580156114e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150d9190613c8a565b839061311e565b915061151f816140b6565b9050611452565b506115318282613112565b935050505090565b6001546001600160a01b031633146115635760405162461bcd60e51b815260040161083f90613ef4565b6009546040516397ffe1d760e01b8152600481018390526001600160a01b03909116906397ffe1d7906024015b600060405180830381600087803b1580156115aa57600080fd5b505af11580156115be573d6000803e3d6000fd5b5050505050565b6001546001600160a01b031633146115ef5760405162461bcd60e51b815260040161083f90613ef4565b614e208111156116415760405162461bcd60e51b815260206004820152601c60248201527f5f7072656d69756d50657263656e74206973206f766572203230302500000000604482015260640161083f565b601c55565b600a54600654604051633ddac95360e01b81526000926001600160a01b0390811692633ddac953926113099290911690670de0b6b3a764000090600401613d27565b6001546001600160a01b031633146116b25760405162461bcd60e51b815260040161083f90613ef4565b61271081101580156116c65750614e208111155b6117245760405162461bcd60e51b815260206004820152602960248201527f5f6d696e74696e67466163746f72466f72506179696e67446562743a206f7574604482015268206f662072616e676560b81b606482015260840161083f565b601d55565b6001546001600160a01b031633146117535760405162461bcd60e51b815260040161083f90613ef4565b6006546001600160a01b03848116911614156117995760405162461bcd60e51b815260206004820152600560248201526418985cd95960da1b604482015260640161083f565b6007546001600160a01b03848116911614156117e05760405162461bcd60e51b815260040161083f90602080825260049082015263189bdb9960e21b604082015260600190565b6008546001600160a01b03848116911614156118265760405162461bcd60e51b8152602060048201526005602482015264736861726560d81b604482015260640161083f565b61183a6001600160a01b038416828461317e565b505050565b61184761312a565b156118645760405162461bcd60e51b815260040161083f90613f38565b61186c613149565b156118895760405162461bcd60e51b815260040161083f90613f38565b6002544210156118ab5760405162461bcd60e51b815260040161083f90613f7e565b6006546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b1580156118ef57600080fd5b505afa158015611903573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119279190613afc565b6001600160a01b03161480156119bf57506007546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b15801561197c57600080fd5b505afa158015611990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b49190613afc565b6001600160a01b0316145b8015611a4d57506008546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015611a0a57600080fd5b505afa158015611a1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a429190613afc565b6001600160a01b0316145b8015611adb57506009546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b158015611a9857600080fd5b505afa158015611aac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ad09190613afc565b6001600160a01b0316145b611af75760405162461bcd60e51b815260040161083f90613dfb565b60008211611b605760405162461bcd60e51b815260206004820152603060248201527f54726561737572793a2063616e6e6f7420707572636861736520626f6e64732060448201526f1dda5d1a081e995c9bc8185b5bdd5b9d60821b606482015260840161083f565b6000611b6a611646565b9050818114611b8b5760405162461bcd60e51b815260040161083f90613da8565b600b548110611bac5760405162461bcd60e51b815260040161083f90613e58565b600454831115611c115760405162461bcd60e51b815260206004820152602a60248201527f54726561737572793a206e6f7420656e6f75676820626f6e64206c65667420746044820152696f20707572636861736560b01b606482015260840161083f565b6000611c1b6109fb565b905060008111611c3d5760405162461bcd60e51b815260040161083f90613d73565b6000611c55670de0b6b3a7640000610a4387856130f3565b90506000611c616113cb565b90506000611cf583600760009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015611cb757600080fd5b505afa158015611ccb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cef9190613c8a565b9061311e565b9050611d12612710610a43601454856130f390919063ffffffff16565b811115611d575760405162461bcd60e51b81526020600482015260136024820152726f766572206d6178206465627420726174696f60681b604482015260640161083f565b60065460405163079cc67960e41b81526001600160a01b03909116906379cc679090611d899033908b90600401613d27565b600060405180830381600087803b158015611da357600080fd5b505af1158015611db7573d6000803e3d6000fd5b50506007546040516340c10f1960e01b81526001600160a01b0390911692506340c10f199150611ded9033908790600401613d27565b602060405180830381600087803b158015611e0757600080fd5b505af1158015611e1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e3f9190613c26565b50600454611e4d9088613112565b600455611e586131d4565b604080518881526020810185905233917f73017f1b70789e2e66759eeb3c7ec11f59e6eedb55d921cfaec5410dd42a4799910160405180910390a25050436000908152602081815260408083203284529091528082208054600160ff19918216811790925533845291909220805490911690911790555050505050565b6001546001600160a01b03163314611eff5760405162461bcd60e51b815260040161083f90613ef4565b6103e88110158015611f1357506127108111155b611f2f5760405162461bcd60e51b815260040161083f90613e32565b601455565b611f3c61312a565b15611f595760405162461bcd60e51b815260040161083f90613f38565b611f61613149565b15611f7e5760405162461bcd60e51b815260040161083f90613f38565b600254421015611fa05760405162461bcd60e51b815260040161083f90613f7e565b611fa8612f62565b421015611ff25760405162461bcd60e51b8152602060048201526018602482015277151c99585cdd5c9e4e881b9bdd081bdc195b9959081e595d60421b604482015260640161083f565b6006546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b15801561203657600080fd5b505afa15801561204a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061206e9190613afc565b6001600160a01b031614801561210657506007546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b1580156120c357600080fd5b505afa1580156120d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120fb9190613afc565b6001600160a01b0316145b801561219457506008546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b15801561215157600080fd5b505afa158015612165573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121899190613afc565b6001600160a01b0316145b801561222257506009546040805163570ca73560e01b8152905130926001600160a01b03169163570ca735916004808301926020929190829003018186803b1580156121df57600080fd5b505afa1580156121f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122179190613afc565b6001600160a01b0316145b61223e5760405162461bcd60e51b815260040161083f90613dfb565b6122466131d4565b61224e611646565b601755600d54600090612269906122636113cb565b90613112565b9050601554600354101561229f5761229a612295612710610a43601654856130f390919063ffffffff16565b613238565b612501565b600c54601754111561250157600754604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b1580156122f057600080fd5b505afa158015612304573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123289190613c8a565b90506000612343600b5460175461311290919063ffffffff16565b9050600080600061235d655af3107a4000610a6e8861366a565b90508084111561236b578093505b612386612710610a43601154886130f390919063ffffffff16565b600d54106123ab576123a4670de0b6b3a7640000610a4388876130f3565b9150612417565b60006123c3670de0b6b3a7640000610a4389886130f3565b90506123e0612710610a43601254846130f390919063ffffffff16565b92506123ec8184613112565b601d549094501561241557612412612710610a43601d54876130f390919063ffffffff16565b93505b505b81156124265761242682613238565b82156124fb57600d54612439908461311e565b600d556006546040516340c10f1960e01b81526001600160a01b03909116906340c10f199061246e9030908790600401613d27565b602060405180830381600087803b15801561248857600080fd5b505af115801561249c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124c09190613c26565b5060408051428152602081018590527ff705142bf09f04297640495ddf7c59b7fd6f51894c5aea9602d631cf05f0efc2910160405180910390a15b50505050505b5060035461251090600161311e565b600355600c5461251e611646565b1161253c57612537612710610a43601354610a6e6113cb565b61253f565b60005b600455436000908152602081815260408083203284529091528082208054600160ff1991821681179092553384529190922080549091169091179055565b6001546001600160a01b031633146125a75760405162461bcd60e51b815260040161083f90613ef4565b600954604051632ffaaa0960e01b815260048101849052602481018390526001600160a01b0390911690632ffaaa0990604401600060405180830381600087803b1580156125f457600080fd5b505af1158015612608573d6000803e3d6000fd5b505050505050565b60008061261b611646565b9050600c54811115610aa7576006546040516370a0823160e01b81526000916001600160a01b0316906370a0823190612658903090600401613d13565b60206040518083038186803b15801561267057600080fd5b505afa158015612684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126a89190613c8a565b905060006126b4610aab565b90508015610aa45761153181610a4384670de0b6b3a76400006130f3565b600581815481106126e257600080fd5b6000918252602090912001546001600160a01b0316905081565b6001546001600160a01b031633146127265760405162461bcd60e51b815260040161083f90613ef4565b60095460405163b3ab15fb60e01b81526001600160a01b039091169063b3ab15fb90611590908490600401613d13565b6001546001600160a01b031633146127805760405162461bcd60e51b815260040161083f90613ef4565b6101f4811015801561279457506127108111155b6127b05760405162461bcd60e51b815260040161083f90613e32565b601155565b6001546001600160a01b031633146127df5760405162461bcd60e51b815260040161083f90613ef4565b60788211156128305760405162461bcd60e51b815260206004820152601e60248201527f5f626f6f74737472617045706f6368733a206f7574206f662072616e67650000604482015260640161083f565b6064811015801561284357506103e88111155b6128a65760405162461bcd60e51b815260206004820152602e60248201527f5f626f6f747374726170537570706c79457870616e73696f6e50657263656e7460448201526d3a206f7574206f662072616e676560901b606482015260840161083f565b601591909155601655565b6001546000906001600160a01b031633146128de5760405162461bcd60e51b815260040161083f90613ef4565b60078360ff16106129015760405162461bcd60e51b815260040161083f90613eab565b60ff83161561294057600e612917600185614046565b60ff168154811061292a5761292a6140ec565b9060005260206000200154821161294057600080fd5b60068360ff16101561298257600e612959846001613fc9565b60ff168154811061296c5761296c6140ec565b9060005260206000200154821061298257600080fd5b81600e8460ff1681548110612999576129996140ec565b60009182526020909120015550600192915050565b600154600160a01b900460ff1615612a085760405162461bcd60e51b815260206004820152601d60248201527f54726561737572793a20616c726561647920696e697469616c697a6564000000604482015260640161083f565b600680546001600160a01b03199081166001600160a01b0389811691909117909255600780548216888416179055600880548216878416179055600a80548216868416179055600980549091169184169190911790556002819055670de0b6b3a7640000600b819055612a8390606490610a439060656130f3565b600c556040805160e08101825260008152692b9f4849d53924c0000060208201526951bd1a180459ad4000009181019190915269703b5b89c3a6e740000060608201526a011349242670ce8480000060808201526a0422ca8b0a00a42500000060a08201526a084595161401484a00000060c0820152612b0790600e906007613a37565b506040805160e08101825261025881526101f460208201526101c291810191909152610190606082015260c86080820152606460a0820152603260c0820152612b5490600f906007613a89565b506102586010819055612710601155610dac601281905561012c601355601455606e601b55611b58601c55600e6015556016556006546040516370a0823160e01b81526001600160a01b03909116906370a0823190612bb7903090600401613d13565b60206040518083038186803b158015612bcf57600080fd5b505afa158015612be3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c079190613c8a565b600d55600180546001600160a81b03191633908117600160a01b179091556040514381527f25ff68dd81b34665b5ba7e553ee5511bf6812e12adb4a7e2c0d9e26b3099ce799060200160405180910390a2505050505050565b6001546001600160a01b03163314612c8a5760405162461bcd60e51b815260040161083f90613ef4565b601855565b600e8181548110612c9f57600080fd5b600091825260209091200154905081565b6001546001600160a01b03163314612cda5760405162461bcd60e51b815260040161083f90613ef4565b600954604051631515d6bd60e21b81526001600160a01b038581166004830152602482018590528381166044830152909116906354575af490606401600060405180830381600087803b158015612d3057600080fd5b505af1158015612d44573d6000803e3d6000fd5b50505050505050565b600f8181548110612c9f57600080fd5b6001546001600160a01b03163314612d875760405162461bcd60e51b815260040161083f90613ef4565b601955565b6001546001600160a01b03163314612db65760405162461bcd60e51b815260040161083f90613ef4565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600080612de3611646565b9050600b548111610aa7576000612df86113cb565b90506000612e17612710610a43601454856130f390919063ffffffff16565b90506000600760009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015612e6957600080fd5b505afa158015612e7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ea19190613c8a565b905080821115612ee4576000612eb78383613112565b90506000612ed1670de0b6b3a7640000610a4384896130f3565b9050612edf60045482613168565b965050505b5050505090565b6001546001600160a01b03163314612f155760405162461bcd60e51b815260040161083f90613ef4565b600b548110158015612f415750612f3d6064610a436078600b546130f390919063ffffffff16565b8111155b612f5d5760405162461bcd60e51b815260040161083f90613e32565b600c55565b6000612f87612f7e6154606003546130f390919063ffffffff16565b6002549061311e565b905090565b6001546001600160a01b03163314612fb65760405162461bcd60e51b815260040161083f90613ef4565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146130025760405162461bcd60e51b815260040161083f90613ef4565b6064811015801561301557506105dc8111155b6130315760405162461bcd60e51b815260040161083f90613e32565b601355565b6001546000906001600160a01b031633146130635760405162461bcd60e51b815260040161083f90613ef4565b60078360ff16106130865760405162461bcd60e51b815260040161083f90613eab565b600a821015801561309957506103e88211155b6130dc5760405162461bcd60e51b81526020600482015260146024820152735f76616c75653a206f7574206f662072616e676560601b604482015260640161083f565b81600f8460ff1681548110612999576129996140ec565b60006130ff8284614010565b9392505050565b60006130ff8284613fee565b60006130ff828461402f565b60006130ff8284613fb1565b4360009081526020818152604080832032845290915290205460ff1690565b4360009081526020818152604080832033845290915290205460ff1690565b600081831061317757816130ff565b5090919050565b61183a8363a9059cbb60e01b848460405160240161319d929190613d27565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526136da565b600a60009054906101000a90046001600160a01b03166001600160a01b031663a2e620456040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561322457600080fd5b505af1925050508015613235575060015b50565b6006546040516340c10f1960e01b81526001600160a01b03909116906340c10f199061326a9030908590600401613d27565b602060405180830381600087803b15801561328457600080fd5b505af1158015613298573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132bc9190613c26565b50601f54600090156133a8576132e3612710610a43601f54856130f390919063ffffffff16565b600654601e5460405163a9059cbb60e01b81529293506001600160a01b039182169263a9059cbb9261331b9216908590600401613d27565b602060405180830381600087803b15801561333557600080fd5b505af1158015613349573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061336d9190613c26565b5060408051428152602081018390527fcb3f34aaa3445b461e6da5492dc89e5c257a59fa598131f3b6bbc97a3638e409910160405180910390a15b60215460009015613493576133ce612710610a43602154866130f390919063ffffffff16565b60065460205460405163a9059cbb60e01b81529293506001600160a01b039182169263a9059cbb926134069216908590600401613d27565b602060405180830381600087803b15801561342057600080fd5b505af1158015613434573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134589190613c26565b5060408051428152602081018390527fdc8b715b18523e58b7fd0da53259dfa91efd91df4a854d94b136e3333a3b9395910160405180910390a15b6023546000901561357e576134b9612710610a43602354876130f390919063ffffffff16565b60065460225460405163a9059cbb60e01b81529293506001600160a01b039182169263a9059cbb926134f19216908590600401613d27565b602060405180830381600087803b15801561350b57600080fd5b505af115801561351f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135439190613c26565b5060408051428152602081018390527f2dfe5937647c787f9c6bddefedb6b3273b627227b0493e9a83b5441fb11ee00c910160405180910390a15b61358e8161226384818888613112565b6009546006549195506135af916001600160a01b03908116911660006137ac565b6009546006546135cc916001600160a01b039182169116866137ac565b6009546040516397ffe1d760e01b8152600481018690526001600160a01b03909116906397ffe1d790602401600060405180830381600087803b15801561361257600080fd5b505af1158015613626573d6000803e3d6000fd5b505060408051428152602081018890527feeb521b36bb796019dd72df381e0563cc676879b0740577e1492faa7e0a0f2c9935001905060405180910390a150505050565b600060065b600e8160ff1681548110613685576136856140ec565b906000526020600020015483106136c057600f8160ff16815481106136ac576136ac6140ec565b6000918252602090912001546010556136d0565b6136c981614099565b905061366f565b5050601054919050565b600061372f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166138bf9092919063ffffffff16565b80519091501561183a578080602001905181019061374d9190613c26565b61183a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161083f565b8015806138355750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b1580156137fb57600080fd5b505afa15801561380f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138339190613c8a565b155b6138a05760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161083f565b61183a8363095ea7b360e01b848460405160240161319d929190613d27565b60606138ce84846000856138d6565b949350505050565b6060824710156139375760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161083f565b843b6139855760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161083f565b600080866001600160a01b031685876040516139a19190613cf7565b60006040518083038185875af1925050503d80600081146139de576040519150601f19603f3d011682016040523d82523d6000602084013e6139e3565b606091505b50915091506139f38282866139fe565b979650505050505050565b60608315613a0d5750816130ff565b825115613a1d5782518084602001fd5b8160405162461bcd60e51b815260040161083f9190613d40565b828054828255906000526020600020908101928215613a7d579160200282015b82811115613a7d57825182906001600160581b0316905591602001919060010190613a57565b50610aa7929150613aca565b828054828255906000526020600020908101928215613a7d579160200282015b82811115613a7d578251829061ffff16905591602001919060010190613aa9565b5b80821115610aa75760008155600101613acb565b600060208284031215613af157600080fd5b81356130ff81614102565b600060208284031215613b0e57600080fd5b81516130ff81614102565b60008060008060008060c08789031215613b3257600080fd5b8635613b3d81614102565b95506020870135613b4d81614102565b94506040870135613b5d81614102565b93506060870135613b6d81614102565b92506080870135613b7d81614102565b8092505060a087013590509295509295509295565b600080600060608486031215613ba757600080fd5b8335613bb281614102565b9250602084013591506040840135613bc981614102565b809150509250925092565b60008060008060008060c08789031215613bed57600080fd5b8635613bf881614102565b9550602087013594506040870135613c0f81614102565b9350606087013592506080870135613b7d81614102565b600060208284031215613c3857600080fd5b815180151581146130ff57600080fd5b600060208284031215613c5a57600080fd5b81516001600160901b03811681146130ff57600080fd5b600060208284031215613c8357600080fd5b5035919050565b600060208284031215613c9c57600080fd5b5051919050565b60008060408385031215613cb657600080fd5b50508035926020909101359150565b60008060408385031215613cd857600080fd5b823560ff81168114613ce957600080fd5b946020939093013593505050565b60008251613d09818460208701614069565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020815260008251806020840152613d5f816040850160208701614069565b601f01601f19169190910160400192915050565b6020808252601b908201527a54726561737572793a20696e76616c696420626f6e64207261746560281b604082015260600190565b6020808252601b908201527a151c99585cdd5c9e4e88109054d151081c1c9a58d9481b5bdd9959602a1b604082015260600190565b6020808252600490820152637a65726f60e01b604082015260600190565b6020808252601e908201527f54726561737572793a206e656564206d6f7265207065726d697373696f6e0000604082015260600190565b6020808252600c908201526b6f7574206f662072616e676560a01b604082015260600190565b60208082526033908201527f54726561737572793a2062617365645072696365206e6f7420656c696769626c6040820152726520666f7220626f6e6420707572636861736560681b606082015260800190565b60208082526029908201527f496e6465782068617320746f206265206c6f776572207468616e20636f756e74604082015268206f6620746965727360b81b606082015260800190565b60208082526024908201527f54726561737572793a2063616c6c6572206973206e6f7420746865206f70657260408201526330ba37b960e11b606082015260800190565b60208082526026908201527f436f6e747261637447756172643a206f6e6520626c6f636b2c206f6e652066756040820152653731ba34b7b760d11b606082015260800190565b602080825260199082015278151c99585cdd5c9e4e881b9bdd081cdd185c9d1959081e595d603a1b604082015260600190565b60008219821115613fc457613fc46140d6565b500190565b600060ff821660ff84168060ff03821115613fe657613fe66140d6565b019392505050565b60008261400b57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561402a5761402a6140d6565b500290565b600082821015614041576140416140d6565b500390565b600060ff821660ff841680821015614060576140606140d6565b90039392505050565b60005b8381101561408457818101518382015260200161406c565b83811115614093576000848401525b50505050565b600060ff8216806140ac576140ac6140d6565b6000190192915050565b600060ff821660ff8114156140cd576140cd6140d6565b60010192915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038116811461323557600080fdfea2646970667358221220c11c09695cc809c1cde4d3ace25e05d84be1911a091cd9eebbe64c30dd6496e864736f6c63430008070033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.