Contract 0xc2054a8c33bfce28de8af4af548c48915c455c13 1

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x3d971fa6d2ec4962216fab2a8f5d43cecc3cbcae5fbad3a7d1af61d7b48a3b7fGet Reward281342512022-10-03 8:46:5321 mins ago0x28e8bade28a29c1c9e958364c55bf4143ba37af8 IN  Radiant: Multi Fee Distribution0 ETH0.00010045
0x67ddfd8c0af199859c87db7d9c85ccd931a7da7a3fd16f269e7d166284068a80Stake281339552022-10-03 8:45:0522 mins ago0x07078da8072f9690172649b4a7a68094994540c7 IN  Radiant: Multi Fee Distribution0 ETH0.00004659
0x67d734182eda349d838ba625d0101341528a9cbb0521fe0feabe6e44afb0f45bStake281339392022-10-03 8:44:5823 mins ago0x07078da8072f9690172649b4a7a68094994540c7 IN  Radiant: Multi Fee Distribution0 ETH0.00005517
0xbf8a315ff087f34468e46c55e1d2276687a6fd285951c00a9f297390eeaf30a0Get Reward281329742022-10-03 8:38:0629 mins ago0x869c9586f80a183df7dc7cb8b4f77374fe5744be IN  Radiant: Multi Fee Distribution0 ETH0.00011208
0xbe095ff7f917a750071abd0a54c6af293d464989c556944219a5a1dbc70f91d2Get Reward281317302022-10-03 8:29:3338 mins ago0x74b24dc2a74b143e2103b955df207f6490f25139 IN  Radiant: Multi Fee Distribution0 ETH0.00012956
0xae9f110144b92cd28bf6552fb5a8373ffee226223734d81e417ae1bf543a342eGet Reward281311672022-10-03 8:25:4442 mins ago0x5481484616fd5bcc97dd5bbb4f58daadf34d099d IN  Radiant: Multi Fee Distribution0 ETH0.00010219
0x84d27f561505fa67a57719323b94ed11fcf1aaa88886245c61f82f88889262afWithdraw Expired...281310642022-10-03 8:25:0243 mins ago0xffd8f75b0d871c70964db76dd4d47cb8e4029e6d IN  Radiant: Multi Fee Distribution0 ETH0.00004047
0xe2760dea12d5196cf619868199747188e4c9ad0d70c3aad7233e76072968cabfGet Reward281298122022-10-03 8:15:5952 mins ago0xffd8f75b0d871c70964db76dd4d47cb8e4029e6d IN  Radiant: Multi Fee Distribution0 ETH0.00010119
0x8d88ea5157fdeefc42247749aea14e18e859f8194e8138d21c0c9eec50f4de47Stake281275212022-10-03 8:01:591 hr 6 mins ago0x6da3471c674fbafd2fc8c0fda8895219ceb3bb77 IN  Radiant: Multi Fee Distribution0 ETH0.00004733
0x51491d3a469c13b4659015dc275bac8a46588245c55395daedb7fba29bed2d58Get Reward281273892022-10-03 8:01:061 hr 6 mins ago0x6da3471c674fbafd2fc8c0fda8895219ceb3bb77 IN  Radiant: Multi Fee Distribution0 ETH0.00010136
0x079b17d2a9d0252063416ed5b8c4c245f9bcda02824358a3c38a0fdc42ecb62aExit281249862022-10-03 7:44:511 hr 23 mins ago0xf9f048c4c86cb89e5c39ad94355ecd7aee56c606 IN  Radiant: Multi Fee Distribution0 ETH0.00029455
0x27fb09d706b4538f535b438e5043182527ac58b5e6336922154fb32ea5653b0bGet Reward281243882022-10-03 7:41:181 hr 26 mins ago0x4bc5f847eaa543f9a57a47f2700653392483c6a1 IN  Radiant: Multi Fee Distribution0 ETH0.00010043
0x2926e326941ff75a82a1e3a8d9b254292b219f755085b82db6806ee7121fdc45Stake281236022022-10-03 7:36:131 hr 31 mins ago0xba0094af9034b813d0ab8cbf9ef99afe88a89c1e IN  Radiant: Multi Fee Distribution0 ETH0.00005113
0x4bedea0dee7e601aa1fb31754d33c1ca40594dd09d484cf1c82df9f59efafee3Exit281235712022-10-03 7:36:021 hr 32 mins ago0xaf7bbcfb1c1f987e0ae409c684289b332a425254 IN  Radiant: Multi Fee Distribution0 ETH0.00028784
0x3de6e05cc176973040f51e8ffc5ce9c0b113231186be4ab3db7424f21fbe67ebStake281213092022-10-03 7:21:321 hr 46 mins ago0xb2043c543bb60fb7aa7265cdca359a35c4bc09fa IN  Radiant: Multi Fee Distribution0 ETH0.00003585
0xc97c6790a68941f46072d52c3c85c313130db93ea714e6de67105a95327f08d2Exit281210362022-10-03 7:19:461 hr 48 mins ago0x1ae3d567efa78eb59a24e05ec3391c701d5a17eb IN  Radiant: Multi Fee Distribution0 ETH0.00003994
0x7a7e04524e9045edead5edee67271725ce5455a159a19a930f45c4f248558d25Stake281201462022-10-03 7:14:111 hr 53 mins ago0x52048ed2642091dc568fc91852283a58b8882170 IN  Radiant: Multi Fee Distribution0 ETH0.00005265
0x5ee172edf2fadf86cd48ea4ec3ece3945efcad02e11d612899139770c0c61a5eStake281190162022-10-03 7:07:072 hrs ago0x450a673ad966dfb327054c70a74e9a95504f5dab IN  Radiant: Multi Fee Distribution0 ETH0.00005224
0x6fcf86fd166685c2342745d0b2888857d5511131153da809bc69f793fdb4edbcGet Reward281179372022-10-03 6:59:582 hrs 8 mins ago0xa19e0ff3bf948c49bd166273a37694ff72991f43 IN  Radiant: Multi Fee Distribution0 ETH0.0001101
0x75f0a8114279e9bffce9cc61927a48ba85a89d3176939e20c22793f76a643daeGet Reward281179162022-10-03 6:59:462 hrs 8 mins ago0x5481484616fd5bcc97dd5bbb4f58daadf34d099d IN  Radiant: Multi Fee Distribution0 ETH0.00009626
0x07692e227816b8de980ce98a366ec96303900433ffb3bfd17fdb0bde0d181d95Stake281176832022-10-03 6:58:082 hrs 9 mins ago0xd5b5775db326a44246713364588725c81fd08964 IN  Radiant: Multi Fee Distribution0 ETH0.0000524
0x979b0b5421b56d0f3e3bceb33d504bb6b5b2dfa76c26a5ad647933ff0e8251bcGet Reward281176162022-10-03 6:57:432 hrs 10 mins ago0x3a201a6410fced5fcc3af32a25b8db72888e54ee IN  Radiant: Multi Fee Distribution0 ETH0.0001182
0x5fa5e8ea03ec87a82d2d788d9332f799cf2663317a781963a7b3f67001c02576Stake281171422022-10-03 6:54:242 hrs 13 mins ago0xf28f707811558ea7cfa9da5b577de1406a2ed924 IN  Radiant: Multi Fee Distribution0 ETH0.00004513
0x97f9f5caa38a9484d9d4c21f663246b4c6d92ff26d981e8b0a4bfcc5364f71b2Stake281168692022-10-03 6:52:352 hrs 15 mins ago0x227f21a134d782ad7b733dad3bf697fa8be378b4 IN  Radiant: Multi Fee Distribution0 ETH0.00004551
0x55f28174edda7c9e6450bb76200bffe71e8b7bfb071b9d38da3ad4756d573551Get Reward281168012022-10-03 6:52:112 hrs 15 mins ago0xf28f707811558ea7cfa9da5b577de1406a2ed924 IN  Radiant: Multi Fee Distribution0 ETH0.00009632
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x56cb3243c802cca46b4de36804c169942d4815b121a9691c1f0148b0831ae260281375082022-10-03 9:07:539 secs ago Radiant: Multi Fee Distribution Radiant: RDNT Token0 ETH
0x56cb3243c802cca46b4de36804c169942d4815b121a9691c1f0148b0831ae260281375082022-10-03 9:07:539 secs ago Radiant: Quick Lock Radiant: Multi Fee Distribution0 ETH
0x56cb3243c802cca46b4de36804c169942d4815b121a9691c1f0148b0831ae260281375082022-10-03 9:07:539 secs ago Radiant: Multi Fee Distribution Radiant: RDNT Token0 ETH
0x56cb3243c802cca46b4de36804c169942d4815b121a9691c1f0148b0831ae260281375082022-10-03 9:07:539 secs ago Radiant: Chef Incentives Controller Radiant: Multi Fee Distribution0 ETH
0x56cb3243c802cca46b4de36804c169942d4815b121a9691c1f0148b0831ae260281375082022-10-03 9:07:539 secs ago Radiant: Multi Fee Distribution Radiant: Chef Incentives Controller0 ETH
0x56cb3243c802cca46b4de36804c169942d4815b121a9691c1f0148b0831ae260281375082022-10-03 9:07:539 secs ago Radiant: Multi Fee Distribution Radiant: RDNT Token0 ETH
0x56cb3243c802cca46b4de36804c169942d4815b121a9691c1f0148b0831ae260281375082022-10-03 9:07:539 secs ago Radiant: Quick Lock Radiant: Multi Fee Distribution0 ETH
0x56cb3243c802cca46b4de36804c169942d4815b121a9691c1f0148b0831ae260281375082022-10-03 9:07:539 secs ago Radiant: Multi Fee Distribution Radiant: RDNT Token0 ETH
0x56cb3243c802cca46b4de36804c169942d4815b121a9691c1f0148b0831ae260281375082022-10-03 9:07:539 secs ago Radiant: Chef Incentives Controller Radiant: Multi Fee Distribution0 ETH
0x7340dae78e93fd4da7e2fa88e044d77d9191d88408753d0e50c1f2da818214ce281346022022-10-03 8:49:0418 mins ago Radiant: Multi Fee Distribution Radiant: RDNT Token0 ETH
0x7340dae78e93fd4da7e2fa88e044d77d9191d88408753d0e50c1f2da818214ce281346022022-10-03 8:49:0418 mins ago Radiant: Chef Incentives Controller Radiant: Multi Fee Distribution0 ETH
0x3d971fa6d2ec4962216fab2a8f5d43cecc3cbcae5fbad3a7d1af61d7b48a3b7f281342512022-10-03 8:46:5321 mins ago Radiant: Multi Fee Distribution 0x4cd44e6fcfa68bf797c65889c74b26b8c2e5d4d30 ETH
0x3d971fa6d2ec4962216fab2a8f5d43cecc3cbcae5fbad3a7d1af61d7b48a3b7f281342512022-10-03 8:46:5321 mins ago Radiant: Multi Fee Distribution 0x15b53d277af860f51c3e6843f8075007026bbb3a0 ETH
0x3d971fa6d2ec4962216fab2a8f5d43cecc3cbcae5fbad3a7d1af61d7b48a3b7f281342512022-10-03 8:46:5321 mins ago Radiant: Multi Fee Distribution 0xef47ccc71ec8941b67dc679d1a5f78facfd0ec3c0 ETH
0x3d971fa6d2ec4962216fab2a8f5d43cecc3cbcae5fbad3a7d1af61d7b48a3b7f281342512022-10-03 8:46:5321 mins ago Radiant: Multi Fee Distribution 0x805ba50001779ced4f59cff63aea527d12b948290 ETH
0x3d971fa6d2ec4962216fab2a8f5d43cecc3cbcae5fbad3a7d1af61d7b48a3b7f281342512022-10-03 8:46:5321 mins ago Radiant: Multi Fee Distribution 0x5293c6ca56b8941040b8d18f557dfa82cf5202160 ETH
0x3d971fa6d2ec4962216fab2a8f5d43cecc3cbcae5fbad3a7d1af61d7b48a3b7f281342512022-10-03 8:46:5321 mins ago Radiant: Multi Fee Distribution Radiant: RDNT Token0 ETH
0x67ddfd8c0af199859c87db7d9c85ccd931a7da7a3fd16f269e7d166284068a80281339552022-10-03 8:45:0522 mins ago Radiant: Multi Fee Distribution Radiant: RDNT Token0 ETH
0x67d734182eda349d838ba625d0101341528a9cbb0521fe0feabe6e44afb0f45b281339392022-10-03 8:44:5823 mins ago Radiant: Multi Fee Distribution Radiant: RDNT Token0 ETH
0xbf8a315ff087f34468e46c55e1d2276687a6fd285951c00a9f297390eeaf30a0281329742022-10-03 8:38:0629 mins ago Radiant: Multi Fee Distribution 0x4cd44e6fcfa68bf797c65889c74b26b8c2e5d4d30 ETH
0xbf8a315ff087f34468e46c55e1d2276687a6fd285951c00a9f297390eeaf30a0281329742022-10-03 8:38:0629 mins ago Radiant: Multi Fee Distribution 0x15b53d277af860f51c3e6843f8075007026bbb3a0 ETH
0xbf8a315ff087f34468e46c55e1d2276687a6fd285951c00a9f297390eeaf30a0281329742022-10-03 8:38:0629 mins ago Radiant: Multi Fee Distribution 0xef47ccc71ec8941b67dc679d1a5f78facfd0ec3c0 ETH
0xbf8a315ff087f34468e46c55e1d2276687a6fd285951c00a9f297390eeaf30a0281329742022-10-03 8:38:0629 mins ago Radiant: Multi Fee Distribution 0x805ba50001779ced4f59cff63aea527d12b948290 ETH
0xbf8a315ff087f34468e46c55e1d2276687a6fd285951c00a9f297390eeaf30a0281329742022-10-03 8:38:0629 mins ago Radiant: Multi Fee Distribution 0x5293c6ca56b8941040b8d18f557dfa82cf5202160 ETH
0xbe095ff7f917a750071abd0a54c6af293d464989c556944219a5a1dbc70f91d2281317302022-10-03 8:29:3338 mins ago Radiant: Multi Fee Distribution 0x4cd44e6fcfa68bf797c65889c74b26b8c2e5d4d30 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MultiFeeDistribution

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 9 : MultiFeeDistribution.sol
pragma solidity 0.7.6;
pragma abicoder v2;

