Contract 0x20aa24369659249f8d65faae175f240740f9754d

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x18449d2b5e7362802c40bdd2a8db176a55154d25ed18dacf6e60ddcab0552444Deposit422286432022-07-07 12:29:324 hrs 42 mins ago0x6ee388feedb55785987ef8cc0760b57f491efd66 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.001151884108
0x5615cf8637a83e51ac561fcbf37f3f7a33b968bf37dce57e6f4d760fa068910bDeposit422175832022-07-07 9:14:217 hrs 58 mins ago0x72d59fa86133d75e5e7c4f32aa90516bdbd605a1 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.001107448362
0x4607646aa54dbb0d4e1cdfd1071a8cf22ea10a4926f1711bd2650530d0419a7dDeposit421203092022-07-06 3:00:371 day 14 hrs ago0x72d59fa86133d75e5e7c4f32aa90516bdbd605a1 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.000492971851
0x3460c6a8c24705791b1e1352f7737158295e71563211fbfd2e4468bad73be875Deposit421172212022-07-06 2:02:461 day 15 hrs ago0x00ea67d1e6cab97994e75c800bc65bf632598802 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.001302903136
0x3e0fe4465c29833ff2295903da86869f34a95e70f01ea46a79d4d1e17b0a9093Deposit421118692022-07-06 0:20:131 day 16 hrs ago0x72d59fa86133d75e5e7c4f32aa90516bdbd605a1 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.000503227371
0xf13697834cb61aea10c50943233c2797e407954f812e98242ed3488f7f0d6014Deposit421109442022-07-06 0:03:181 day 17 hrs ago0x72d59fa86133d75e5e7c4f32aa90516bdbd605a1 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.000511222381
0x9598a08d163747673c850ff77bbf50646d173d4d37525ae8aae733e3766f3605Deposit421091542022-07-05 23:30:061 day 17 hrs ago0x360f8dab09ccd7090cc67220443a12bcab41d824 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.000507142813
0xd14dfdb36e17d249feb9a118d0311c020ca5b31e70175bffce41e89c787cb9a8Deposit421043522022-07-05 22:01:431 day 19 hrs ago0xd8bc5000aca451b2f1af14449d849449cef93073 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.002711249702
0x63cd9585ad9e652d5ea7dbb3fb81fc8d11c0ced00c02a38a8e4bd2ed46284510Deposit421041562022-07-05 21:57:581 day 19 hrs ago0xd8bc5000aca451b2f1af14449d849449cef93073 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.00059775191
0xe1702ae09837bd0b7c3f7bcdc270ccaa2a8ccf9c05824aad61558a8a666e9b72Deposit421040502022-07-05 21:56:121 day 19 hrs ago0xd8bc5000aca451b2f1af14449d849449cef93073 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.001354769382
0xd0cadceed9df02a4d1218803a8d638679ab4110fe80ccd85bf96c1f92cb60a2aProcess Rewards420786212022-07-05 14:02:372 days 3 hrs agoTarot: Deployer IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.002648145
0x819eadfec7a7037d8457ae7ec551ca26f3ed956ca8d6d2910f279caa9ed94ca1Deposit419609732022-07-04 1:54:533 days 15 hrs ago0xdbcca572f5a5d5a43f08c75258151bb45da412bd IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.001132337251
0x8a6b1834877a8ece172be44d54a20bb78282c203825f7be304c854c771f9cf86Deposit419408032022-07-03 19:35:003 days 21 hrs ago0x7c9457a775015eee6e098cb1a4ba6cf9b0fdf3c0 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.00047681
0x5888fc285ba8d9f701b9b445061bc8be9432789390b4837eae32d792fb92a057Deposit419256222022-07-03 15:08:234 days 2 hrs ago0x27ec0fcf5bf0899104c0dda55d511280a91c1f32 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.0004339625
0x9e6ab2d0c9706d78a9b8281d9f729802b063ea15ab2062253f524d263b9fce48Deposit418480312022-07-02 15:25:595 days 1 hr ago0x37fa02e7c49b9f7097c0d28e7053c1d632caa795 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.001648302638
0x23f11038e4b1df47d6d05b3e9213da8e983cca4216524d30251450f22556496fDeposit418185342022-07-02 6:18:555 days 10 hrs ago0x89cb28bbe20e4b78830e7f6bf33c1e03b65fd5fa IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.001119810643
0x8d71f342bef82b104c86e429c805d014762d0f8c9641c9931702e9d3bb95088cDeposit415760992022-06-29 0:31:498 days 16 hrs ago0x8a886736b133d113ba706c79dbab68cca0ed1709 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.001866866019
0x44f559de814be5c652e2e2d39b65e31d77b8e06ce41d8561c17c92cb5ea93f90Process Rewards415527042022-06-28 17:15:398 days 23 hrs agoTarot: Deployer IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.14046075
0xd20e39257ce4af3c82c7603591b15aefc043482761d9fcae954128314556b7a2Deposit415260442022-06-28 9:05:359 days 8 hrs ago0x3d6991085ab1ae3926cb96f25684c40a364b6856 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.001304693305
0x7bfb2323521feec686b4ab26e3870c8a6d24b2731ad6916f787861f15991481bDeposit415002372022-06-28 0:59:039 days 16 hrs ago0x280031caaecc9abd565cbe58a0ffc32e15e2eec2 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.001330315091
0x062844985586809d6e08c112edfe08b5ab851a00abcdc75ecc90395a00979239Deposit414822012022-06-27 19:35:509 days 21 hrs ago0x85200b0d9720725ea4c690b85273cbcb27a76180 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.003541070018
0xb899519b379d886f99c659fbf702f66af2b648699e9100fab6d1b8ad87d4f3f0Deposit414704722022-06-27 15:50:4710 days 1 hr ago0x5da68351bd082abda73e42ac981db51d9364fe69 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.394774429493
0x0ee8b9a7c54d2be270cf012972fe1d180615dc8ebbb093e1ecf4ddcfca7eff66Deposit414550342022-06-27 10:48:3710 days 6 hrs ago0x0b997e226b63fded87673bc8b43ba24477b8147a IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.001107757369
0xca1bc130576b3dc44053c243bce607f831cdb45f3b4a3c2302f8e9d5f95aedcdDeposit414458182022-06-27 8:02:1210 days 9 hrs ago0x8a9d159bc3e61c683c71da9b72bc9f60a20a44d2 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.001102376953
0x9154b66b3540f01e0483555a8962a2cb5fe77ac75494d9719f0042b775e5b6a1Deposit414406292022-06-27 6:32:0210 days 10 hrs ago0x8a9d159bc3e61c683c71da9b72bc9f60a20a44d2 IN  0x20aa24369659249f8d65faae175f240740f9754d0 FTM0.001160618119
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x1fb5f81686edd1ec2a3653d509c138f55962a12e9c482b303740b655dd8faedc358884832022-04-12 15:57:0886 days 1 hr ago Tarot: Deployer  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GaugeVaultProxyManager

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 16 : GaugeVaultProxyManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/IGaugeVaultProxy.sol";
import "./interfaces/ITokenDistributor.sol";
import "./interfaces/IWrappedVotingEscrowToken.sol";
import "./interfaces/IOptiSwap.sol";
import "./interfaces/IVeToken.sol";

