BERA Price: $3.68 (+0.13%)

Contract

0xA7A60d86405D5e488488D2816c9353E2Fc8cE324

Overview

BERA Balance

Berachain LogoBerachain LogoBerachain Logo0 BERA

BERA Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Make Positive Re...31794872025-04-02 19:23:1320 days ago1743621793IN
0xA7A60d86...2Fc8cE324
0 BERA0.000001330.02677
Make Positive Re...31794852025-04-02 19:23:0920 days ago1743621789IN
0xA7A60d86...2Fc8cE324
0 BERA0.000017260.02677
Make Positive Re...31728242025-04-02 15:46:5720 days ago1743608817IN
0xA7A60d86...2Fc8cE324
0 BERA0.000000230.00472876
Make Positive Re...31720852025-04-02 15:23:0120 days ago1743607381IN
0xA7A60d86...2Fc8cE324
0 BERA0.000016740.025974
Make Positive Re...31646422025-04-02 11:22:5221 days ago1743592972IN
0xA7A60d86...2Fc8cE324
0 BERA0.000005670.008575
Make Positive Re...31570152025-04-02 7:17:1321 days ago1743578233IN
0xA7A60d86...2Fc8cE324
0 BERA0.000000320.00642505
Make Positive Re...31570122025-04-02 7:17:0721 days ago1743578227IN
0xA7A60d86...2Fc8cE324
0 BERA0.000004720.0073292
Make Positive Re...31494812025-04-02 3:16:2021 days ago1743563780IN
0xA7A60d86...2Fc8cE324
0 BERA0.000001640.00255505
Make Positive Re...31361282025-04-01 20:08:4221 days ago1743538122IN
0xA7A60d86...2Fc8cE324
0 BERA0.000004580.0073
Make Positive Re...31215872025-04-01 12:21:3722 days ago1743510097IN
0xA7A60d86...2Fc8cE324
0 BERA0.000101450.157338
Make Positive Re...31140852025-04-01 8:21:2322 days ago1743495683IN
0xA7A60d86...2Fc8cE324
0 BERA0.000001530.00237294
Make Positive Re...30916792025-03-31 20:19:3222 days ago1743452372IN
0xA7A60d86...2Fc8cE324
0 BERA0.000021120.032755
Make Positive Re...30843072025-03-31 16:19:1622 days ago1743437956IN
0xA7A60d86...2Fc8cE324
0 BERA0.000004120.08260003
Make Positive Re...30843072025-03-31 16:19:1622 days ago1743437956IN
0xA7A60d86...2Fc8cE324
0 BERA0.000107840.16293478
Make Positive Re...30769212025-03-31 12:18:4123 days ago1743423521IN
0xA7A60d86...2Fc8cE324
0 BERA0.000000010.00033392
Make Positive Re...30769182025-03-31 12:18:3623 days ago1743423516IN
0xA7A60d86...2Fc8cE324
0 BERA0.000000110.002262
Make Positive Re...30769162025-03-31 12:18:3223 days ago1743423512IN
0xA7A60d86...2Fc8cE324
0 BERA0.000001450.002262
Make Positive Re...30698062025-03-31 8:18:2123 days ago1743409101IN
0xA7A60d86...2Fc8cE324
0 BERA0.000015960.024758
Make Positive Re...30628432025-03-31 4:18:0623 days ago1743394686IN
0xA7A60d86...2Fc8cE324
0 BERA0.000010050.015601
Make Positive Re...30559632025-03-31 0:17:5323 days ago1743380273IN
0xA7A60d86...2Fc8cE324
0 BERA0.000007240.01123
Make Positive Re...30489722025-03-30 20:17:1723 days ago1743365837IN
0xA7A60d86...2Fc8cE324
0 BERA0.000000830.00125667
Make Positive Re...30418982025-03-30 16:17:0823 days ago1743351428IN
0xA7A60d86...2Fc8cE324
0 BERA0.000003330.005166
Make Positive Re...30348182025-03-30 12:16:5324 days ago1743337013IN
0xA7A60d86...2Fc8cE324
0 BERA0.000000870.00136385
Make Positive Re...30277322025-03-30 8:16:4424 days ago1743322604IN
0xA7A60d86...2Fc8cE324
0 BERA0.000000120.002581
Make Positive Re...30277322025-03-30 8:16:4424 days ago1743322604IN
0xA7A60d86...2Fc8cE324
0 BERA0.000002040.0031742
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xEea8fc68...f89F811AD
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
EmissionManager

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 10000 runs

Other Settings:
istanbul EvmVersion
File 1 of 18 : EmissionManager.sol
//SPDX-License-Identifier: MIT
pragma solidity =0.6.6;

import "@openzeppelin/contracts/math/Math.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "../access/Operatable.sol";
import "../time/Debouncable.sol";
import "../time/Timeboundable.sol";
import "../SyntheticToken.sol";
import "../interfaces/IEmissionManager.sol";
import "../interfaces/ITokenManager.sol";
import "../interfaces/IBoardroom.sol";
import "../interfaces/IBerachainRewardsVaultNewSol.sol";

