Contract 0xd2f585c41cca33dce5227c8df6adf604085690c2

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xeebacdb95cd4e9d1d6ea47cb287dab52818e570e9652c01eea9c81fa3a209865Claim All Stakin...339281752022-03-20 12:25:06199 days 19 hrs ago0x1c51f54f1784f90b56af0b16d41108f5ab745045 IN  0xDAO: User Proxy Interface0 FTM0.011086036832
0x733574c7176c69eaeaa62abd4252414068b60b1358e243a1f4ad009cb6750975Claim Staking Re...339281172022-03-20 12:24:17199 days 19 hrs ago0x1c51f54f1784f90b56af0b16d41108f5ab745045 IN  0xDAO: User Proxy Interface0 FTM0.011192957569
0x6f833aa8c0839a1043914032b1b0cb8ddd0054a104d2f8a9ac34d0c84e3714b6Claim Staking Re...339276692022-03-20 12:17:07199 days 20 hrs ago0x1c51f54f1784f90b56af0b16d41108f5ab745045 IN  0xDAO: User Proxy Interface0 FTM0.013266596366
0x0d3196780a237213392a1d4e4c1521c77f1e5864776f67243264aefa1d2f4eb6Claim Staking Re...339276062022-03-20 12:16:08199 days 20 hrs ago0x1c51f54f1784f90b56af0b16d41108f5ab745045 IN  0xDAO: User Proxy Interface0 FTM0.012966848885
0x2fcea55903f9a06fa7482bbd1ba948308542281175b8a5613e6c3e58d026b95eClaim Staking Re...339275372022-03-20 12:15:07199 days 20 hrs ago0x1c51f54f1784f90b56af0b16d41108f5ab745045 IN  0xDAO: User Proxy Interface0 FTM0.01294698777
0xdd02651f327728e485c4bd54ccd2a68da101a169fa2ac3403e39f5695b808584Claim Staking Re...339272022022-03-20 12:09:50199 days 20 hrs ago0x1c51f54f1784f90b56af0b16d41108f5ab745045 IN  0xDAO: User Proxy Interface0 FTM0.02826547701
0x946f289b555154bf937bf4e85968c0c5dd09792540c5640fd00dd3ae3688f4f5Deposit Lp And S...323849902022-03-02 20:38:20217 days 11 hrs ago0xfa31dcff7bed47232b82b50fc0ec9582b9b4fb3a IN  0xDAO: User Proxy Interface0 FTM0.056771666835
0x1712ddd89d732e4102d7774ceeaabad574488d3664373fbf682d341d44f2548e0x60806040323676422022-03-02 15:12:21217 days 17 hrs ago0xDAO: Deployer IN  Create: UserProxyInterface0 FTM4.291957166145
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x1712ddd89d732e4102d7774ceeaabad574488d3664373fbf682d341d44f2548e323676422022-03-02 15:12:21217 days 17 hrs ago 0xDAO: Deployer  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
UserProxyInterface

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 24 : UserProxyInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Wrapper.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "./interfaces/IOxLens.sol";
import "./interfaces/IUserProxy.sol";
import "./interfaces/IUserProxyFactory.sol";
import "./interfaces/ISolid.sol";
import "./interfaces/IVe.sol";

/**
 * @title UserProxyInterface
 * @author 0xDAO
 * @notice The primary user interface contract for front-end
 * @dev User proxy interface is responsible for creating and fetching a user's proxy
 *      and transferring tokens/routing calls to the user's proxy
 * @dev All calls here are unpermissioned as each call deals only with the proxy for msg.sender
 * @dev Authentication is handled in actual UserProxy implementations
 */
