Contract 0x9Ec66B9409d4cD8D4a4C90950Ff0fd26bB39ad84

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x66a09a90d48dbf83e6beca9fc28bf890b78f45315026123c40bcb5d1041a69e4Withdraw432106072022-07-21 2:50:2377 days 4 hrs ago0xb7c67550c36c46b7bf7d42fd2fd311fc1ee2abb5 IN  Based Finance: Based Genesis Reward Pool0 FTM0.005301774284
0x87fbf03555ec3981de80533ed2b10e457cee65de6c86c9031d7ace25a5308aacWithdraw432105242022-07-21 2:47:4077 days 4 hrs ago0xb7c67550c36c46b7bf7d42fd2fd311fc1ee2abb5 IN  Based Finance: Based Genesis Reward Pool0 FTM0.002718271613
0xdd950b07153c3cbb151f48d1d9a173fff5a8deacc02438948a6322707bab23d9Withdraw432098352022-07-21 2:32:2477 days 4 hrs ago0xb7c67550c36c46b7bf7d42fd2fd311fc1ee2abb5 IN  Based Finance: Based Genesis Reward Pool0 FTM0.001026156719
0xce139bd5e0f03402d11643c2b5a946862277bb6f438c731f68c2cc140b53df52Withdraw421195542022-07-06 2:45:2492 days 4 hrs ago0x1d4e027c56f870c27c660c4a201735afb142b924 IN  Based Finance: Based Genesis Reward Pool0 FTM0.000216102437
0x08a886cef516e3c9bac756c90cdbe68c4a384604e24662203d0bc48fedb7f086Withdraw419495722022-07-03 22:30:4194 days 8 hrs ago0x6aae190e74dd06f4d7d35cd4ce6e20322bc835be IN  Based Finance: Based Genesis Reward Pool0 FTM0.0001726126
0xcbd4f224eed4fa9de2a44eabf29f7cf5b552cd7a1bb7a6c9f00fd35fffe8edc9Withdraw419494562022-07-03 22:28:3394 days 8 hrs ago0x6aae190e74dd06f4d7d35cd4ce6e20322bc835be IN  Based Finance: Based Genesis Reward Pool0 FTM0.000175406203
0x46ae8f06d28e0495e10386906abb5913d79cffb6ff96893956977fd5ea3a3b2dWithdraw419494102022-07-03 22:27:4294 days 8 hrs ago0x6aae190e74dd06f4d7d35cd4ce6e20322bc835be IN  Based Finance: Based Genesis Reward Pool0 FTM0.000175406203
0x230cf6a64bd4bc8d83a4c056ad4a30ffdaf4c79d7fe9e5cc69cfc3ff855618a7Withdraw419476212022-07-03 21:54:4694 days 8 hrs ago0x6aae190e74dd06f4d7d35cd4ce6e20322bc835be IN  Based Finance: Based Genesis Reward Pool0 FTM0.000190288874
0x51567084888e9ec14f9aa87f61e588d0c826ff065407572155a3986043c2cf6cWithdraw404358982022-06-13 15:44:12114 days 15 hrs ago0x76611a38d98aac57073f8f982e3691d868a2425a IN  Based Finance: Based Genesis Reward Pool0 FTM0.500805428489
0xdaf13e32d1700eddbcd5af48e9e32cb8cd4bc5f1ef39cc5dc0da1b37bb0a3578Withdraw400820432022-06-08 18:37:58119 days 12 hrs ago0x5bd279f0643a388e4a8a1470613f7ca8b3b48784 IN  Based Finance: Based Genesis Reward Pool0 FTM0.008681686168
0x31f870598b28b28751a3372e062327db8fe05b2de68bd4436ed58a6f4b9e6a6dWithdraw400208552022-06-07 22:40:44120 days 8 hrs ago0x5bd279f0643a388e4a8a1470613f7ca8b3b48784 IN  Based Finance: Based Genesis Reward Pool0 FTM0.001864745923
0x729c0c165bf817b2e9286988feebb6b9a84de72923c841c01b233320c911f772Withdraw400206842022-06-07 22:36:28120 days 8 hrs ago0x5bd279f0643a388e4a8a1470613f7ca8b3b48784 IN  Based Finance: Based Genesis Reward Pool0 FTM0.000648058241
0xa416ab93fabd5e95937ddc9aaae1374f38f7c25c3ef36a44076cbf3e4d683fb7Withdraw400194582022-06-07 22:12:45120 days 8 hrs ago0x65b2ca14fa487f32755c0bec3be741105a7967bc IN  Based Finance: Based Genesis Reward Pool0 FTM0.00066728458
0xe1f226d07d9a171ec6dc534032450e41ce73b9d92adfbbcefb81c02e8f4006c6Withdraw399332512022-06-06 18:37:16121 days 12 hrs ago0x65b2ca14fa487f32755c0bec3be741105a7967bc IN  Based Finance: Based Genesis Reward Pool0 FTM0.024612213131
0xd81cba938a5aeea7892bc0e74a41a32bdcc2c5cfd5c92aa837d70a2a2b907566Withdraw399324352022-06-06 18:19:27121 days 12 hrs ago0x65b2ca14fa487f32755c0bec3be741105a7967bc IN  Based Finance: Based Genesis Reward Pool0 FTM0.001029891927
0x4e10d204553d55f07be732dadcb1200b0f1192c8187ac8d5e3b45e3e4376aab6Withdraw390682682022-05-26 1:56:24133 days 4 hrs ago0x848035b48bd6e7df943d667dab6d060ceafbb319 IN  Based Finance: Based Genesis Reward Pool0 FTM0.001787847455
0x48e15b05f7b52ce49547f5dd1ed999441b817ad4f6b6d3fe3b2a4a1e7ae98772Withdraw390682422022-05-26 1:55:53133 days 4 hrs ago0x848035b48bd6e7df943d667dab6d060ceafbb319 IN  Based Finance: Based Genesis Reward Pool0 FTM0.001254362508
0xe848bdd39b7b7aeb90125c62be21b393112c873e4d4137d6c69899b818ab5f2cWithdraw385145022022-05-18 13:19:07140 days 17 hrs ago0x71c8be1f7319b364d9cdc447bcc4b60c025e54ee IN  Based Finance: Based Genesis Reward Pool0 FTM0.018648919067
0x280d6ba5e24a54b077e6f95d9cc46668a88fa43d9d1a1620a755f2e89ac5c1e1Emergency Withdr...380687292022-05-12 0:22:48147 days 6 hrs ago0x58e96dccbcc83667e0e0e2183cb5b19635d1c2a3 IN  Based Finance: Based Genesis Reward Pool0 FTM0.086717977587
0xa8458ca484fff055c58c2acc293409228d87d960291e5ffa370953a5e7e37666Emergency Withdr...380686972022-05-12 0:21:48147 days 6 hrs ago0x58e96dccbcc83667e0e0e2183cb5b19635d1c2a3 IN  Based Finance: Based Genesis Reward Pool0 FTM0.085224281463
0xcf66e66bd5c3a4d150e582ef7c4206903f6f9836d92dd08aa8ddada4f21ff8dfEmergency Withdr...380686942022-05-12 0:21:42147 days 6 hrs ago0x58e96dccbcc83667e0e0e2183cb5b19635d1c2a3 IN  Based Finance: Based Genesis Reward Pool0 FTM0.081287858743
0x7f4662e16be2656c33330c8ee0593c00143df020c5616ed7ff80fcb52c074af4Withdraw366937422022-04-22 10:33:19166 days 20 hrs ago0xfaf0de5e1756a4b8499ca05a4d0b58436f04c361 IN  Based Finance: Based Genesis Reward Pool0 FTM0.00788203742
0x38d0229950787441b2a98f4d2cf07b5d3d4e12515b9ace3f32b4f07627365fdeWithdraw361796222022-04-16 5:25:49173 days 1 hr ago0x0bb444a4489ad6af64156978b1185833ee1bfd8a IN  Based Finance: Based Genesis Reward Pool0 FTM0.006575953925
0x592d75ca898e133e2667f8238fb57c23a4e55da8c4a077626e17ee6114c1984bWithdraw350911032022-04-03 2:02:45186 days 4 hrs ago0x3754e00866c4d05bc7be8dd624a0dcab99600477 IN  Based Finance: Based Genesis Reward Pool0 FTM0.009634989336
0x88afeb7de720a96585eec071212a1b55c47cd6bfbd88edddb10b870df32a013eWithdraw346887392022-03-29 7:43:28190 days 23 hrs ago0x0d7a1626b63c506b6113ae3510dd56007b2c80f9 IN  Based Finance: Based Genesis Reward Pool0 FTM0.00947285584
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0xd090d1a384be1fdb1a43ea7c8b7f02855cbab612b533d803583714ae81b17dd7300982082022-02-05 18:34:11242 days 12 hrs ago Based Finance: Deployer  Contract Creation0 FTM
[ Download CSV Export 
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
BasedGenesisRewardPool

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 50 runs

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

pragma solidity ^0.8.0;

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

// Note that this pool has no minter key of BASED (rewards).
// Instead, the governance will call BASED distributeReward method and send reward to this pool at the beginning.
contract BasedGenesisRewardPool {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    // governance
    address public operator;

    // Info of each user.
    struct UserInfo {
        uint256 amount; // How many tokens the user has provided.
        uint256 rewardDebt; // Deposit debt. See explanation below.
    }

    // Info of each pool.
    struct PoolInfo {
        IERC20 token; // Address of LP token contract.
        uint256 allocPoint; // How many allocation points assigned to this pool. BASED to distribute.
        uint256 lastRewardTime; // Last time that BASED distribution occurs.
        uint256 accBasedPerShare; // Accumulated BASED per share, times 1e18. See below.
        bool isStarted; // if lastRewardBlock has passed
    }

    IERC20 public based;


    // Info of each pool.
    PoolInfo[] public poolInfo;

    // Info of each user that stakes tokens.
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;

    // Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;

    // The time when BASED mining starts.
    uint256 public poolStartTime;

    // The time when BASED mining ends.
    uint256 public poolEndTime;

    address public daoFundAddress;


    uint256 public basedPerSecond = 0.159143 ether; // 27500 BASED / (48h * 60min * 60s)
    uint256 public runningTime = 48 hours;
    uint256 public constant TOTAL_REWARDS = 27500 ether;


    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event RewardPaid(address indexed user, uint256 amount);

    constructor(
        address _based,
        address _daoFund,
        uint256 _poolStartTime
    ) {
        require(block.timestamp < _poolStartTime, "late");
        if (_based != address(0)) based = IERC20(_based);
        if (_daoFund != address(0)) daoFundAddress = _daoFund;

        poolStartTime = _poolStartTime;
        poolEndTime = poolStartTime + runningTime;
        operator = msg.sender;

    }

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

    function checkPoolDuplicate(IERC20 _token) internal view {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            require(poolInfo[pid].token != _token, "BasedGenesisPool: existing pool?");
        }
    }

    // Add a new pool. Can only be called by the owner.
    // @ _allocPoint - amount of based this pool will emit
    // @ _token - token that can be deposited into this pool
    function add(
        uint256 _allocPoint,
        IERC20 _token,
        bool _withUpdate,
        uint256 _lastRewardTime
    ) public onlyOperator {
        checkPoolDuplicate(_token);
        if (_withUpdate) {
            massUpdatePools();
        }
        if (block.timestamp < poolStartTime) {
            // chef is sleeping
            if (_lastRewardTime == 0) {
                _lastRewardTime = poolStartTime;
            } else {
                if (_lastRewardTime < poolStartTime) {
                    _lastRewardTime = poolStartTime;
                }
            }
        } else {
            // chef is cooking
            if (_lastRewardTime == 0 || _lastRewardTime < block.timestamp) {
                _lastRewardTime = block.timestamp;
            }
        }
        bool _isStarted =
        (_lastRewardTime <= poolStartTime) ||
        (_lastRewardTime <= block.timestamp);
        poolInfo.push(PoolInfo({
        token : _token,
        allocPoint : _allocPoint,
        lastRewardTime : _lastRewardTime,
        accBasedPerShare : 0,
        isStarted : _isStarted
        }));
        if (_isStarted) {
            totalAllocPoint = totalAllocPoint.add(_allocPoint);
        }
    }

    // Update the given pool's BASED allocation point. Can only be called by the owner.
    function set(uint256 _pid, uint256 _allocPoint) public onlyOperator {
        massUpdatePools();
        PoolInfo storage pool = poolInfo[_pid];
        if (pool.isStarted) {
            totalAllocPoint = totalAllocPoint.sub(pool.allocPoint).add(
                _allocPoint
            );
        }
        pool.allocPoint = _allocPoint;
    }

    // Return accumulate rewards over the given _from to _to block.
    function getGeneratedReward(uint256 _fromTime, uint256 _toTime) public view returns (uint256) {
        if (_fromTime >= _toTime) return 0;
        if (_toTime >= poolEndTime) {
            if (_fromTime >= poolEndTime) return 0;
            if (_fromTime <= poolStartTime) return poolEndTime.sub(poolStartTime).mul(basedPerSecond);
            return poolEndTime.sub(_fromTime).mul(basedPerSecond);
        } else {
            if (_toTime <= poolStartTime) return 0;
            if (_fromTime <= poolStartTime) return _toTime.sub(poolStartTime).mul(basedPerSecond);
            return _toTime.sub(_fromTime).mul(basedPerSecond);
        }
    }

    // View function to see pending BASED on frontend.
    function pendingBASED(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accBasedPerShare = pool.accBasedPerShare;
        uint256 tokenSupply = pool.token.balanceOf(address(this));
        if (block.timestamp > pool.lastRewardTime && tokenSupply != 0) {
            uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp);
            uint256 _basedReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint);
            accBasedPerShare = accBasedPerShare.add(_basedReward.mul(1e18).div(tokenSupply));
        }
        return user.amount.mul(accBasedPerShare).div(1e18).sub(user.rewardDebt);
    }

    // Update reward variables for all pools. Be careful of gas spending!
    function massUpdatePools() public {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            updatePool(pid);
        }
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.timestamp <= pool.lastRewardTime) {
            return;
        }
        uint256 tokenSupply = pool.token.balanceOf(address(this));
        if (tokenSupply == 0) {
            pool.lastRewardTime = block.timestamp;
            return;
        }
        if (!pool.isStarted) {
            pool.isStarted = true;
            totalAllocPoint = totalAllocPoint.add(pool.allocPoint);
        }
        if (totalAllocPoint > 0) {
            uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp);
            uint256 _basedReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint);
            pool.accBasedPerShare = pool.accBasedPerShare.add(_basedReward.mul(1e18).div(tokenSupply));
        }
        pool.lastRewardTime = block.timestamp;
    }

    // Deposit tokens.

    function deposit(uint256 _pid, uint256 _amount) public {
        address _sender = msg.sender;
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_sender];
        updatePool(_pid);
        if (user.amount > 0) {
            // transfer rewards to user if any pending rewards
            uint256 _pending = user.amount.mul(pool.accBasedPerShare).div(1e18).sub(user.rewardDebt);
            if (_pending > 0) {
                // send pending reward to user, if rewards accumulating in _pending
                safeBasedTransfer(_sender, _pending);
                emit RewardPaid(_sender, _pending);
            }
        }
        if (_amount > 0) {
            pool.token.safeTransferFrom(_sender, address(this), _amount);
            uint256 depositDebt = _amount.mul(50).div(10000);
            user.amount = user.amount.add(_amount.sub(depositDebt));
            pool.token.safeTransfer(daoFundAddress, depositDebt);
        }
        user.rewardDebt = user.amount.mul(pool.accBasedPerShare).div(1e18);
        emit Deposit(_sender, _pid, _amount);
    }

    // Withdraw tokens.
    function withdraw(uint256 _pid, uint256 _amount) public {
        address _sender = msg.sender;
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_sender];
        require(user.amount >= _amount, "withdraw: not good");
        updatePool(_pid);
        uint256 _pending = user.amount.mul(pool.accBasedPerShare).div(1e18).sub(user.rewardDebt);
        if (_pending > 0) {
            safeBasedTransfer(_sender, _pending);
            emit RewardPaid(_sender, _pending);
        }
        if (_amount > 0) {
            user.amount = user.amount.sub(_amount);
            pool.token.safeTransfer(_sender, _amount);

        }
        user.rewardDebt = user.amount.mul(pool.accBasedPerShare).div(1e18);
        emit Withdraw(_sender, _pid, _amount);
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        uint256 _amount = user.amount;
        user.amount = 0;
        user.rewardDebt = 0;
        pool.token.safeTransfer(msg.sender, _amount);
        emit EmergencyWithdraw(msg.sender, _pid, _amount);
    }

    // Safe BASED transfer function, in case if rounding error causes pool to not have enough BASEDs.
    function safeBasedTransfer(address _to, uint256 _amount) internal {
        uint256 _basedBalance = based.balanceOf(address(this));
        if (_basedBalance > 0) {
            if (_amount > _basedBalance) {
                based.safeTransfer(_to, _basedBalance);
            } else {
                based.safeTransfer(_to, _amount);
            }
        }
    }

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

    function governanceRecoverUnsupported(IERC20 _token, uint256 amount, address to) external onlyOperator {
        if (block.timestamp < poolEndTime + 3 days) {
            // do not allow to drain core token (BASED or lps) if less than 3 days after pool ends
            require(_token != based, "based");
            uint256 length = poolInfo.length;
            for (uint256 pid = 0; pid < length; ++pid) {
                PoolInfo storage pool = poolInfo[pid];
                require(_token != pool.token, "pool.token");
            }
        }
        _token.safeTransfer(to, amount);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 3 of 5 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

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

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

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

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

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

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

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

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

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

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

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

File 5 of 5 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

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

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

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

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

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

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_based","type":"address"},{"internalType":"address","name":"_daoFund","type":"address"},{"internalType":"uint256","name":"_poolStartTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"TOTAL_REWARDS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"},{"internalType":"uint256","name":"_lastRewardTime","type":"uint256"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"based","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"basedPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"daoFundAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromTime","type":"uint256"},{"internalType":"uint256","name":"_toTime","type":"uint256"}],"name":"getGeneratedReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"governanceRecoverUnsupported","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingBASED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardTime","type":"uint256"},{"internalType":"uint256","name":"accBasedPerShare","type":"uint256"},{"internalType":"bool","name":"isStarted","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"runningTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600060045567023563b71f7d70006008556202a3006009553480156200002957600080fd5b506040516200189f3803806200189f8339810160408190526200004c9162000136565b8042106200008f5760405162461bcd60e51b815260040162000086906020808252600490820152636c61746560e01b604082015260600190565b60405180910390fd5b6001600160a01b03831615620000bb57600180546001600160a01b0319166001600160a01b0385161790555b6001600160a01b03821615620000e757600780546001600160a01b0319166001600160a01b0384161790555b6005819055600954620000fb908262000177565b6006555050600080546001600160a01b03191633179055506200019e565b80516001600160a01b03811681146200013157600080fd5b919050565b6000806000606084860312156200014c57600080fd5b620001578462000119565b9250620001676020850162000119565b9150604084015190509250925092565b600082198211156200019957634e487b7160e01b600052601160045260246000fd5b500190565b6116f180620001ae6000396000f3fe608060405234801561001057600080fd5b50600436106101225760003560e01c8063570ca735116100a8578063570ca7351461022b5780635ab673b11461024b5780635f96dc111461025e578063630b5ba1146102675780636e271dd51461026f57806393f1a40b14610278578063943f013d146102bf57806396805e54146102c8578063ad9bd68f146102db578063b3ab15fb146102ee578063e2bbb1581461030157600080fd5b806309cf609114610127578063113507be1461014b5780631526fe2714610154578063176129781461019b57806317caf6f1146101ae5780631ab06ee5146101b7578063231f0c6a146101cc578063441a3e70146101df57806351eb05a6146101f25780635312ea8e1461020557806354575af414610218575b600080fd5b6101386905d2c72a2ac16a30000081565b6040519081526020015b60405180910390f35b61013860085481565b610167610162366004611437565b610314565b604080516001600160a01b03909616865260208601949094529284019190915260608301521515608082015260a001610142565b6101386101a9366004611469565b610362565b61013860045481565b6101ca6101c53660046114e1565b6104df565b005b6101386101da3660046114e1565b61057d565b6101ca6101ed3660046114e1565b61063c565b6101ca610200366004611437565b6107f2565b6101ca610213366004611437565b61095b565b6101ca6102263660046113f5565b6109fd565b60005461023e906001600160a01b031681565b604051610142919061151f565b60015461023e906001600160a01b031681565b61013860055481565b6101ca610b31565b61013860065481565b6102aa610286366004611469565b60036020908152600092835260408084209091529082529020805460019091015482565b60408051928352602083019190915201610142565b61013860095481565b6101ca6102d6366004611499565b610b5c565b60075461023e906001600160a01b031681565b6101ca6102fc3660046113bb565b610d3a565b6101ca61030f3660046114e1565b610d86565b6002818154811061032457600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b0390931694509092909160ff1685565b600080600284815481106103785761037861167f565b60009182526020808320878452600380835260408086206001600160a01b03808b1688529452808620600590950290920190810154815492516370a0823160e01b815291965093949291909116906370a08231906103da90309060040161151f565b60206040518083038186803b1580156103f257600080fd5b505afa158015610406573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061042a9190611450565b905083600201544211801561043e57508015155b156104a157600061045385600201544261057d565b9050600061047a600454610474886001015485610f3b90919063ffffffff16565b90610f4e565b905061049c6104958461047484670de0b6b3a7640000610f3b565b8590610f5a565b935050505b6104d283600101546104cc670de0b6b3a7640000610474868860000154610f3b90919063ffffffff16565b90610f66565b9450505050505b92915050565b6000546001600160a01b031633146105125760405162461bcd60e51b815260040161050990611566565b60405180910390fd5b61051a610b31565b60006002838154811061052f5761052f61167f565b60009182526020909120600590910201600481015490915060ff1615610576576105728261056c8360010154600454610f6690919063ffffffff16565b90610f5a565b6004555b6001015550565b600081831061058e575060006104d9565b60065482106105f65760065483106105a8575060006104d9565b60055483116105db576105d46008546105ce600554600654610f6690919063ffffffff16565b90610f3b565b90506104d9565b6105d46008546105ce85600654610f6690919063ffffffff16565b6005548211610607575060006104d9565b600554831161062b576105d46008546105ce60055485610f6690919063ffffffff16565b6008546105d4906105ce8486610f66565b60003390506000600284815481106106565761065661167f565b600091825260208083208784526003825260408085206001600160a01b038816865290925292208054600590920290920192508411156106cd5760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b6044820152606401610509565b6106d6856107f2565b600061070782600101546104cc670de0b6b3a764000061047487600301548760000154610f3b90919063ffffffff16565b9050801561075d576107198482610f72565b836001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04868260405161075491815260200190565b60405180910390a25b841561078757815461076f9086610f66565b82558254610787906001600160a01b0316858761102d565b600383015482546107a591670de0b6b3a76400009161047491610f3b565b600183015560405185815286906001600160a01b038616907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a3505050505050565b6000600282815481106108075761080761167f565b9060005260206000209060050201905080600201544211610826575050565b80546040516370a0823160e01b81526000916001600160a01b0316906370a082319061085690309060040161151f565b60206040518083038186803b15801561086e57600080fd5b505afa158015610882573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a69190611450565b9050806108b857504260029091015550565b600482015460ff166108e9576004808301805460ff1916600190811790915583015490546108e591610f5a565b6004555b6004541561095057600061090183600201544261057d565b90506000610922600454610474866001015485610f3b90919063ffffffff16565b905061094861093d8461047484670de0b6b3a7640000610f3b565b600386015490610f5a565b600385015550505b504260029091015550565b6000600282815481106109705761097061167f565b6000918252602080832085845260038252604080852033808752935284208054858255600182019590955560059093020180549094509192916109c0916001600160a01b0391909116908361102d565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a350505050565b6000546001600160a01b03163314610a275760405162461bcd60e51b815260040161050990611566565b600654610a37906203f4806115b2565b421015610b18576001546001600160a01b0384811691161415610a845760405162461bcd60e51b815260206004820152600560248201526418985cd95960da1b6044820152606401610509565b60025460005b81811015610b1557600060028281548110610aa757610aa761167f565b6000918252602090912060059091020180549091506001600160a01b0387811691161415610b045760405162461bcd60e51b815260206004820152600a6024820152693837b7b6173a37b5b2b760b11b6044820152606401610509565b50610b0e8161164e565b9050610a8a565b50505b610b2c6001600160a01b038416828461102d565b505050565b60025460005b81811015610b5857610b48816107f2565b610b518161164e565b9050610b37565b5050565b6000546001600160a01b03163314610b865760405162461bcd60e51b815260040161050990611566565b610b8f83611090565b8115610b9d57610b9d610b31565b600554421015610bc95780610bb55750600554610bdd565b600554811015610bc457506005545b610bdd565b801580610bd557504281105b15610bdd5750425b600060055482111580610bf05750428211155b6040805160a0810182526001600160a01b03878116825260208201898152928201868152600060608401818152861580156080870190815260028054600181018255945295517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace600590940293840180546001600160a01b031916919096161790945594517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf82015590517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad082015592517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad184015590517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2909201805460ff191692151592909217909155909150610d3357600454610d2f9086610f5a565b6004555b5050505050565b6000546001600160a01b03163314610d645760405162461bcd60e51b815260040161050990611566565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000339050600060028481548110610da057610da061167f565b600091825260208083208784526003825260408085206001600160a01b0388168652909252922060059091029091019150610dda856107f2565b805415610e6a576000610e1282600101546104cc670de0b6b3a764000061047487600301548760000154610f3b90919063ffffffff16565b90508015610e6857610e248482610f72565b836001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048682604051610e5f91815260200190565b60405180910390a25b505b8315610ed1578154610e87906001600160a01b0316843087611133565b6000610e9a612710610474876032610f3b565b9050610eb1610ea98683610f66565b835490610f5a565b82556007548354610ecf916001600160a01b0391821691168361102d565b505b60038201548154610eef91670de0b6b3a76400009161047491610f3b565b600182015560405184815285906001600160a01b038516907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a35050505050565b6000610f4782846115ec565b9392505050565b6000610f4782846115ca565b6000610f4782846115b2565b6000610f47828461160b565b6001546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610fa390309060040161151f565b60206040518083038186803b158015610fbb57600080fd5b505afa158015610fcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff39190611450565b90508015610b2c578082111561101a57600154610b2c906001600160a01b0316848361102d565b600154610b2c906001600160a01b031684845b6040516001600160a01b038316602482015260448101829052610b2c90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611171565b60025460005b81811015610b2c57826001600160a01b0316600282815481106110bb576110bb61167f565b60009182526020909120600590910201546001600160a01b031614156111235760405162461bcd60e51b815260206004820181905260248201527f426173656447656e65736973506f6f6c3a206578697374696e6720706f6f6c3f6044820152606401610509565b61112c8161164e565b9050611096565b6040516001600160a01b038085166024830152831660448201526064810182905261116b9085906323b872dd60e01b90608401611059565b50505050565b60006111c6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112439092919063ffffffff16565b805190915015610b2c57808060200190518101906111e491906113d8565b610b2c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610509565b6060611252848460008561125a565b949350505050565b6060824710156112bb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610509565b843b6113095760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610509565b600080866001600160a01b031685876040516113259190611503565b60006040518083038185875af1925050503d8060008114611362576040519150601f19603f3d011682016040523d82523d6000602084013e611367565b606091505b5091509150611377828286611382565b979650505050505050565b60608315611391575081610f47565b8251156113a15782518084602001fd5b8160405162461bcd60e51b81526004016105099190611533565b6000602082840312156113cd57600080fd5b8135610f4781611695565b6000602082840312156113ea57600080fd5b8151610f47816116ad565b60008060006060848603121561140a57600080fd5b833561141581611695565b925060208401359150604084013561142c81611695565b809150509250925092565b60006020828403121561144957600080fd5b5035919050565b60006020828403121561146257600080fd5b5051919050565b6000806040838503121561147c57600080fd5b82359150602083013561148e81611695565b809150509250929050565b600080600080608085870312156114af57600080fd5b8435935060208501356114c181611695565b925060408501356114d1816116ad565b9396929550929360600135925050565b600080604083850312156114f457600080fd5b50508035926020909101359150565b60008251611515818460208701611622565b9190910192915050565b6001600160a01b0391909116815260200190565b6020815260008251806020840152611552816040850160208701611622565b601f01601f19169190910160400192915050565b6020808252602c908201527f426173656447656e65736973506f6f6c3a2063616c6c6572206973206e6f742060408201526b3a34329037b832b930ba37b960a11b606082015260800190565b600082198211156115c5576115c5611669565b500190565b6000826115e757634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561160657611606611669565b500290565b60008282101561161d5761161d611669565b500390565b60005b8381101561163d578181015183820152602001611625565b8381111561116b5750506000910152565b600060001982141561166257611662611669565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b03811681146116aa57600080fd5b50565b80151581146116aa57600080fdfea2646970667358221220cab85bef1bf930b810cf3f49906c57a99e355e31a68d1ce164694b227657c0c964736f6c634300080700330000000000000000000000008d7d3409881b51466b483b11ea1b8a03cded89ae000000000000000000000000a0e0f462d66de459711bc721ce1fdcc3d94058310000000000000000000000000000000000000000000000000000000061ff0f80

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

0000000000000000000000008d7d3409881b51466b483b11ea1b8a03cded89ae000000000000000000000000a0e0f462d66de459711bc721ce1fdcc3d94058310000000000000000000000000000000000000000000000000000000061ff0f80

-----Decoded View---------------
Arg [0] : _based (address): 0x8d7d3409881b51466b483b11ea1b8a03cded89ae
Arg [1] : _daoFund (address): 0xa0e0f462d66de459711bc721ce1fdcc3d9405831
Arg [2] : _poolStartTime (uint256): 1644105600

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000008d7d3409881b51466b483b11ea1b8a03cded89ae
Arg [1] : 000000000000000000000000a0e0f462d66de459711bc721ce1fdcc3d9405831
Arg [2] : 0000000000000000000000000000000000000000000000000000000061ff0f80


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

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

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