/// Emission manager expands supply when the price goes up
contract EmissionManager is
    IEmissionManager,
    ReentrancyGuard,
    Operatable,
    Debouncable,
    Timeboundable
{
    using SafeMath for uint256;

    /// Stable fund address
    address public stableFund;
    /// Development fund address
    address public devFund;
    /// LiquidBoardroom contract
    IBoardroom public liquidBoardroom;
    /// LockBoardroom contract
    IBoardroom public lockBoardroom;
    /// BexBoardroom contract
    IBoardroom public bexBoardroom;

    /// TokenManager contract
    ITokenManager public tokenManager;

    /// Threshold for positive rebase
    uint256 public threshold = 105;

    /// If stab fund has more than 'stabFundTokensThreshold' tokens, 
    // then rebase is not possible
    uint256 public stabFundBalanceThresholdUnits = 10_000;

    /// Threshold for positive rebase
    uint256 public maxRebase = 300;
    /// Development fund allocation rate (in percentage points)
    uint256 public devFundRate = 4;
    /// Stable fund allocation rate (in percentage points)
    uint256 public stableFundRate = 90;
    /// LiquidBoardroom allocation rate (in percentage points)
    uint256 public liquidBoardroomRate = 4;
    /// LiquidBoardroom allocation rate (in percentage points)
    uint256 public bexBoardroomRate = 2;
    /// LockBoardroom allocation rate (in percentage points)
    uint256 public lockBoardroomRate = 0;

    /// Pauses positive rebases
    bool public pausePositiveRebase;

    // RewardsVault address (gauge)
    address public gauge;

    // RewardsVault rate
    uint256 public gaugeRate = 0;

    // RewardsVault rate 
    uint256 public gaugeIncentiveRate = 1 ether;  // 1 USDbr per 1 BGT

    /// Create new Emission manager
    /// @param startTime Start of the operations
    /// @param period The period between positive rebases
    constructor(uint256 startTime, uint256 period)
        public
        Debouncable(period)
        Timeboundable(startTime, 0)
    {}

    // --------- Modifiers ---------

    /// Checks if contract was initialized properly and ready for use
    modifier initialized() {
        require(isInitialized(), "EmissionManager: not initialized");
        _;
    }

    // --------- View ---------

    /// Checks if contract was initialized properly and ready for use
    function isInitialized() public view returns (bool) {
        return
            (address(tokenManager) != address(0)) &&
            (address(stableFund) != address(0)) &&
            (address(devFund) != address(0)) &&
            (address(bexBoardroom) != address(0)) &&
            (address(liquidBoardroom) != address(0)) &&
            (stableFundRate > 0) &&
            (devFundRate > 0) &&
            (threshold > 100) &&
            (maxRebase > 100);
    }

    /// The amount for positive rebase of the synthetic token
    /// @param syntheticTokenAddress The address of the synthetic token
    function positiveRebaseAmount(address syntheticTokenAddress)
        public
        initialized
        returns (uint256)
    {   
        // 1e18
        uint256 oneSyntheticUnit =
            tokenManager.oneSyntheticUnit(syntheticTokenAddress);
        // 1e18
        uint256 oneUnderlyingUnit =
            tokenManager.oneUnderlyingUnit(syntheticTokenAddress);

        if (
            stabFundBalanceThresholdUnits > 0 
            &&
            SyntheticToken(syntheticTokenAddress).balanceOf(stableFund) >= 
            (stabFundBalanceThresholdUnits * oneSyntheticUnit)
        ) {
            // Stab fund has too many tokens. Trade first
            return 0;
        }

        // 1.18e18
        uint256 rebasePriceUndPerUnitSyn =
            tokenManager.averagePrice(syntheticTokenAddress, oneSyntheticUnit);
        // 1.05e18
        uint256 thresholdUndPerUnitSyn =
            threshold.mul(oneUnderlyingUnit).div(100);
        
        uint256 currentPriceUndPerUnitSyn =
            tokenManager.currentPrice(syntheticTokenAddress, oneSyntheticUnit);

        if (rebasePriceUndPerUnitSyn < thresholdUndPerUnitSyn) {
            return 0;
        }
        // Extra safe check!
        if (currentPriceUndPerUnitSyn < thresholdUndPerUnitSyn) {
            return 0;
        }

        // 2e18
        uint256 maxRebaseAmountUndPerUnitSyn =
            maxRebase.mul(oneUnderlyingUnit).div(100);

        // 1.18e18
        rebasePriceUndPerUnitSyn = Math.min(
            rebasePriceUndPerUnitSyn,
            maxRebaseAmountUndPerUnitSyn
        );
        SyntheticToken syntheticToken = SyntheticToken(syntheticTokenAddress);
        return
            syntheticToken.totalSupply().mul(rebasePriceUndPerUnitSyn.sub(oneUnderlyingUnit)).div(
                oneUnderlyingUnit
            );
    }

    // --------- Public ---------

    /// Makes positive rebases for all eligible tokens
    function makePositiveRebase()
        public
        nonReentrant
        initialized
        debounce
        inTimeBounds
    {
        require(!pausePositiveRebase, "EmissionManager: Rebases are paused");
        address[] memory tokens = tokenManager.allTokens();
        for (uint32 i = 0; i < tokens.length; i++) {
            if (tokens[i] != address(0)) {
                _makeOnePositiveRebase(tokens[i]);
            }
        }
    }

    // --------- Owner (Timelocked) ---------

    /// Set new dev fund
    /// @param _devFund New dev fund address
    function setDevFund(address _devFund) public onlyOwner {
        devFund = _devFund;
        emit DevFundChanged(msg.sender, _devFund);
    }
    
    /// Set new gauge
    /// @param _gauge New gauge address
    function setGauge(address _gauge) public onlyOwner {
        gauge = _gauge;
        emit GaugeChanged(msg.sender, _gauge);
    }

    /// Set new stable fund
    /// @param _stableFund New stable fund address
    function setStableFund(address _stableFund) public onlyOwner {
        stableFund = _stableFund;
        emit StableFundChanged(msg.sender, _stableFund);
    }

    /// Set new boardroom
    /// @param _boardroom New boardroom address
    function setLiquidBoardroom(address _boardroom) public onlyOwner {
        liquidBoardroom = IBoardroom(_boardroom);
        emit LiquidBoardroomChanged(msg.sender, _boardroom);
    }

    /// Set new boardroom
    /// @param _boardroom New boardroom address
    function setLockBoardroom(address _boardroom) public onlyOwner {
        lockBoardroom = IBoardroom(_boardroom);
        emit LockBoardroomChanged(msg.sender, _boardroom);
    }

    /// Set new boardroom
    /// @param _boardroom New boardroom address
    function setBexBoardroom(address _boardroom) public onlyOwner {
        bexBoardroom = IBoardroom(_boardroom);
        emit BexBoardroomChanged(msg.sender, _boardroom);
    }

    /// Set new TokenManager
    /// @param _tokenManager New TokenManager address
    function setTokenManager(address _tokenManager) public onlyOwner {
        tokenManager = ITokenManager(_tokenManager);
        emit TokenManagerChanged(msg.sender, _tokenManager);
    }

    /// Set new dev fund rate
    /// @param _devFundRate New dev fund rate
    function setDevFundRate(uint256 _devFundRate) public onlyOperator {
        devFundRate = _devFundRate;
        emit DevFundRateChanged(msg.sender, _devFundRate);
    }

    /// Set new gauge rate
    /// @param _gaugeRate New gauge rate
    function setGaugeRate(uint256 _gaugeRate) public onlyOperator {
        gaugeRate = _gaugeRate;
        emit GaugeFundRateChanged(msg.sender, _gaugeRate);
    }

    /// Set new gauge rate
    /// @param _gaugeIncentiveRate New gauge incentive rate
    function setGaugeIncentiveRate(uint256 _gaugeIncentiveRate) public onlyOperator {
        gaugeIncentiveRate = _gaugeIncentiveRate;
        emit GaugeIncentiveRateChanged(msg.sender, _gaugeIncentiveRate);
    }

    /// Set new stable fund rate
    /// @param _stableFundRate New stable fund rate
    function setStableFundRate(uint256 _stableFundRate) public onlyOperator {
        stableFundRate = _stableFundRate;
        emit StableFundRateChanged(msg.sender, _stableFundRate);
    }

    /// Set new stable fund rate
    /// @param _lockBoardroomRate New stable fund rate
    function setLockBoardroomRate(uint256 _lockBoardroomRate) public onlyOperator {
        lockBoardroomRate = _lockBoardroomRate;
        emit LockBoardroomRateChanged(msg.sender, _lockBoardroomRate);
    }

    /// Set new stable fund rate
    /// @param _liquidBoardroomRate New stable fund rate
    function setLiquidBoardroomRate(uint256 _liquidBoardroomRate)
        public
        onlyOperator
    {
        liquidBoardroomRate = _liquidBoardroomRate;
        emit LiquidBoardroomRateChanged(msg.sender, _liquidBoardroomRate);
    }

    /// Set new bexBoardroom rate
    /// @param _bexBoardroomRate New stable fund rate
    function setBexBoardroomRate(uint256 _bexBoardroomRate) public onlyOperator {
        bexBoardroomRate = _bexBoardroomRate;
        emit BexBoardroomRateChanged(msg.sender, _bexBoardroomRate);
    }

    /// Set new threshold
    /// @param _threshold New threshold
    function setThreshold(uint256 _threshold) public onlyOperator {
        threshold = _threshold;
        emit ThresholdChanged(msg.sender, _threshold);
    }

    /// Set new threshold
    /// @param _threshold New threshold
    function setStabFundBalanceThresholdUnits(uint256 _threshold) public onlyOperator {
        stabFundBalanceThresholdUnits = _threshold;
        emit StabFundBalanceThresholdUnitsChanged(msg.sender, _threshold);
    }

    /// Set new maxRebase
    /// @param _maxRebase New maxRebase
    function setMaxRebase(uint256 _maxRebase) public onlyOperator {
        maxRebase = _maxRebase;
        emit MaxRebaseChanged(msg.sender, _maxRebase);
    }

    /// Set new rebase period
    /// @param _period New period duration in seconds
    function setRebasePeriod(uint256 _period) public onlyOwner {
        _setPeriod(_period);
        emit RebasePeriodChanged(msg.sender, _period);
    }

    // --------- Operator (immediate) ---------

    /// Pauses / unpauses positive rebases
    /// @param pause Sets the pause / unpause
    function setPausePositiveRebase(bool pause) public onlyOperator {
        pausePositiveRebase = pause;
        emit PositiveRebasePaused(msg.sender, pause);
    }

    /// Make positive rebase for one token
    /// @param syntheticTokenAddress The address of the synthetic token
    /// @dev The caller must ensure `managedToken` and `initialized` properties
    function _makeOnePositiveRebase(address syntheticTokenAddress) internal {
        uint256 amount = positiveRebaseAmount(syntheticTokenAddress);
        if (amount == 0) {
            return;
        }
        emit PositiveRebaseTotal(syntheticTokenAddress, amount);

        uint256 devFundAmount = 0;
        if (devFundRate > 0 && devFund != address(0)) {
            devFundAmount = amount.mul(devFundRate).div(100);
            tokenManager.mintSynthetic(
                syntheticTokenAddress,
                devFund,
                devFundAmount
            );
            emit DevFundFunded(syntheticTokenAddress, devFundAmount);
        }

        uint256 stableFundAmount = amount.mul(stableFundRate).div(100);
        tokenManager.mintSynthetic(
            syntheticTokenAddress,
            stableFund,
            stableFundAmount
        );
        emit StableFundFunded(syntheticTokenAddress, stableFundAmount);

        if (gaugeRate > 0 && gaugeIncentiveRate > 0 && gauge != address(0)) {
            uint256 gaugeAmount = amount.mul(gaugeRate).div(100);
            // Mint for this address first. Than addIncentives
            tokenManager.mintSynthetic(
                syntheticTokenAddress,
                address(this),
                gaugeAmount
            );

            SyntheticToken(syntheticTokenAddress).approve(gauge, gaugeAmount);
            IBerachainRewardsVaultNewSol(gauge).addIncentive(
                syntheticTokenAddress,
                gaugeAmount,
                gaugeIncentiveRate
            );
            emit GaugeFunded(syntheticTokenAddress, devFundAmount);
        }
        
        if (lockBoardroomRate > 0 && address(lockBoardroom) != address(0)) {
            uint256 lockBoardroomAmount = amount.mul(lockBoardroomRate).div(100);
            tokenManager.mintSynthetic(
                syntheticTokenAddress,
                address(lockBoardroom),
                lockBoardroomAmount
            );
            lockBoardroom.notifyTransfer(
                syntheticTokenAddress,
                lockBoardroomAmount
            );
            emit LockBoardroomFunded(syntheticTokenAddress, lockBoardroomAmount);
        }

        if (liquidBoardroomRate > 0 && address(liquidBoardroom) != address(0)) {
            uint256 liquidBoardroomAmount = amount.mul(liquidBoardroomRate).div(100);
            tokenManager.mintSynthetic(
                syntheticTokenAddress,
                address(liquidBoardroom),
                liquidBoardroomAmount
            );
            liquidBoardroom.notifyTransfer(
                syntheticTokenAddress,
                liquidBoardroomAmount
            );
            emit LiquidBoardroomFunded(
                syntheticTokenAddress,
                liquidBoardroomAmount
            );
        }

        if (bexBoardroomRate > 0 && address(bexBoardroom) != address(0)) {
            uint256 bexBoardroomAmount = amount.mul(bexBoardroomRate).div(100);
            tokenManager.mintSynthetic(
                syntheticTokenAddress,
                address(bexBoardroom),
                bexBoardroomAmount
            );
            bexBoardroom.notifyTransfer(
                syntheticTokenAddress,
                bexBoardroomAmount
            );
            emit BexBoardroomFunded(
                syntheticTokenAddress,
                bexBoardroomAmount
            );
        }
    }

    event DevFundChanged(address indexed operator, address newFund);
    event GaugeChanged(address indexed operator, address newFund);
    event StableFundChanged(address indexed operator, address newFund);
    event LiquidBoardroomChanged(address indexed operator, address newBoadroom);
    event LockBoardroomChanged(address indexed operator, address newBoadroom);
    event BexBoardroomChanged(
        address indexed operator,
        address newBoadroom
    );
    event TokenManagerChanged(
        address indexed operator,
        address newTokenManager
    );
    event PositiveRebasePaused(address indexed operator, bool pause);

    event DevFundRateChanged(address indexed operator, uint256 newRate);
    event GaugeFundRateChanged(address indexed operator, uint256 newRate);
    event GaugeIncentiveRateChanged(address indexed operator, uint256 newRate);
    event StableFundRateChanged(address indexed operator, uint256 newRate);
    event LockBoardroomRateChanged(address indexed operator, uint256 newRate);
    event LiquidBoardroomRateChanged(address indexed operator, uint256 newRate);
    event BexBoardroomRateChanged(address indexed operator, uint256 newRate);
    event ThresholdChanged(address indexed operator, uint256 newThreshold);
    event StabFundBalanceThresholdUnitsChanged(address indexed operator, uint256 newThreshold);
    event MaxRebaseChanged(address indexed operator, uint256 newThreshold);
    event PositiveRebaseTotal(
        address indexed syntheticTokenAddress,
        uint256 amount
    );
    event LiquidBoardroomFunded(
        address indexed syntheticTokenAddress,
        uint256 amount
    );
    event LockBoardroomFunded(
        address indexed syntheticTokenAddress,
        uint256 amount
    );
    event BexBoardroomFunded(
        address indexed syntheticTokenAddress,
        uint256 amount
    );
    event DevFundFunded(address indexed syntheticTokenAddress, uint256 amount);
    event GaugeFunded(address indexed syntheticTokenAddress, uint256 amount);
    event StableFundFunded(
        address indexed syntheticTokenAddress,
        uint256 amount
    );
    event RebasePeriodChanged(address indexed operator, uint256 newPeriod);
}