contract UserProxyInterface {
    // Public addresses
    address public userProxyFactoryAddress;
    address public oxLensAddress;

    // Internal interface helpers
    IOxLens internal oxLens;
    IVe internal ve;
    ISolid internal solid;
    IOxSolid internal oxSolid;
    IOxd internal oxd;

    /**
     * @notice Initialize UserProxyInterface
     * @param _userProxyFactoryAddress Factory address
     * @param _oxLensAddress oxLens address
     */
    function initialize(
        address _userProxyFactoryAddress,
        address _oxLensAddress
    ) public {
        require(userProxyFactoryAddress == address(0), "Already initialized");
        userProxyFactoryAddress = _userProxyFactoryAddress;
        oxLensAddress = _oxLensAddress;
        oxLens = IOxLens(_oxLensAddress);
        ve = oxLens.ve();
        solid = oxLens.solid();
        oxSolid = oxLens.oxSolid();
        oxd = oxLens.oxd();
    }

    /*******************************************************
     *                    LP Interactions
     *******************************************************/

    /**
     * @notice LP -> oxPool LP -> Staked (max)
     * @param solidPoolAddress The solid pool LP address to deposit and stake
     */
    function depositLpAndStake(address solidPoolAddress) external {
        // Fetch user proxy
        IUserProxy userProxy = createAndGetUserProxy();
        address userProxyOwnerAddress = msg.sender;

        // Fetch amount of Solid LP owned by owner
        uint256 amount = IERC20(solidPoolAddress).balanceOf(
            userProxyOwnerAddress
        );

        // Deposit and stake LP
        depositLpAndStake(solidPoolAddress, amount);
    }

    /**
     * @notice LP -> oxPool LP -> Staked
     * @param solidPoolAddress The solid pool LP address to deposit and stake
     * @param amount The amount of solid pool LP to deposit and stake
     */
    function depositLpAndStake(address solidPoolAddress, uint256 amount)
        public
    {
        // Fetch user proxy
        IUserProxy userProxy = createAndGetUserProxy();
        address userProxyOwnerAddress = msg.sender;

        // Receive LP from UserProxy owner
        IERC20(solidPoolAddress).transferFrom(
            userProxyOwnerAddress,
            address(this),
            amount
        );

        // Allow UserProxy to spend LP
        IERC20(solidPoolAddress).approve(address(userProxy), amount);

        // Deposit and stake LP via UserProxy
        userProxy.depositLpAndStake(solidPoolAddress, amount);
    }

    /**
     * @notice LP -> oxPool LP (max)
     * @param solidPoolAddress The solid pool LP address to deposit
     */
    function depositLp(address solidPoolAddress) external {
        // Fetch user proxy
        IUserProxy userProxy = createAndGetUserProxy();
        address userProxyOwnerAddress = msg.sender;

        // Fetch amount of Solid LP owned by owner
        uint256 amount = IERC20(solidPoolAddress).balanceOf(
            userProxyOwnerAddress
        );
        depositLp(solidPoolAddress, amount);
    }

    /**
     * @notice LP -> oxPool LP
     * @param solidPoolAddress The solid pool LP address to deposit
     * @param amount The amount of solid pool LP to deposit and stake
     */
    function depositLp(address solidPoolAddress, uint256 amount) public {
        // Fetch user proxy
        IUserProxy userProxy = createAndGetUserProxy();
        address userProxyOwnerAddress = msg.sender;

        // Receive LP from UserProxy owner
        IERC20(solidPoolAddress).transferFrom(
            userProxyOwnerAddress,
            address(this),
            amount
        );

        // Allow UserProxy to spend LP
        IERC20(solidPoolAddress).approve(address(userProxy), amount);

        // Deposit LP into oxPool via UserProxy
        userProxy.depositLp(solidPoolAddress, amount);
    }

    /**
     * @notice Staked oxPool LP -> oxPool LP -> LP (max)
     * @param solidPoolAddress The solid pool LP address to unstake and withdraw
     */
    function unstakeLpWithdrawAndClaim(address solidPoolAddress) external {
        // Fetch amount staked
        uint256 amount = _amountStaked(solidPoolAddress);

        // Withdraw and unstake
        unstakeLpWithdrawAndClaim(solidPoolAddress, amount);
    }

    /**
     * @notice Staked oxPool LP -> oxPool LP -> LP
     * @param solidPoolAddress The solid pool LP address to unstake and withdraw
     * @param amount The amount of solid pool LP to unstake and withdraw
     */
    function unstakeLpWithdrawAndClaim(address solidPoolAddress, uint256 amount)
        public
    {
        // Withdraw and unstake
        IUserProxy userProxy = createAndGetUserProxy();
        userProxy.unstakeLpAndWithdraw(solidPoolAddress, amount, true);
    }

    /**
     * @notice Staked oxPool LP -> oxPool LP -> LP (max)
     * @param solidPoolAddress The solid pool LP address to unstake and withdraw
     */
    function unstakeLpAndWithdraw(address solidPoolAddress) external {
        // Fetch amount staked
        uint256 amount = _amountStaked(solidPoolAddress);

        // Withdraw and unstake
        unstakeLpAndWithdraw(solidPoolAddress, amount);
    }

    /**
     * @notice Staked oxPool LP -> oxPool LP -> LP
     * @param solidPoolAddress The solid pool LP address to unstake and withdraw
     * @param amount The amount of solid pool LP to unstake and withdraw
     */
    function unstakeLpAndWithdraw(address solidPoolAddress, uint256 amount)
        public
    {
        // Withdraw and unstake
        IUserProxy userProxy = createAndGetUserProxy();
        userProxy.unstakeLpAndWithdraw(solidPoolAddress, amount, false);
    }

    function _amountStaked(address solidPoolAddress)
        internal
        returns (uint256)
    {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();

        // Determine amount currently staked
        address stakingAddress = oxLens.stakingRewardsBySolidPool(
            solidPoolAddress
        );
        uint256 amount = IERC20(stakingAddress).balanceOf(address(userProxy));
        return amount;
    }

    /**
     * @notice oxPool LP -> LP (max)
     * @param solidPoolAddress The solid pool LP address to withdraw
     */
    function withdrawLp(address solidPoolAddress) external {
        // Fetch user proxy
        IUserProxy userProxy = createAndGetUserProxy();
        address userProxyOwnerAddress = msg.sender;

        // Fetch amount of oxPool LP owned by UserProxy owner
        address oxPoolAddress = oxLens.oxPoolBySolidPool(solidPoolAddress);
        uint256 amount = IERC20(oxPoolAddress).balanceOf(userProxyOwnerAddress);
        withdrawLp(solidPoolAddress, amount);
    }

    /**
     * @notice oxPool LP -> LP
     * @param solidPoolAddress The solid pool LP address to withdraw
     * @param amount The amount of solid pool LP to withdraw
     */
    function withdrawLp(address solidPoolAddress, uint256 amount) public {
        // Fetch user proxy
        IUserProxy userProxy = createAndGetUserProxy();
        address userProxyOwnerAddress = msg.sender;

        // Receive oxPool LP from UserProxy owner
        address oxPoolAddress = oxLens.oxPoolBySolidPool(solidPoolAddress);
        IERC20(oxPoolAddress).transferFrom(
            userProxyOwnerAddress,
            address(this),
            amount
        );

        // Allow UserProxy to spend oxPool LP
        IERC20(oxPoolAddress).approve(address(userProxy), amount);

        // Withdraw oxPool LP via UserProxy (UserProxy will transfer it to owner)
        userProxy.withdrawLp(solidPoolAddress, amount);
    }

    /**
     * @notice oxPool LP -> Staked oxPool LP (max)
     * @param oxPoolAddress The oxPool LP address to stake
     */
    function stakeOxLp(address oxPoolAddress) public {
        // Fetch user proxy
        IUserProxy userProxy = createAndGetUserProxy();
        address userProxyOwnerAddress = msg.sender;

        // Fetch amount of oxPool LP owned by owner
        uint256 amount = IERC20(oxPoolAddress).balanceOf(userProxyOwnerAddress);
        stakeOxLp(oxPoolAddress, amount);
    }

    /**
     * @notice oxPool LP -> Staked oxPool LP
     * @param oxPoolAddress The oxPool LP address to stake
     * @param amount The amount of oxPool LP to stake
     */
    function stakeOxLp(address oxPoolAddress, uint256 amount) public {
        // Fetch user proxy
        IUserProxy userProxy = createAndGetUserProxy();
        address userProxyOwnerAddress = msg.sender;

        // Receive oxPool LP from owner
        IERC20(oxPoolAddress).transferFrom(
            userProxyOwnerAddress,
            address(this),
            amount
        );

        // Allow UserProxy to spend oxPool LP
        IERC20(oxPoolAddress).approve(address(userProxy), amount);

        // Stake oxPool LP
        userProxy.stakeOxLp(oxPoolAddress, amount);
    }

    /**
     * @notice Staked oxPool LP -> oxPool LP (max)
     * @param oxPoolAddress The oxPool LP address to unstake
     */
    function unstakeOxLp(address oxPoolAddress) public {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();

        // Fetch amount of oxPool LP currently staked
        address stakingAddress = oxLens.stakingRewardsByOxPool(oxPoolAddress);
        uint256 amount = IERC20(stakingAddress).balanceOf(address(userProxy));

        // Unstake
        unstakeOxLp(oxPoolAddress, amount);
    }

    /**
     * @notice Staked oxPool LP -> oxPool LP
     * @param oxPoolAddress The oxPool LP address to unstake
     * @param amount The amount of oxPool LP to unstake
     */
    function unstakeOxLp(address oxPoolAddress, uint256 amount) public {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();

        // Unstake
        userProxy.unstakeOxLp(oxPoolAddress, amount);
    }

    /**
     * @notice Claim staking rewards given a staking pool address
     * @param stakingPoolAddress Address of MultiRewards contract
     */
    function claimStakingRewards(address stakingPoolAddress) public {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();

        // Unstake
        userProxy.claimStakingRewards(stakingPoolAddress);
    }

    /**
     * @notice Claim all staking rewards
     */
    function claimStakingRewards() public {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();

        // Unstake
        userProxy.claimStakingRewards();
    }

    /*******************************************************
     *                 SOLID and veNFT interactions
     *******************************************************/

    /**
     * @notice SOLID -> veNFT -> oxSOLID (max)
     */
    function convertSolidToOxSolid() external {
        // Fetch user proxy
        IUserProxy userProxy = createAndGetUserProxy();
        address userProxyOwnerAddress = msg.sender;

        // Fetch amount of SOLID owned by owner
        uint256 amount = solid.balanceOf(userProxyOwnerAddress);
        convertSolidToOxSolid(amount);
    }

    /**
     * @notice SOLID -> veNFT -> oxSOLID
     * @param amount The amount of SOLID to convert
     */
    function convertSolidToOxSolid(uint256 amount) public {
        // Fetch user proxy
        IUserProxy userProxy = createAndGetUserProxy();
        address userProxyOwnerAddress = msg.sender;

        // Transfer SOLID to this contract
        solid.transferFrom(userProxyOwnerAddress, address(this), amount);

        // Allow UserProxy to spend SOLID
        solid.approve(address(userProxy), amount);

        // Convert SOLID to oxSOLID
        userProxy.convertSolidToOxSolid(amount);
    }

    /**
     * @notice SOLID -> veNFT -> oxSOLID -> Staked oxSOLID (max)
     */
    function convertSolidToOxSolidAndStake() external {
        // Fetch user proxy
        IUserProxy userProxy = createAndGetUserProxy();
        address userProxyOwnerAddress = msg.sender;

        // Fetch amount of SOLID owner by UserProxy owner
        uint256 amount = solid.balanceOf(userProxyOwnerAddress);

        // Convert SOLID to oxSOLID and stake
        convertSolidToOxSolidAndStake(amount);
    }

    /**
     * @notice SOLID -> veNFT -> oxSOLID -> Staked oxSOLID
     * @param amount The amount of SOLID to convert
     */
    function convertSolidToOxSolidAndStake(uint256 amount) public {
        // Fetch user proxy
        IUserProxy userProxy = createAndGetUserProxy();
        address userProxyOwnerAddress = msg.sender;

        // Transfer SOLID to this contract
        solid.transferFrom(userProxyOwnerAddress, address(this), amount);

        // Allow UserProxy to spend SOLID
        solid.approve(address(userProxy), amount);

        // Convert SOLID to oxSOLID
        userProxy.convertSolidToOxSolidAndStake(amount);
    }

    /**
     * @notice veNFT -> oxSOLID
     * @param tokenId The tokenId of the NFT to convert
     */
    function convertNftToOxSolid(uint256 tokenId) public {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();
        address userProxyOwnerAddress = msg.sender;

        // Transfer NFT to this contract
        ve.safeTransferFrom(userProxyOwnerAddress, address(this), tokenId);

        // Transfer NFT to user proxy to convert
        ve.approve(address(userProxy), tokenId);
        userProxy.convertNftToOxSolid(tokenId);
    }

    /**
     * @notice veNFT -> oxSOLID -> Staked oxSOLID
     * @param tokenId The tokenId of the NFT to convert
     */
    function convertNftToOxSolidAndStake(uint256 tokenId) external {
        // Fetch user proxy
        IUserProxy userProxy = createAndGetUserProxy();
        address userProxyOwnerAddress = msg.sender;

        // Transfer NFT to this contract
        ve.safeTransferFrom(userProxyOwnerAddress, address(this), tokenId);

        // Convert SOLID to oxSOLID and stake
        ve.approve(address(userProxy), tokenId);
        userProxy.convertNftToOxSolidAndStake(tokenId);
    }

    /**
     * @notice oxSOLID -> Staked oxSOLID (max)
     */
    function stakeOxSolid() external {
        // Fetch amount of oxSOLID currently staked
        uint256 amount = oxSolid.balanceOf(msg.sender);

        // Stake oxSOLID
        stakeOxSolid(amount);
    }

    /**
     * @notice oxSOLID -> Staked oxSOLID
     * @param amount The amount of oxSOLID to stake
     */
    function stakeOxSolid(uint256 amount) public {
        // Fetch user proxy
        IUserProxy userProxy = createAndGetUserProxy();
        address userProxyOwnerAddress = msg.sender;

        // Receive oxSOLID from owner
        oxSolid.transferFrom(userProxyOwnerAddress, address(this), amount);

        // Allow UserProxy to spend oxSOLID
        oxSolid.approve(address(userProxy), amount);

        // Stake oxSOLID via UserProxy
        userProxy.stakeOxSolid(amount);
    }

    /**
     * @notice oxSOLID -> Staked oxSOLID in oxdV1Rewards after burning OXDv1 (max)
     */
    function stakeOxSolidInOxdV1() external {
        // Fetch amount of oxSOLID currently staked
        uint256 amount = oxSolid.balanceOf(msg.sender);

        // Stake oxSOLID
        stakeOxSolidInOxdV1(amount);
    }

    /**
     * @notice oxSOLID -> Staked oxSOLID in oxdV1Rewards after burning OXDv1
     * @param amount The amount of oxSOLID to stake
     */
    function stakeOxSolidInOxdV1(uint256 amount) public {
        // Fetch user proxy
        IUserProxy userProxy = createAndGetUserProxy();
        address userProxyOwnerAddress = msg.sender;

        // Receive oxSOLID from owner
        oxSolid.transferFrom(userProxyOwnerAddress, address(this), amount);

        // Allow UserProxy to spend oxSOLID
        oxSolid.approve(address(userProxy), amount);

        // Stake oxSOLID via UserProxy
        userProxy.stakeOxSolidInOxdV1(amount);
    }

    /**
     * @notice Staked oxSOLID -> oxSOLID (max)
     */
    function unstakeOxSolid() external {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();

        // Fetch amount of oxSOLID currently staked
        uint256 amount = oxLens.stakedOxSolidBalanceOf(msg.sender);

        // Unstake oxSOLID
        userProxy.unstakeOxSolid(amount);
    }

    /**
     * @notice Staked oxSOLID -> oxSOLID
     * @param amount The amount of oxSOLID to unstake
     */
    function unstakeOxSolid(uint256 amount) public {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();
        address stakingAddress = oxLens.oxSolidRewardsPoolAddress();

        // Unstake via UserProxy
        userProxy.unstakeOxSolid(amount);
    }

    /**
     * @notice Staked oxSOLID in oxdV1Rewards -> oxSOLID
     * @param amount The amount of oxSOLID to unstake
     */
    function unstakeOxSolidInOxdV1(uint256 amount) public {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();
        address stakingAddress = oxLens.oxdV1RewardsAddress();

        // Unstake via UserProxy
        userProxy.unstakeOxSolid(stakingAddress, amount);
    }

    /**
     * @notice Generalized Staked oxSOLID -> oxSOLID
     * @param stakingAddress The MultiRewards Address to unstake from
     * @param amount The amount of oxSOLID to unstake
     */
    function unstakeOxSolid(address stakingAddress, uint256 amount) public {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();

        // Unstake via UserProxy
        userProxy.unstakeOxSolid(stakingAddress, amount);
    }

    /**
     * @notice Claim staking rewards for staking oxSOLID
     */
    function claimOxSolidStakingRewards() public {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();
        address stakingAddress;
        if (oxLens.isPartner(address(userProxy))) {
            stakingAddress = oxLens.partnersRewardsPoolAddress();
        } else {
            stakingAddress = oxLens.oxSolidRewardsPoolAddress();
        }

        // Claim rewards
        userProxy.claimStakingRewards(stakingAddress);
    }

    /*******************************************************
     *                   OXDv1 Redemption
     *******************************************************/

    /**
     * @notice OXDv1 -> oxSOLID (max)
     */
    function redeemOxdV1() public {
        // Fetch amount
        uint256 amount = IERC20(oxLens.oxdV1Address()).balanceOf(msg.sender);

        // Unstake via UserProxy
        redeemOxdV1(amount);
    }

    /**
     * @notice OXDv1 -> oxSOLID
     * @param amount The amount of OXDv1 to redeem
     */
    function redeemOxdV1(uint256 amount) public {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();
        address userProxyOwnerAddress = msg.sender;

        // Receive OXD v1 from owner
        IERC20(oxLens.oxdV1Address()).transferFrom(
            userProxyOwnerAddress,
            address(this),
            amount
        );

        // Allow UserProxy to spend OXD v1
        IERC20(oxLens.oxdV1Address()).approve(address(userProxy), amount);

        // Unstake via UserProxy
        userProxy.redeemOxdV1(amount);
    }

    /**
     * @notice OXDv1 -> oxSOLID staked in oxdV1Rewards (max)
     */
    function redeemAndStakeOxdV1() public {
        // Fetch amount
        uint256 amount = IERC20(oxLens.oxdV1Address()).balanceOf(msg.sender);

        // Unstake via UserProxy
        redeemAndStakeOxdV1(amount);
    }

    /**
     * @notice OXDv1 -> oxSOLID staked in oxdV1Rewards
     * @param amount The amount of OXDv1 to redeem
     */
    function redeemAndStakeOxdV1(uint256 amount) public {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();
        address userProxyOwnerAddress = msg.sender;

        // Receive OXD v1 from owner
        IERC20(oxLens.oxdV1Address()).transferFrom(
            userProxyOwnerAddress,
            address(this),
            amount
        );

        // Allow UserProxy to spend OXD v1
        IERC20(oxLens.oxdV1Address()).approve(address(userProxy), amount);

        // Unstake via UserProxy
        userProxy.redeemAndStakeOxdV1(amount);
    }

    /**
     * @notice Claim OXDv1 oxSOLID staking rewards
     */
    function claimV1OxSolidStakingRewards() public {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();

        // Claim rewards
        userProxy.claimStakingRewards(oxLens.oxdV1RewardsAddress());
    }

    /*******************************************************
     *                   Partner migration
     *******************************************************/

    /**
     * @notice Migrates nonparters who recently got whitelisted as partners
     */
    function migrateOxSolidToPartner() external {
        IUserProxy userProxy = createAndGetUserProxy();
        userProxy.migrateOxSolidToPartner();
    }

    /*******************************************************
     *                        vlOXD
     *******************************************************/

    /**
     * @notice Vote lock OXD for 16 weeks (non-transferrable)
     * @param amount Amount of OXD to lock
     * @param spendRatio Spend ratio for OxdLocker
     * @dev OxdLocker utilizes the same code as CvxLocker
     */
    function voteLockOxd(uint256 amount, uint256 spendRatio) external {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();
        address userProxyOwnerAddress = msg.sender;

        // Receive OXD from user
        oxd.transferFrom(userProxyOwnerAddress, address(this), amount);

        // Allow UserProxy to spend OXD
        oxd.approve(address(userProxy), amount);

        // Lock OXD via UserProxy
        userProxy.voteLockOxd(amount, spendRatio);

        // reset approval back to 0
        oxd.approve(address(userProxy), 0);
    }

    /**
     * @notice Withdraw vote locked OXD
     * @param spendRatio Spend ratio
     */
    function withdrawVoteLockedOxd(uint256 spendRatio) external {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();

        // Withdraw vote locked OXD and claim
        userProxy.withdrawVoteLockedOxd(spendRatio, false);
    }

    /**
     * @notice Relock vote locked OXD
     * @param spendRatio Spend ratio
     */
    function relockVoteLockedOxd(uint256 spendRatio) external {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();

        // Withdraw vote locked OXD and claim
        userProxy.relockVoteLockedOxd(spendRatio);
    }

    /**
     * @notice Claim vlOXD staking rewards
     */
    function claimVlOxdStakingRewards() public {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();

        // Claim rewards
        userProxy.claimVlOxdRewards();
    }

    /*******************************************************
     *                       Voting
     *******************************************************/

    /**
     * @notice Vote for a pool given a pool address and weight
     * @param poolAddress The pool adress to vote for
     * @param weight The new vote weight (can be positive or negative)
     */
    function vote(address poolAddress, int256 weight) external {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();

        // Withdraw vote locked OXD and claim
        userProxy.vote(poolAddress, weight);
    }

    /**
     * @notice Batch vote
     * @param votes Votes
     */
    function vote(IUserProxy.Vote[] memory votes) external {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();

        // Clear vote delegate
        userProxy.vote(votes);
    }

    /**
     * @notice Remove a user's vote given a pool address
     * @param poolAddress The address of the pool whose vote will be deleted
     */
    function removeVote(address poolAddress) public {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();

        // Withdraw vote locked OXD and claim
        userProxy.removeVote(poolAddress);
    }

    /**
     * @notice Delete all vote for a user
     */
    function resetVotes() external {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();

        // Withdraw vote locked OXD and claim
        userProxy.resetVotes();
    }

    /**
     * @notice Set vote delegate for an account
     * @param accountAddress New delegate address
     */
    function setVoteDelegate(address accountAddress) external {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();

        // Set vote delegate
        userProxy.setVoteDelegate(accountAddress);
    }

    /**
     * @notice Clear vote delegate for an account
     */
    function clearVoteDelegate() external {
        // Fetch UserProxy
        IUserProxy userProxy = createAndGetUserProxy();

        // Clear vote delegate
        userProxy.clearVoteDelegate();
    }

    /*******************************************************
     *                   Helper Utilities
     *******************************************************/

    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4) {
        return IERC721Receiver.onERC721Received.selector;
    }

    // Only allow users to interact with their proxy
    function createAndGetUserProxy() internal returns (IUserProxy) {
        return
            IUserProxy(
                IUserProxyFactory(userProxyFactoryAddress)
                    .createAndGetUserProxy(msg.sender)
            );
    }

    function claimAllStakingRewards() public {
        claimStakingRewards();
        claimOxSolidStakingRewards();
        claimV1OxSolidStakingRewards();
        claimVlOxdStakingRewards();
    }
}