interface OptiSwapPair {
    function swap(
        uint amount0Out,
        uint amount1Out,
        address to,
        bytes calldata data
    ) external;
}

contract GaugeVaultProxyManager is Ownable {
    using SafeERC20 for IERC20;

    address public rewardToken;
    address public votingEscrowToken;
    address public wrappedVotingEscrowToken;
    address public gaugeVaultProxy;
    address public tokenDistributor;
    address public optiSwap;
    address public manager;
    bool public initialized;

    constructor(
        address _rewardToken,
        address _votingEscrowToken,
        address _wrappedVotingEscrowToken,
        address _gaugeVaultProxy,
        address _tokenDistributor,
        address _optiSwap
    ) {
        rewardToken = _rewardToken;
        votingEscrowToken = _votingEscrowToken;
        wrappedVotingEscrowToken = _wrappedVotingEscrowToken;
        gaugeVaultProxy = _gaugeVaultProxy;
        tokenDistributor = _tokenDistributor;
        optiSwap = _optiSwap;
    }

    function initialize() external onlyOwner {
      require(!initialized, "GaugeVaultProxyManager: ALREADY_INITIALIZED");
      (uint256 lockedAmount, ) = IVeToken(votingEscrowToken).locked(gaugeVaultProxy);
      IWrappedVotingEscrowToken(wrappedVotingEscrowToken).mint(msg.sender, lockedAmount);
      initialized = true;
    }

    function updateOptiSwap(address _optiSwap) external onlyOwner {
        optiSwap = _optiSwap;
    }

    function updateManager(address _manager) external onlyOwner {
        manager = _manager;
    }

    function deposit(uint256 _amount) external {
        require(_amount > 0, "GaugeVaultProxyManager: AMOUNT_ZERO");
        (address pair, uint256 amountOut) = IOptiSwap(optiSwap).getBestAmountOut(_amount, rewardToken, wrappedVotingEscrowToken);
        if (pair != address(0) && amountOut > _amount) {
            // Swap
            IERC20(rewardToken).safeTransferFrom(msg.sender, pair, _amount);
            if (rewardToken < wrappedVotingEscrowToken) {
                OptiSwapPair(pair).swap(0, amountOut, msg.sender, new bytes(0));
            } else {
                OptiSwapPair(pair).swap(amountOut, 0, msg.sender, new bytes(0));
            }
        } else {
            // Mint
            IERC20(rewardToken).safeTransferFrom(msg.sender, gaugeVaultProxy, _amount);
            IGaugeVaultProxy(gaugeVaultProxy).increaseAmount(_amount);
            IWrappedVotingEscrowToken(wrappedVotingEscrowToken).mint(msg.sender, _amount);
        }
    }

    function processRewards(address _feeDistributor) external onlyOwnerOrManager {
        ITokenDistributor(tokenDistributor).claim();
        IGaugeVaultProxy gvp = IGaugeVaultProxy(gaugeVaultProxy);
        if (_feeDistributor != address(0)) {
            gvp.claimVeTokenReward(_feeDistributor);
        }
        uint256 amount = IERC20(rewardToken).balanceOf(gaugeVaultProxy);
        require(amount > 0, "GaugeVaultProxyManager: AMOUNT_ZERO");
        (address pair, uint256 amountOut) = IOptiSwap(optiSwap).getBestAmountOut(amount, rewardToken, wrappedVotingEscrowToken);
        if (gvp.admin() == address(this) && pair != address(0) && amountOut > amount) {
            // Swap
            gvp.withdrawRewardToken(amount);
            IERC20(rewardToken).safeTransfer(pair, amount);
            if (rewardToken < wrappedVotingEscrowToken) {
                OptiSwapPair(pair).swap(0, amountOut, tokenDistributor, new bytes(0));
            } else {
                OptiSwapPair(pair).swap(amountOut, 0, tokenDistributor, new bytes(0));
            }
        } else {
            // Mint
            gvp.increaseAmount(amount);
            IWrappedVotingEscrowToken(wrappedVotingEscrowToken).mint(tokenDistributor, amount);
        }
    }

    modifier onlyOwnerOrManager() {
        require(msg.sender == owner() || msg.sender == manager, "GaugeVaultProxyManager: RESTRICTED");
        _;
    }
}