import "../interfaces/IChefIncentivesController.sol";
import "../interfaces/IMultiFeeDistribution.sol";
import "../dependencies/openzeppelin/contracts/IERC20.sol";
import "../dependencies/openzeppelin/contracts/SafeERC20.sol";
import "../dependencies/openzeppelin/contracts/SafeMath.sol";
import "../dependencies/openzeppelin/contracts/Ownable.sol";


interface IMintableToken is IERC20 {
    function mint(address _receiver, uint256 _amount) external returns (bool);
    function setMinter(address _minter) external returns (bool);
}

// Based on Ellipsis EPS Staker
// https://github.com/ellipsis-finance/ellipsis/blob/master/contracts/EpsStaker.sol
contract MultiFeeDistribution is IMultiFeeDistribution, Ownable {

    using SafeMath for uint256;
    using SafeERC20 for IERC20;
    using SafeERC20 for IMintableToken;

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

    struct Reward {
        uint256 periodFinish;
        uint256 rewardRate;
        uint256 lastUpdateTime;
        uint256 rewardPerTokenStored;
        // tracks already-added balances to handle accrued interest in aToken rewards
        // for the stakingToken this value is unused and will always be 0
        uint256 balance;
    }
    struct Balances {
        uint256 total;
        uint256 unlocked;
        uint256 locked;
        uint256 earned;
    }
    struct LockedBalance {
        uint256 amount;
        uint256 unlockTime;
    }
    struct RewardData {
        address token;
        uint256 amount;
    }

    IChefIncentivesController public incentivesController;
    IMintableToken public immutable stakingToken;
    address[] public rewardTokens;
    mapping(address => Reward) public rewardData;

    // Duration that rewards are streamed over
    uint256 public constant rewardsDuration = 86400 * 7; //60;
    uint256 public constant rewardLookback = 86400; //30; //86400;
    
    // Duration of lock/earned penalty period
    uint256 public constant lockDuration = rewardsDuration * 4;

    // Addresses approved to call mint
    mapping(address => bool) public minters;
    bool public mintersAreSet;

    // user -> reward token -> amount
    mapping(address => mapping(address => uint256)) public userRewardPerTokenPaid;
    mapping(address => mapping(address => uint256)) public rewards;

    uint256 public totalSupply;
    uint256 public lockedSupply;

    // Private mappings for balance data
    mapping(address => Balances) private balances;
    mapping(address => LockedBalance[]) private userLocks;
    mapping(address => LockedBalance[]) private userEarnings;

    mapping(address => address) public exitDelegatee;

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

    constructor(address _stakingToken) Ownable() {
        stakingToken = IMintableToken(_stakingToken);
        IMintableToken(_stakingToken).setMinter(address(this));
        // First reward MUST be the staking token or things will break
        // related to the 50% penalty and distribution to locked balances
        rewardTokens.push(_stakingToken);
        rewardData[_stakingToken].lastUpdateTime = block.timestamp;
    }

    /* ========== ADMIN CONFIGURATION ========== */

    function setMinters(address[] memory _minters) external onlyOwner {
        require(!mintersAreSet);
        for (uint i; i < _minters.length; i++) {
            minters[_minters[i]] = true;
        }
        mintersAreSet = true;
    }

    function setIncentivesController(IChefIncentivesController _controller) external onlyOwner {
        incentivesController = _controller;
    }

    // Add a new reward token to be distributed to stakers
    function addReward(address _rewardsToken) external override onlyOwner {
        require(rewardData[_rewardsToken].lastUpdateTime == 0);
        rewardTokens.push(_rewardsToken);
        rewardData[_rewardsToken].lastUpdateTime = block.timestamp;
        rewardData[_rewardsToken].periodFinish = block.timestamp;
    }

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

    function _rewardPerToken(address _rewardsToken, uint256 _supply) internal view returns (uint256) {
        if (_supply == 0) {
            return rewardData[_rewardsToken].rewardPerTokenStored;
        }
        return
            rewardData[_rewardsToken].rewardPerTokenStored.add(
                lastTimeRewardApplicable(_rewardsToken).sub(
                    rewardData[_rewardsToken].lastUpdateTime).mul(
                        rewardData[_rewardsToken].rewardRate).mul(1e18).div(_supply)
            );
    }

    function _earned(
        address _user,
        address _rewardsToken,
        uint256 _balance,
        uint256 _currentRewardPerToken
    ) internal view returns (uint256) {
        return _balance.mul(
            _currentRewardPerToken.sub(userRewardPerTokenPaid[_user][_rewardsToken])
        ).div(1e18).add(rewards[_user][_rewardsToken]);
    }

    function lastTimeRewardApplicable(address _rewardsToken) public view returns (uint256) {
        uint periodFinish = rewardData[_rewardsToken].periodFinish;
        return block.timestamp < periodFinish ? block.timestamp : periodFinish;
    }

    function rewardPerToken(address _rewardsToken) external view returns (uint256) {
        uint256 supply = _rewardsToken == address(stakingToken) ? lockedSupply : totalSupply;
        return _rewardPerToken(_rewardsToken, supply);

    }

    function getRewardForDuration(address _rewardsToken) external view returns (uint256) {
        return rewardData[_rewardsToken].rewardRate.mul(rewardsDuration).div(1e12);
    }

    // Address and claimable amount of all reward tokens for the given account
    function claimableRewards(address account) external view returns (RewardData[] memory rewards) {
        rewards = new RewardData[](rewardTokens.length);
        for (uint256 i = 0; i < rewards.length; i++) {
            // If i == 0 this is the stakingReward, distribution is based on locked balances
            uint256 balance = i == 0 ? balances[account].locked : balances[account].total;
            uint256 supply = i == 0 ? lockedSupply : totalSupply;
            rewards[i].token = rewardTokens[i];
            rewards[i].amount = _earned(account, rewards[i].token, balance, _rewardPerToken(rewardTokens[i], supply)).div(1e12);
        }
        return rewards;
    }

    // Total balance of an account, including unlocked, locked and earned tokens
    function totalBalance(address user) view external returns (uint256 amount) {
        return balances[user].total;
    }

    // Total withdrawable balance for an account to which no penalty is applied
    function unlockedBalance(address user) view external returns (uint256 amount) {
        amount = balances[user].unlocked;
        LockedBalance[] storage earnings = userEarnings[msg.sender];
        for (uint i = 0; i < earnings.length; i++) {
            if (earnings[i].unlockTime > block.timestamp) {
                break;
            }
            amount = amount.add(earnings[i].amount);
        }
        return amount;
    }

    // Information on the "earned" balances of a user
    // Earned balances may be withdrawn immediately for a 50% penalty
    function earnedBalances(
        address user
    ) view external returns (
        uint256 total,
        LockedBalance[] memory earningsData
    ) {
        LockedBalance[] storage earnings = userEarnings[user];
        uint256 idx;
        for (uint i = 0; i < earnings.length; i++) {
            if (earnings[i].unlockTime > block.timestamp) {
                if (idx == 0) {
                    earningsData = new LockedBalance[](earnings.length - i);
                }
                earningsData[idx] = earnings[i];
                idx++;
                total = total.add(earnings[i].amount);
            }
        }
        return (total, earningsData);
    }

    // Information on a user's locked balances
    function lockedBalances(
        address user
    ) view external returns (
        uint256 total,
        uint256 unlockable,
        uint256 locked,
        LockedBalance[] memory lockData
    ) {
        LockedBalance[] storage locks = userLocks[user];
        uint256 idx;
        for (uint i = 0; i < locks.length; i++) {
            if (locks[i].unlockTime > block.timestamp) {
                if (idx == 0) {
                    lockData = new LockedBalance[](locks.length - i);
                }
                lockData[idx] = locks[i];
                idx++;
                locked = locked.add(locks[i].amount);
            } else {
                unlockable = unlockable.add(locks[i].amount);
            }
        }
        return (balances[user].locked, unlockable, locked, lockData);
    }

    // Final balance received and penalty balance paid by user upon calling exit
    function withdrawableBalance(
        address user
    ) view public returns (
        uint256 amount,
        uint256 penaltyAmount
    ) {
        Balances storage bal = balances[user];
        uint256 earned = bal.earned;
        if (earned > 0) {
            uint256 amountWithoutPenalty;
            uint256 length = userEarnings[user].length;
            for (uint i = 0; i < length; i++) {
                uint256 earnedAmount = userEarnings[user][i].amount;
                if (earnedAmount == 0) continue;
                if (userEarnings[user][i].unlockTime > block.timestamp) {
                    break;
                }
                amountWithoutPenalty = amountWithoutPenalty.add(earnedAmount);
            }

            penaltyAmount = earned.sub(amountWithoutPenalty).div(2);
        }
        amount = bal.unlocked.add(earned).sub(penaltyAmount);
        return (amount, penaltyAmount);
    }

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

    // Stake tokens to receive rewards
    // Locked tokens cannot be withdrawn for lockDuration and are eligible to receive stakingReward rewards
    function stake(uint256 amount, bool lock, address onBehalfOf) external override {
        require(amount > 0, "Cannot stake 0");
        require(lock == true, "Staking disabled");
        _updateReward(onBehalfOf);
        totalSupply = totalSupply.add(amount);
        Balances storage bal = balances[onBehalfOf];
        bal.total = bal.total.add(amount);
        if (lock) {
            lockedSupply = lockedSupply.add(amount);
            bal.locked = bal.locked.add(amount);
            uint256 unlockTime = block.timestamp.div(rewardsDuration).mul(rewardsDuration).add(lockDuration);
            uint256 idx = userLocks[onBehalfOf].length;
            if (idx == 0 || userLocks[onBehalfOf][idx-1].unlockTime < unlockTime) {
                userLocks[onBehalfOf].push(LockedBalance({amount: amount, unlockTime: unlockTime}));
            } else {
                userLocks[onBehalfOf][idx-1].amount = userLocks[onBehalfOf][idx-1].amount.add(amount);
            }
        } else {
            bal.unlocked = bal.unlocked.add(amount);
        }
        stakingToken.safeTransferFrom(msg.sender, address(this), amount);
        emit Staked(onBehalfOf, amount, lock);
    }

    // Mint new tokens
    // Minted tokens receive rewards normally but incur a 50% penalty when
    // withdrawn before lockDuration has passed.
    function mint(address user, uint256 amount, bool withPenalty) external override {
        require(minters[msg.sender]);
        if (amount == 0) return;
        _updateReward(user);
        stakingToken.mint(address(this), amount);
        if (user == address(this)) {
            // minting to this contract adds the new tokens as incentives for lockers
            _notifyReward(address(stakingToken), amount);
            return;
        }
        totalSupply = totalSupply.add(amount);
        Balances storage bal = balances[user];
        bal.total = bal.total.add(amount);
        if (withPenalty) {
            bal.earned = bal.earned.add(amount);
            uint256 unlockTime = block.timestamp.div(rewardsDuration).mul(rewardsDuration).add(lockDuration);
            LockedBalance[] storage earnings = userEarnings[user];
            uint256 idx = earnings.length;
            if (idx == 0 || earnings[idx-1].unlockTime < unlockTime) {
                earnings.push(LockedBalance({amount: amount, unlockTime: unlockTime}));
            } else {
                earnings[idx-1].amount = earnings[idx-1].amount.add(amount);
            }
        } else {
            bal.unlocked = bal.unlocked.add(amount);
        }
        emit Staked(user, amount, false);
    }

    // Withdraw staked tokens
    // First withdraws unlocked tokens, then earned tokens. Withdrawing earned tokens
    // incurs a 50% penalty which is distributed based on locked balances.
    function withdraw(uint256 amount) public {
        require(amount > 0, "Cannot withdraw 0");
        _updateReward(msg.sender);
        Balances storage bal = balances[msg.sender];
        uint256 penaltyAmount;

        if (amount <= bal.unlocked) {
            bal.unlocked = bal.unlocked.sub(amount);
        } else {
            uint256 remaining = amount.sub(bal.unlocked);
            require(bal.earned >= remaining, "Insufficient unlocked balance");
            bal.unlocked = 0;
            bal.earned = bal.earned.sub(remaining);
            for (uint i = 0; ; i++) {
                uint256 earnedAmount = userEarnings[msg.sender][i].amount;
                if (earnedAmount == 0) continue;
                if (penaltyAmount == 0 && userEarnings[msg.sender][i].unlockTime > block.timestamp) {
                    penaltyAmount = remaining;
                    require(bal.earned >= remaining, "Insufficient balance after penalty");
                    bal.earned = bal.earned.sub(remaining);
                    if (bal.earned == 0) {
                        delete userEarnings[msg.sender];
                        break;
                    }
                    remaining = remaining.mul(2);
                }
                if (remaining <= earnedAmount) {
                    userEarnings[msg.sender][i].amount = earnedAmount.sub(remaining);
                    break;
                } else {
                    delete userEarnings[msg.sender][i];
                    remaining = remaining.sub(earnedAmount);
                }
            }
        }

        uint256 adjustedAmount = amount.add(penaltyAmount);
        bal.total = bal.total.sub(adjustedAmount);
        totalSupply = totalSupply.sub(adjustedAmount);
        stakingToken.safeTransfer(msg.sender, amount);
        if (penaltyAmount > 0) {
            incentivesController.claim(address(this), new address[](0));
            _notifyReward(address(stakingToken), penaltyAmount);
        }
        emit Withdrawn(msg.sender, amount, penaltyAmount);
    }

    function _getReward(address[] memory _rewardTokens) internal {
        uint256 length = _rewardTokens.length;
        for (uint i; i < length; i++) {
            address token = _rewardTokens[i];
            uint256 reward = rewards[msg.sender][token].div(1e12);
            if (token != address(stakingToken)) {
                // for rewards other than stakingToken, every 24 hours we check if new
                // rewards were sent to the contract or accrued via aToken interest
                Reward storage r = rewardData[token];
                uint256 periodFinish = r.periodFinish;
                require(periodFinish > 0, "Unknown reward token");
                uint256 balance = r.balance;
                if (periodFinish < block.timestamp.add(rewardsDuration - rewardLookback)) {
                    uint256 unseen = IERC20(token).balanceOf(address(this)).sub(balance);
                    if (unseen > 0) {
                        _notifyReward(token, unseen);
                        balance = balance.add(unseen);
                    }
                }
                r.balance = balance.sub(reward);
            }
            if (reward == 0) continue;
            rewards[msg.sender][token] = 0;
            IERC20(token).safeTransfer(msg.sender, reward);
            emit RewardPaid(msg.sender, token, reward);
        }
    }

    // Claim all pending staking rewards
    function getReward(address[] memory _rewardTokens) public {
        _updateReward(msg.sender);
        _getReward(_rewardTokens);
    }

    // Delegate exit
    function delegateExit(address delegatee) external {
        exitDelegatee[msg.sender] = delegatee;
    }

    // Withdraw full unlocked balance and optionally claim pending rewards
    function exit(bool claimRewards, address onBehalfOf) external override {
        require(onBehalfOf == msg.sender || exitDelegatee[onBehalfOf] == msg.sender);
        _updateReward(onBehalfOf);
        (uint256 amount, uint256 penaltyAmount) = withdrawableBalance(onBehalfOf);
        delete userEarnings[onBehalfOf];
        Balances storage bal = balances[onBehalfOf];
        bal.total = bal.total.sub(bal.unlocked).sub(bal.earned);
        bal.unlocked = 0;
        bal.earned = 0;

        totalSupply = totalSupply.sub(amount.add(penaltyAmount));
        stakingToken.safeTransfer(onBehalfOf, amount);
        if (penaltyAmount > 0) {
            incentivesController.claim(address(this), new address[](0));
            _notifyReward(address(stakingToken), penaltyAmount);
        }
        if (claimRewards) {
            _getReward(rewardTokens);
        }
        emit Withdrawn(onBehalfOf, amount, penaltyAmount);
    }

    // Withdraw all currently locked tokens where the unlock time has passed
    function withdrawExpiredLocks() external {
        _updateReward(msg.sender);
        LockedBalance[] storage locks = userLocks[msg.sender];
        Balances storage bal = balances[msg.sender];
        uint256 amount;
        uint256 length = locks.length;
        if (locks[length-1].unlockTime <= block.timestamp) {
            amount = bal.locked;
            delete userLocks[msg.sender];
        } else {
            for (uint i = 0; i < length; i++) {
                if (locks[i].unlockTime > block.timestamp) break;
                amount = amount.add(locks[i].amount);
                delete locks[i];
            }
        }
        bal.locked = bal.locked.sub(amount);
        bal.total = bal.total.sub(amount);
        totalSupply = totalSupply.sub(amount);
        lockedSupply = lockedSupply.sub(amount);
        stakingToken.safeTransfer(msg.sender, amount);
        emit Withdrawn(msg.sender, amount, 0);
    }

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

    function _notifyReward(address _rewardsToken, uint256 reward) internal {
        Reward storage r = rewardData[_rewardsToken];
        if (block.timestamp >= r.periodFinish) {
            r.rewardRate = reward.mul(1e12).div(rewardsDuration);
        } else {
            uint256 remaining = r.periodFinish.sub(block.timestamp);
            uint256 leftover = remaining.mul(r.rewardRate).div(1e12);
            r.rewardRate = reward.add(leftover).mul(1e12).div(rewardsDuration);
        }

        r.lastUpdateTime = block.timestamp;
        r.periodFinish = block.timestamp.add(rewardsDuration);

    }

    // Added to support recovering LP Rewards from other systems such as BAL to be distributed to holders
    function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyOwner {
        require(tokenAddress != address(stakingToken), "Cannot withdraw staking token");
        require(rewardData[tokenAddress].lastUpdateTime == 0, "Cannot withdraw reward token");
        IERC20(tokenAddress).safeTransfer(owner(), tokenAmount);
        emit Recovered(tokenAddress, tokenAmount);
    }

    function _updateReward(address account) internal {
        address token = address(stakingToken);
        uint256 balance;
        Reward storage r = rewardData[token];
        uint256 rpt = _rewardPerToken(token, lockedSupply);
        r.rewardPerTokenStored = rpt;
        r.lastUpdateTime = lastTimeRewardApplicable(token);
        if (account != address(this)) {
            // Special case, use the locked balances and supply for stakingReward rewards
            rewards[account][token] = _earned(account, token, balances[account].locked, rpt);
            userRewardPerTokenPaid[account][token] = rpt;
            balance = balances[account].total;
        }

        uint256 supply = totalSupply;
        uint256 length = rewardTokens.length;
        for (uint i = 1; i < length; i++) {
            token = rewardTokens[i];
            r = rewardData[token];
            rpt = _rewardPerToken(token, supply);
            r.rewardPerTokenStored = rpt;
            r.lastUpdateTime = lastTimeRewardApplicable(token);
            if (account != address(this)) {
                rewards[account][token] = _earned(account, token, balance, rpt);
                userRewardPerTokenPaid[account][token] = rpt;
            }
        }
    }

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

    event RewardAdded(uint256 reward);
    event Staked(address indexed user, uint256 amount, bool locked);
    event Withdrawn(address indexed user, uint256 receivedAmount, uint256 penaltyPaid);
    event RewardPaid(address indexed user, address indexed rewardsToken, uint256 reward);
    event RewardsDurationUpdated(address token, uint256 newDuration);
    event Recovered(address token, uint256 amount);
}