File 2 of 24 : 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 24 : ERC20Wrapper.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Wrapper.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Extension of the ERC20 token contract to support token wrapping.
 *
 * Users can deposit and withdraw "underlying tokens" and receive a matching number of "wrapped tokens". This is useful
 * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC20Votes} will allow the
 * wrapping of an existing "basic" ERC20 into a governance token.
 *
 * _Available since v4.2._
 */
abstract contract ERC20Wrapper is ERC20 {
    IERC20 public immutable underlying;

    constructor(IERC20 underlyingToken) {
        underlying = underlyingToken;
    }

    /**
     * @dev Allow a user to deposit underlying tokens and mint the corresponding number of wrapped tokens.
     */
    function depositFor(address account, uint256 amount) public virtual returns (bool) {
        SafeERC20.safeTransferFrom(underlying, _msgSender(), address(this), amount);
        _mint(account, amount);
        return true;
    }

    /**
     * @dev Allow a user to burn a number of wrapped tokens and withdraw the corresponding number of underlying tokens.
     */
    function withdrawTo(address account, uint256 amount) public virtual returns (bool) {
        _burn(_msgSender(), amount);
        SafeERC20.safeTransfer(underlying, account, amount);
        return true;
    }

    /**
     * @dev Mint wrapped token to cover any underlyingTokens that would have been transfered by mistake. Internal
     * function that can be exposed with access control if desired.
     */
    function _recover(address account) internal virtual returns (uint256) {
        uint256 value = underlying.balanceOf(address(this)) - totalSupply();
        _mint(account, value);
        return value;
    }
}