File 2 of 16 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        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 16 : 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 16 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

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

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

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

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

pragma solidity >=0.6.12;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import "./IMasterChefProxy.sol";
import "./IGauge.sol";
import "./IVaultToken.sol";

interface IGaugeVaultProxy is IMasterChefProxy {
    function manager() external view returns (address);

    function admin() external view returns (address);

    function pendingAdmin() external view returns (address);

    function pendingAdminNotBefore() external view returns (uint256);

    function veLockBps() external view returns (uint256);

    function removeAdmin() external;

    function updatePendingAdmin(address _newPendingAdmin, uint256 _notBefore) external;

    function updateAdmin() external;

    function updateManager(address _manager) external;

    function setVaultTokenFactory(address _vaultTokenFactory) external;

    function updateVeLockBps(uint256 _newVeLockBps) external;

    function getUnderlying(uint256 _pid) external view returns (IERC20 underlying);

    function getGauge(uint _pid) external view returns (IGauge gauge);

    function getVaultToken(uint _pid) external view returns (IVaultToken vaultToken);

    function createLock(uint256 _amount, uint256 _unlockTime) external;

    function release() external;

    function increaseAmount(uint256 _amount) external;

    function increaseTime(uint256 _unlockTime) external;

    function claimVeTokenReward(address _feeDistributor) external;