File 2 of 18 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

File 3 of 18 : Math.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

File 4 of 18 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 5 of 18 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name_, string memory symbol_) public {
        _name = name_;
        _symbol = symbol_;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal virtual {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}

File 6 of 18 : ERC20Burnable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    using SafeMath for uint256;

    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, "ERC20: burn amount exceeds allowance");

        _approve(account, _msgSender(), decreasedAllowance);
        _burn(account, amount);
    }
}

File 7 of 18 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity >=0.6.0 <0.8.0;

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

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

File 9 of 18 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 10 of 18 : Operatable.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.6.6;

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

/// Introduces `Operator` role that can be changed only by Owner.
abstract contract Operatable is Ownable {
    address public operator;

    constructor() internal {
        operator = msg.sender;
    }

    modifier onlyOperator() {
        require(msg.sender == operator, "Only operator can call this method");
        _;
    }

    /// Set new operator
    /// @param newOperator New operator to be set
    /// @dev Only owner is allowed to call this method.
    function transferOperator(address newOperator) public onlyOwner {
        emit OperatorTransferred(operator, newOperator);
        operator = newOperator;
    }

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

File 11 of 18 : IBerachainRewardsVaultNewSol.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.6.6;

interface IBerachainRewardsVaultNewSol {
    function addIncentive(
        address token,
        uint256 amount,
        uint256 incentiveRate
    ) external;

    function delegateStake(address account, uint256 amount) external;

    function delegateWithdraw(address account, uint256 amount) external;

    function getDelegateStake(address account, address delegate)
        external
        view
        returns (uint256);
}

File 12 of 18 : IBoardroom.sol
//SPDX-License-Identifier: MIT
pragma solidity =0.6.6;

/// Boardroom as seen by others
interface IBoardroom {
    /// Notify Boardroom about new incoming reward for token
    /// @param token Rewards denominated in this token
    /// @param amount The amount of rewards
    function notifyTransfer(address token, uint256 amount) external;
}

File 13 of 18 : IEmissionManager.sol
//SPDX-License-Identifier: MIT
pragma solidity =0.6.6;

/// Emission manager as seen by other managers
interface IEmissionManager {

}

File 14 of 18 : ISmelter.sol
//SPDX-License-Identifier: MIT
pragma solidity =0.6.6;

/// Smelter can mint and burn tokens
interface ISmelter {
    /// Burn SyntheticToken
    /// @param syntheticTokenAddress The address of the synthetic token
    /// @param owner Owner of the tokens to burn
    /// @param amount Amount to burn
    function burnSyntheticFrom(
        address syntheticTokenAddress,
        address owner,
        uint256 amount
    ) external;

    /// Mints synthetic token
    /// @param syntheticTokenAddress The address of the synthetic token
    /// @param receiver Address to receive minted token
    /// @param amount Amount to mint
    function mintSynthetic(
        address syntheticTokenAddress,
        address receiver,
        uint256 amount
    ) external;

    /// Check if address is token admin
    /// @param admin - address to check
    function isTokenAdmin(address admin) external view returns (bool);
}

File 15 of 18 : ITokenManager.sol
//SPDX-License-Identifier: MIT
pragma solidity =0.6.6;

import "./ISmelter.sol";

/// Token manager as seen by other managers
interface ITokenManager is ISmelter {
    /// A set of synthetic tokens under management
    /// @dev Deleted tokens are still present in the array but with address(0)
    function allTokens() external view returns (address[] memory);

    /// Checks if the token is managed by Token Manager
    /// @param syntheticTokenAddress The address of the synthetic token
    /// @return True if token is managed
    function isManagedToken(address syntheticTokenAddress)
        external
        view
        returns (bool);

    /// Address of the underlying token
    /// @param syntheticTokenAddress The address of the synthetic token
    function underlyingToken(address syntheticTokenAddress)
        external
        view
        returns (address);

    /// Average price of the synthetic token according to price oracle
    /// @param syntheticTokenAddress The address of the synthetic token
    /// @param syntheticTokenAmount The amount to be priced
    /// @return The equivalent amount of the underlying token required to buy syntheticTokenAmount (average)
    /// @dev Fails if the token is not managed
    function averagePrice(
        address syntheticTokenAddress,
        uint256 syntheticTokenAmount
    ) external view returns (uint256);

    /// Current price of the synthetic token according to DEX
    /// @param syntheticTokenAddress The address of the synthetic token
    /// @param syntheticTokenAmount The amount to be priced
    /// @return The equivalent amount of the underlying token required to buy syntheticTokenAmount
    /// @dev Fails if the token is not managed
    function currentPrice(
        address syntheticTokenAddress,
        uint256 syntheticTokenAmount
    ) external returns (uint256);

    // /// Updates Oracle for the synthetic asset
    // /// @param syntheticTokenAddress The address of the synthetic token
    // function updateOracle(address syntheticTokenAddress) external;

    /// Get one synthetic unit
    /// @param syntheticTokenAddress The address of the synthetic token
    /// @return one unit of the synthetic asset
    function oneSyntheticUnit(address syntheticTokenAddress)
        external
        view
        returns (uint256);

    /// Get one underlying unit
    /// @param syntheticTokenAddress The address of the synthetic token
    /// @return one unit of the underlying asset
    function oneUnderlyingUnit(address syntheticTokenAddress)
        external
        view
        returns (uint256);
}

File 16 of 18 : SyntheticToken.sol
//SPDX-License-Identifier: MIT
pragma solidity =0.6.6;

import "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol";
import "./access/Operatable.sol";

/// @title Synthetic token for the Klondike platform
contract SyntheticToken is ERC20Burnable, Operatable {
    /// Creates a new synthetic token
    /// @param _name Name of the token
    /// @param _symbol Ticker for the token
    /// @param _decimals Number of decimals
    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) public ERC20(_name, _symbol) {
        _setupDecimals(_decimals);
    }

    ///  Mints tokens to the recepient
    ///  @param recipient The address of recipient
    ///  @param amount The amount of tokens to mint
    function mint(address recipient, uint256 amount)
        public
        onlyOperator
        returns (bool)
    {
        _mint(recipient, amount);
    }

    ///  Burns token from the caller
    ///  @param amount The amount of tokens to burn
    function burn(uint256 amount) public override onlyOperator {
        super.burn(amount);
    }

    ///  Burns token from address
    ///  @param account The account to burn from
    ///  @param amount The amount of tokens to burn
    ///  @dev The allowance for sender in address account must be
    ///  strictly >= amount. Otherwise the function call will fail.
    function burnFrom(address account, uint256 amount)
        public
        override
        onlyOperator
    {
        super.burnFrom(account, amount);
    }
}