File 4 of 24 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 5 of 24 : IOxLens.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
import "./IOxd.sol";
import "./IVlOxd.sol";
import "./IOxPoolFactory.sol";
import "./IOxSolid.sol";
import "./ISolid.sol";
import "./ISolidlyLens.sol";
import "./IUserProxy.sol";
import "./IVe.sol";
import "./IVotingSnapshot.sol";
import "./IVoterProxy.sol";
import "./IOxdV1Rewards.sol";
import "./ITokensAllowlist.sol";

interface IOxLens {
    struct ProtocolAddresses {
        address oxPoolFactoryAddress;
        address solidlyLensAddress;
        address oxdAddress;
        address vlOxdAddress;
        address oxSolidAddress;
        address voterProxyAddress;
        address solidAddress;
        address voterAddress;
        address poolsFactoryAddress;
        address gaugesFactoryAddress;
        address minterAddress;
        address veAddress;
        address userProxyInterfaceAddress;
        address votingSnapshotAddress;
    }

    struct UserPosition {
        address userProxyAddress;
        uint256 veTotalBalanceOf;
        ISolidlyLens.PositionVe[] vePositions;
        ISolidlyLens.PositionPool[] poolsPositions;
        IUserProxy.PositionStakingPool[] stakingPools;
        uint256 oxSolidBalanceOf;
        uint256 oxdBalanceOf;
        uint256 solidBalanceOf;
        uint256 vlOxdBalanceOf;
    }

    struct TokenMetadata {
        address id;
        string name;
        string symbol;
        uint8 decimals;
        uint256 priceUsdc;
    }

    struct OxPoolData {
        address id;
        address stakingAddress;
        ISolidlyLens.Pool poolData;
    }

    struct Pool {
        address id;
        string symbol;
        bool stable;
        address token0Address;
        address token1Address;
        address gaugeAddress;
        address bribeAddress;
        address[] bribeTokensAddresses;
        address fees;
    }

    /* ========== PUBLIC VARS ========== */

    function oxPoolFactoryAddress() external view returns (address);

    function userProxyFactoryAddress() external view returns (address);

    function solidlyLensAddress() external view returns (address);

    function oxdAddress() external view returns (address);

    function vlOxdAddress() external view returns (address);

    function oxSolidAddress() external view returns (address);

    function voterProxyAddress() external view returns (address);

    function veAddress() external view returns (address);

    function solidAddress() external view returns (address);

    function oxSolidRewardsPoolAddress() external view returns (address);

    function partnersRewardsPoolAddress() external view returns (address);

    function treasuryAddress() external view returns (address);

    function cvlOxdAddress() external view returns (address);

    function oxdV1RewardsAddress() external view returns (address);

    function oxdV1RedeemAddress() external view returns (address);

    function oxdV1Address() external view returns (address);

    /* ========== PUBLIC VIEW FUNCTIONS ========== */

    function voterAddress() external view returns (address);

    function poolsFactoryAddress() external view returns (address);

    function gaugesFactoryAddress() external view returns (address);

    function minterAddress() external view returns (address);

    function protocolAddresses()
        external
        view
        returns (ProtocolAddresses memory);

    function positionsOf(address accountAddress)
        external
        view
        returns (UserPosition memory);

    function rewardTokensPositionsOf(address, address)
        external
        view
        returns (IUserProxy.RewardToken[] memory);

    function veTotalBalanceOf(ISolidlyLens.PositionVe[] memory positions)
        external
        pure
        returns (uint256);

    function oxPoolsLength() external view returns (uint256);

    function userProxiesLength() external view returns (uint256);

    function userProxyByAccount(address accountAddress)
        external
        view
        returns (address);

    function userProxyByIndex(uint256 index) external view returns (address);

    function gaugeBySolidPool(address) external view returns (address);

    function solidPoolByOxPool(address oxPoolAddress)
        external
        view
        returns (address);

    function oxPoolBySolidPool(address solidPoolAddress)
        external
        view
        returns (address);

    function stakingRewardsBySolidPool(address solidPoolAddress)
        external
        view
        returns (address);

    function stakingRewardsByOxPool(address solidPoolAddress)
        external
        view
        returns (address);

    function isOxPool(address oxPoolAddress) external view returns (bool);

    function oxPoolsAddresses() external view returns (address[] memory);

    function oxPoolData(address oxPoolAddress)
        external
        view
        returns (OxPoolData memory);

    function oxPoolsData(address[] memory _oxPoolsAddresses)
        external
        view
        returns (OxPoolData[] memory);

    function oxPoolsData() external view returns (OxPoolData[] memory);

    function oxSolid() external view returns (IOxSolid);

    function oxd() external view returns (IOxd);

    function vlOxd() external view returns (IVlOxd);

    function oxPoolFactory() external view returns (IOxPoolFactory);

    function solid() external view returns (ISolid);

    function ve() external view returns (IVe);

    function voterProxy() external view returns (IVoterProxy);

    function votingSnapshot() external view returns (IVotingSnapshot);

    function tokensAllowlist() external view returns (ITokensAllowlist);

    function isPartner(address userProxyAddress) external view returns (bool);

    function stakedOxSolidBalanceOf(address accountAddress)
        external
        view
        returns (uint256 stakedBalance);

    function solidInflationSinceInception() external view returns (uint256);
}

File 6 of 24 : IUserProxy.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

interface IUserProxy {
    struct PositionStakingPool {
        address stakingPoolAddress;
        address oxPoolAddress;
        address solidPoolAddress;
        uint256 balanceOf;
        RewardToken[] rewardTokens;
    }

    function initialize(
        address,
        address,
        address,
        address[] memory
    ) external;

    struct RewardToken {
        address rewardTokenAddress;
        uint256 rewardRate;
        uint256 rewardPerToken;
        uint256 getRewardForDuration;
        uint256 earned;
    }

    struct Vote {
        address poolAddress;
        int256 weight;
    }

    function convertNftToOxSolid(uint256) external;

    function convertSolidToOxSolid(uint256) external;

    function depositLpAndStake(address, uint256) external;

    function depositLp(address, uint256) external;

    function stakingAddresses() external view returns (address[] memory);

    function initialize(address, address) external;