    function vote(address[] calldata _tokenVote, uint256[] calldata _weights) external;

    function withdrawRewardToken(uint256 _amount) external;

    function inCaseTokensGetStuck(address _token, uint256 _amount) external;

    event UpdatePendingAdmin(address indexed admin, uint256 notBefore);
    event UpdateAdmin(address indexed admin);

    event UpdateVeLockBps(uint256 _newVeLockFeeBps);
    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);

    event CreateLock(address indexed user, uint256 amount, uint256 unlockTime);
    event Release(address indexed user, uint256 amount, uint256 balanceAfter);
    event IncreaseAmount(address indexed user, uint256 amount);
    event IncreaseTime(address indexed user, uint256 unlockTime);
    event ClaimVeTokenReward(address indexed user, address indexed feeDistributor, uint256 amount);
}

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

pragma solidity >=0.6.12;

interface ITokenDistributor {
    function token() external view returns (address);

    function xToken() external view returns (address);

    function periodLength() external view returns (uint);

    function lastClaim() external view returns (uint);

    function claim() external returns (uint amount);

    function setPeriodLength(uint newPeriodLength) external;

    event Claim(uint previousBalance, uint timeElapsed, uint amount);
    event NewPeriodLength(uint oldPeriodLength, uint newPeriodLength);
}

File 7 of 16 : IWrappedVotingEscrowToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

interface IWrappedVotingEscrowToken {
    function manager() external view returns (address);

    function setManager(address _manager) external;

    function mint(address _to, uint256 _amount) external;

    function burn(address _from, uint256 _amount) external;
}

File 8 of 16 : IOptiSwap.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface IOptiSwap {
    function weth() external view returns (address);

    function bridgeFromTokens(uint256 index) external view returns (address token);

    function bridgeFromTokensLength() external view returns (uint256);

    function getBridgeToken(address _token) external view returns (address bridgeToken);

    function addBridgeToken(address _token, address _bridgeToken) external;

    struct TokenBridge {
        address token;
        address bridgeToken;
    }

    function addBridgeTokenBulk(TokenBridge[] calldata _tokenBridgeList) external;

    function getDexInfo(uint256 index) external view returns (address dex, address handler);

    function dexListLength() external view returns (uint256);

    function indexOfDex(address _dex) external view returns (uint256);

    function getDexEnabled(address _dex) external view returns (bool);

    struct DexInfo {
        address dex; // Factory or Router
        address handler; // DexHandler
    }

    function addDex(address _dex, address _handler) external;

    function addDexBulk(DexInfo[] calldata _dexList) external;

    function removeDex(address _dex) external;

    function getBestAmountOut(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut
    ) external view returns (address pair, uint256 amountOut);
}

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

pragma solidity >=0.6.12;

interface IVeToken {
    function create_lock(uint256 _amount, uint256 _unlockTime) external;

    function increase_amount(uint256 _amount) external;

    function increase_unlock_time(uint256 _unlockTime) external;

    function withdraw() external;

    function locked__end(address _user) external view returns (uint256);