File 17 of 18 : Debouncable.sol
//SPDX-License-Identifier: MIT
pragma solidity =0.6.6;

/// Provides modifier for debouncing call to methods,
/// i.e. method cannot be called more earlier than debouncePeriod
/// since the last call
abstract contract Debouncable {
    /// Debounce period in secs
    uint256 public debouncePeriod;
    /// Last time method successfully called (block timestamp)
    uint256 public lastCalled;

    /// @param _debouncePeriod Debounce period in secs
    constructor(uint256 _debouncePeriod) internal {
        debouncePeriod = _debouncePeriod;
    }

    function _setPeriod(uint256 _debouncePeriod) internal {
        debouncePeriod = _debouncePeriod;
    }

    /// Throws if the method was called earlier than debouncePeriod last time.
    modifier debounce() {
        uint256 timeElapsed = block.timestamp - lastCalled;
        require(
            timeElapsed >= debouncePeriod,
            "Debouncable: already called in this time slot"
        );
        _;
        lastCalled = block.timestamp;
    }
}

File 18 of 18 : Timeboundable.sol
//SPDX-License-Identifier: MIT
pragma solidity =0.6.6;

/// Checks time bounds for contract
abstract contract Timeboundable {
    uint256 public immutable start;
    uint256 public immutable finish;

    /// @param _start The block timestamp to start from (in secs). Use 0 for unbounded start.
    /// @param _finish The block timestamp to finish in (in secs). Use 0 for unbounded finish.
    constructor(uint256 _start, uint256 _finish) internal {
        require(
            (_start != 0) || (_finish != 0),
            "Timebound: either start or finish must be nonzero"
        );
        require(
            (_finish == 0) || (_finish > _start),
            "Timebound: finish must be zero or greater than start"
        );
        uint256 s = _start;
        if (s == 0) {
            s = block.timestamp;
        }
        uint256 f = _finish;
        if (f == 0) {
            f = uint256(-1);
        }
        start = s;
        finish = f;
    }

    /// Checks if timebounds are satisfied
    modifier inTimeBounds() {
        require(block.timestamp >= start, "Timeboundable: Not started yet");
        require(block.timestamp <= finish, "Timeboundable: Already finished");
        _;
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"period","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"address","name":"newBoadroom","type":"address"}],"name":"BexBoardroomChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"syntheticTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BexBoardroomFunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"BexBoardroomRateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"address","name":"newFund","type":"address"}],"name":"DevFundChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"syntheticTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DevFundFunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"DevFundRateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"address","name":"newFund","type":"address"}],"name":"GaugeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"GaugeFundRateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"syntheticTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"GaugeFunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"GaugeIncentiveRateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"address","name":"newBoadroom","type":"address"}],"name":"LiquidBoardroomChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"syntheticTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LiquidBoardroomFunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"LiquidBoardroomRateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"address","name":"newBoadroom","type":"address"}],"name":"LockBoardroomChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"syntheticTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LockBoardroomFunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"LockBoardroomRateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"uint256","name":"newThreshold","type":"uint256"}],"name":"MaxRebaseChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOperator","type":"address"},{"indexed":true,"internalType":"address","name":"newOperator","type":"address"}],"name":"OperatorTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"pause","type":"bool"}],"name":"PositiveRebasePaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"syntheticTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PositiveRebaseTotal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"uint256","name":"newPeriod","type":"uint256"}],"name":"RebasePeriodChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"uint256","name":"newThreshold","type":"uint256"}],"name":"StabFundBalanceThresholdUnitsChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"address","name":"newFund","type":"address"}],"name":"StableFundChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"syntheticTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"StableFundFunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"StableFundRateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"uint256","name":"newThreshold","type":"uint256"}],"name":"ThresholdChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"address","name":"newTokenManager","type":"address"}],"name":"TokenManagerChanged","type":"event"},{"inputs":[],"name":"bexBoardroom","outputs":[{"internalType":"contract IBoardroom","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bexBoardroomRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"debouncePeriod","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":"devFundRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gauge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gaugeIncentiveRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gaugeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isInitialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastCalled","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidBoardroom","outputs":[{"internalType":"contract IBoardroom","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidBoardroomRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockBoardroom","outputs":[{"internalType":"contract IBoardroom","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockBoardroomRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"makePositiveRebase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxRebase","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":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pausePositiveRebase","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"syntheticTokenAddress","type":"address"}],"name":"positiveRebaseAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_boardroom","type":"address"}],"name":"setBexBoardroom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bexBoardroomRate","type":"uint256"}],"name":"setBexBoardroomRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_devFund","type":"address"}],"name":"setDevFund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_devFundRate","type":"uint256"}],"name":"setDevFundRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gauge","type":"address"}],"name":"setGauge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gaugeIncentiveRate","type":"uint256"}],"name":"setGaugeIncentiveRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gaugeRate","type":"uint256"}],"name":"setGaugeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_boardroom","type":"address"}],"name":"setLiquidBoardroom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_liquidBoardroomRate","type":"uint256"}],"name":"setLiquidBoardroomRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_boardroom","type":"address"}],"name":"setLockBoardroom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockBoardroomRate","type":"uint256"}],"name":"setLockBoardroomRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxRebase","type":"uint256"}],"name":"setMaxRebase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"pause","type":"bool"}],"name":"setPausePositiveRebase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"setRebasePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_threshold","type":"uint256"}],"name":"setStabFundBalanceThresholdUnits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stableFund","type":"address"}],"name":"setStableFund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stableFundRate","type":"uint256"}],"name":"setStableFundRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_threshold","type":"uint256"}],"name":"setThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenManager","type":"address"}],"name":"setTokenManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stabFundBalanceThresholdUnits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stableFund","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stableFundRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"start","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"threshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenManager","outputs":[{"internalType":"contract ITokenManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOperator","type":"address"}],"name":"transferOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061032b5760003560e01c80638da5cb5b116101b2578063c10ae780116100f9578063d9e8a97a116100a2578063e9ebaf1b1161007c578063e9ebaf1b146106bc578063f052e041146106db578063f2fde38b146106e3578063ff8337f1146107095761032b565b8063d9e8a97a1461067a578063da776e5014610697578063e176e6541461069f5761032b565b8063d56b2889116100d3578063d56b28891461062f578063d7c5f0ba14610637578063d88df3a21461065d5761032b565b8063c10ae780146105f9578063c412664a14610601578063c92a3188146106095761032b565b8063a9f63f2b1161015b578063b6f0e9f511610135578063b6f0e9f5146105ae578063b85b02e0146105d4578063be9a6555146105f15761032b565b8063a9f63f2b1461054e578063ae4db9191461056b578063b6effb92146105915761032b565b806397ac9aa91161018c57806397ac9aa914610536578063a6baac121461053e578063a6f19c84146105465761032b565b80638da5cb5b14610509578063960bfe0414610511578063968fff541461052e5761032b565b80634327e9b9116102765780636cbee2301161021f5780637cb2b79c116101f95780637cb2b79c146104a05780637e109695146104c6578063896354bb146104ec5761032b565b80636cbee230146104735780636f90e89f14610490578063715018a6146104985761032b565b8063570ca73511610250578063570ca7351461045b5780636250c395146104635780636b3065201461046b5761032b565b80634327e9b9146104255780634390d2a81461042d57806355a68ed3146104355761032b565b80632a709b14116102d85780633f5885fc116102b25780633f5885fc1461040d57806342941ef91461041557806342cde4e81461041d5761032b565b80632a709b14146103cc578063392e53cd146103d45780633cfa4190146103f05761032b565b806319a1642b1161030957806319a1642b1461037a5780631db28a041461039e57806329605e77146103a65761032b565b8063160efaa61461033057806317793aa31461035857806318485e4e14610372575b600080fd5b6103566004803603602081101561034657600080fd5b50356001600160a01b0316610726565b005b610360610809565b60408051918252519081900360200190f35b61036061080f565b610382610815565b604080516001600160a01b039092168252519081900360200190f35b610360610824565b610356600480360360208110156103bc57600080fd5b50356001600160a01b031661082a565b610382610912565b6103dc610921565b604080519115158252519081900360200190f35b6103566004803603602081101561040657600080fd5b50356109c7565b610360610a4e565b610360610a54565b610360610a5a565b610356610a60565b610382610e53565b6103566004803603602081101561044b57600080fd5b50356001600160a01b0316610e62565b610382610f4c565b610360610f5b565b610360610f61565b6103566004803603602081101561048957600080fd5b5035610f67565b610360610fee565b610356610ff4565b610356600480360360208110156104b657600080fd5b50356001600160a01b03166110ca565b610360600480360360208110156104dc57600080fd5b50356001600160a01b03166111ad565b6103566004803603602081101561050257600080fd5b503561164a565b6103826116d1565b6103566004803603602081101561052757600080fd5b50356116e0565b610382611767565b6103dc611776565b61038261177f565b61038261178e565b6103566004803603602081101561056457600080fd5b50356117a2565b6103566004803603602081101561058157600080fd5b50356001600160a01b0316611829565b610356600480360360208110156105a757600080fd5b503561190c565b610356600480360360208110156105c457600080fd5b50356001600160a01b0316611993565b610356600480360360208110156105ea57600080fd5b5035611a76565b610360611afc565b610382611b20565b610360611b2f565b6103566004803603602081101561061f57600080fd5b50356001600160a01b0316611b35565b610360611c18565b6103566004803603602081101561064d57600080fd5b50356001600160a01b0316611c3c565b6103566004803603602081101561067357600080fd5b5035611d1f565b6103566004803603602081101561069057600080fd5b5035611dd5565b610360611e5c565b610356600480360360208110156106b557600080fd5b5035611e62565b610356600480360360208110156106d257600080fd5b50351515611ee9565b610360611f9a565b610356600480360360208110156106f957600080fd5b50356001600160a01b0316611fa0565b6103566004803603602081101561071f57600080fd5b50356120cd565b61072e612154565b6001600160a01b031661073f6116d1565b6001600160a01b03161461079a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600880546001600160a01b0383167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155604080519182525133917f8101b64a9533cf7e857135a4fd1cf7859548214b5624ad94c8347e32a7089148919081900360200190a250565b60045481565b60125481565b6007546001600160a01b031681565b60105481565b610832612154565b6001600160a01b03166108436116d1565b6001600160a01b03161461089e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6002546040516001600160a01b038084169216907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed90600090a3600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600a546001600160a01b031681565b600a546000906001600160a01b03161580159061094857506005546001600160a01b031615155b801561095e57506006546001600160a01b031615155b801561097457506009546001600160a01b031615155b801561098a57506007546001600160a01b031615155b801561099857506000600f54115b80156109a657506000600e54115b80156109b457506064600b54115b80156109c257506064600d54115b905090565b6002546001600160a01b03163314610a105760405162461bcd60e51b8152600401808060200182810382526022815260200180612ca86022913960400191505060405180910390fd5b601281905560408051828152905133917fbeee563ed378ce7ac02ecb3d0659ee8c9b615409788a39f19897642765d987e8919081900360200190a250565b60035481565b600f5481565b600b5481565b60026000541415610ab8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600055610ac5610921565b610b16576040805162461bcd60e51b815260206004820181905260248201527f456d697373696f6e4d616e616765723a206e6f7420696e697469616c697a6564604482015290519081900360640190fd5b600060045442039050600354811015610b605760405162461bcd60e51b815260040180806020018281038252602d815260200180612c5a602d913960400191505060405180910390fd5b7f0000000000000000000000000000000000000000000000000000000067adefa5421015610bd5576040805162461bcd60e51b815260206004820152601e60248201527f54696d65626f756e6461626c653a204e6f742073746172746564207965740000604482015290519081900360640190fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff421115610c4a576040805162461bcd60e51b815260206004820152601f60248201527f54696d65626f756e6461626c653a20416c72656164792066696e697368656400604482015290519081900360640190fd5b60135460ff1615610c8c5760405162461bcd60e51b8152600401808060200182810382526023815260200180612c116023913960400191505060405180910390fd5b600a54604080517f6ff97f1d00000000000000000000000000000000000000000000000000000000815290516060926001600160a01b031691636ff97f1d916004808301926000929190829003018186803b158015610cea57600080fd5b505afa158015610cfe573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526020811015610d4557600080fd5b8101908080516040519392919084640100000000821115610d6557600080fd5b908301906020820185811115610d7a57600080fd5b8251866020820283011164010000000082111715610d9757600080fd5b82525081516020918201928201910280838360005b83811015610dc4578181015183820152602001610dac565b50505050905001604052505050905060008090505b81518163ffffffff161015610e455760006001600160a01b0316828263ffffffff1681518110610e0557fe5b60200260200101516001600160a01b031614610e3d57610e3d828263ffffffff1681518110610e3057fe5b6020026020010151612158565b600101610dd9565b505042600455506001600055565b6006546001600160a01b031681565b610e6a612154565b6001600160a01b0316610e7b6116d1565b6001600160a01b031614610ed6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b601380546001600160a01b03831661010081027fffffffffffffffffffffff0000000000000000000000000000000000000000ff90921691909117909155604080519182525133917f5b7c0beaac72a17ee6d24d9716571be20b5742dd80027803f960fd5a532706a0919081900360200190a250565b6002546001600160a01b031681565b600c5481565b60145481565b6002546001600160a01b03163314610fb05760405162461bcd60e51b8152600401808060200182810382526022815260200180612ca86022913960400191505060405180910390fd5b601481905560408051828152905133917fe980649ba665b23dc3c5508fe82000a8e35134ece8dec5e1d0f312eaad4ca880919081900360200190a250565b60155481565b610ffc612154565b6001600160a01b031661100d6116d1565b6001600160a01b031614611068576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6110d2612154565b6001600160a01b03166110e36116d1565b6001600160a01b03161461113e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600a80546001600160a01b0383167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155604080519182525133917f30056c869cb7bd9a119bb04d42d06154eabdc05e93d07c802fac1180b51581ab919081900360200190a250565b60006111b7610921565b611208576040805162461bcd60e51b815260206004820181905260248201527f456d697373696f6e4d616e616765723a206e6f7420696e697469616c697a6564604482015290519081900360640190fd5b600a54604080517f3d7726560000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015291516000939290921691633d77265691602480820192602092909190829003018186803b15801561127257600080fd5b505afa158015611286573d6000803e3d6000fd5b505050506040513d602081101561129c57600080fd5b5051600a54604080517fc2d8da720000000000000000000000000000000000000000000000000000000081526001600160a01b0387811660048301529151939450600093919092169163c2d8da72916024808301926020929190829003018186803b15801561130a57600080fd5b505afa15801561131e573d6000803e3d6000fd5b505050506040513d602081101561133457600080fd5b5051600c54909150158015906113e15750600c54600554604080517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b039283166004820152905192850292918716916370a0823191602480820192602092909190829003018186803b1580156113b257600080fd5b505afa1580156113c6573d6000803e3d6000fd5b505050506040513d60208110156113dc57600080fd5b505110155b156113f157600092505050611645565b600a54604080517fc943d3b40000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152602482018690529151600093929092169163c943d3b491604480820192602092909190829003018186803b15801561146257600080fd5b505afa158015611476573d6000803e3d6000fd5b505050506040513d602081101561148c57600080fd5b5051600b549091506000906114ba906064906114ae908663ffffffff612acf16565b9063ffffffff612b3116565b600a54604080517f2fb3905a0000000000000000000000000000000000000000000000000000000081526001600160a01b038a811660048301526024820189905291519394506000939190921691632fb3905a91604480830192602092919082900301818787803b15801561152e57600080fd5b505af1158015611542573d6000803e3d6000fd5b505050506040513d602081101561155857600080fd5b505190508183101561157257600095505050505050611645565b8181101561158857600095505050505050611645565b60006115a460646114ae87600d54612acf90919063ffffffff16565b90506115b08482612b98565b93508761163b866114ae6115ca888363ffffffff612bae16565b846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561160357600080fd5b505afa158015611617573d6000803e3d6000fd5b505050506040513d602081101561162d57600080fd5b50519063ffffffff612acf16565b9750505050505050505b919050565b6002546001600160a01b031633146116935760405162461bcd60e51b8152600401808060200182810382526022815260200180612ca86022913960400191505060405180910390fd5b601581905560408051828152905133917f1b0f4c553d5885be24b18dab9afb7a1f204f8cbcf1026279d94bc9a669885cec919081900360200190a250565b6001546001600160a01b031690565b6002546001600160a01b031633146117295760405162461bcd60e51b8152600401808060200182810382526022815260200180612ca86022913960400191505060405180910390fd5b600b81905560408051828152905133917fd3005e99e9685e065a46f77dad8a1a1d43354338c5eec3e7f4757beb17fee129919081900360200190a250565b6008546001600160a01b031681565b60135460ff1681565b6009546001600160a01b031681565b60135461010090046001600160a01b031681565b6002546001600160a01b031633146117eb5760405162461bcd60e51b8152600401808060200182810382526022815260200180612ca86022913960400191505060405180910390fd5b600e81905560408051828152905133917f1bea9736c359e1c629b577d89033b7e78cf7e7d211ab808a0ccd1213e198fc9f919081900360200190a250565b611831612154565b6001600160a01b03166118426116d1565b6001600160a01b03161461189d576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600680546001600160a01b0383167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155604080519182525133917ff87e12ba363db684b1b69a530d850a8a3f416932cd031e008ef71e42a1d88450919081900360200190a250565b6002546001600160a01b031633146119555760405162461bcd60e51b8152600401808060200182810382526022815260200180612ca86022913960400191505060405180910390fd5b600c81905560408051828152905133917f33a9fc48e3f1ae1243f5e2f5f70888e56d86564cfbb431acad30f7cbb46b08d9919081900360200190a250565b61199b612154565b6001600160a01b03166119ac6116d1565b6001600160a01b031614611a07576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600580546001600160a01b0383167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155604080519182525133917f9ad70e2ec47af816fa0a1bb1482bb0af841b95427fecd5ffb996bb74a4b33480919081900360200190a250565b6002546001600160a01b03163314611abf5760405162461bcd60e51b8152600401808060200182810382526022815260200180612ca86022913960400191505060405180910390fd5b601181905560408051828152905133917e51ec87024645e7281447969b015c808b454892da21f216260c95f5dc8dfa4f919081900360200190a250565b7f0000000000000000000000000000000000000000000000000000000067adefa581565b6005546001600160a01b031681565b600e5481565b611b3d612154565b6001600160a01b0316611b4e6116d1565b6001600160a01b031614611ba9576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600980546001600160a01b0383167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155604080519182525133917f072a2fbc0ab7237be102366342d58bf05a3c6657794ad23cc6a381e074e4c2f7919081900360200190a250565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81565b611c44612154565b6001600160a01b0316611c556116d1565b6001600160a01b031614611cb0576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600780546001600160a01b0383167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155604080519182525133917fe895c10f0f2704f6e8cdba0453884f96a1ab2eec954342ff157206489dfa1e9b919081900360200190a250565b611d27612154565b6001600160a01b0316611d386116d1565b6001600160a01b031614611d93576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611d9c81612c0b565b60408051828152905133917f4cb86392fa7bbfdeaa5c681b18bc13a90adc2fbc95d708f05568636026afd3f5919081900360200190a250565b6002546001600160a01b03163314611e1e5760405162461bcd60e51b8152600401808060200182810382526022815260200180612ca86022913960400191505060405180910390fd5b600f81905560408051828152905133917fe71c8abd80710c379097fa09e02d06c55c30289435eabc2a932f9584894f064b919081900360200190a250565b60115481565b6002546001600160a01b03163314611eab5760405162461bcd60e51b8152600401808060200182810382526022815260200180612ca86022913960400191505060405180910390fd5b600d81905560408051828152905133917f8333b7a4769ee99c913dd9d99bfae4911e8a8648893c51e8f49ec2bec9f7e073919081900360200190a250565b6002546001600160a01b03163314611f325760405162461bcd60e51b8152600401808060200182810382526022815260200180612ca86022913960400191505060405180910390fd5b601380548215157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009091168117909155604080519182525133917fc97b793b467d29cb2d1cbf38e7a255ad447cc51633930c7de54880d858c04fec919081900360200190a250565b600d5481565b611fa8612154565b6001600160a01b0316611fb96116d1565b6001600160a01b031614612014576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166120595760405162461bcd60e51b8152600401808060200182810382526026815260200180612c346026913960400191505060405180910390fd5b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6002546001600160a01b031633146121165760405162461bcd60e51b8152600401808060200182810382526022815260200180612ca86022913960400191505060405180910390fd5b601081905560408051828152905133917fccb00c42390cef9aa76d0ef7dc579d7e5f5bc976f9db82f6aab5dea8e8b35727919081900360200190a250565b3390565b6000612163826111ad565b9050806121705750612acc565b6040805182815290516001600160a01b038416917f9a9cdc6e37b9c0f9dd4dbcca66dddaefede3fd595da5e61202ef058dc5419370919081900360200190a2600e54600090158015906121cd57506006546001600160a01b031615155b156122bf576121ec60646114ae600e5485612acf90919063ffffffff16565b600a54600654604080517f2185261b0000000000000000000000000000000000000000000000000000000081526001600160a01b0388811660048301529283166024820152604481018590529051939450911691632185261b9160648082019260009290919082900301818387803b15801561226757600080fd5b505af115801561227b573d6000803e3d6000fd5b50506040805184815290516001600160a01b03871693507f942a2a88755e131aa4f508ee807f8d31188bbae8a43d7e04c67758f4ce7df80e92509081900360200190a25b60006122db60646114ae600f5486612acf90919063ffffffff16565b600a54600554604080517f2185261b0000000000000000000000000000000000000000000000000000000081526001600160a01b0389811660048301529283166024820152604481018590529051939450911691632185261b9160648082019260009290919082900301818387803b15801561235657600080fd5b505af115801561236a573d6000803e3d6000fd5b50506040805184815290516001600160a01b03881693507f627949e49911c088b2c1cd06ac71aa3101d8fceac04544c8c3abf0f1470fdbc892509081900360200190a260006014541180156123c157506000601554115b80156123dc575060135461010090046001600160a01b031615155b156126035760006123fd60646114ae60145487612acf90919063ffffffff16565b600a54604080517f2185261b0000000000000000000000000000000000000000000000000000000081526001600160a01b038981166004830152306024830152604482018590529151939450911691632185261b9160648082019260009290919082900301818387803b15801561247357600080fd5b505af1158015612487573d6000803e3d6000fd5b5050601354604080517f095ea7b30000000000000000000000000000000000000000000000000000000081526101009092046001600160a01b039081166004840152602483018690529051908916935063095ea7b3925060448083019260209291908290030181600087803b1580156124ff57600080fd5b505af1158015612513573d6000803e3d6000fd5b505050506040513d602081101561252957600080fd5b5050601354601554604080517fb42f60db0000000000000000000000000000000000000000000000000000000081526001600160a01b03898116600483015260248201869052604482019390935290516101009093049091169163b42f60db9160648082019260009290919082900301818387803b1580156125aa57600080fd5b505af11580156125be573d6000803e3d6000fd5b50506040805186815290516001600160a01b03891693507f2822dbd51836617b078ce2a37394b40fa1fb43e64fc5f45d713427457cb044e192509081900360200190a2505b600060125411801561261f57506008546001600160a01b031615155b1561279a57600061264060646114ae60125487612acf90919063ffffffff16565b600a54600854604080517f2185261b0000000000000000000000000000000000000000000000000000000081526001600160a01b038a811660048301529283166024820152604481018590529051939450911691632185261b9160648082019260009290919082900301818387803b1580156126bb57600080fd5b505af11580156126cf573d6000803e3d6000fd5b5050600854604080517f7357ff730000000000000000000000000000000000000000000000000000000081526001600160a01b038a81166004830152602482018790529151919092169350637357ff739250604480830192600092919082900301818387803b15801561274157600080fd5b505af1158015612755573d6000803e3d6000fd5b50506040805184815290516001600160a01b03891693507fb811c3d8d4e5ce0e77dfc165a0bf9c88c31fe9ebddca60f55d30b765802cb3db92509081900360200190a2505b60006010541180156127b657506007546001600160a01b031615155b156129315760006127d760646114ae60105487612acf90919063ffffffff16565b600a54600754604080517f2185261b0000000000000000000000000000000000000000000000000000000081526001600160a01b038a811660048301529283166024820152604481018590529051939450911691632185261b9160648082019260009290919082900301818387803b15801561285257600080fd5b505af1158015612866573d6000803e3d6000fd5b5050600754604080517f7357ff730000000000000000000000000000000000000000000000000000000081526001600160a01b038a81166004830152602482018790529151919092169350637357ff739250604480830192600092919082900301818387803b1580156128d857600080fd5b505af11580156128ec573d6000803e3d6000fd5b50506040805184815290516001600160a01b03891693507ffd0e86d483de13d180095f7ede5b7c53a84f35cdf25a4632275068580a6ea44a92509081900360200190a2505b600060115411801561294d57506009546001600160a01b031615155b15612ac857600061296e60646114ae60115487612acf90919063ffffffff16565b600a54600954604080517f2185261b0000000000000000000000000000000000000000000000000000000081526001600160a01b038a811660048301529283166024820152604481018590529051939450911691632185261b9160648082019260009290919082900301818387803b1580156129e957600080fd5b505af11580156129fd573d6000803e3d6000fd5b5050600954604080517f7357ff730000000000000000000000000000000000000000000000000000000081526001600160a01b038a81166004830152602482018790529151919092169350637357ff739250604480830192600092919082900301818387803b158015612a6f57600080fd5b505af1158015612a83573d6000803e3d6000fd5b50506040805184815290516001600160a01b03891693507f2b671fc52549f74a9e0694724398d939a2c803237848bc407ddc0646a484daae92509081900360200190a2505b5050505b50565b600082612ade57506000612b2b565b82820282848281612aeb57fe5b0414612b285760405162461bcd60e51b8152600401808060200182810382526021815260200180612c876021913960400191505060405180910390fd5b90505b92915050565b6000808211612b87576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381612b9057fe5b049392505050565b6000818310612ba75781612b28565b5090919050565b600082821115612c05576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60035556fe456d697373696f6e4d616e616765723a205265626173657320617265207061757365644f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734465626f756e6361626c653a20616c72656164792063616c6c656420696e20746869732074696d6520736c6f74536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f6e6c79206f70657261746f722063616e2063616c6c2074686973206d6574686f64a264697066735822122050f47441483a224b5049676370a83733c1876e69ada51a986ef8b66ad0f5dbe664736f6c63430006060033

Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.