    function stakingPoolsLength() external view returns (uint256);

    function unstakeLpAndWithdraw(
        address,
        uint256,
        bool
    ) external;

    function unstakeLpAndWithdraw(address, uint256) external;

    function unstakeLpWithdrawAndClaim(address) external;

    function unstakeLpWithdrawAndClaim(address, uint256) external;

    function withdrawLp(address, uint256) external;

    function stakeOxLp(address, uint256) external;

    function unstakeOxLp(address, uint256) external;

    function ownerAddress() external view returns (address);

    function stakingPoolsPositions()
        external
        view
        returns (PositionStakingPool[] memory);

    function stakeOxSolid(uint256) external;

    function unstakeOxSolid(uint256) external;

    function unstakeOxSolid(address, uint256) external;

    function convertSolidToOxSolidAndStake(uint256) external;

    function convertNftToOxSolidAndStake(uint256) external;

    function claimOxSolidStakingRewards() external;

    function claimPartnerStakingRewards() external;

    function claimStakingRewards(address) external;

    function claimStakingRewards(address[] memory) external;

    function claimStakingRewards() external;

    function claimVlOxdRewards() external;

    function depositOxd(uint256, uint256) external;

    function withdrawOxd(bool, uint256) external;

    function voteLockOxd(uint256, uint256) external;

    function withdrawVoteLockedOxd(uint256, bool) external;

    function relockVoteLockedOxd(uint256) external;

    function removeVote(address) external;

    function registerStake(address) external;

    function registerUnstake(address) external;

    function resetVotes() external;

    function setVoteDelegate(address) external;

    function clearVoteDelegate() external;

    function vote(address, int256) external;

    function vote(Vote[] memory) external;

    function votesByAccount(address) external view returns (Vote[] memory);

    function migrateOxSolidToPartner() external;

    function stakeOxSolidInOxdV1(uint256) external;

    function unstakeOxSolidInOxdV1(uint256) external;

    function redeemOxdV1(uint256) external;

    function redeemAndStakeOxdV1(uint256) external;
}

File 7 of 24 : IUserProxyFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

interface IUserProxyFactory {
    function createAndGetUserProxy(address) external returns (address);

    function oxLensAddress() external view returns (address);

    function userProxyByAccount(address) external view returns (address);

    function userProxyByIndex(uint256) external view returns (address);

    function userProxyInterfaceAddress() external view returns (address);

    function userProxiesLength() external view returns (uint256);

    function isUserProxy(address) external view returns (bool);
}

File 8 of 24 : ISolid.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

interface ISolid {
    function transferFrom(
        address,
        address,
        uint256
    ) external;

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

    function approve(address, uint256) external;

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

    function router() external view returns (address);

    function minter() external view returns (address);
}

File 9 of 24 : IVe.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

interface IVe {
    function safeTransferFrom(
        address,
        address,
        uint256
    ) external;

    function ownerOf(uint256) external view returns (address);

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

    function balanceOfNFT(uint256) external view returns (uint256);

    function balanceOfNFTAt(uint256, uint256) external view returns (uint256);

    function balanceOfAtNFT(uint256, uint256) external view returns (uint256);

    function locked(uint256) external view returns (uint256);

    function create_lock(uint256, uint256) external returns (uint256);

    function approve(address, uint256) external;

    function merge(uint256, uint256) external;

    function token() external view returns (address);

    function voter() external view returns (address);

    function tokenOfOwnerByIndex(address, uint256)
        external
        view
        returns (uint256);
}

