ETH Price: $2,687.91 (-1.70%)
Gas: 0.78 Gwei

Contract

0x19a0a70a68fbC604Bf20A03b787df8f7AC1d50f0
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

Transaction Hash
Method
Block
From
To
Recover ERC20147710262022-05-14 2:17:32836 days ago1652494652IN
0x19a0a70a...7AC1d50f0
0 ETH0.0040469638.7781125
Get Yield145150262022-04-03 19:29:30876 days ago1649014170IN
0x19a0a70a...7AC1d50f0
0 ETH0.0052159944.868734
Get Yield140484172022-01-21 10:31:31948 days ago1642761091IN
0x19a0a70a...7AC1d50f0
0 ETH0.0177261881.55181129
Get Yield139500582022-01-06 5:41:21964 days ago1641447681IN
0x19a0a70a...7AC1d50f0
0 ETH0.02902835134.84438648
Checkpoint137967212021-12-13 12:07:23987 days ago1639397243IN
0x19a0a70a...7AC1d50f0
0 ETH0.0046535540.44463001
Nominate New Own...133665312021-10-06 16:35:311055 days ago1633538131IN
0x19a0a70a...7AC1d50f0
0 ETH0.00484997102.90420911
Recover ERC20129484592021-08-02 21:53:331120 days ago1627941213IN
0x19a0a70a...7AC1d50f0
0 ETH0.0042372945.00000145
Get Yield128872832021-07-24 5:58:251130 days ago1627106305IN
0x19a0a70a...7AC1d50f0
0 ETH0.001333510
Get Yield128757172021-07-22 10:52:421131 days ago1626951162IN
0x19a0a70a...7AC1d50f0
0 ETH0.0017219117
Get Yield126872982021-06-23 0:35:591161 days ago1624408559IN
0x19a0a70a...7AC1d50f0
0 ETH0.0041298519
Get Yield126386792021-06-15 11:05:031168 days ago1623755103IN
0x19a0a70a...7AC1d50f0
0 ETH0.0017915210
Get Yield126378322021-06-15 7:57:401168 days ago1623743860IN
0x19a0a70a...7AC1d50f0
0 ETH0.0026872815
Get Yield126378312021-06-15 7:56:591168 days ago1623743819IN
0x19a0a70a...7AC1d50f0
0 ETH0.00152415
Get Yield126336012021-06-14 16:19:231169 days ago1623687563IN
0x19a0a70a...7AC1d50f0
0 ETH0.005195429
Get Yield126335892021-06-14 16:16:571169 days ago1623687417IN
0x19a0a70a...7AC1d50f0
0 ETH0.005166527
Checkpoint126264972021-06-13 13:51:181170 days ago1623592278IN
0x19a0a70a...7AC1d50f0
0 ETH0.001490613
Get Yield126258112021-06-13 11:18:171170 days ago1623583097IN
0x19a0a70a...7AC1d50f0
0 ETH0.0018797310
Get Yield125936562021-06-08 11:41:231175 days ago1623152483IN
0x19a0a70a...7AC1d50f0
0 ETH0.0026872815
Get Yield125799672021-06-06 8:53:451177 days ago1622969625IN
0x19a0a70a...7AC1d50f0
0 ETH0.0024031312
Get Yield125554362021-06-02 13:49:271181 days ago1622641767IN
0x19a0a70a...7AC1d50f0
0 ETH0.0057328632
Get Yield125553882021-06-02 13:37:231181 days ago1622641043IN
0x19a0a70a...7AC1d50f0
0 ETH0.0089634343
Get Yield125539342021-06-02 8:28:491181 days ago1622622529IN
0x19a0a70a...7AC1d50f0
0 ETH0.0032231518
Get Yield125536202021-06-02 7:15:571182 days ago1622618157IN
0x19a0a70a...7AC1d50f0
0 ETH0.0034445518
Get Yield125478672021-06-01 9:53:051182 days ago1622541185IN
0x19a0a70a...7AC1d50f0
0 ETH0.0026872815
Get Yield125478582021-06-01 9:51:551182 days ago1622541115IN
0x19a0a70a...7AC1d50f0
0 ETH0.0026872815.00000134
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
veFXSYieldDistributor

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 100000 runs

Other Settings:
default evmVersion
File 1 of 11 : veFXSYieldDistributor.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.6;
pragma experimental ABIEncoderV2;

// ====================================================================
// |     ______                   _______                             |
// |    / _____________ __  __   / ____(_____  ____ _____  ________   |
// |   / /_  / ___/ __ `| |/_/  / /_  / / __ \/ __ `/ __ \/ ___/ _ \  |
// |  / __/ / /  / /_/ _>  <   / __/ / / / / / /_/ / / / / /__/  __/  |
// | /_/   /_/   \__,_/_/|_|  /_/   /_/_/ /_/\__,_/_/ /_/\___/\___/   |
// |                                                                  |
// ====================================================================
// =======================veFXSYieldDistributor========================
// ====================================================================
// Distributes Frax protocol yield based on the claimer's veFXS balance

// Frax Finance: https://github.com/FraxFinance

// Primary Author(s)
// Travis Moore: https://github.com/FortisFortuna

// Reviewer(s) / Contributor(s)
// Jason Huan: https://github.com/jasonhuan
// Sam Kazemian: https://github.com/samkazemian

// Originally inspired by Synthetixio, but heavily modified by the Frax team (veFXS portion)
// https://raw.githubusercontent.com/Synthetixio/synthetix/develop/contracts/StakingYield.sol