    function balanceOf(address _user) external view returns (uint256);

    function token() external view returns (address);

    function locked(address) external view returns (uint256 amount, uint256 end);
}

File 10 of 16 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity >=0.6.12;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

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

    // Info of each pool.
    struct PoolInfo {
        IERC20 lpToken; // Address of LP token contract.
        uint256 allocPoint; // How many allocation points assigned to this pool. Reward tokens to distribute per block.
        uint256 lastRewardBlock; // Last block number that reward token distribution occurs.
        uint256 accRewardTokenPerShare; // Accumulated reward tokens per share, times 1e12. See below.
    }

    // Info of each user that stakes LP tokens.
    function poolInfo(uint256 _pid) external view returns (PoolInfo memory);

    function userInfo(uint256 _pid, address _address) external view returns (UserInfo memory);

    // Deposit LP tokens to MasterChef.
    function deposit(uint256 _pid, uint256 _amount) external;

    // Withdraw LP tokens from MasterChef.
    function withdraw(uint256 _pid, uint256 _amount) external;
}

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

pragma solidity >=0.6.12;

interface IGauge {
    function deposit(uint256 _amount) external;

    function withdraw(uint256 _amount) external;

    function withdrawAll() external;

    function balanceOf(address _account) external view returns (uint256);

    function derivedBalance(address account) external view returns (uint);

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

    function getReward() external;

    function vote(address[] calldata _tokenVote, uint256[] calldata _weights) external;
}

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

pragma solidity >=0.6.12;

interface IVaultToken {
    /*** Tarot ERC20 ***/

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    function name() external pure returns (string memory);

    function symbol() external pure returns (string memory);

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

    function nonces(address owner) external view returns (uint256);

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /*** Pool Token ***/

    event Mint(address indexed sender, address indexed minter, uint256 mintAmount, uint256 mintTokens);
    event Redeem(address indexed sender, address indexed redeemer, uint256 redeemAmount, uint256 redeemTokens);
    event Sync(uint256 totalBalance);

    function underlying() external view returns (address);

    function factory() external view returns (address);

    function totalBalance() external view returns (uint256);

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function exchangeRate() external view returns (uint256);

    function mint(address minter) external returns (uint256 mintTokens);

    function redeem(address redeemer) external returns (uint256 redeemAmount);

    function skim(address to) external;

    function sync() external;

    function _setFactory() external;

    /*** VaultToken ***/

    event Reinvest(address indexed caller, uint256 reward, uint256 bounty);

    function isVaultToken() external pure returns (bool);

    function router() external view returns (address);

    function masterChef() external view returns (address);

    function rewardsToken() external view returns (address);

    function WETH() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function swapFeeFactor() external view returns (uint256);

    function pid() external view returns (uint256);

    function REINVEST_BOUNTY() external pure returns (uint256);

    function getReserves()
        external
        view
        returns (
            uint112 reserve0,
            uint112 reserve1,
            uint32 blockTimestampLast
        );

    function price0CumulativeLast() external view returns (uint256);

    function price1CumulativeLast() external view returns (uint256);

    function _initialize(
        address _router,
        address _masterChef,
        address _rewardsToken,
        uint256 _swapFeeFactor,
        uint256 _pid
    ) external;

    function reinvest() external;
}