File 10 of 24 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

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

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

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

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - 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) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][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) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), 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:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `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 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 11 of 24 : 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 12 of 24 : 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);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 15 of 24 : IOxd.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IOxd is IERC20 {
    function mint(address to, uint256 amount) external;
}

File 16 of 24 : IVlOxd.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

interface IVlOxd {
    struct LocksData {
        uint256 total;
        uint256 unlockable;
        uint256 locked;
        LockedBalance[] locks;
    }

    struct LockedBalance {
        uint112 amount;
        uint112 boosted;
        uint32 unlockTime;
    }

    struct EarnedData {
        address token;
        uint256 amount;
    }

    struct Reward {
        bool useBoost;
        uint40 periodFinish;
        uint208 rewardRate;
        uint40 lastUpdateTime;
        uint208 rewardPerTokenStored;
        address rewardsDistributor;
    }

    function lock(
        address _account,
        uint256 _amount,
        uint256 _spendRatio
    ) external;

    function processExpiredLocks(
        bool _relock,
        uint256 _spendRatio,
        address _withdrawTo
    ) external;

    function lockedBalanceOf(address) external view returns (uint256 amount);

    function lockedBalances(address)
        external
        view
        returns (
            uint256,
            uint256,
            uint256,
            LockedBalance[] memory
        );

    function claimableRewards(address _account)
        external
        view
        returns (EarnedData[] memory userRewards);

    function rewardTokensLength() external view returns (uint256);

    function rewardTokens(uint256) external view returns (address);

    function rewardData(address) external view returns (Reward memory);

    function rewardPerToken(address) external view returns (uint256);

    function getRewardForDuration(address) external view returns (uint256);

    function getReward() external;
}

File 17 of 24 : IOxPoolFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

interface IOxPoolFactory {
    function oxPoolsLength() external view returns (uint256);

    function isOxPool(address) external view returns (bool);

    function OXD() external view returns (address);

    function syncPools(uint256) external;

    function oxPools(uint256) external view returns (address);

    function oxPoolBySolidPool(address) external view returns (address);

    function vlOxdAddress() external view returns (address);

    function solidPoolByOxPool(address) external view returns (address);

    function syncedPoolsLength() external returns (uint256);

    function solidlyLensAddress() external view returns (address);

    function voterProxyAddress() external view returns (address);

    function rewardsDistributorAddress() external view returns (address);

    function tokensAllowlist() external view returns (address);
}

File 18 of 24 : IOxSolid.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IOxSolid is IERC20 {
    function mint(address, uint256) external;

    function convertNftToOxSolid(uint256) external;
}

File 19 of 24 : ISolidlyLens.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

interface ISolidlyLens {
    struct Pool {
        address id;
        string symbol;
        bool stable;
        address token0Address;
        address token1Address;
        address gaugeAddress;
        address bribeAddress;
        address[] bribeTokensAddresses;
        address fees;
    }

    struct PositionVe {
        uint256 tokenId;
        uint256 balanceOf;
        uint256 locked;
    }

    struct PositionBribesByTokenId {
        uint256 tokenId;
        PositionBribe[] bribes;
    }

    struct PositionBribe {
        address bribeTokenAddress;
        uint256 earned;
    }

    struct PositionPool {
        address id;
        uint256 balanceOf;
    }

    function poolsLength() external view returns (uint256);

    function voterAddress() external view returns (address);

    function veAddress() external view returns (address);

    function poolsFactoryAddress() external view returns (address);

    function gaugesFactoryAddress() external view returns (address);

    function minterAddress() external view returns (address);

    function solidAddress() external view returns (address);

    function vePositionsOf(address) external view returns (PositionVe[] memory);

    function bribeAddresByPoolAddress(address) external view returns (address);

    function gaugeAddressByPoolAddress(address) external view returns (address);

    function poolsPositionsOf(address)
        external
        view
        returns (PositionPool[] memory);

    function poolInfo(address) external view returns (Pool memory);
}

File 20 of 24 : IVotingSnapshot.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11||0.6.12;
pragma experimental ABIEncoderV2;

interface IVotingSnapshot {
    struct Vote {
        address poolAddress;
        int256 weight;
    }

    function vote(address, int256) external;

    function vote(Vote[] memory) external;

    function removeVote(address) external;

    function resetVotes() external;

    function resetVotes(address) external;

    function setVoteDelegate(address) external;

    function clearVoteDelegate() external;

    function voteDelegateByAccount(address) external view returns (address);

    function votesByAccount(address) external view returns (Vote[] memory);

    function voteWeightTotalByAccount(address) external view returns (uint256);

    function voteWeightUsedByAccount(address) external view returns (uint256);

    function voteWeightAvailableByAccount(address)
        external
        view
        returns (uint256);
}

File 21 of 24 : IVoterProxy.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

interface IVoterProxy {
    function depositInGauge(address, uint256) external;

    function withdrawFromGauge(address, uint256) external;

    function getRewardFromGauge(
        address _gauge,
        address _staking,
        address[] memory _tokens
    ) external;

    function depositNft(uint256) external;

    function veAddress() external returns (address);

    function lockSolid(uint256 amount) external;

    function primaryTokenId() external view returns (uint256);

    function vote(address[] memory, int256[] memory) external;

    function votingSnapshotAddress() external view returns (address);

    function solidInflationSinceInception() external view returns (uint256);

    function getRewardFromBribe(
        address oxPoolAddress,
        address[] memory _tokensAddresses
    ) external returns (bool allClaimed, bool[] memory claimed);

    function getFeeTokensFromBribe(address oxPoolAddress)
        external
        returns (bool allClaimed);

    function claimSolid(address oxPoolAddress)
        external
        returns (bool _claimSolid);
}

File 22 of 24 : IOxdV1Rewards.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./IMultiRewards.sol";

interface IOxdV1Rewards is IMultiRewards {
    function stakingCap(address account) external view returns (uint256 cap);
}

File 23 of 24 : ITokensAllowlist.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

interface ITokensAllowlist {
    function tokenIsAllowed(address) external view returns (bool);

    function bribeTokensSyncPageSize() external view returns (uint256);

    function bribeTokensNotifyPageSize() external view returns (uint256);

    function bribeSyncLagLimit() external view returns (uint256);

    function notifyFrequency()
        external
        view
        returns (uint256 bribeFrequency, uint256 feeFrequency);

    function feeClaimingDisabled(address) external view returns (bool);

    function periodBetweenClaimSolid() external view returns (uint256);

    function periodBetweenClaimFee() external view returns (uint256);

    function periodBetweenClaimBribe() external view returns (uint256);
}

File 24 of 24 : IMultiRewards.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

interface IMultiRewards {
    struct Reward {
        address rewardsDistributor;
        uint256 rewardsDuration;
        uint256 periodFinish;
        uint256 rewardRate;
        uint256 lastUpdateTime;
        uint256 rewardPerTokenStored;
    }

    function stake(uint256) external;

    function withdraw(uint256) external;

    function getReward() external;

    function stakingToken() external view returns (address);

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

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

    function initialize(address, address) external;

    function rewardRate(address) external view returns (uint256);

    function getRewardForDuration(address) external view returns (uint256);

    function rewardPerToken(address) external view returns (uint256);

    function rewardData(address) external view returns (Reward memory);

    function rewardTokensLength() external view returns (uint256);

    function rewardTokens(uint256) external view returns (address);

    function totalSupply() external view returns (uint256);

    function addReward(
        address _rewardsToken,
        address _rewardsDistributor,
        uint256 _rewardsDuration
    ) external;

    function notifyRewardAmount(address, uint256) external;

    function recoverERC20(address tokenAddress, uint256 tokenAmount) external;

    function setRewardsDuration(address _rewardsToken, uint256 _rewardsDuration)
        external;

    function exit() external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"claimAllStakingRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimOxSolidStakingRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimStakingRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"stakingPoolAddress","type":"address"}],"name":"claimStakingRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimV1OxSolidStakingRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimVlOxdStakingRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"clearVoteDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"convertNftToOxSolid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"convertNftToOxSolidAndStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"convertSolidToOxSolid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"convertSolidToOxSolid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"convertSolidToOxSolidAndStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"convertSolidToOxSolidAndStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"solidPoolAddress","type":"address"}],"name":"depositLp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"solidPoolAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"depositLp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"solidPoolAddress","type":"address"}],"name":"depositLpAndStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"solidPoolAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"depositLpAndStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_userProxyFactoryAddress","type":"address"},{"internalType":"address","name":"_oxLensAddress","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrateOxSolidToPartner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"oxLensAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"redeemAndStakeOxdV1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeemAndStakeOxdV1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"redeemOxdV1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeemOxdV1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"spendRatio","type":"uint256"}],"name":"relockVoteLockedOxd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"poolAddress","type":"address"}],"name":"removeVote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resetVotes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"accountAddress","type":"address"}],"name":"setVoteDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"oxPoolAddress","type":"address"}],"name":"stakeOxLp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"oxPoolAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stakeOxLp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeOxSolid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stakeOxSolid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stakeOxSolidInOxdV1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeOxSolidInOxdV1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"solidPoolAddress","type":"address"}],"name":"unstakeLpAndWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"solidPoolAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstakeLpAndWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"solidPoolAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstakeLpWithdrawAndClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"solidPoolAddress","type":"address"}],"name":"unstakeLpWithdrawAndClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"oxPoolAddress","type":"address"}],"name":"unstakeOxLp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"oxPoolAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstakeOxLp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"stakingAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstakeOxSolid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unstakeOxSolid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstakeOxSolid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstakeOxSolidInOxdV1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"userProxyFactoryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"poolAddress","type":"address"},{"internalType":"int256","name":"weight","type":"int256"}],"internalType":"struct IUserProxy.Vote[]","name":"votes","type":"tuple[]"}],"name":"vote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"poolAddress","type":"address"},{"internalType":"int256","name":"weight","type":"int256"}],"name":"vote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"spendRatio","type":"uint256"}],"name":"voteLockOxd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"solidPoolAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawLp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"solidPoolAddress","type":"address"}],"name":"withdrawLp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"spendRatio","type":"uint256"}],"name":"withdrawVoteLockedOxd","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506130f7806100206000396000f3fe608060405234801561001057600080fd5b506004361061030c5760003560e01c806373ba45d71161019d578063b4eb3699116100e9578063db636eee116100a2578063e8ce1cff1161007c578063e8ce1cff14610656578063edf187f01461065e578063f6fe675914610666578063fce07e891461067957600080fd5b8063db636eee14610628578063e338eab314610630578063e4089abe1461064357600080fd5b8063b4eb3699146105ed578063b9065a8814610600578063b9830ff114610608578063bcec2cc714610610578063ce56bffd14610618578063d91a88731461062057600080fd5b80639bdf746a11610156578063b0dfaa7a11610130578063b0dfaa7a146105a1578063b1611d15146105b4578063b2b32887146105c7578063b4425fd4146105da57600080fd5b80639bdf746a14610568578063a36707321461057b578063a62323ca1461058e57600080fd5b806373ba45d7146104f6578063748743231461050957806386fcf6b01461051c5780638aace6081461052f5780638b043f431461054257806396bb1fef1461055557600080fd5b80633ccc1f531161025c57806350bad775116102155780635d696cf2116101ef5780635d696cf2146104c05780636393f5a3146104c85780636b69e05b146104db5780637082df00146104e357600080fd5b806350bad7751461049d57806357f125c0146104b05780635b9b8b63146104b857600080fd5b80633ccc1f531461043657806344963170146104495780634700188b1461045c578063485cc955146104645780634c610084146104775780634db6ba3b1461048a57600080fd5b80631794caaf116102c9578063222cc519116102a3578063222cc519146103ea578063243c11bb146103fd5780632560d350146104105780632cdd61241461042357600080fd5b80631794caaf146103b15780631bad0a1c146103c457806321bbcc54146103d757600080fd5b806301aee6bd14610311578063086d6e401461031b57806308be3ab61461032e5780630e0d27351461035e5780630f16ec8e14610371578063150b7a0214610379575b600080fd5b61031961068c565b005b610319610329366004612d2b565b610707565b600154610341906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b600054610341906001600160a01b031681565b610319610784565b610398610387366004612d57565b630a85bd0160e11b95945050505050565b6040516001600160e01b03199091168152602001610355565b6103196103bf366004612df6565b6107e6565b6103196103d2366004612e7f565b6108ec565b6103196103e5366004612f55565b61095b565b6103196103f8366004612df6565b6109e7565b61031961040b366004612f55565b610b11565b61031961041e366004612f55565b610b97565b610319610431366004612d2b565b610bb2565b610319610444366004612f55565b610bed565b610319610457366004612d2b565b610c29565b610319610df7565b610319610472366004612f79565b610e3e565b610319610485366004612f55565b6110d1565b610319610498366004612df6565b6110e8565b6103196104ab366004612df6565b6112ed565b6103196113f1565b6103196114c4565b6103196114e6565b6103196104d6366004612f55565b611592565b61031961168c565b6103196104f1366004612df6565b6116d3565b610319610504366004612df6565b6117d6565b610319610517366004612f55565b61188b565b61031961052a366004612df6565b6118c7565b61031961053d366004612d2b565b6119cd565b610319610550366004612df6565b611a08565b610319610563366004612f55565b611c0d565b610319610576366004612f55565b611c49565b610319610589366004612d2b565b611ccf565b61031961059c366004612d2b565b611e2a565b6103196105af366004612d2b565b611f4d565b6103196105c2366004612d2b565b611f88565b6103196105d5366004612f55565b6120ab565b6103196105e8366004612df6565b6121a5565b6103196105fb366004612df6565b6122cf565b610319612309565b6103196123ec565b610319612433565b6103196124ab565b610319612539565b6103196125c2565b61031961063e366004612fb2565b61276b565b610319610651366004612df6565b61293f565b610319612980565b610319612a63565b610319610674366004612df6565b612aaa565b610319610687366004612d2b565b612b60565b6005546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156106d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f99190612fd4565b9050610704816109e7565b50565b6000610711612baa565b604051631befc4d360e11b81526001600160a01b0385811660048301526024820185905260016044830152919250908216906337df89a6906064015b600060405180830381600087803b15801561076757600080fd5b505af115801561077b573d6000803e3d6000fd5b50505050505050565b600061078e612baa565b9050806001600160a01b0316630f16ec8e6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156107cb57600080fd5b505af11580156107df573d6000803e3d6000fd5b5050505050565b60006107f0612baa565b600354604051632142170760e11b815291925033916001600160a01b03909116906342842e0e9061082990849030908890600401612fed565b600060405180830381600087803b15801561084357600080fd5b505af1158015610857573d6000803e3d6000fd5b505060035460405163095ea7b360e01b81526001600160a01b03909116925063095ea7b3915061088d9085908790600401613011565b600060405180830381600087803b1580156108a757600080fd5b505af11580156108bb573d6000803e3d6000fd5b5050604051631794caaf60e01b8152600481018690526001600160a01b0385169250631794caaf915060240161074d565b60006108f6612baa565b6040516306eb428760e21b81529091506001600160a01b03821690631bad0a1c9061092590859060040161302a565b600060405180830381600087803b15801561093f57600080fd5b505af1158015610953573d6000803e3d6000fd5b505050505050565b6000610965612baa565b6040516370a0823160e01b815233600482018190529192506000906001600160a01b038516906370a0823190602401602060405180830381865afa1580156109b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d59190612fd4565b90506109e18482611e2a565b50505050565b60006109f1612baa565b6005546040516323b872dd60e01b815291925033916001600160a01b03909116906323b872dd90610a2a90849030908890600401612fed565b6020604051808303816000875af1158015610a49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6d9190613082565b5060055460405163095ea7b360e01b81526001600160a01b039091169063095ea7b390610aa09085908790600401613011565b6020604051808303816000875af1158015610abf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae39190613082565b5060405163222cc51960e01b8152600481018490526001600160a01b0383169063222cc5199060240161074d565b6000610b1b612baa565b6040516370a0823160e01b815233600482018190529192506000906001600160a01b038516906370a0823190602401602060405180830381865afa158015610b67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8b9190612fd4565b90506109e18482611ccf565b6000610ba282612c1e565b9050610bae8282610707565b5050565b6000610bbc612baa565b604051630b37584960e21b81529091506001600160a01b03821690632cdd61249061074d9086908690600401613011565b6000610bf7612baa565b604051633ccc1f5360e01b81526001600160a01b03848116600483015291925090821690633ccc1f5390602401610925565b6000610c33612baa565b60025460405163043515c360e21b81526001600160a01b038681166004830152929350339260009216906310d4570c90602401602060405180830381865afa158015610c83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca791906130a4565b6040516323b872dd60e01b81529091506001600160a01b038216906323b872dd90610cda90859030908990600401612fed565b6020604051808303816000875af1158015610cf9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1d9190613082565b5060405163095ea7b360e01b81526001600160a01b0382169063095ea7b390610d4c9086908890600401613011565b6020604051808303816000875af1158015610d6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8f9190613082565b50604051630449631760e41b81526001600160a01b03841690634496317090610dbe9088908890600401613011565b600060405180830381600087803b158015610dd857600080fd5b505af1158015610dec573d6000803e3d6000fd5b505050505050505050565b6000610e01612baa565b9050806001600160a01b031663141995d86040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156107cb57600080fd5b6000546001600160a01b031615610e915760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015260640160405180910390fd5b600080546001600160a01b038085166001600160a01b0319928316179092556001805492841692821683179055600280549091168217905560408051630fc2838b60e11b81529051631f850716916004808201926020929091908290030181865afa158015610f04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2891906130a4565b600380546001600160a01b0319166001600160a01b03928316179055600254604080516329d1fb0b60e11b8152905191909216916353a3f6169160048083019260209291908290030181865afa158015610f86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610faa91906130a4565b600480546001600160a01b0319166001600160a01b039283161781556002546040805163d98fa39760e01b81529051919093169263d98fa39792818101926020929091908290030181865afa158015611007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102b91906130a4565b600580546001600160a01b0319166001600160a01b039283161790556002546040805163b01e033960e01b81529051919092169163b01e03399160048083019260209291908290030181865afa158015611089573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ad91906130a4565b600680546001600160a01b0319166001600160a01b03929092169190911790555050565b60006110dc82612c1e565b9050610bae8282612b60565b60006110f2612baa565b6002546040805163f4262b1160e01b8152905192935033926001600160a01b039092169163f4262b11916004808201926020929091908290030181865afa158015611141573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116591906130a4565b6001600160a01b03166323b872dd8230866040518463ffffffff1660e01b815260040161119493929190612fed565b6020604051808303816000875af11580156111b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d79190613082565b50600260009054906101000a90046001600160a01b03166001600160a01b031663f4262b116040518163ffffffff1660e01b8152600401602060405180830381865afa15801561122b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061124f91906130a4565b6001600160a01b031663095ea7b383856040518363ffffffff1660e01b815260040161127c929190613011565b6020604051808303816000875af115801561129b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112bf9190613082565b50604051634db6ba3b60e01b8152600481018490526001600160a01b03831690634db6ba3b9060240161074d565b60006112f7612baa565b600480546040516323b872dd60e01b815292935033926001600160a01b03909116916323b872dd9161132f9185913091899101612fed565b600060405180830381600087803b15801561134957600080fd5b505af115801561135d573d6000803e3d6000fd5b50506004805460405163095ea7b360e01b81526001600160a01b03909116935063095ea7b39250611392918691889101613011565b600060405180830381600087803b1580156113ac57600080fd5b505af11580156113c0573d6000803e3d6000fd5b50506040516350bad77560e01b8152600481018690526001600160a01b03851692506350bad775915060240161074d565b60006113fb612baa565b9050806001600160a01b03166396bb1fef600260009054906101000a90046001600160a01b03166001600160a01b031663b93c1f866040518163ffffffff1660e01b8152600401602060405180830381865afa15801561145f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061148391906130a4565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381600087803b1580156107cb57600080fd5b6114cc61168c565b6114d46125c2565b6114dc6113f1565b6114e4610df7565b565b60006114f0612baa565b60025460405163961dbfa960e01b81523360048201529192506000916001600160a01b039091169063961dbfa990602401602060405180830381865afa15801561153e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115629190612fd4565b6040516373ba45d760e01b8152600481018290529091506001600160a01b038316906373ba45d790602401610925565b600061159c612baa565b60025460405163c037801360e01b81526001600160a01b0385811660048301529293506000929091169063c037801390602401602060405180830381865afa1580156115ec573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161091906130a4565b6040516370a0823160e01b81526001600160a01b0384811660048301529192506000918316906370a0823190602401602060405180830381865afa15801561165c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116809190612fd4565b90506109e184826119cd565b6000611696612baa565b9050806001600160a01b0316636b69e05b6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156107cb57600080fd5b60006116dd612baa565b600480546040516323b872dd60e01b815292935033926001600160a01b03909116916323b872dd916117159185913091899101612fed565b600060405180830381600087803b15801561172f57600080fd5b505af1158015611743573d6000803e3d6000fd5b50506004805460405163095ea7b360e01b81526001600160a01b03909116935063095ea7b39250611778918691889101613011565b600060405180830381600087803b15801561179257600080fd5b505af11580156117a6573d6000803e3d6000fd5b5050604051627082df60e81b8152600481018690526001600160a01b0385169250637082df00915060240161074d565b60006117e0612baa565b90506000600260009054906101000a90046001600160a01b03166001600160a01b0316636646e2de6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611837573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185b91906130a4565b6040516373ba45d760e01b8152600481018590529091506001600160a01b038316906373ba45d79060240161074d565b6000611895612baa565b604051637487432360e01b81526001600160a01b03848116600483015291925090821690637487432390602401610925565b60006118d1612baa565b600354604051632142170760e11b815291925033916001600160a01b03909116906342842e0e9061190a90849030908890600401612fed565b600060405180830381600087803b15801561192457600080fd5b505af1158015611938573d6000803e3d6000fd5b505060035460405163095ea7b360e01b81526001600160a01b03909116925063095ea7b3915061196e9085908790600401613011565b600060405180830381600087803b15801561198857600080fd5b505af115801561199c573d6000803e3d6000fd5b505060405163086fcf6b60e41b8152600481018690526001600160a01b03851692506386fcf6b0915060240161074d565b60006119d7612baa565b6040516311559cc160e31b81529091506001600160a01b03821690638aace6089061074d9086908690600401613011565b6000611a12612baa565b6002546040805163f4262b1160e01b8152905192935033926001600160a01b039092169163f4262b11916004808201926020929091908290030181865afa158015611a61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8591906130a4565b6001600160a01b03166323b872dd8230866040518463ffffffff1660e01b8152600401611ab493929190612fed565b6020604051808303816000875af1158015611ad3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af79190613082565b50600260009054906101000a90046001600160a01b03166001600160a01b031663f4262b116040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b6f91906130a4565b6001600160a01b031663095ea7b383856040518363ffffffff1660e01b8152600401611b9c929190613011565b6020604051808303816000875af1158015611bbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bdf9190613082565b50604051638b043f4360e01b8152600481018490526001600160a01b03831690638b043f439060240161074d565b6000611c17612baa565b6040516396bb1fef60e01b81526001600160a01b038481166004830152919250908216906396bb1fef90602401610925565b6000611c53612baa565b6040516370a0823160e01b815233600482018190529192506000906001600160a01b038516906370a0823190602401602060405180830381865afa158015611c9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cc39190612fd4565b90506109e18482611f88565b6000611cd9612baa565b6040516323b872dd60e01b815290915033906001600160a01b038516906323b872dd90611d0e90849030908890600401612fed565b6020604051808303816000875af1158015611d2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d519190613082565b5060405163095ea7b360e01b81526001600160a01b0385169063095ea7b390611d809085908790600401613011565b6020604051808303816000875af1158015611d9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc39190613082565b506040516351b3839960e11b81526001600160a01b0383169063a367073290611df29087908790600401613011565b600060405180830381600087803b158015611e0c57600080fd5b505af1158015611e20573d6000803e3d6000fd5b5050505050505050565b6000611e34612baa565b6040516323b872dd60e01b815290915033906001600160a01b038516906323b872dd90611e6990849030908890600401612fed565b6020604051808303816000875af1158015611e88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eac9190613082565b5060405163095ea7b360e01b81526001600160a01b0385169063095ea7b390611edb9085908790600401613011565b6020604051808303816000875af1158015611efa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f1e9190613082565b5060405163531191e560e11b81526001600160a01b0383169063a62323ca90611df29087908790600401613011565b6000611f57612baa565b60405163586fd53d60e11b81529091506001600160a01b0382169063b0dfaa7a9061074d9086908690600401613011565b6000611f92612baa565b6040516323b872dd60e01b815290915033906001600160a01b038516906323b872dd90611fc790849030908890600401612fed565b6020604051808303816000875af1158015611fe6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200a9190613082565b5060405163095ea7b360e01b81526001600160a01b0385169063095ea7b3906120399085908790600401613011565b6020604051808303816000875af1158015612058573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061207c9190613082565b5060405163b1611d1560e01b81526001600160a01b0383169063b1611d1590611df29087908790600401613011565b60006120b5612baa565b60025460405163043515c360e21b81526001600160a01b038581166004830152929350339260009216906310d4570c90602401602060405180830381865afa158015612105573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061212991906130a4565b6040516370a0823160e01b81526001600160a01b0384811660048301529192506000918316906370a0823190602401602060405180830381865afa158015612175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121999190612fd4565b90506107df8582610c29565b60006121af612baa565b6005546040516323b872dd60e01b815291925033916001600160a01b03909116906323b872dd906121e890849030908890600401612fed565b6020604051808303816000875af1158015612207573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222b9190613082565b5060055460405163095ea7b360e01b81526001600160a01b039091169063095ea7b39061225e9085908790600401613011565b6020604051808303816000875af115801561227d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122a19190613082565b50604051632d1097f560e21b8152600481018490526001600160a01b0383169063b4425fd49060240161074d565b60006122d9612baa565b60405163b4eb369960e01b8152600481018490529091506001600160a01b0382169063b4eb369990602401610925565b6002546040805163f4262b1160e01b815290516000926001600160a01b03169163f4262b119160048083019260209291908290030181865afa158015612353573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061237791906130a4565b6040516370a0823160e01b81523360048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa1580156123bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123e19190612fd4565b905061070481611a08565b60006123f6612baa565b9050806001600160a01b031663b9830ff16040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156107cb57600080fd5b6005546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561247c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124a09190612fd4565b9050610704816121a5565b60006124b5612baa565b600480546040516370a0823160e01b81523392810183905292935090916000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612505573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125299190612fd4565b9050612534816112ed565b505050565b6000612543612baa565b600480546040516370a0823160e01b81523392810183905292935090916000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612593573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125b79190612fd4565b9050612534816116d3565b60006125cc612baa565b600254604051632303e6ab60e21b81526001600160a01b03808416600483015292935060009290911690638c0f9aac90602401602060405180830381865afa15801561261c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126409190613082565b156126c357600260009054906101000a90046001600160a01b03166001600160a01b0316631c0b05d76040518163ffffffff1660e01b8152600401602060405180830381865afa158015612698573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126bc91906130a4565b905061273d565b600260009054906101000a90046001600160a01b03166001600160a01b0316636646e2de6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612716573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061273a91906130a4565b90505b6040516396bb1fef60e01b81526001600160a01b0382811660048301528316906396bb1fef90602401610925565b6000612775612baa565b6006546040516323b872dd60e01b815291925033916001600160a01b03909116906323b872dd906127ae90849030908990600401612fed565b6020604051808303816000875af11580156127cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127f19190613082565b5060065460405163095ea7b360e01b81526001600160a01b039091169063095ea7b3906128249085908890600401613011565b6020604051808303816000875af1158015612843573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128679190613082565b5060405163e338eab360e01b815260048101859052602481018490526001600160a01b0383169063e338eab390604401600060405180830381600087803b1580156128b157600080fd5b505af11580156128c5573d6000803e3d6000fd5b505060065460405163095ea7b360e01b81526001600160a01b03909116925063095ea7b391506128fc908590600090600401613011565b6020604051808303816000875af115801561291b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107df9190613082565b6000612949612baa565b60405163627a167f60e01b815260048101849052600060248201529091506001600160a01b0382169063627a167f90604401610925565b6002546040805163f4262b1160e01b815290516000926001600160a01b03169163f4262b119160048083019260209291908290030181865afa1580156129ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ee91906130a4565b6040516370a0823160e01b81523360048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015612a34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a589190612fd4565b9050610704816110e8565b6000612a6d612baa565b9050806001600160a01b031663edf187f06040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156107cb57600080fd5b6000612ab4612baa565b90506000600260009054906101000a90046001600160a01b03166001600160a01b031663b93c1f866040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b2f91906130a4565b604051630b37584960e21b81529091506001600160a01b03831690632cdd61249061074d9084908790600401613011565b6000612b6a612baa565b604051631befc4d360e11b81526001600160a01b0385811660048301526024820185905260006044830152919250908216906337df89a69060640161074d565b600080546040516303a1d0cf60e01b81523360048201526001600160a01b03909116906303a1d0cf906024016020604051808303816000875af1158015612bf5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c1991906130a4565b905090565b600080612c29612baa565b6002546040516310a5af5760e31b81526001600160a01b0386811660048301529293506000929091169063852d7ab890602401602060405180830381865afa158015612c79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c9d91906130a4565b6040516370a0823160e01b81526001600160a01b0384811660048301529192506000918316906370a0823190602401602060405180830381865afa158015612ce9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d0d9190612fd4565b95945050505050565b6001600160a01b038116811461070457600080fd5b60008060408385031215612d3e57600080fd5b8235612d4981612d16565b946020939093013593505050565b600080600080600060808688031215612d6f57600080fd5b8535612d7a81612d16565b94506020860135612d8a81612d16565b935060408601359250606086013567ffffffffffffffff80821115612dae57600080fd5b818801915088601f830112612dc257600080fd5b813581811115612dd157600080fd5b896020828501011115612de357600080fd5b9699959850939650602001949392505050565b600060208284031215612e0857600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715612e4857612e48612e0f565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612e7757612e77612e0f565b604052919050565b60006020808385031215612e9257600080fd5b823567ffffffffffffffff80821115612eaa57600080fd5b818501915085601f830112612ebe57600080fd5b813581811115612ed057612ed0612e0f565b612ede848260051b01612e4e565b818152848101925060069190911b830184019087821115612efe57600080fd5b928401925b81841015612f4a5760408489031215612f1c5760008081fd5b612f24612e25565b8435612f2f81612d16565b81528486013586820152835260409093019291840191612f03565b979650505050505050565b600060208284031215612f6757600080fd5b8135612f7281612d16565b9392505050565b60008060408385031215612f8c57600080fd5b8235612f9781612d16565b91506020830135612fa781612d16565b809150509250929050565b60008060408385031215612fc557600080fd5b50508035926020909101359150565b600060208284031215612fe657600080fd5b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b602080825282518282018190526000919060409081850190868401855b8281101561307557815180516001600160a01b03168552860151868501529284019290850190600101613047565b5091979650505050505050565b60006020828403121561309457600080fd5b81518015158114612f7257600080fd5b6000602082840312156130b657600080fd5b8151612f7281612d1656fea2646970667358221220b81677f413770aa8283b731a3cde0b7702c1a1e114c2eb1036dbd42d4fc2615d64736f6c634300080b0033

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.