import "../Math/Math.sol";
import "../Math/SafeMath.sol";
import "../Curve/IveFXS.sol";
import "../ERC20/ERC20.sol";
import "../ERC20/SafeERC20.sol";
import "../Utils/ReentrancyGuard.sol";
import "./Owned.sol";

contract veFXSYieldDistributor is Owned, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for ERC20;

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

    // Instances
    IveFXS private veFXS;
    ERC20 public emittedToken;

    // Addresses
    address emitted_token_address;

    // Admin addresses
    address public owner_address;
    address public timelock_address;

    // Constant for price precision
    uint256 private constant PRICE_PRECISION = 1e6;

    // Yield and period related
    uint256 public periodFinish;
    uint256 public lastUpdateTime;
    uint256 public yieldRate;
    uint256 public yieldDuration = 604800; // 7 * 86400  (7 days)

    // Yield tracking
    uint256 public yieldPerVeFXSStored = 0;
    mapping(address => uint256) public userYieldPerTokenPaid;
    mapping(address => uint256) public yields;

    // veFXS tracking
    uint256 public totalVeFXSParticipating = 0;
    uint256 public totalVeFXSSupplyStored = 0;
    mapping(address => uint256) public userVeFXSCheckpointed;

    // Greylists
    mapping(address => bool) public greylist;

    // Admin booleans for emergencies
    bool public yieldCollectionPaused = false; // For emergencies


    /* ========== MODIFIERS ========== */

    modifier onlyByOwnerOrGovernance() {
        require(msg.sender == owner_address || msg.sender == timelock_address, "You are not the owner or the governance timelock");
        _;
    }

    modifier notYieldCollectionPaused() {
        require(yieldCollectionPaused == false,"Yield collection is paused");
        _;
    }

    modifier checkpointUser(address account) {
        _checkpointUser(account);
        _;
    }

    /* ========== CONSTRUCTOR ========== */

    constructor(
        address _owner,
        address _emittedToken,
        address _timelock_address,
        address _veFXS_address
    ) public Owned(_owner) {
        owner_address = _owner;
        emitted_token_address = _emittedToken;
        emittedToken = ERC20(_emittedToken);

        veFXS = IveFXS(_veFXS_address);
        lastUpdateTime = block.timestamp;
        timelock_address = _timelock_address;

        // 1 FXS a day at initialization
        yieldRate = (uint256(365e18)).div(365 * 86400);
    }

    /* ========== VIEWS ========== */

    function fractionParticipating() external view returns (uint256) {
        return totalVeFXSParticipating.mul(PRICE_PRECISION).div(totalVeFXSSupplyStored);
    }

    function lastTimeYieldApplicable() public view returns (uint256) {
        return Math.min(block.timestamp, periodFinish);
    }

    function yieldPerVeFXS() public view returns (uint256) {
        if (totalVeFXSSupplyStored == 0) {
            return yieldPerVeFXSStored;
        } else {
            return (
                yieldPerVeFXSStored.add(
                    lastTimeYieldApplicable()
                        .sub(lastUpdateTime)
                        .mul(yieldRate)
                        .mul(1e18)
                        .div(totalVeFXSSupplyStored)
                )
            );
        }
    }

    function earned(address account) public view returns (uint256) {
        uint256 yield0 = yieldPerVeFXS();
        return (
            userVeFXSCheckpointed[account]
                .mul(yield0.sub(userYieldPerTokenPaid[account]))
                .div(1e18)
                .add(yields[account])
        );
    }

    function getYieldForDuration() external view returns (uint256) {
        return (yieldRate.mul(yieldDuration));
    }

    /* ========== MUTATIVE FUNCTIONS ========== */

    function _checkpointUser(address account) internal {
        // Need to retro-adjust some things if the period hasn't been renewed, then start a new one
        sync();

        // Get the old and the new veFXS balances
        uint256 old_vefxs_balance = userVeFXSCheckpointed[account];
        uint256 new_vefxs_balance = veFXS.balanceOf(account);

        // Update the user's stored veFXS balance
        userVeFXSCheckpointed[account] = new_vefxs_balance;

        // Update the total amount participating
        if (new_vefxs_balance >= old_vefxs_balance) {
            uint256 weight_diff = new_vefxs_balance.sub(old_vefxs_balance);
            totalVeFXSParticipating = totalVeFXSParticipating.add(weight_diff);
        } else {
            uint256 weight_diff = old_vefxs_balance.sub(new_vefxs_balance);
            totalVeFXSParticipating = totalVeFXSParticipating.sub(weight_diff);
        }

        if (account != address(0)) {
            // Calculate the earnings
            uint256 earned0 = earned(account);
            yields[account] = earned0;
            userYieldPerTokenPaid[account] = yieldPerVeFXSStored;
        }
    }

    // Checkpoints the user
    function checkpoint() external {
        _checkpointUser(msg.sender);
    }

    function getYield() external nonReentrant notYieldCollectionPaused checkpointUser(msg.sender) {
        require(greylist[msg.sender] == false, "Address has been greylisted");

        uint256 yield0 = yields[msg.sender];
        if (yield0 > 0) {
            yields[msg.sender] = 0;
            emittedToken.transfer(msg.sender, yield0);
            emit YieldCollected(msg.sender, yield0, emitted_token_address);
        }
    }

    function renewIfApplicable() external {
        if (block.timestamp > periodFinish) {
            retroCatchUp();
        }

        // Update the total veFXS supply
        totalVeFXSSupplyStored = veFXS.totalSupply();
    }

    // If the period expired, renew it
    function retroCatchUp() internal {
        // Failsafe check
        require(block.timestamp > periodFinish, "Period has not expired yet!");

        // Ensure the provided yield amount is not more than the balance in the contract.
        // This keeps the yield rate in the right range, preventing overflows due to
        // very high values of yieldRate in the earned and yieldPerToken functions;
        // Yield + leftover must be less than 2^256 / 10^18 to avoid overflow.
        uint256 num_periods_elapsed = uint256(block.timestamp.sub(periodFinish)) / yieldDuration; // Floor division to the nearest period
        uint256 balance0 = emittedToken.balanceOf(address(this));
        require(yieldRate.mul(yieldDuration).mul(num_periods_elapsed + 1) <= balance0, "Not enough emittedToken available for yield distribution!");

        periodFinish = periodFinish.add((num_periods_elapsed.add(1)).mul(yieldDuration));

        uint256 yield0 = yieldPerVeFXS();
        yieldPerVeFXSStored = yield0;
        lastUpdateTime = lastTimeYieldApplicable();

        emit YieldPeriodRenewed(emitted_token_address);
    }

    function sync() public {
        // Update the total veFXS supply
        totalVeFXSSupplyStored = veFXS.totalSupply();

        if (block.timestamp > periodFinish) {
            retroCatchUp();
        } else {
            uint256 yield0 = yieldPerVeFXS();
            yieldPerVeFXSStored = yield0;
            lastUpdateTime = lastTimeYieldApplicable();
        }
    }

    /* ========== RESTRICTED FUNCTIONS ========== */

    // Added to support recovering LP Yield and other mistaken tokens from other systems to be distributed to holders
    function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyByOwnerOrGovernance {
        // Only the owner address can ever receive the recovery withdrawal
        ERC20(tokenAddress).transfer(owner_address, tokenAmount);
        emit RecoveredERC20(tokenAddress, tokenAmount);
    }

    function setYieldDuration(uint256 _yieldDuration) external onlyByOwnerOrGovernance {
        require(periodFinish == 0 || block.timestamp > periodFinish, "Previous yield period must be complete before changing the duration for the new period");
        yieldDuration = _yieldDuration;
        emit YieldDurationUpdated(yieldDuration);
    }

    function initializeDefault() external onlyByOwnerOrGovernance {
        lastUpdateTime = block.timestamp;
        periodFinish = block.timestamp.add(yieldDuration);
        totalVeFXSSupplyStored = veFXS.totalSupply();
        emit DefaultInitialization();
    }

    function greylistAddress(address _address) external onlyByOwnerOrGovernance {
        greylist[_address] = !(greylist[_address]);
    }

    function setPauses(bool _yieldCollectionPaused) external onlyByOwnerOrGovernance {
        yieldCollectionPaused = _yieldCollectionPaused;
    }

    function setYieldRate(uint256 _new_rate0, bool sync_too) external onlyByOwnerOrGovernance {
        yieldRate = _new_rate0;

        if (sync_too) {
            sync();
        }
    }

    function setOwner(address _owner_address) external onlyByOwnerOrGovernance {
        owner_address = _owner_address;
    }

    function setTimelock(address _new_timelock) external onlyByOwnerOrGovernance {
        timelock_address = _new_timelock;
    }

    /* ========== EVENTS ========== */

    event YieldCollected(address indexed user, uint256 yield, address token_address);
    event YieldDurationUpdated(uint256 newDuration);
    event RecoveredERC20(address token, uint256 amount);
    event YieldPeriodRenewed(address token);
    event DefaultInitialization();

    /* ========== A CHICKEN ========== */
    //
    //         ,~.
    //      ,-'__ `-,
    //     {,-'  `. }              ,')
    //    ,( a )   `-.__         ,',')~,
    //   <=.) (         `-.__,==' ' ' '}
    //     (   )                      /)
    //      `-'\   ,                    )
    //          |  \        `~.        /
    //          \   `._        \      /
    //           \     `._____,'    ,'
    //            `-.             ,'
    //               `-._     _,-'
    //                   77jj'
    //                  //_||
    //               __//--'/`
    //             ,--'/`  '
    //
    // [hjw] https://textart.io/art/vw6Sa3iwqIRGkZsN1BC2vweF/chicken
}