File 2 of 9 : IChefIncentivesController.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.7.6;
pragma experimental ABIEncoderV2;

interface IChefIncentivesController {

  /**
   * @dev Called by the corresponding asset on any update that affects the rewards distribution
   * @param user The address of the user
   * @param userBalance The balance of the user of the asset in the lending pool
   * @param totalSupply The total supply of the asset in the lending pool
   **/
  function handleAction(
    address user,
    uint256 userBalance,
    uint256 totalSupply
  ) external;

    function addPool(address _token, uint256 _allocPoint) external;

    function claim(address _user, address[] calldata _tokens) external;

    function setClaimReceiver(address _user, address _receiver) external;

}

File 3 of 9 : IMultiFeeDistribution.sol
pragma solidity 0.7.6;

interface IMultiFeeDistribution {

    function addReward(address rewardsToken) external;
    function mint(address user, uint256 amount, bool withPenalty) external;
    function exit(bool claimRewards, address onBehalfOf) external;
    function stake(uint256 amount, bool lock, address onBehalfOf) external;
}

File 4 of 9 : IERC20.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.7.6;

/**
 * @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 5 of 9 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.7.6;

import {IERC20} from './IERC20.sol';
import {SafeMath} from './SafeMath.sol';
import {Address} from './Address.sol';

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

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

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

  function safeApprove(
    IERC20 token,
    address spender,
    uint256 value
  ) internal {
    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 callOptionalReturn(IERC20 token, bytes memory data) private {
    require(address(token).isContract(), 'SafeERC20: call to non-contract');

    // solhint-disable-next-line avoid-low-level-calls
    (bool success, bytes memory returndata) = address(token).call(data);
    require(success, 'SafeERC20: low-level call failed');

    if (returndata.length > 0) {
      // Return data is optional
      // solhint-disable-next-line max-line-length
      require(abi.decode(returndata, (bool)), 'SafeERC20: ERC20 operation did not succeed');
    }
  }
}

File 6 of 9 : SafeMath.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.7.6;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
  /**
   * @dev Returns the addition of two unsigned integers, reverting on
   * overflow.
   *
   * Counterpart to Solidity's `+` operator.
   *
   * Requirements:
   * - Addition cannot overflow.
   */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a, 'SafeMath: addition overflow');

    return c;
  }

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

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

    return c;
  }

  /**
   * @dev Returns the multiplication of two unsigned integers, reverting on
   * overflow.
   *
   * Counterpart to Solidity's `*` operator.
   *
   * Requirements:
   * - Multiplication cannot overflow.
   */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
    if (a == 0) {
      return 0;
    }

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

    return c;
  }

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

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

    return c;
  }

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

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