File 15 of 16 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead 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, IERC20Metadata {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override 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 this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

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

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

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, 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}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, 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}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        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) {
        address owner = _msgSender();
        _approve(owner, spender, _allowances[owner][spender] + 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) {
        address owner = _msgSender();
        uint256 currentAllowance = _allowances[owner][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This 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:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, 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:
     *
     * - `account` 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 += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

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

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

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

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

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

    /**
     * @dev Spend `amount` form the allowance of `owner` toward `spender`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @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 transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

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

File 16 of 16 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"address","name":"_votingEscrowToken","type":"address"},{"internalType":"address","name":"_wrappedVotingEscrowToken","type":"address"},{"internalType":"address","name":"_gaugeVaultProxy","type":"address"},{"internalType":"address","name":"_tokenDistributor","type":"address"},{"internalType":"address","name":"_optiSwap","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gaugeVaultProxy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"manager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"optiSwap","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_feeDistributor","type":"address"}],"name":"processRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenDistributor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_manager","type":"address"}],"name":"updateManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_optiSwap","type":"address"}],"name":"updateOptiSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"votingEscrowToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wrappedVotingEscrowToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b50604051620014803803806200148083398101604081905262000034916200011f565b6200003f33620000b2565b600180546001600160a01b03199081166001600160a01b03988916179091556002805482169688169690961790955560038054861694871694909417909355600480548516928616929092179091556005805484169185169190911790556006805490921692169190911790556200019f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200011a57600080fd5b919050565b60008060008060008060c0878903121562000138578182fd5b620001438762000102565b9550620001536020880162000102565b9450620001636040880162000102565b9350620001736060880162000102565b9250620001836080880162000102565b91506200019360a0880162000102565b90509295509295509295565b6112d180620001af6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063612dc218116100975780638da5cb5b116100665780638da5cb5b14610203578063b6b55f2514610214578063f2fde38b14610227578063f7c618c11461023a57600080fd5b8063612dc218146101cd578063715018a6146101e05780638129fc1c146101e857806385769609146101f057600080fd5b8063481c6a75116100d3578063481c6a751461018157806349ad6a0a1461019457806358aba00f146101a757806360c2affa146101ba57600080fd5b8063158ef93e1461010557806316c12ac21461012e57806318a6bc321461014357806323cfcb101461016e575b600080fd5b60075461011990600160a01b900460ff1681565b60405190151581526020015b60405180910390f35b61014161013c366004611078565b61024d565b005b600554610156906001600160a01b031681565b6040516001600160a01b039091168152602001610125565b61014161017c366004611078565b6102a2565b600754610156906001600160a01b031681565b600354610156906001600160a01b031681565b6101416101b5366004611078565b610812565b600654610156906001600160a01b031681565b600254610156906001600160a01b031681565b61014161085e565b610141610894565b600454610156906001600160a01b031681565b6000546001600160a01b0316610156565b6101416102223660046110fd565b610a2b565b610141610235366004611078565b610c97565b600154610156906001600160a01b031681565b6000546001600160a01b031633146102805760405162461bcd60e51b8152600401610277906111e2565b60405180910390fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314806102c557506007546001600160a01b031633145b61031c5760405162461bcd60e51b815260206004820152602260248201527f47617567655661756c7450726f78794d616e616765723a205245535452494354604482015261115160f21b6064820152608401610277565b600560009054906101000a90046001600160a01b03166001600160a01b0316634e71d92d6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561036c57600080fd5b505af1158015610380573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a49190611115565b506004546001600160a01b03908116908216156104175760405163095222d760e31b81526001600160a01b038381166004830152821690634a9116b890602401600060405180830381600087803b1580156103fe57600080fd5b505af1158015610412573d6000803e3d6000fd5b505050505b600154600480546040516370a0823160e01b81526001600160a01b039182169281019290925260009216906370a082319060240160206040518083038186803b15801561046357600080fd5b505afa158015610477573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049b9190611115565b9050600081116104bd5760405162461bcd60e51b815260040161027790611217565b600654600154600354604051630820681160e11b8152600481018590526001600160a01b039283166024820152908216604482015260009283921690631040d02290606401604080518083038186803b15801561051957600080fd5b505afa15801561052d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055191906110b0565b91509150306001600160a01b0316846001600160a01b031663f851a4406040518163ffffffff1660e01b815260040160206040518083038186803b15801561059857600080fd5b505afa1580156105ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d09190611094565b6001600160a01b03161480156105ee57506001600160a01b03821615155b80156105f957508281115b1561074857604051630935450960e21b8152600481018490526001600160a01b038516906324d5142490602401600060405180830381600087803b15801561064057600080fd5b505af1158015610654573d6000803e3d6000fd5b505060015461067092506001600160a01b031690508385610d32565b6003546001546001600160a01b0391821691161015610727576005546001600160a01b038084169163022c0d9f91600091859116825b6040519080825280601f01601f1916602001820160405280156106d0576020820181803683370190505b506040518563ffffffff1660e01b81526004016106f09493929190611198565b600060405180830381600087803b15801561070a57600080fd5b505af115801561071e573d6000803e3d6000fd5b5050505061080b565b6005546001600160a01b038084169163022c0d9f91849160009116816106a6565b604051630aa2b75d60e11b8152600481018490526001600160a01b038516906315456eba90602401600060405180830381600087803b15801561078a57600080fd5b505af115801561079e573d6000803e3d6000fd5b50506003546005546040516340c10f1960e01b81526001600160a01b03918216600482015260248101889052911692506340c10f199150604401600060405180830381600087803b1580156107f257600080fd5b505af1158015610806573d6000803e3d6000fd5b505050505b5050505050565b6000546001600160a01b0316331461083c5760405162461bcd60e51b8152600401610277906111e2565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146108885760405162461bcd60e51b8152600401610277906111e2565b6108926000610d95565b565b6000546001600160a01b031633146108be5760405162461bcd60e51b8152600401610277906111e2565b600754600160a01b900460ff161561092c5760405162461bcd60e51b815260206004820152602b60248201527f47617567655661756c7450726f78794d616e616765723a20414c52454144595f60448201526a125392551250531256915160aa1b6064820152608401610277565b6002546004805460405163cbf9fe5f60e01b81526001600160a01b0391821692810192909252600092169063cbf9fe5f90602401604080518083038186803b15801561097757600080fd5b505afa15801561098b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109af919061112d565b506003546040516340c10f1960e01b8152336004820152602481018390529192506001600160a01b0316906340c10f1990604401600060405180830381600087803b1580156109fd57600080fd5b505af1158015610a11573d6000803e3d6000fd5b50506007805460ff60a01b1916600160a01b179055505050565b60008111610a4b5760405162461bcd60e51b815260040161027790611217565b600654600154600354604051630820681160e11b8152600481018590526001600160a01b039283166024820152908216604482015260009283921690631040d02290606401604080518083038186803b158015610aa757600080fd5b505afa158015610abb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adf91906110b0565b90925090506001600160a01b03821615801590610afb57508281115b15610be057600154610b18906001600160a01b0316338486610de5565b6003546001546001600160a01b0391821691161015610bc7576001600160a01b03821663022c0d9f60008333825b6040519080825280601f01601f191660200182016040528015610b70576020820181803683370190505b506040518563ffffffff1660e01b8152600401610b909493929190611198565b600060405180830381600087803b158015610baa57600080fd5b505af1158015610bbe573d6000803e3d6000fd5b50505050505050565b6001600160a01b03821663022c0d9f8260003381610b46565b600454600154610bff916001600160a01b039182169133911686610de5565b60048054604051630aa2b75d60e11b81529182018590526001600160a01b0316906315456eba90602401600060405180830381600087803b158015610c4357600080fd5b505af1158015610c57573d6000803e3d6000fd5b50506003546040516340c10f1960e01b8152336004820152602481018790526001600160a01b0390911692506340c10f199150604401610b90565b505050565b6000546001600160a01b03163314610cc15760405162461bcd60e51b8152600401610277906111e2565b6001600160a01b038116610d265760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610277565b610d2f81610d95565b50565b6040516001600160a01b038316602482015260448101829052610c9290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610e23565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052610e1d9085906323b872dd60e01b90608401610d5e565b50505050565b6000610e78826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610ef59092919063ffffffff16565b805190915015610c925780806020019051810190610e9691906110dd565b610c925760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610277565b6060610f048484600085610f0e565b90505b9392505050565b606082471015610f6f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610277565b6001600160a01b0385163b610fc65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610277565b600080866001600160a01b03168587604051610fe2919061117c565b60006040518083038185875af1925050503d806000811461101f576040519150601f19603f3d011682016040523d82523d6000602084013e611024565b606091505b509150915061103482828661103f565b979650505050505050565b6060831561104e575081610f07565b82511561105e5782518084602001fd5b8160405162461bcd60e51b815260040161027791906111cf565b600060208284031215611089578081fd5b8135610f0781611286565b6000602082840312156110a5578081fd5b8151610f0781611286565b600080604083850312156110c2578081fd5b82516110cd81611286565b6020939093015192949293505050565b6000602082840312156110ee578081fd5b81518015158114610f07578182fd5b60006020828403121561110e578081fd5b5035919050565b600060208284031215611126578081fd5b5051919050565b6000806040838503121561113f578182fd5b505080516020909101519092909150565b6000815180845261116881602086016020860161125a565b601f01601f19169290920160200192915050565b6000825161118e81846020870161125a565b9190910192915050565b84815283602082015260018060a01b03831660408201526080606082015260006111c56080830184611150565b9695505050505050565b602081526000610f076020830184611150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526023908201527f47617567655661756c7450726f78794d616e616765723a20414d4f554e545f5a60408201526245524f60e81b606082015260800190565b60005b8381101561127557818101518382015260200161125d565b83811115610e1d5750506000910152565b6001600160a01b0381168114610d2f57600080fdfea264697066735822122073118d4bd3099c4fdeea8eef1ee14769b4ce6a0c55978737fdf7460b266f735064736f6c634300080400330000000000000000000000005cc61a78f164885776aa610fb0fe1257df78e59b0000000000000000000000002fbff41a9efaeae77538bd63f1ea489494acdc080000000000000000000000006caa3e5feba1f83ec1d80ea2eaca37c3421c33a8000000000000000000000000cf8660e267d44cc804ddbee6b1ce44f9ed5648890000000000000000000000006d137d99084f710fad6adf45fd6ef65e617bd4dd000000000000000000000000d04f1a8182d5670e42ba9ee0ce9ffc71e6d1fc18

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

0000000000000000000000005cc61a78f164885776aa610fb0fe1257df78e59b0000000000000000000000002fbff41a9efaeae77538bd63f1ea489494acdc080000000000000000000000006caa3e5feba1f83ec1d80ea2eaca37c3421c33a8000000000000000000000000cf8660e267d44cc804ddbee6b1ce44f9ed5648890000000000000000000000006d137d99084f710fad6adf45fd6ef65e617bd4dd000000000000000000000000d04f1a8182d5670e42ba9ee0ce9ffc71e6d1fc18

-----Decoded View---------------
Arg [0] : _rewardToken (address): 0x5cc61a78f164885776aa610fb0fe1257df78e59b
Arg [1] : _votingEscrowToken (address): 0x2fbff41a9efaeae77538bd63f1ea489494acdc08
Arg [2] : _wrappedVotingEscrowToken (address): 0x6caa3e5feba1f83ec1d80ea2eaca37c3421c33a8
Arg [3] : _gaugeVaultProxy (address): 0xcf8660e267d44cc804ddbee6b1ce44f9ed564889
Arg [4] : _tokenDistributor (address): 0x6d137d99084f710fad6adf45fd6ef65e617bd4dd
Arg [5] : _optiSwap (address): 0xd04f1a8182d5670e42ba9ee0ce9ffc71e6d1fc18

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000005cc61a78f164885776aa610fb0fe1257df78e59b
Arg [1] : 0000000000000000000000002fbff41a9efaeae77538bd63f1ea489494acdc08
Arg [2] : 0000000000000000000000006caa3e5feba1f83ec1d80ea2eaca37c3421c33a8
Arg [3] : 000000000000000000000000cf8660e267d44cc804ddbee6b1ce44f9ed564889
Arg [4] : 0000000000000000000000006d137d99084f710fad6adf45fd6ef65e617bd4dd
Arg [5] : 000000000000000000000000d04f1a8182d5670e42ba9ee0ce9ffc71e6d1fc18


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.