File 2 of 11 : Math.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;

/**
 * @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);
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint y) internal pure returns (uint z) {
        if (y > 3) {
            z = y;
            uint x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}

File 3 of 11 : SafeMath.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;

/**
 * @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, 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) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     *
     * _Available since v2.4.0._
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @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) {
        // 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 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts 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) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

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

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

File 4 of 11 : IveFXS.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;
pragma experimental ABIEncoderV2;

interface IveFXS {

    struct LockedBalance {
        int128 amount;
        uint256 end;
    }

    /* ========== VIEWS ========== */
    function balanceOf(address addr) external view returns (uint256);
    function balanceOf(address addr, uint256 _t) external view returns (uint256);
    function balanceOfAt(address addr, uint256 _block) external returns (uint256);
    function totalSupply() external view returns (uint256);
    function totalSupply(uint256 t) external view returns (uint256);
    function totalSupplyAt(uint256 _block) external returns (uint256);
    function totalFXSSupply() external view returns (uint256);
    function totalFXSSupplyAt(uint256 _block) external view returns (uint256);
    function locked(address addr) external view returns (LockedBalance memory);

    /* ========== PUBLIC FUNCTIONS ========== */
    function checkpoint() external;
}

File 5 of 11 : ERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;

import "../Common/Context.sol";
import "./IERC20.sol";
import "../Math/SafeMath.sol";
import "../Utils/Address.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 {ERC20Mintable}.
 *
 * 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 returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view 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 returns (uint8) {
        return _decimals;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view 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.approve(address spender, uint256 amount)
     */
    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 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);
    }


    /**
     * @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 is 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 Destroys `amount` tokens from `account`.`amount` is then deducted
     * from the caller's allowance.
     *
     * See {_burn} and {_approve}.
     */
    function _burnFrom(address account, uint256 amount) internal virtual {
        _burn(account, amount);
        _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance"));
    }

    /**
     * @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:using-hooks.adoc[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}

File 6 of 11 : SafeERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;

import "./IERC20.sol";
import "../Math/SafeMath.sol";
import "../Utils/Address.sol";

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

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

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

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

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

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

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

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

File 7 of 11 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;

/**
 * @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 8 of 11 : Owned.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;

// https://docs.synthetix.io/contracts/Owned
contract Owned {
    address public owner;
    address public nominatedOwner;

    constructor(address _owner) public {
        require(_owner != address(0), "Owner address cannot be 0");
        owner = _owner;
        emit OwnerChanged(address(0), _owner);
    }

    function nominateNewOwner(address _owner) external onlyOwner {
        nominatedOwner = _owner;
        emit OwnerNominated(_owner);
    }

    function acceptOwnership() external {
        require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership");
        emit OwnerChanged(owner, nominatedOwner);
        owner = nominatedOwner;
        nominatedOwner = address(0);
    }

    modifier onlyOwner {
        require(msg.sender == owner, "Only the contract owner may perform this action");
        _;
    }

    event OwnerNominated(address newOwner);
    event OwnerChanged(address oldOwner, address newOwner);
}

File 9 of 11 : Context.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;

/*
 * @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 payable(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 10 of 11 : IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;

import "../Common/Context.sol";
import "../Math/SafeMath.sol";

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
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 11 of 11 : Address.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11 <0.9.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_emittedToken","type":"address"},{"internalType":"address","name":"_timelock_address","type":"address"},{"internalType":"address","name":"_veFXS_address","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[],"name":"DefaultInitialization","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RecoveredERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"yield","type":"uint256"},{"indexed":false,"internalType":"address","name":"token_address","type":"address"}],"name":"YieldCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"YieldDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"YieldPeriodRenewed","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"checkpoint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emittedToken","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fractionParticipating","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getYield","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getYieldForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"greylist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"greylistAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initializeDefault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastTimeYieldApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","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":"owner_address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renewIfApplicable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner_address","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_yieldCollectionPaused","type":"bool"}],"name":"setPauses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_new_timelock","type":"address"}],"name":"setTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_yieldDuration","type":"uint256"}],"name":"setYieldDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_new_rate0","type":"uint256"},{"internalType":"bool","name":"sync_too","type":"bool"}],"name":"setYieldRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sync","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timelock_address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalVeFXSParticipating","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalVeFXSSupplyStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userVeFXSCheckpointed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userYieldPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"yieldCollectionPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"yieldDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"yieldPerVeFXS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"yieldPerVeFXSStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"yieldRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"yields","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405262093a80600b556000600c819055600f8190556010556013805460ff191690553480156200003157600080fd5b5060405162002123380380620021238339810160408190526200005491620002b3565b836001600160a01b038116620000b1576040805162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b038316908117825560408051928352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a1506001600255600680546001600160a01b03199081166001600160a01b038781169190911790925560058054821686841690811790915560048054831690911790556003805482168484161790554260095560078054909116918416919091179055620001906813c9647e25a99400006301e133806200019e602090811b6200138717901c565b600a55506200030f92505050565b6000620001e883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250620001ef60201b60201c565b9392505050565b600081836200027f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156200024357818101518382015260200162000229565b50505050905090810190601f168015620002715780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816200028c57fe5b0495945050505050565b80516001600160a01b0381168114620002ae57600080fd5b919050565b60008060008060808587031215620002c9578384fd5b620002d48562000296565b9350620002e46020860162000296565b9250620002f46040860162000296565b9150620003046060860162000296565b905092959194509250565b611e04806200031f6000396000f3fe608060405234801561001057600080fd5b506004361061025b5760003560e01c8063819abfcd11610145578063c2c4c5c1116100bd578063e9218ff61161008c578063fc939bb111610071578063fc939bb114610429578063fee2eae614610431578063fff6cae9146104395761025b565b8063e9218ff614610419578063ebe2b12b146104215761025b565b8063c2c4c5c1146103f9578063c8f33c9114610401578063dc6663c714610409578063e172cf21146104115761025b565b8063941d9f6511610114578063a875f472116100f9578063a875f472146103cb578063ad1148cb146103de578063bdacb303146103e65761025b565b8063941d9f65146103a5578063948e25a2146103b85761025b565b8063819abfcd1461036f5780638980f11f146103775780638da5cb5b1461038a57806391519bda146103925761025b565b806354e04d15116101d857806374ea0b98116101a75780637c2628711161018c5780637c2628711461035757806380a761d11461035f57806380edef8e146103675761025b565b806374ea0b981461033c57806379ba50971461034f5761025b565b806354e04d151461031c57806356d9fff3146103245780636869f42f1461032c5780636999ac93146103345761025b565b806319aec6d21161022f57806345ff83cb1161021457806345ff83cb146102e157806350fe98ac146102f457806353a47bb7146103075761025b565b806319aec6d2146102b957806331ca208c146102c15761025b565b80628cc2621461026057806313af4035146102895780631627540c1461029e578063169d27ef146102b1575b600080fd5b61027361026e3660046119fd565b610441565b6040516102809190611d0b565b60405180910390f35b61029c6102973660046119fd565b6104e3565b005b61029c6102ac3660046119fd565b6105a6565b61029c61068f565b6102736107e9565b6102d46102cf3660046119fd565b610808565b6040516102809190611b1e565b6102736102ef3660046119fd565b61081d565b6102736103023660046119fd565b61082f565b61030f610841565b6040516102809190611ad7565b61027361085d565b610273610863565b610273610871565b6102736108cc565b61029c61034a366004611a78565b6108d2565b61029c6109cb565b61029c610ae0565b610273610d17565b61030f610d1d565b610273610d39565b61029c610385366004611a17565b610d3f565b61030f610e9c565b61029c6103a0366004611aa8565b610eb8565b61029c6103b33660046119fd565b610f42565b61029c6103c6366004611a40565b611009565b6102736103d93660046119fd565b6110ad565b6102d46110bf565b61029c6103f43660046119fd565b6110c8565b61029c611182565b61027361118d565b61030f611193565b6102736111af565b61030f6111b5565b6102736111d1565b6102736111d7565b61029c6111f7565b61029c6112ae565b60008061044c610871565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600e6020908152604080832054600d909252909120549192506104da916104d490670de0b6b3a7640000906104ce906104a29087906113d2565b73ffffffffffffffffffffffffffffffffffffffff891660009081526011602052604090205490611414565b90611387565b90611487565b9150505b919050565b60065473ffffffffffffffffffffffffffffffffffffffff16331480610520575060075473ffffffffffffffffffffffffffffffffffffffff1633145b61055f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b97565b60405180910390fd5b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610616576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180611d7f602f913960400191505060405180910390fd5b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b60065473ffffffffffffffffffffffffffffffffffffffff163314806106cc575060075473ffffffffffffffffffffffffffffffffffffffff1633145b610702576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b97565b426009819055600b546107159190611487565b600855600354604080517f18160ddd000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff909216916318160ddd91600480820192602092909190829003018186803b15801561078357600080fd5b505afa158015610797573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107bb9190611a90565b6010556040517fb5cfe3ccd03847076864f081609024cbc2eb98c38da4d8b2cebe9479a9a1ef3790600090a1565b6000610802600b54600a5461141490919063ffffffff16565b90505b90565b60126020526000908152604090205460ff1681565b60116020526000908152604090205481565b600e6020526000908152604090205481565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b600c5481565b6000610802426008546114fb565b6000601054600014156108875750600c54610805565b6108c56108bc6010546104ce670de0b6b3a76400006108b6600a546108b66009546108b0610863565b906113d2565b90611414565b600c5490611487565b9050610805565b600a5481565b60065473ffffffffffffffffffffffffffffffffffffffff1633148061090f575060075473ffffffffffffffffffffffffffffffffffffffff1633145b610945576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b97565b6008541580610955575060085442115b61098b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611c88565b600b8190556040517fce653f06b9044b00e7d9d01b9b4228e84812092cb6a38371889bef19370d21f7906109c0908390611d0b565b60405180910390a150565b60015473ffffffffffffffffffffffffffffffffffffffff163314610a3b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526035815260200180611d4a6035913960400191505060405180910390fd5b6000546001546040805173ffffffffffffffffffffffffffffffffffffffff938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff841617909155169055565b600280541415610b5157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002805560135460ff1615610b92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b60565b33610b9c81611511565b3360009081526012602052604090205460ff1615610be6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611c51565b336000908152600e60205260409020548015610d0e57336000818152600e6020526040808220919091556004805491517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9092169263a9059cbb92610c6492869101611af8565b602060405180830381600087803b158015610c7e57600080fd5b505af1158015610c92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb69190611a5c565b5060055460405133917f3998039806f6db7e5d83a5371638cc47dd2e9ae500d5d561d95ec6381f53e3cd91610d0591859173ffffffffffffffffffffffffffffffffffffffff90911690611d14565b60405180910390a25b50506001600255565b60105481565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600f5481565b60065473ffffffffffffffffffffffffffffffffffffffff16331480610d7c575060075473ffffffffffffffffffffffffffffffffffffffff1633145b610db2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b97565b6006546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481169263a9059cbb92610e0c92909116908590600401611af8565b602060405180830381600087803b158015610e2657600080fd5b505af1158015610e3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5e9190611a5c565b507f55350610fe57096d8c0ffa30beede987326bccfcb0b4415804164d0dd50ce8b18282604051610e90929190611af8565b60405180910390a15050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60065473ffffffffffffffffffffffffffffffffffffffff16331480610ef5575060075473ffffffffffffffffffffffffffffffffffffffff1633145b610f2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b97565b600a8290558015610f3e57610f3e6112ae565b5050565b60065473ffffffffffffffffffffffffffffffffffffffff16331480610f7f575060075473ffffffffffffffffffffffffffffffffffffffff1633145b610fb5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b97565b73ffffffffffffffffffffffffffffffffffffffff16600090815260126020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff90911615179055565b60065473ffffffffffffffffffffffffffffffffffffffff16331480611046575060075473ffffffffffffffffffffffffffffffffffffffff1633145b61107c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b97565b601380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b600d6020526000908152604090205481565b60135460ff1681565b60065473ffffffffffffffffffffffffffffffffffffffff16331480611105575060075473ffffffffffffffffffffffffffffffffffffffff1633145b61113b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b97565b600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61118b33611511565b565b60095481565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b600b5481565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b60006108026010546104ce620f4240600f5461141490919063ffffffff16565b600854421115611209576112096116b1565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561127157600080fd5b505afa158015611285573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a99190611a90565b601055565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561131657600080fd5b505afa15801561132a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134e9190611a90565b601055600854421115611368576113636116b1565b61118b565b6000611372610871565b600c8190559050611381610863565b60095550565b60006113c983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506118a9565b90505b92915050565b60006113c983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611965565b600082611423575060006113cc565b8282028284828161143057fe5b04146113c9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611dae6021913960400191505060405180910390fd5b6000828201838110156113c957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600081831061150a57816113c9565b5090919050565b6115196112ae565b73ffffffffffffffffffffffffffffffffffffffff8082166000908152601160205260408082205460035491517f70a08231000000000000000000000000000000000000000000000000000000008152909391909116906370a0823190611584908690600401611ad7565b60206040518083038186803b15801561159c57600080fd5b505afa1580156115b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d49190611a90565b73ffffffffffffffffffffffffffffffffffffffff84166000908152601160205260409020819055905081811061162a57600061161182846113d2565b600f549091506116219082611487565b600f555061164b565b600061163683836113d2565b600f5490915061164690826113d2565b600f55505b73ffffffffffffffffffffffffffffffffffffffff8316156116ac57600061167284610441565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600e6020908152604080832093909355600c54600d90915291902055505b505050565b60085442116116ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b29565b6000600b54611706600854426113d290919063ffffffff16565b8161170d57fe5b600480546040517f70a0823100000000000000000000000000000000000000000000000000000000815293909204935060009273ffffffffffffffffffffffffffffffffffffffff909216916370a082319161176b91309101611ad7565b60206040518083038186803b15801561178357600080fd5b505afa158015611797573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117bb9190611a90565b9050806117dc836001016108b6600b54600a5461141490919063ffffffff16565b1115611814576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611bf4565b600b546118339061182a906108b6856001611487565b60085490611487565b6008556000611840610871565b600c819055905061184f610863565b6009556005546040517f06f0b9e4dd73c79369e3baecc8877fba4094cb477d9eff289470865c4bcc48329161189c9173ffffffffffffffffffffffffffffffffffffffff90911690611ad7565b60405180910390a1505050565b6000818361194f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119145781810151838201526020016118fc565b50505050905090810190601f1680156119415780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161195b57fe5b0495945050505050565b600081848411156119d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156119145781810151838201526020016118fc565b505050900390565b803573ffffffffffffffffffffffffffffffffffffffff811681146104de57600080fd5b600060208284031215611a0e578081fd5b6113c9826119d9565b60008060408385031215611a29578081fd5b611a32836119d9565b946020939093013593505050565b600060208284031215611a51578081fd5b81356113c981611d38565b600060208284031215611a6d578081fd5b81516113c981611d38565b600060208284031215611a89578081fd5b5035919050565b600060208284031215611aa1578081fd5b5051919050565b60008060408385031215611aba578182fd5b823591506020830135611acc81611d38565b809150509250929050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b6020808252601b908201527f506572696f6420686173206e6f74206578706972656420796574210000000000604082015260600190565b6020808252601a908201527f5969656c6420636f6c6c656374696f6e20697320706175736564000000000000604082015260600190565b60208082526030908201527f596f7520617265206e6f7420746865206f776e6572206f722074686520676f7660408201527f65726e616e63652074696d656c6f636b00000000000000000000000000000000606082015260800190565b60208082526039908201527f4e6f7420656e6f75676820656d6974746564546f6b656e20617661696c61626c60408201527f6520666f72207969656c6420646973747269627574696f6e2100000000000000606082015260800190565b6020808252601b908201527f4164647265737320686173206265656e20677265796c69737465640000000000604082015260600190565b60208082526056908201527f50726576696f7573207969656c6420706572696f64206d75737420626520636f60408201527f6d706c657465206265666f7265206368616e67696e672074686520647572617460608201527f696f6e20666f7220746865206e657720706572696f6400000000000000000000608082015260a00190565b90815260200190565b91825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b8015158114611d4657600080fd5b5056fe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e6572736869704f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220dad8d971d71f4606d9dcda05171252a6c89af4d31853ca6eb93d9ec2be04bfdc64736f6c63430007060033000000000000000000000000ff5b4bcbf765fe363269114e1c765229a29edefd0000000000000000000000003432b6a60d23ca0dfca7761b7ab56459d9c964d00000000000000000000000008412ebf45bac1b340bbe8f318b928c466c4e39ca000000000000000000000000c8418af6358ffdda74e09ca9cc3fe03ca6adc5b0

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061025b5760003560e01c8063819abfcd11610145578063c2c4c5c1116100bd578063e9218ff61161008c578063fc939bb111610071578063fc939bb114610429578063fee2eae614610431578063fff6cae9146104395761025b565b8063e9218ff614610419578063ebe2b12b146104215761025b565b8063c2c4c5c1146103f9578063c8f33c9114610401578063dc6663c714610409578063e172cf21146104115761025b565b8063941d9f6511610114578063a875f472116100f9578063a875f472146103cb578063ad1148cb146103de578063bdacb303146103e65761025b565b8063941d9f65146103a5578063948e25a2146103b85761025b565b8063819abfcd1461036f5780638980f11f146103775780638da5cb5b1461038a57806391519bda146103925761025b565b806354e04d15116101d857806374ea0b98116101a75780637c2628711161018c5780637c2628711461035757806380a761d11461035f57806380edef8e146103675761025b565b806374ea0b981461033c57806379ba50971461034f5761025b565b806354e04d151461031c57806356d9fff3146103245780636869f42f1461032c5780636999ac93146103345761025b565b806319aec6d21161022f57806345ff83cb1161021457806345ff83cb146102e157806350fe98ac146102f457806353a47bb7146103075761025b565b806319aec6d2146102b957806331ca208c146102c15761025b565b80628cc2621461026057806313af4035146102895780631627540c1461029e578063169d27ef146102b1575b600080fd5b61027361026e3660046119fd565b610441565b6040516102809190611d0b565b60405180910390f35b61029c6102973660046119fd565b6104e3565b005b61029c6102ac3660046119fd565b6105a6565b61029c61068f565b6102736107e9565b6102d46102cf3660046119fd565b610808565b6040516102809190611b1e565b6102736102ef3660046119fd565b61081d565b6102736103023660046119fd565b61082f565b61030f610841565b6040516102809190611ad7565b61027361085d565b610273610863565b610273610871565b6102736108cc565b61029c61034a366004611a78565b6108d2565b61029c6109cb565b61029c610ae0565b610273610d17565b61030f610d1d565b610273610d39565b61029c610385366004611a17565b610d3f565b61030f610e9c565b61029c6103a0366004611aa8565b610eb8565b61029c6103b33660046119fd565b610f42565b61029c6103c6366004611a40565b611009565b6102736103d93660046119fd565b6110ad565b6102d46110bf565b61029c6103f43660046119fd565b6110c8565b61029c611182565b61027361118d565b61030f611193565b6102736111af565b61030f6111b5565b6102736111d1565b6102736111d7565b61029c6111f7565b61029c6112ae565b60008061044c610871565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600e6020908152604080832054600d909252909120549192506104da916104d490670de0b6b3a7640000906104ce906104a29087906113d2565b73ffffffffffffffffffffffffffffffffffffffff891660009081526011602052604090205490611414565b90611387565b90611487565b9150505b919050565b60065473ffffffffffffffffffffffffffffffffffffffff16331480610520575060075473ffffffffffffffffffffffffffffffffffffffff1633145b61055f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b97565b60405180910390fd5b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610616576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180611d7f602f913960400191505060405180910390fd5b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b60065473ffffffffffffffffffffffffffffffffffffffff163314806106cc575060075473ffffffffffffffffffffffffffffffffffffffff1633145b610702576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b97565b426009819055600b546107159190611487565b600855600354604080517f18160ddd000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff909216916318160ddd91600480820192602092909190829003018186803b15801561078357600080fd5b505afa158015610797573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107bb9190611a90565b6010556040517fb5cfe3ccd03847076864f081609024cbc2eb98c38da4d8b2cebe9479a9a1ef3790600090a1565b6000610802600b54600a5461141490919063ffffffff16565b90505b90565b60126020526000908152604090205460ff1681565b60116020526000908152604090205481565b600e6020526000908152604090205481565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b600c5481565b6000610802426008546114fb565b6000601054600014156108875750600c54610805565b6108c56108bc6010546104ce670de0b6b3a76400006108b6600a546108b66009546108b0610863565b906113d2565b90611414565b600c5490611487565b9050610805565b600a5481565b60065473ffffffffffffffffffffffffffffffffffffffff1633148061090f575060075473ffffffffffffffffffffffffffffffffffffffff1633145b610945576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b97565b6008541580610955575060085442115b61098b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611c88565b600b8190556040517fce653f06b9044b00e7d9d01b9b4228e84812092cb6a38371889bef19370d21f7906109c0908390611d0b565b60405180910390a150565b60015473ffffffffffffffffffffffffffffffffffffffff163314610a3b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526035815260200180611d4a6035913960400191505060405180910390fd5b6000546001546040805173ffffffffffffffffffffffffffffffffffffffff938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff841617909155169055565b600280541415610b5157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002805560135460ff1615610b92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b60565b33610b9c81611511565b3360009081526012602052604090205460ff1615610be6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611c51565b336000908152600e60205260409020548015610d0e57336000818152600e6020526040808220919091556004805491517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9092169263a9059cbb92610c6492869101611af8565b602060405180830381600087803b158015610c7e57600080fd5b505af1158015610c92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb69190611a5c565b5060055460405133917f3998039806f6db7e5d83a5371638cc47dd2e9ae500d5d561d95ec6381f53e3cd91610d0591859173ffffffffffffffffffffffffffffffffffffffff90911690611d14565b60405180910390a25b50506001600255565b60105481565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b600f5481565b60065473ffffffffffffffffffffffffffffffffffffffff16331480610d7c575060075473ffffffffffffffffffffffffffffffffffffffff1633145b610db2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b97565b6006546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481169263a9059cbb92610e0c92909116908590600401611af8565b602060405180830381600087803b158015610e2657600080fd5b505af1158015610e3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5e9190611a5c565b507f55350610fe57096d8c0ffa30beede987326bccfcb0b4415804164d0dd50ce8b18282604051610e90929190611af8565b60405180910390a15050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60065473ffffffffffffffffffffffffffffffffffffffff16331480610ef5575060075473ffffffffffffffffffffffffffffffffffffffff1633145b610f2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b97565b600a8290558015610f3e57610f3e6112ae565b5050565b60065473ffffffffffffffffffffffffffffffffffffffff16331480610f7f575060075473ffffffffffffffffffffffffffffffffffffffff1633145b610fb5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b97565b73ffffffffffffffffffffffffffffffffffffffff16600090815260126020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff90911615179055565b60065473ffffffffffffffffffffffffffffffffffffffff16331480611046575060075473ffffffffffffffffffffffffffffffffffffffff1633145b61107c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b97565b601380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b600d6020526000908152604090205481565b60135460ff1681565b60065473ffffffffffffffffffffffffffffffffffffffff16331480611105575060075473ffffffffffffffffffffffffffffffffffffffff1633145b61113b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b97565b600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61118b33611511565b565b60095481565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b600b5481565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b60006108026010546104ce620f4240600f5461141490919063ffffffff16565b600854421115611209576112096116b1565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561127157600080fd5b505afa158015611285573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a99190611a90565b601055565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561131657600080fd5b505afa15801561132a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134e9190611a90565b601055600854421115611368576113636116b1565b61118b565b6000611372610871565b600c8190559050611381610863565b60095550565b60006113c983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506118a9565b90505b92915050565b60006113c983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611965565b600082611423575060006113cc565b8282028284828161143057fe5b04146113c9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611dae6021913960400191505060405180910390fd5b6000828201838110156113c957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600081831061150a57816113c9565b5090919050565b6115196112ae565b73ffffffffffffffffffffffffffffffffffffffff8082166000908152601160205260408082205460035491517f70a08231000000000000000000000000000000000000000000000000000000008152909391909116906370a0823190611584908690600401611ad7565b60206040518083038186803b15801561159c57600080fd5b505afa1580156115b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d49190611a90565b73ffffffffffffffffffffffffffffffffffffffff84166000908152601160205260409020819055905081811061162a57600061161182846113d2565b600f549091506116219082611487565b600f555061164b565b600061163683836113d2565b600f5490915061164690826113d2565b600f55505b73ffffffffffffffffffffffffffffffffffffffff8316156116ac57600061167284610441565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600e6020908152604080832093909355600c54600d90915291902055505b505050565b60085442116116ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611b29565b6000600b54611706600854426113d290919063ffffffff16565b8161170d57fe5b600480546040517f70a0823100000000000000000000000000000000000000000000000000000000815293909204935060009273ffffffffffffffffffffffffffffffffffffffff909216916370a082319161176b91309101611ad7565b60206040518083038186803b15801561178357600080fd5b505afa158015611797573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117bb9190611a90565b9050806117dc836001016108b6600b54600a5461141490919063ffffffff16565b1115611814576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055690611bf4565b600b546118339061182a906108b6856001611487565b60085490611487565b6008556000611840610871565b600c819055905061184f610863565b6009556005546040517f06f0b9e4dd73c79369e3baecc8877fba4094cb477d9eff289470865c4bcc48329161189c9173ffffffffffffffffffffffffffffffffffffffff90911690611ad7565b60405180910390a1505050565b6000818361194f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119145781810151838201526020016118fc565b50505050905090810190601f1680156119415780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161195b57fe5b0495945050505050565b600081848411156119d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156119145781810151838201526020016118fc565b505050900390565b803573ffffffffffffffffffffffffffffffffffffffff811681146104de57600080fd5b600060208284031215611a0e578081fd5b6113c9826119d9565b60008060408385031215611a29578081fd5b611a32836119d9565b946020939093013593505050565b600060208284031215611a51578081fd5b81356113c981611d38565b600060208284031215611a6d578081fd5b81516113c981611d38565b600060208284031215611a89578081fd5b5035919050565b600060208284031215611aa1578081fd5b5051919050565b60008060408385031215611aba578182fd5b823591506020830135611acc81611d38565b809150509250929050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b6020808252601b908201527f506572696f6420686173206e6f74206578706972656420796574210000000000604082015260600190565b6020808252601a908201527f5969656c6420636f6c6c656374696f6e20697320706175736564000000000000604082015260600190565b60208082526030908201527f596f7520617265206e6f7420746865206f776e6572206f722074686520676f7660408201527f65726e616e63652074696d656c6f636b00000000000000000000000000000000606082015260800190565b60208082526039908201527f4e6f7420656e6f75676820656d6974746564546f6b656e20617661696c61626c60408201527f6520666f72207969656c6420646973747269627574696f6e2100000000000000606082015260800190565b6020808252601b908201527f4164647265737320686173206265656e20677265796c69737465640000000000604082015260600190565b60208082526056908201527f50726576696f7573207969656c6420706572696f64206d75737420626520636f60408201527f6d706c657465206265666f7265206368616e67696e672074686520647572617460608201527f696f6e20666f7220746865206e657720706572696f6400000000000000000000608082015260a00190565b90815260200190565b91825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b8015158114611d4657600080fd5b5056fe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e6572736869704f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220dad8d971d71f4606d9dcda05171252a6c89af4d31853ca6eb93d9ec2be04bfdc64736f6c63430007060033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000ff5b4bcbf765fe363269114e1c765229a29edefd0000000000000000000000003432b6a60d23ca0dfca7761b7ab56459d9c964d00000000000000000000000008412ebf45bac1b340bbe8f318b928c466c4e39ca000000000000000000000000c8418af6358ffdda74e09ca9cc3fe03ca6adc5b0

-----Decoded View---------------
Arg [0] : _owner (address): 0xfF5B4BCbf765FE363269114e1c765229a29eDeFD
Arg [1] : _emittedToken (address): 0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0
Arg [2] : _timelock_address (address): 0x8412ebf45bAC1B340BbE8F318b928C466c4E39CA
Arg [3] : _veFXS_address (address): 0xc8418aF6358FFddA74e09Ca9CC3Fe03Ca6aDC5b0

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000ff5b4bcbf765fe363269114e1c765229a29edefd
Arg [1] : 0000000000000000000000003432b6a60d23ca0dfca7761b7ab56459d9c964d0
Arg [2] : 0000000000000000000000008412ebf45bac1b340bbe8f318b928c466c4e39ca
Arg [3] : 000000000000000000000000c8418af6358ffdda74e09ca9cc3fe03ca6adc5b0


Block Transaction Difficulty 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
Loading...
Loading
[ 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.