File 7 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.7.6;

import './Context.sol';

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

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

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

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

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

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

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

File 8 of 9 : Address.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.7.6;

/**
 * @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) {
    // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
    // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
    // for accounts without code, i.e. `keccak256('')`
    bytes32 codehash;
    bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
    // solhint-disable-next-line no-inline-assembly
    assembly {
      codehash := extcodehash(account)
    }
    return (codehash != accountHash && codehash != 0x0);
  }

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

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

File 9 of 9 : Context.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.6;

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

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

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_stakingToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"rewardsToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"RewardsDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"locked","type":"bool"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"receivedAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"penaltyPaid","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"}],"name":"addReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"claimableRewards","outputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct MultiFeeDistribution.RewardData[]","name":"rewards","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"}],"name":"delegateExit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"earnedBalances","outputs":[{"internalType":"uint256","name":"total","type":"uint256"},{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"unlockTime","type":"uint256"}],"internalType":"struct MultiFeeDistribution.LockedBalance[]","name":"earningsData","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"claimRewards","type":"bool"},{"internalType":"address","name":"onBehalfOf","type":"address"}],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"exitDelegatee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_rewardTokens","type":"address[]"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"}],"name":"getRewardForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"incentivesController","outputs":[{"internalType":"contract IChefIncentivesController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"}],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"lockedBalances","outputs":[{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"unlockable","type":"uint256"},{"internalType":"uint256","name":"locked","type":"uint256"},{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"unlockTime","type":"uint256"}],"internalType":"struct MultiFeeDistribution.LockedBalance[]","name":"lockData","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockedSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"withPenalty","type":"bool"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minters","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintersAreSet","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardData","outputs":[{"internalType":"uint256","name":"periodFinish","type":"uint256"},{"internalType":"uint256","name":"rewardRate","type":"uint256"},{"internalType":"uint256","name":"lastUpdateTime","type":"uint256"},{"internalType":"uint256","name":"rewardPerTokenStored","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardLookback","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"}],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IChefIncentivesController","name":"_controller","type":"address"}],"name":"setIncentivesController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_minters","type":"address[]"}],"name":"setMinters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"lock","type":"bool"},{"internalType":"address","name":"onBehalfOf","type":"address"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IMintableToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"totalBalance","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"unlockedBalance","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawExpiredLocks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"withdrawableBalance","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"penaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"}]

60a06040523480156200001157600080fd5b50604051620032d1380380620032d1833981016040819052620000349162000187565b60006200004062000183565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160601b0319606082901b16608052604051637e51dad560e11b81526001600160a01b0382169063fca3b5aa90620000ca903090600401620001d9565b602060405180830381600087803b158015620000e557600080fd5b505af1158015620000fa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001209190620001b7565b50600280546001810182557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b039093166001600160a01b03199093168317905560009182526003602052604090912042910155620001ed565b3390565b60006020828403121562000199578081fd5b81516001600160a01b0381168114620001b0578182fd5b9392505050565b600060208284031215620001c9578081fd5b81518015158114620001b0578182fd5b6001600160a01b0391909116815260200190565b60805160601c61308a6200024760003980610a5f5280610b1e5280610dc052806111b25280611271528061134b52806114065280611734528061182c52806118cc5280611dd9528061201552806123f3525061308a6000f3fe608060405234801561001057600080fd5b50600436106102275760003560e01c80637bb7bed111610130578063bcd11014116100b8578063e655dbd81161007c578063e655dbd81461048f578063e70b9e27146104a2578063f1229777146104b5578063f2fde38b146104c8578063f46eccc4146104db57610227565b8063bcd1101414610420578063ca5c7b9114610433578063d1a1beb41461043b578063dc01f60d1461044e578063df3798761461046e57610227565b80638da5cb5b116100ff5780638da5cb5b146103e05780638fd9f2ca146103e85780639c9b2e21146103fd578063a01c77bc14610410578063af1df2551461041857610227565b80637bb7bed1146103945780637fd7d062146103a75780638980f11f146103ba5780638bf39416146103cd57610227565b806348e5d9f8116101b35780636eacd398116101825780636eacd3981461033e5780637035ab9814610351578063715018a61461036457806372be3d4a1461036c57806372f702f31461037f57610227565b806348e5d9f8146102e1578063547d0096146103055780635e0fac2e14610318578063638634ee1461032b57610227565b806318160ddd116101fa57806318160ddd146102a35780632e1a7d4d146102ab5780632eff2076146102be578063386a9525146102d15780633b1837d9146102d957610227565b806302b629381461022c5780630408ae2214610256578063045544431461026b5780630483a7f614610280575b600080fd5b61023f61023a366004612a37565b6104ee565b60405161024d929190612f40565b60405180910390f35b610269610264366004612a37565b61061e565b005b61027361064d565b60405161024d9190612f0e565b61029361028e366004612a37565b610654565b60405161024d9493929190612f4e565b6102736107e2565b6102696102b9366004612be5565b6107e8565b6102696102cc366004612c15565b610b8c565b610273610e23565b610273610e2a565b6102f46102ef366004612a37565b610e31565b60405161024d959493929190612f7d565b610269610313366004612af7565b610e61565b610273610326366004612a37565b610f32565b610273610339366004612a37565b610fca565b61027361034c366004612a37565b610ff9565b61027361035f366004612a53565b611014565b610269611031565b61026961037a366004612bc8565b6110d3565b610387611349565b60405161024d9190612c90565b6103876103a2366004612be5565b61136d565b6102696103b5366004612af7565b611397565b6102696103c8366004612a8b565b6113ac565b6103876103db366004612a37565b6114e8565b610387611503565b6103f0611512565b60405161024d9190612d71565b61026961040b366004612a37565b61151b565b6102696115fb565b610387611797565b61027361042e366004612a37565b6117a6565b6102736117e0565b610269610449366004612ab6565b6117e6565b61046161045c366004612a37565b611a7e565b60405161024d9190612d19565b61048161047c366004612a37565b611c19565b60405161024d929190612f17565b61026961049d366004612a37565b611d3d565b6102736104b0366004612a53565b611db7565b6102736104c3366004612a37565b611dd4565b6102696104d6366004612a37565b611e28565b6103f06104e9366004612a37565b611f20565b6001600160a01b0381166000908152600a60205260408120600381015482919080156105f4576001600160a01b0385166000908152600c6020526040812054815b818110156105d9576001600160a01b0388166000908152600c6020526040812080548390811061055b57fe5b9060005260206000209060020201600001549050806000141561057e57506105d1565b6001600160a01b0389166000908152600c602052604090208054429190849081106105a557fe5b90600052602060002090600202016001015411156105c357506105d9565b6105cd8482611f35565b9350505b60010161052f565b506105ef60026105e98585611f8f565b90611fd1565b945050505b6106158361060f838560010154611f3590919063ffffffff16565b90611f8f565b93505050915091565b336000908152600d6020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b6224ea0081565b6001600160a01b0381166000908152600b602052604081208190819060609082805b82548110156107ba574283828154811061068c57fe5b9060005260206000209060020201600101541115610788578161070257825481900367ffffffffffffffff811180156106c457600080fd5b506040519080825280602002602001820160405280156106fe57816020015b6106eb6129bb565b8152602001906001900390816106e35790505b5093505b82818154811061070e57fe5b90600052602060002090600202016040518060400160405290816000820154815260200160018201548152505084838151811061074757fe5b6020026020010181905250818060010192505061078183828154811061076957fe5b60009182526020909120600290910201548690611f35565b94506107b2565b6107af83828154811061079757fe5b60009182526020909120600290910201548790611f35565b95505b600101610676565b5050506001600160a01b0385166000908152600a602052604090206002015493509193509193565b60085481565b600081116108115760405162461bcd60e51b815260040161080890612de6565b60405180910390fd5b61081a33612013565b336000908152600a60205260408120600181015490919083116108505760018201546108469084611f8f565b6001830155610a25565b6000610869836001015485611f8f90919063ffffffff16565b9050808360030154101561088f5760405162461bcd60e51b815260040161080890612e48565b6000600184015560038301546108a59082611f8f565b600384015560005b336000908152600c602052604081208054839081106108c857fe5b906000526020600020906002020160000154905080600014156108eb5750610a1a565b831580156109265750336000908152600c6020526040902080544291908490811061091257fe5b906000526020600020906002020160010154115b156109985782935082856003015410156109525760405162461bcd60e51b815260040161080890612da4565b60038501546109619084611f8f565b6003860181905561098a57336000908152600c60205260408120610984916129d5565b50610a22565b6109958360026121d3565b92505b8083116109db576109a98184611f8f565b336000908152600c602052604090208054849081106109c457fe5b600091825260209091206002909102015550610a22565b336000908152600c602052604090208054839081106109f657fe5b60009182526020822060029091020181815560010155610a168382611f8f565b9250505b6001016108ad565b50505b6000610a318483611f35565b8354909150610a409082611f8f565b8355600854610a4f9082611f8f565b600855610a866001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016338661222c565b8115610b43576001546001600160a01b0316638e2eba09306000604051908082528060200260200182016040528015610ac9578160200160208202803683370190505b506040518363ffffffff1660e01b8152600401610ae7929190612ca4565b600060405180830381600087803b158015610b0157600080fd5b505af1158015610b15573d6000803e3d6000fd5b50505050610b437f00000000000000000000000000000000000000000000000000000000000000008361227e565b336001600160a01b03167f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc68584604051610b7e929190612f40565b60405180910390a250505050565b60008311610bac5760405162461bcd60e51b815260040161080890612d7c565b600182151514610bce5760405162461bcd60e51b815260040161080890612ee4565b610bd781612013565b600854610be49084611f35565b6008556001600160a01b0381166000908152600a602052604090208054610c0b9085611f35565b81558215610d9e57600954610c209085611f35565b6009556002810154610c329085611f35565b60028201556000610c5d6224ea00610c5762093a80610c514282611fd1565b906121d3565b90611f35565b6001600160a01b0384166000908152600b6020526040902054909150801580610cc057506001600160a01b0384166000908152600b6020526040902080548391906000198401908110610cac57fe5b906000526020600020906002020160010154105b15610d18576001600160a01b0384166000908152600b60209081526040808320815180830190925289825281830186815281546001818101845592865293909420915160029093029091019182559151910155610d97565b6001600160a01b0384166000908152600b602052604090208054610d5d9188916000198501908110610d4657fe5b600091825260209091206002909102015490611f35565b6001600160a01b0385166000908152600b6020526040902080546000198401908110610d8557fe5b60009182526020909120600290910201555b5050610db3565b6001810154610dad9085611f35565b60018201555b610de86001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087612330565b816001600160a01b03167f37d4053e34fde482e96f6bcd424dfa31342cbd5fe184d497fb3c8bb4b4b975808585604051610b7e929190612f30565b62093a8081565b6201518081565b60036020819052600091825260409091208054600182015460028301549383015460049093015491939092909185565b610e69612390565b6000546001600160a01b03908116911614610eb9576040805162461bcd60e51b8152602060048201819052602482015260008051602061300b833981519152604482015290519081900360640190fd5b60055460ff1615610ec957600080fd5b60005b8151811015610f2157600160046000848481518110610ee757fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055600101610ecc565b50506005805460ff19166001179055565b6001600160a01b0381166000908152600a6020908152604080832060010154338452600c909252822090915b8154811015610fc25742828281548110610f7457fe5b9060005260206000209060020201600101541115610f9157610fc2565b610fb8828281548110610fa057fe5b60009182526020909120600290910201548490611f35565b9250600101610f5e565b50505b919050565b6001600160a01b038116600090815260036020526040812054428111610ff05780610ff2565b425b9392505050565b6001600160a01b03166000908152600a602052604090205490565b600660209081526000928352604080842090915290825290205481565b611039612390565b6000546001600160a01b03908116911614611089576040805162461bcd60e51b8152602060048201819052602482015260008051602061300b833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6001600160a01b03811633148061110357506001600160a01b038181166000908152600d60205260409020541633145b61110c57600080fd5b61111581612013565b600080611121836104ee565b6001600160a01b0385166000908152600c6020526040812092945090925061114991906129d5565b6001600160a01b0383166000908152600a6020526040902060038101546001820154825461117c929161060f9190611f8f565b815560006001820181905560038201556111a26111998484611f35565b60085490611f8f565b6008556111d96001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016858561222c565b8115611296576001546001600160a01b0316638e2eba0930600060405190808252806020026020018201604052801561121c578160200160208202803683370190505b506040518363ffffffff1660e01b815260040161123a929190612ca4565b600060405180830381600087803b15801561125457600080fd5b505af1158015611268573d6000803e3d6000fd5b505050506112967f00000000000000000000000000000000000000000000000000000000000000008361227e565b84156112ff576112ff60028054806020026020016040519081016040528092919081815260200182805480156112f557602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116112d7575b5050505050612394565b836001600160a01b03167f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc6848460405161133a929190612f40565b60405180910390a25050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6002818154811061137d57600080fd5b6000918252602090912001546001600160a01b0316905081565b6113a033612013565b6113a981612394565b50565b6113b4612390565b6000546001600160a01b03908116911614611404576040805162461bcd60e51b8152602060048201819052602482015260008051602061300b833981519152604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156114565760405162461bcd60e51b815260040161080890612e11565b6001600160a01b0382166000908152600360205260409020600201541561148f5760405162461bcd60e51b815260040161080890612e7f565b6114ab61149a611503565b6001600160a01b038416908361222c565b7f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa2882826040516114dc929190612d00565b60405180910390a15050565b600d602052600090815260409020546001600160a01b031681565b6000546001600160a01b031690565b60055460ff1681565b611523612390565b6000546001600160a01b03908116911614611573576040805162461bcd60e51b8152602060048201819052602482015260008051602061300b833981519152604482015290519081900360640190fd5b6001600160a01b0381166000908152600360205260409020600201541561159957600080fd5b600280546001810182557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b039093166001600160a01b0319909316831790556000918252600360205260409091204291810182905555565b61160433612013565b336000908152600b60209081526040808320600a90925282208154919290914284600019830183811061163357fe5b90600052602060002090600202016001015411611670576002830154336000908152600b6020526040812091935061166b91906129d5565b6116e5565b60005b818110156116e3574285828154811061168857fe5b90600052602060002090600202016001015411156116a5576116e3565b6116b4858281548110610fa057fe5b92508481815481106116c257fe5b60009182526020822060029091020181815560019081019190915501611673565b505b60028301546116f49083611f8f565b600284015582546117059083611f8f565b83556008546117149083611f8f565b6008556009546117249083611f8f565b60095561175b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016338461222c565b336001600160a01b03167f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc6836000604051610b7e929190612f40565b6001546001600160a01b031681565b6001600160a01b0381166000908152600360205260408120600101546117da9064e8d4a51000906105e99062093a806121d3565b92915050565b60095481565b3360009081526004602052604090205460ff1661180257600080fd5b8161180c57611a79565b61181583612013565b6040516340c10f1960e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340c10f19906118639030908690600401612d00565b602060405180830381600087803b15801561187d57600080fd5b505af1158015611891573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118b59190612bac565b506001600160a01b0383163014156118f6576118f17f00000000000000000000000000000000000000000000000000000000000000008361227e565b611a79565b6008546119039083611f35565b6008556001600160a01b0383166000908152600a60205260409020805461192a9084611f35565b81558115611a285760038101546119419084611f35565b600382015560006119606224ea00610c5762093a80610c514282611fd1565b6001600160a01b0386166000908152600c602052604090208054919250908015806119aa57508282600183038154811061199657fe5b906000526020600020906002020160010154105b156119ec576040805180820190915286815260208082018581528454600181810187556000878152939093209351600290910290930192835551910155611a20565b6119ff86836001840381548110610d4657fe5b826001830381548110611a0e57fe5b60009182526020909120600290910201555b505050611a3d565b6001810154611a379084611f35565b60018201555b836001600160a01b03167f37d4053e34fde482e96f6bcd424dfa31342cbd5fe184d497fb3c8bb4b4b97580846000604051610b7e929190612f30565b505050565b60025460609067ffffffffffffffff81118015611a9a57600080fd5b50604051908082528060200260200182016040528015611ad457816020015b611ac16129f6565b815260200190600190039081611ab95790505b50905060005b8151811015611c135760008115611b09576001600160a01b0384166000908152600a6020526040902054611b26565b6001600160a01b0384166000908152600a60205260409020600201545b905060008215611b3857600854611b3c565b6009545b905060028381548110611b4b57fe5b9060005260206000200160009054906101000a90046001600160a01b0316848481518110611b7557fe5b6020026020010151600001906001600160a01b031690816001600160a01b031681525050611bef64e8d4a510006105e987878781518110611bb257fe5b60200260200101516000015186611bea60028a81548110611bcf57fe5b6000918252602090912001546001600160a01b0316886125c6565b61265d565b848481518110611bfb57fe5b60209081029190910181015101525050600101611ada565b50919050565b6001600160a01b0381166000908152600c6020526040812060609082805b8254811015611d355742838281548110611c4d57fe5b9060005260206000209060020201600101541115611d2d5781611cc357825481900367ffffffffffffffff81118015611c8557600080fd5b50604051908082528060200260200182016040528015611cbf57816020015b611cac6129bb565b815260200190600190039081611ca45790505b5093505b828181548110611ccf57fe5b906000526020600020906002020160405180604001604052908160008201548152602001600182015481525050848381518110611d0857fe5b60200260200101819052508180600101925050611d2a83828154811061076957fe5b94505b600101611c37565b505050915091565b611d45612390565b6000546001600160a01b03908116911614611d95576040805162461bcd60e51b8152602060048201819052602482015260008051602061300b833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600760209081526000928352604080842090915290825290205481565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b031614611e1857600854611e1c565b6009545b9050610ff283826125c6565b611e30612390565b6000546001600160a01b03908116911614611e80576040805162461bcd60e51b8152602060048201819052602482015260008051602061300b833981519152604482015290519081900360640190fd5b6001600160a01b038116611ec55760405162461bcd60e51b8152600401808060200182810382526026815260200180612fc46026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60046020526000908152604090205460ff1681565b600082820183811015610ff2576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000610ff283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506126cc565b6000610ff283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612763565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0381166000908152600360205260408120600954829061205c9085906125c6565b60038301819055905061206e84610fca565b60028301556001600160a01b03851630146120fc576001600160a01b0385166000908152600a60205260409020600201546120ad90869086908461265d565b6001600160a01b038087166000818152600760209081526040808320948a168084529482528083209590955582825260068152848220938252928352838120859055908152600a909152205492505b60085460025460015b818110156121c9576002818154811061211a57fe5b60009182526020808320909101546001600160a01b031680835260039091526040909120909750945061214d87846125c6565b60038601819055935061215f87610fca565b60028601556001600160a01b03881630146121c1576121808888888761265d565b6001600160a01b03808a166000818152600760209081526040808320948d168084529482528083209590955591815260068252838120928152919052208490555b600101612105565b5050505050505050565b6000826121e2575060006117da565b828202828482816121ef57fe5b0414610ff25760405162461bcd60e51b8152600401808060200182810382526021815260200180612fea6021913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611a799084906127c8565b6001600160a01b0382166000908152600360205260409020805442106122be576122b462093a806105e98464e8d4a510006121d3565b6001820155612315565b80546000906122cd9042611f8f565b905060006122f164e8d4a510006105e98560010154856121d390919063ffffffff16565b905061230d62093a806105e964e8d4a51000610c518886611f35565b600184015550505b426002820181905561232a9062093a80611f35565b90555050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261238a9085906127c8565b50505050565b3390565b805160005b81811015611a795760008382815181106123af57fe5b6020908102919091018101513360009081526007835260408082206001600160a01b0384168352909352918220549092506123ef9064e8d4a51000611fd1565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614612533576001600160a01b03821660009081526003602052604090208054806124615760405162461bcd60e51b815260040161080890612eb6565b6004820154612473426207e900611f35565b82101561251d5760006124fc82876001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016124ac9190612c90565b60206040518083038186803b1580156124c457600080fd5b505afa1580156124d8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060f9190612bfd565b9050801561251b5761250e868261227e565b6125188282611f35565b91505b505b6125278185611f8f565b83600401819055505050505b8061253f5750506125be565b3360008181526007602090815260408083206001600160a01b0387168085529252822091909155612570918361222c565b816001600160a01b0316336001600160a01b03167f540798df468d7b23d11f156fdb954cb19ad414d150722a7b6d55ba369dea792e836040516125b39190612f0e565b60405180910390a350505b600101612399565b6000816125f057506001600160a01b038216600090815260036020819052604090912001546117da565b6001600160a01b03831660009081526003602052604090206001810154600290910154610ff29161263a9185916105e991670de0b6b3a764000091610c5191829061060f8c610fca565b6001600160a01b0385166000908152600360208190526040909120015490611f35565b6001600160a01b0380851660008181526007602090815260408083209488168084529482528083205493835260068252808320948352939052918220546126c39190610c5790670de0b6b3a7640000906105e9906126bc908890611f8f565b88906121d3565b95945050505050565b6000818484111561275b5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612720578181015183820152602001612708565b50505050905090810190601f16801561274d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836127b25760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612720578181015183820152602001612708565b5060008385816127be57fe5b0495945050505050565b6127da826001600160a01b031661297f565b61282b576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600080836001600160a01b0316836040518082805190602001908083835b602083106128685780518252601f199092019160209182019101612849565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146128ca576040519150601f19603f3d011682016040523d82523d6000602084013e6128cf565b606091505b509150915081612926576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b80511561238a5780806020019051602081101561294257600080fd5b505161238a5760405162461bcd60e51b815260040180806020018281038252602a81526020018061302b602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906129b357508115155b949350505050565b604051806040016040528060008152602001600081525090565b50805460008255600202906000526020600020908101906113a99190612a0d565b604080518082019091526000808252602082015290565b5b80821115612a285760008082556001820155600201612a0e565b5090565b8035610fc581612fa0565b600060208284031215612a48578081fd5b8135610ff281612fa0565b60008060408385031215612a65578081fd5b8235612a7081612fa0565b91506020830135612a8081612fa0565b809150509250929050565b60008060408385031215612a9d578182fd5b8235612aa881612fa0565b946020939093013593505050565b600080600060608486031215612aca578081fd5b8335612ad581612fa0565b9250602084013591506040840135612aec81612fb5565b809150509250925092565b60006020808385031215612b09578182fd5b823567ffffffffffffffff80821115612b20578384fd5b818501915085601f830112612b33578384fd5b813581811115612b3f57fe5b83810260405185828201018181108582111715612b5857fe5b604052828152858101935084860182860187018a1015612b76578788fd5b8795505b83861015612b9f57612b8b81612a2c565b855260019590950194938601938601612b7a565b5098975050505050505050565b600060208284031215612bbd578081fd5b8151610ff281612fb5565b60008060408385031215612bda578182fd5b8235612a7081612fb5565b600060208284031215612bf6578081fd5b5035919050565b600060208284031215612c0e578081fd5b5051919050565b600080600060608486031215612c29578283fd5b833592506020840135612c3b81612fb5565b91506040840135612aec81612fa0565b6000815180845260208085019450808401835b83811015612c85578151805188528301518388015260409096019590820190600101612c5e565b509495945050505050565b6001600160a01b0391909116815260200190565b6001600160a01b038381168252604060208084018290528451918401829052600092858201929091906060860190855b81811015612cf2578551851683529483019491830191600101612cd4565b509098975050505050505050565b6001600160a01b03929092168252602082015260400190565b602080825282518282018190526000919060409081850190868401855b82811015612d6457815180516001600160a01b03168552860151868501529284019290850190600101612d36565b5091979650505050505050565b901515815260200190565b6020808252600e908201526d043616e6e6f74207374616b6520360941b604082015260600190565b60208082526022908201527f496e73756666696369656e742062616c616e63652061667465722070656e616c604082015261747960f01b606082015260800190565b602080825260119082015270043616e6e6f74207769746864726177203607c1b604082015260600190565b6020808252601d908201527f43616e6e6f74207769746864726177207374616b696e6720746f6b656e000000604082015260600190565b6020808252601d908201527f496e73756666696369656e7420756e6c6f636b65642062616c616e6365000000604082015260600190565b6020808252601c908201527f43616e6e6f742077697468647261772072657761726420746f6b656e00000000604082015260600190565b6020808252601490820152732ab735b737bbb7103932bbb0b932103a37b5b2b760611b604082015260600190565b60208082526010908201526f14dd185ada5b99c8191a5cd8589b195960821b604082015260600190565b90815260200190565b6000838252604060208301526129b36040830184612c4b565b9182521515602082015260400190565b918252602082015260400190565b600085825284602083015283604083015260806060830152612f736080830184612c4b565b9695505050505050565b948552602085019390935260408401919091526060830152608082015260a00190565b6001600160a01b03811681146113a957600080fd5b80151581146113a957600080fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212206041c922e12faecd8b76ee5efa96f86e325ad9b49741e8d499905313eb6889b564736f6c634300070600330000000000000000000000000c4681e6c0235179ec3d4f4fc4df3d14fdd96017

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

0000000000000000000000000c4681e6c0235179ec3d4f4fc4df3d14fdd96017

-----Decoded View---------------
Arg [0] : _stakingToken (address): 0x0c4681e6c0235179ec3d4f4fc4df3d14fdd96017

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000c4681e6c0235179ec3d4f4fc4df3d14fdd96017


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.