Contract 0x3f648151f5d591718327aa27d2ee25edf1b435d8

 
 
Txn Hash
Block
From
To
Value [Txn Fee]
0x0f18bf41e07cf3b1332144d93c7a7d22cb4f33b80cdb95439f5f00d6d64291cd95621402021-07-29 1:27:0616 mins ago0x27845daa2b0ebfa7add25f5a62aa17c2f4bfcc57 IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.001411955
0xe27831eed7f2926cb113630679acc17fc78f08c7c97c0ba103f8cd975dd632a395619372021-07-29 1:16:4827 mins ago0xc9c17b24a3e97783c018ee20259502341ce09732 IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.000412675
0xff1d4c6ed0883bb831049def1c38fa1aed6f27f43614399ea5ef3e7e6e87baf695618842021-07-29 1:14:0929 mins ago0xc9c17b24a3e97783c018ee20259502341ce09732 IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.00149761
0xf70dce516b25398872212d7d64d68ea4116ba20f8a7fd632b825fdc5be2f263f95613362021-07-29 0:46:3757 mins ago0xca2fbe7335f2746000c68b0fc56eccddebc9f796 IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.000487555
0x0c69ee330cf3ee2efb4e4d5a7629d81c0da9fb1869d74ca6ffafb31d79ead32b95610092021-07-29 0:30:151 hr 13 mins ago0x671789abfa7018d7f2cc649e44fa6fb48f4817bc IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.001411955
0x8bab3a97f64c6f5e6dc810783a3b99a86f6727a4aa686ec6474267eedff5075095599292021-07-28 23:35:192 hrs 8 mins ago0x671789abfa7018d7f2cc649e44fa6fb48f4817bc IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.001389085
0xb3aeafff70bf0d482b9dab6a6a4068353ed3861c554514b2073bf92d578b834495587952021-07-28 22:36:433 hrs 7 mins ago0xcff3ff0879011741173a9a04cdab24fca67a1766 IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.001389085
0xeeeb59a7d805ca0df061d24c44049e1d5592e9443cedb352e4a3f8ad2b5aa2d195581842021-07-28 22:04:503 hrs 39 mins ago0xfeca55e256387265510473626c83d109e3943a8e IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.00186652
0xf6edeb4252af833c07cc2ba1af010def6ad6433ae1109cfdcc94d3cd8242de2e95576672021-07-28 21:38:434 hrs 5 mins ago0xb00d13953c0cdd4ec4191a9f007c1a1a3ac6d592 IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.001411895
0xd25ed28a5fa697379f311b97c255609edc61356024e86ad3d6d711648bef06f095576492021-07-28 21:37:494 hrs 6 mins ago0x05dd49d5e79dacea849790c8857f9dbd8e16e82c IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.001520485
0x6f875ca2b356183520e4fd6468e2f967614818789572b9f336864e4090df830195575642021-07-28 21:33:344 hrs 10 mins ago0x09c0f473227250fc00a828814f8479b51ac59feb IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.001411895
0xd5c1825c9f8297ed73b88668ab2094c2c2e6e46c77077e32b021389c1325267495575082021-07-28 21:30:464 hrs 13 mins ago0x09c0f473227250fc00a828814f8479b51ac59feb IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.000412555
0x4ebe35b97887598304cbfec11761c00bfc425e186cba096260ffc846a9f8517995572822021-07-28 21:19:264 hrs 24 mins ago0xfeca55e256387265510473626c83d109e3943a8e IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.00149761
0x16988365dc3c51a282842571a3c60eed01be547209a8b58c765e1b9636a1c81895572242021-07-28 21:16:324 hrs 27 mins ago0xabe3fe12d80df7436259013e1cb7094359b2a737 IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.001486955
0x6a0504996740dd88dda7a70b2c14a68aee90713d9140a324ba18341746746ffb95571332021-07-28 21:11:594 hrs 31 mins ago0xa6a5dd2ca182464b90a0d53ddeb16183f49668d3 IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.00116183
0x4577dbbb6970082efc77355e0fed28c953997f4d76c7e79bcc075d1350ff7ed495568972021-07-28 21:00:084 hrs 43 mins ago0x4d5c962aa00c78426e4e9dfa3ceb9ac708c59cb7 IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.001411895
0x721cf28a86ec9316eec83e541cd8040ce229a109582d35351ad6235a57cc652095566902021-07-28 20:49:404 hrs 54 mins ago0xd6e446f6d26680d12b81ab5653fe41e3f0801a47 IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.000412615
0xde091632ceb0f7ea7e457ad73d7ba8107a6aa363a5c0272c279814524ca6f9a295565602021-07-28 20:43:105 hrs ago0xa6a5dd2ca182464b90a0d53ddeb16183f49668d3 IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.032267315
0x5202c25e25bce1fc45fc54227816e2f0c4873845411f3b371fcd74cf4bc0821f95559902021-07-28 20:14:395 hrs 29 mins ago0xa6a5dd2ca182464b90a0d53ddeb16183f49668d3 IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.013133895
0x0982bc183a8fc765076e3ec0dc1da6068479b67c2e3ec31d91d6fe01bc39c58c95559872021-07-28 20:14:305 hrs 29 mins ago0xa6a5dd2ca182464b90a0d53ddeb16183f49668d3 IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.01336027
0x654033d276995dd850b91ad613d8797094dda5ddd102e73db3f504fd67c883dd95559852021-07-28 20:14:245 hrs 29 mins ago0xa6a5dd2ca182464b90a0d53ddeb16183f49668d3 IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.012874325
0xb469ef0d2af409754a86dd9588ee6dfeae8d7141701f078c5801c10348384bdf95559832021-07-28 20:14:185 hrs 29 mins ago0xa6a5dd2ca182464b90a0d53ddeb16183f49668d3 IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.012928725
0xa76db0e42fb58f1e20de31a3a197fa060dacd38593f72cc697a2adc2642deea595559812021-07-28 20:14:125 hrs 29 mins ago0xa6a5dd2ca182464b90a0d53ddeb16183f49668d3 IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.012874325
0xe1bb997229506d0f03d6806cf6b82abdbe1527f7da9f8792724cccbb9ef784bb95559792021-07-28 20:14:065 hrs 29 mins ago0xa6a5dd2ca182464b90a0d53ddeb16183f49668d3 IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.012874285
0x3dfb638b22201fc8854681726193d13ad9a65f07b627527300a01bc3db5d031b95559772021-07-28 20:14:005 hrs 29 mins ago0xa6a5dd2ca182464b90a0d53ddeb16183f49668d3 IN  0x3f648151f5d591718327aa27d2ee25edf1b435d80 BNB0.012874285
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VaultChef

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 5000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 10 : VaultChef.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.6.12;

import '@openzeppelin/contracts/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/ReentrancyGuard.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';
import "./interfaces/ITreasury.sol";
import "./interfaces/IStrategy.sol";

contract VaultChef is Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    struct UserInfo {
        uint256 shares;
        uint256 rewardDebt;
    }

    struct PoolInfo {
        IERC20 want;
        uint256 allocPoint;
        uint256 lastRewardBlock;
        uint256 accRewardsPerShare;
        address strat;
    }

    PoolInfo[] public poolInfo;
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;
    uint256 public totalAllocPoint = 0;
    uint256 public startBlock;

    IERC20 public gooseDollar;
    ITreasury public treasury;

    uint256 public emissionRate;
    uint256 public rateMultiplierBP = 10000;
    uint256 public lastEmissionUpdateBlock;
    address public schedulerAddress = address(0xa6A5dd2ca182464B90A0D53DdeB16183f49668D3);

    address constant public busdAddress = address(0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56);

    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event DepositBUSD(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event UpdateVaultEmission(address indexed user, uint256 emissionRate);
    event Harvest(address indexed user, uint256 indexed pid, uint256 amount);
    event SetSchedulerAddress(address indexed user, address newAddr);
    event SetRateMultiplier(address indexed user, uint256 rate);
    event Earn(address indexed user, uint256 indexed pid, address wantAddress, uint256 amountGained, uint256 valueGained);

    constructor(
        address _treasury,
        address _gooseDollar
    ) public {
        treasury = ITreasury(_treasury);
        gooseDollar = IERC20(_gooseDollar);
    }

    modifier onlyAdmins(){
        require(msg.sender == owner() || msg.sender == schedulerAddress, "onlyAdmins: FORBIDDEN");
        _;
    }

    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }

    function add(uint256 _allocPoint, IERC20 _want, bool _withUpdate, address _strat) public onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(PoolInfo({
        want : _want,
        allocPoint : _allocPoint,
        lastRewardBlock : lastRewardBlock,
        accRewardsPerShare : 0,
        strat : _strat
        }));
    }

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

    function getMultiplier(uint256 _from, uint256 _to) public pure returns (uint256){
        return _to.sub(_from);
    }

    function pendingRewards(uint256 _pid, address _user) external view returns (uint256){
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accRewardsPerShare = pool.accRewardsPerShare;
        uint256 sharesTotal = IStrategy(pool.strat).sharesTotal();
        if (block.number > pool.lastRewardBlock && sharesTotal != 0) {
            uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
            uint256 rewards = multiplier.mul(emissionRate).mul(pool.allocPoint).div(totalAllocPoint);
            accRewardsPerShare = accRewardsPerShare.add(rewards.mul(1e12).div(sharesTotal));
        }
        return user.shares.mul(accRewardsPerShare).div(1e12).sub(user.rewardDebt);
    }

    // View function to see staked Want tokens on frontend.
    function stakedWantTokens(uint256 _pid, address _user) external view returns (uint256){
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];

        uint256 sharesTotal = IStrategy(pool.strat).sharesTotal();
        uint256 wantLockedTotal = IStrategy(poolInfo[_pid].strat).wantLockedTotal();
        if (sharesTotal == 0) {
            return 0;
        }
        return user.shares.mul(wantLockedTotal).div(sharesTotal);
    }

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

    function massUpdatePoolsFromTo(uint256 from, uint256 to) public {
        for (uint256 pid = from; pid <= to; ++pid) {
            updatePool(pid);
        }
    }

    function updateVaultEmission(bool withUpdate) public onlyAdmins {
        if (withUpdate) {
            massUpdatePools();
        }
        uint256 _emissionRate = treasury.updateEmissionRate();
        emissionRate = _emissionRate.mul(rateMultiplierBP).div(10000);
        lastEmissionUpdateBlock = block.number;
        emit UpdateVaultEmission(msg.sender, emissionRate);
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }
        uint256 sharesTotal = IStrategy(pool.strat).sharesTotal();
        if (sharesTotal == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }
        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
        if (multiplier <= 0) {
            return;
        }
        uint256 rewards = multiplier.mul(emissionRate).mul(pool.allocPoint).div(totalAllocPoint);
        rewards = treasury.mintGooseDollar(rewards);

        pool.accRewardsPerShare = pool.accRewardsPerShare.add(rewards.mul(1e12).div(sharesTotal));
        pool.lastRewardBlock = block.number;
    }

    // Want tokens moved from user -> chef -> Strat (compounding)
    function deposit(uint256 _pid, uint256 _wantAmt) public nonReentrant {
        updatePool(_pid);
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];

        if (user.shares > 0) {
            uint256 pending = user.shares.mul(pool.accRewardsPerShare).div(1e12).sub(user.rewardDebt);
            if (pending > 0) {
                safeRewardTransfer(msg.sender, pending);
            }
        }
        if (_wantAmt > 0) {
            pool.want.safeTransferFrom(address(msg.sender), address(this), _wantAmt);
            pool.want.safeIncreaseAllowance(pool.strat, _wantAmt);
            uint256 sharesAdded = IStrategy(pool.strat).deposit(msg.sender, _wantAmt);
            require(sharesAdded > 0, "DEPOSIT FAILED");
            user.shares = user.shares.add(sharesAdded);
        }
        user.rewardDebt = user.shares.mul(pool.accRewardsPerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _wantAmt);
    }

    function depositBUSD(uint256 _pid, uint256 _busdAmount) public nonReentrant {
        updatePool(_pid);
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];

        if (user.shares > 0) {
            uint256 pending = user.shares.mul(pool.accRewardsPerShare).div(1e12).sub(user.rewardDebt);
            if (pending > 0) {
                safeRewardTransfer(msg.sender, pending);
            }
        }
        if (_busdAmount > 0) {
            IERC20(busdAddress).safeTransferFrom(address(msg.sender), address(this), _busdAmount);
            IERC20(busdAddress).safeIncreaseAllowance(pool.strat, _busdAmount);
            uint256 sharesAdded = IStrategy(pool.strat).depositBUSD(msg.sender, _busdAmount);
            require(sharesAdded > 0, "DEPOSIT FAILED");
            user.shares = user.shares.add(sharesAdded);
        }
        user.rewardDebt = user.shares.mul(pool.accRewardsPerShare).div(1e12);
        emit DepositBUSD(msg.sender, _pid, _busdAmount);
    }

    // Withdraw LP tokens from MasterChef.
    function withdraw(uint256 _pid, uint256 _wantAmt) public nonReentrant {
        updatePool(_pid);

        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];

        uint256 wantLockedTotal = IStrategy(pool.strat).wantLockedTotal();
        uint256 sharesTotal = IStrategy(pool.strat).sharesTotal();

        require(user.shares > 0, "user.shares is 0");
        require(sharesTotal > 0, "sharesTotal is 0");

        uint256 pending = user.shares.mul(pool.accRewardsPerShare).div(1e12).sub(user.rewardDebt);
        if (pending > 0) {
            safeRewardTransfer(msg.sender, pending);
        }

        // Withdraw want tokens
        uint256 amount = user.shares.mul(wantLockedTotal).div(sharesTotal);
        if (_wantAmt > amount) {
            _wantAmt = amount;
        }
        if (_wantAmt > 0) {
            uint256 sharesRemoved = IStrategy(pool.strat).withdraw(msg.sender, _wantAmt);

            if (sharesRemoved > user.shares) {
                user.shares = 0;
            } else {
                user.shares = user.shares.sub(sharesRemoved);
            }

            uint256 wantBal = pool.want.balanceOf(address(this));
            if (wantBal < _wantAmt) {
                _wantAmt = wantBal;
            }
            pool.want.safeTransfer(address(msg.sender), _wantAmt);
        }
        user.rewardDebt = user.shares.mul(pool.accRewardsPerShare).div(1e12);
        emit Withdraw(msg.sender, _pid, _wantAmt);
    }

    function withdrawAll(uint256 _pid) public nonReentrant {
        withdraw(_pid, uint256(- 1));
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint256 _pid) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];

        uint256 wantLockedTotal = IStrategy(pool.strat).wantLockedTotal();
        uint256 sharesTotal = IStrategy(pool.strat).sharesTotal();
        uint256 amount = user.shares.mul(wantLockedTotal).div(sharesTotal);

        IStrategy(pool.strat).withdraw(msg.sender, amount);

        pool.want.safeTransfer(address(msg.sender), amount);
        emit EmergencyWithdraw(msg.sender, _pid, amount);
        user.shares = 0;
        user.rewardDebt = 0;
    }

    // Safe transfer function, just in case if rounding error causes pool to not have enough
    function safeRewardTransfer(address to, uint256 amount) internal {
        uint256 balance = gooseDollar.balanceOf(address(this));
        if (amount > balance) {
            gooseDollar.safeTransfer(to, balance);
        } else {
            gooseDollar.safeTransfer(to, amount);
        }
    }

    function harvestFor(uint256 _pid, address _user) public nonReentrant {
        //Limit to self or delegated harvest to avoid unnecessary confusion
        require(msg.sender == _user || tx.origin == _user, "harvestFor: FORBIDDEN");
        updatePool(_pid);
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        if (user.shares > 0) {
            uint256 pending = user.shares.mul(pool.accRewardsPerShare).div(1e12).sub(user.rewardDebt);
            if (pending > 0) {
                safeRewardTransfer(_user, pending);
                user.rewardDebt = user.shares.mul(pool.accRewardsPerShare).div(1e12);
                emit Harvest(_user, _pid, pending);
            }
        }
    }

    function bulkHarvestFor(uint256[] calldata pidArray, address _user) external {
        uint256 length = pidArray.length;
        for (uint256 index = 0; index < length; ++index) {
            uint256 _pid = pidArray[index];
            harvestFor(_pid, _user);
        }
    }

    function earn(uint256 _pid) external onlyAdmins {
        PoolInfo storage pool = poolInfo[_pid];
        uint256 wantLockedBefore = IStrategy(pool.strat).wantLockedTotal();
        IStrategy(pool.strat).earn();
        uint256 wantLockedAfter = IStrategy(pool.strat).wantLockedTotal();
        if(wantLockedAfter > wantLockedBefore){
            uint256 wantGained = wantLockedAfter.sub(wantLockedBefore);
            uint256 valueGained = IStrategy(pool.strat).wantTokenValue(wantGained);
            emit Earn(msg.sender, _pid, address(pool.want), wantGained, valueGained);
        }
    }




    //Misc Settings
    function setSchedulerAddr(address newAddr) external onlyAdmins {
        schedulerAddress = newAddr;
        emit SetSchedulerAddress(msg.sender, newAddr);
    }

    function setRateMultiplier(uint256 rate) external onlyOwner {
        rateMultiplierBP = rate;
        emit SetRateMultiplier(msg.sender, rate);
    }



    //View Functions For Clients
    function tvl(uint256 _pid) public view returns (uint256){
        return IStrategy(poolInfo[_pid].strat).tvl();
    }

    function sharesTotal(uint256 _pid) external view returns (uint256){
        return IStrategy(poolInfo[_pid].strat).sharesTotal();
    }

    function wantLockedTotal(uint256 _pid) external view returns (uint256){
        return IStrategy(poolInfo[_pid].strat).wantLockedTotal();
    }

    function lastEarnBlock(uint256 _pid) external view returns (uint256){
        return IStrategy(poolInfo[_pid].strat).lastEarnBlock();
    }

    function lastEarnTimestamp(uint256 _pid) external view returns (uint256){
        return IStrategy(poolInfo[_pid].strat).lastEarnTimestamp();
    }

    function wantTokenValue(uint256 _pid, uint256 wantAmount) external view returns (uint256){
        return IStrategy(poolInfo[_pid].strat).wantTokenValue(wantAmount);
    }

    function originTVL(uint256 _pid) external view returns (uint256){
        return IStrategy(poolInfo[_pid].strat).originTVL();
    }

    function rewardTokenValue(uint256 _pid, uint256 rewardAmount) external view returns (uint256){
        return IStrategy(poolInfo[_pid].strat).rewardTokenValue(rewardAmount);
    }

    function originRewardsPerBlock(uint256 _pid) external view returns (uint256){
        return IStrategy(poolInfo[_pid].strat).originRewardsPerBlock();
    }

    function originAPR(uint256 _pid, uint256 blocks) external view returns (uint256){
        return IStrategy(poolInfo[_pid].strat).originAPR(blocks);
    }

    function originStakedTotal(uint256 _pid) external view returns (uint256){
        return IStrategy(poolInfo[_pid].strat).originStakedTotal();
    }

    function paused(uint256 _pid) public view returns (bool){
        return IStrategy(poolInfo[_pid].strat).paused();
    }

    function allocPoint(uint256 _pid) public view returns (uint256){
        return poolInfo[_pid].allocPoint;
    }

    function shouldCompound(uint256 _pid) external view returns (bool){
        return !paused(_pid) && tvl(_pid) > 0;
    }
}

File 2 of 10 : IStrategy.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.6.12;

interface IStrategy {
    function wantLockedTotal() external view returns (uint256);

    function sharesTotal() external view returns (uint256);

    function lastEarnBlock() external view returns (uint256);

    function lastEarnTimestamp() external view returns (uint256);

    function earn() external;

    function deposit(address _userAddress, uint256 _wantAmt) external returns (uint256);

    function withdraw(address _userAddress, uint256 _wantAmt) external returns (uint256);

    function depositBUSD(address _userAddress, uint256 busdAmount) external returns (uint256);

    function withdrawBUSD(address _userAddress, uint256 shares) external returns (uint256, uint256);

    function tvl() external view returns (uint256);

    function wantTokenValue(uint256 wantAmount) external view returns (uint256);

    function originTVL() external view returns (uint256);

    function rewardTokenValue(uint256 rewardAmount) external view returns (uint256);

    function originRewardsPerBlock() external view returns (uint256);

    function originAPR(uint256 blocks) external view returns (uint256);

    function originStakedTotal() external view returns (uint256);

    function paused() external view returns (bool);
}

File 3 of 10 : ITreasury.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.6.12;

interface ITreasury {
    function updateEmissionRate() external returns (uint256 emissionRate);
    function mintGooseDollar(uint256 dollarAmount) external returns (uint256 mintAmount);
    function borrow(uint256 dollarAmount) external returns (bool);
    function settle(uint256 settleAmount, uint256 debtAmount) external returns (bool);
    function income(uint256 dollarAmount) external;
}

File 4 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        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 5 of 10 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @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, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

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

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

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

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

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        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) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        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, reverting 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) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

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

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

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * 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) {
        require(b > 0, errorMessage);
        return a / b;
    }

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

File 6 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 7 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

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

File 8 of 10 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <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;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 9 of 10 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 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;
    }
}

File 10 of 10 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 5000
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address","name":"_gooseDollar","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DepositBUSD","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"address","name":"wantAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountGained","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"valueGained","type":"uint256"}],"name":"Earn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Harvest","type":"event"},{"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":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"rate","type":"uint256"}],"name":"SetRateMultiplier","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"newAddr","type":"address"}],"name":"SetSchedulerAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"emissionRate","type":"uint256"}],"name":"UpdateVaultEmission","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_want","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"},{"internalType":"address","name":"_strat","type":"address"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"allocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"pidArray","type":"uint256[]"},{"internalType":"address","name":"_user","type":"address"}],"name":"bulkHarvestFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"busdAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_wantAmt","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_busdAmount","type":"uint256"}],"name":"depositBUSD","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"earn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emissionRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"gooseDollar","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"harvestFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"lastEarnBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"lastEarnTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastEmissionUpdateBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"to","type":"uint256"}],"name":"massUpdatePoolsFromTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"blocks","type":"uint256"}],"name":"originAPR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"originRewardsPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"originStakedTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"originTVL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"want","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accRewardsPerShare","type":"uint256"},{"internalType":"address","name":"strat","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rateMultiplierBP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"}],"name":"rewardTokenValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"schedulerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rate","type":"uint256"}],"name":"setRateMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddr","type":"address"}],"name":"setSchedulerAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"sharesTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"shouldCompound","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"stakedWantTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","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":[],"name":"treasury","outputs":[{"internalType":"contract ITreasury","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"tvl","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"withUpdate","type":"bool"}],"name":"updateVaultEmission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"wantLockedTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"wantAmount","type":"uint256"}],"name":"wantTokenValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_wantAmt","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000600455612710600955600b80546001600160a01b03191673a6a5dd2ca182464b90a0d53ddeb16183f49668d31790553480156200004257600080fd5b50604051620038b9380380620038b9833981810160405260408110156200006857600080fd5b50805160209091015160006200007d620000fd565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060018055600780546001600160a01b039384166001600160a01b0319918216179091556006805492909316911617905562000101565b3390565b6137a880620001116000396000f3fe608060405234801561001057600080fd5b506004361061031f5760003560e01c80637b84daec116101a7578063c56c7f8d116100ee578063ed09c0c011610097578063f2fde38b11610071578063f2fde38b146108cf578063f3eb62e6146108f5578063fa3bf010146109125761031f565b8063ed09c0c014610887578063edc23f96146108a4578063efa1c47e146108ac5761031f565b8063dafc1315116100c8578063dafc13151461082a578063e2bbb15814610847578063e65a01171461086a5761031f565b8063c56c7f8d146107be578063d18df53c146107e1578063da480fb71461080d5761031f565b80639c7781d111610150578063b45f8b431161012a578063b45f8b431461077c578063c22c36dc14610784578063c4c940f2146107a15761031f565b80639c7781d114610738578063ab7a225214610757578063ae45850b146107745761031f565b806393f1a40b1161018157806393f1a40b146106ce578063958e2d311461071357806396afc450146107305761031f565b80637b84daec146106775780638da5cb5b146106a35780638dbb1e3a146106ab5761031f565b8063496b29891161026b57806364482f791161021457806375d50869116101ee57806375d50869146105d357806376a90231146105f6578063795ccdbb146105fe5761031f565b806364482f7914610574578063708e3ebf1461059f578063715018a6146105cb5761031f565b80635f70edcf116102455780635f70edcf1461050a57806361d027b314610548578063630b5ba11461056c5761031f565b8063496b2989146104ad57806351eb05a6146104d05780635312ea8e146104ed5761031f565b80632ac27381116102cd57806343abd319116102a757806343abd3191461045a578063441a3e701461048257806348cd4cb1146104a55761031f565b80632ac27381146104185780632f914bd4146104205780633503b9931461043d5761031f565b80631526fe27116102fe5780631526fe271461039257806315eccd6a146103f357806317caf6f1146104105761031f565b8062dde10e1461032457806304f1eb6414610355578063081e3eda1461038a575b600080fd5b6103416004803603602081101561033a57600080fd5b503561092f565b604080519115158252519081900360200190f35b6103786004803603604081101561036b57600080fd5b50803590602001356109cd565b60408051918252519081900360200190f35b610378610a82565b6103af600480360360208110156103a857600080fd5b5035610a88565b60405180866001600160a01b03168152602001858152602001848152602001838152602001826001600160a01b031681526020019550505050505060405180910390f35b6103786004803603602081101561040957600080fd5b5035610ad3565b610378610afb565b610378610b01565b6103786004803603602081101561043657600080fd5b5035610b07565b6103786004803603602081101561045357600080fd5b5035610b73565b6104806004803603602081101561047057600080fd5b50356001600160a01b0316610bdf565b005b6104806004803603604081101561049857600080fd5b5080359060200135610cd0565b610378611182565b610480600480360360408110156104c357600080fd5b5080359060200135611188565b610480600480360360208110156104e657600080fd5b50356111a7565b6104806004803603602081101561050357600080fd5b5035611385565b6104806004803603608081101561052057600080fd5b508035906001600160a01b03602082013581169160408101351515916060909101351661164b565b610550611837565b604080516001600160a01b039092168252519081900360200190f35b610480611846565b6104806004803603606081101561058a57600080fd5b50803590602081013590604001351515611869565b610480600480360360408110156105b557600080fd5b50803590602001356001600160a01b0316611956565b610480611b20565b610378600480360360408110156105e957600080fd5b5080359060200135611bf6565b610550611c76565b6104806004803603604081101561061457600080fd5b81019060208101813564010000000081111561062f57600080fd5b82018360208201111561064157600080fd5b8035906020019184602083028401116401000000008311171561066357600080fd5b9193509150356001600160a01b0316611c8e565b6103786004803603604081101561068d57600080fd5b50803590602001356001600160a01b0316611ccb565b610550611e5f565b610378600480360360408110156106c157600080fd5b5080359060200135611e6e565b6106fa600480360360408110156106e457600080fd5b50803590602001356001600160a01b0316611e81565b6040805192835260208301919091528051918290030190f35b6104806004803603602081101561072957600080fd5b5035611ea5565b610378611f33565b6104806004803603602081101561074e57600080fd5b50351515611f39565b6104806004803603602081101561076d57600080fd5b50356120af565b610550612161565b610550612170565b6103416004803603602081101561079a57600080fd5b503561217f565b610378600480360360208110156107b757600080fd5b50356121a4565b610480600480360360408110156107d457600080fd5b5080359060200135612210565b610378600480360360408110156107f757600080fd5b50803590602001356001600160a01b03166124ad565b6103786004803603602081101561082357600080fd5b5035612618565b6103786004803603602081101561084057600080fd5b5035612684565b6104806004803603604081101561085d57600080fd5b50803590602001356126f0565b6104806004803603602081101561088057600080fd5b5035612974565b6103786004803603602081101561089d57600080fd5b5035612ca3565b610378612d0f565b610378600480360360408110156108c257600080fd5b5080359060200135612d15565b610480600480360360208110156108e557600080fd5b50356001600160a01b0316612d95565b6103786004803603602081101561090b57600080fd5b5035612ec1565b6103786004803603602081101561092857600080fd5b5035612f2d565b60006002828154811061093e57fe5b906000526020600020906005020160040160009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561099b57600080fd5b505afa1580156109af573d6000803e3d6000fd5b505050506040513d60208110156109c557600080fd5b505192915050565b6000600283815481106109dc57fe5b60009182526020918290206004600590920201810154604080517f2713c16a000000000000000000000000000000000000000000000000000000008152928301869052516001600160a01b0390911692632713c16a9260248082019391829003018186803b158015610a4d57600080fd5b505afa158015610a61573d6000803e3d6000fd5b505050506040513d6020811015610a7757600080fd5b505190505b92915050565b60025490565b60028181548110610a9557fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b0393841695509193909290911685565b600060028281548110610ae257fe5b9060005260206000209060050201600101549050919050565b60045481565b60095481565b600060028281548110610b1657fe5b906000526020600020906005020160040160009054906101000a90046001600160a01b03166001600160a01b03166342da4eb36040518163ffffffff1660e01b815260040160206040518083038186803b15801561099b57600080fd5b600060028281548110610b8257fe5b906000526020600020906005020160040160009054906101000a90046001600160a01b03166001600160a01b031663f364846c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561099b57600080fd5b610be7611e5f565b6001600160a01b0316336001600160a01b03161480610c105750600b546001600160a01b031633145b610c61576040805162461bcd60e51b815260206004820152601560248201527f6f6e6c7941646d696e733a20464f5242494444454e0000000000000000000000604482015290519081900360640190fd5b600b80546001600160a01b0383167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155604080519182525133917f3286106f3d6ecbfd95574eec1ebdfd0640a1d7bfea3ac1ef867907e32830ec3f919081900360200190a250565b60026001541415610d28576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600155610d36826111a7565b600060028381548110610d4557fe5b60009182526020808320868452600382526040808520338652835280852060059490940290910160048181015483517f42da4eb300000000000000000000000000000000000000000000000000000000815293519297509495946001600160a01b0316936342da4eb39380830193919290829003018186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d6020811015610df457600080fd5b5051600480850154604080517f44a3955e00000000000000000000000000000000000000000000000000000000815290519394506000936001600160a01b03909216926344a3955e928282019260209290829003018186803b158015610e5957600080fd5b505afa158015610e6d573d6000803e3d6000fd5b505050506040513d6020811015610e8357600080fd5b50518354909150610edb576040805162461bcd60e51b815260206004820152601060248201527f757365722e736861726573206973203000000000000000000000000000000000604482015290519081900360640190fd5b60008111610f30576040805162461bcd60e51b815260206004820152601060248201527f736861726573546f74616c206973203000000000000000000000000000000000604482015290519081900360640190fd5b6000610f6a8460010154610f6464e8d4a51000610f5e89600301548960000154612f9990919063ffffffff16565b90612ff2565b90613059565b90508015610f7c57610f7c33826130b6565b8354600090610f91908490610f5e9087612f99565b905080871115610f9f578096505b861561111d57600480870154604080517ff3fef3a30000000000000000000000000000000000000000000000000000000081523393810193909352602483018a9052516000926001600160a01b039092169163f3fef3a391604480830192602092919082900301818787803b15801561101757600080fd5b505af115801561102b573d6000803e3d6000fd5b505050506040513d602081101561104157600080fd5b505186549091508111156110585760008655611067565b85546110649082613059565b86555b8654604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156110ca57600080fd5b505afa1580156110de573d6000803e3d6000fd5b505050506040513d60208110156110f457600080fd5b5051905088811015611104578098505b875461111a906001600160a01b0316338b61317f565b50505b600386015485546111389164e8d4a5100091610f5e91612f99565b6001860155604080518881529051899133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a3505060018055505050505050565b60055481565b815b8181116111a25761119a816111a7565b60010161118a565b505050565b6000600282815481106111b657fe5b90600052602060002090600502019050806002015443116111d75750611382565b60008160040160009054906101000a90046001600160a01b03166001600160a01b03166344a3955e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561122957600080fd5b505afa15801561123d573d6000803e3d6000fd5b505050506040513d602081101561125357600080fd5b5051905080611269575043600290910155611382565b6000611279836002015443611e6e565b90506000811161128b57505050611382565b60006112b6600454610f5e86600101546112b060085487612f9990919063ffffffff16565b90612f99565b600754604080517f5689b2650000000000000000000000000000000000000000000000000000000081526004810184905290519293506001600160a01b0390911691635689b265916024808201926020929091908290030181600087803b15801561132057600080fd5b505af1158015611334573d6000803e3d6000fd5b505050506040513d602081101561134a57600080fd5b5051905061136f61136484610f5e8464e8d4a51000612f99565b6003860154906131ff565b6003850155505043600290920191909155505b50565b600260015414156113dd576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026001819055506000600282815481106113f457fe5b60009182526020808320858452600382526040808520338652835280852060059490940290910160048181015483517f42da4eb300000000000000000000000000000000000000000000000000000000815293519297509495946001600160a01b0316936342da4eb39380830193919290829003018186803b15801561147957600080fd5b505afa15801561148d573d6000803e3d6000fd5b505050506040513d60208110156114a357600080fd5b5051600480850154604080517f44a3955e00000000000000000000000000000000000000000000000000000000815290519394506000936001600160a01b03909216926344a3955e928282019260209290829003018186803b15801561150857600080fd5b505afa15801561151c573d6000803e3d6000fd5b505050506040513d602081101561153257600080fd5b5051835490915060009061154c908390610f5e9086612f99565b600480870154604080517ff3fef3a3000000000000000000000000000000000000000000000000000000008152339381019390935260248301849052519293506001600160a01b03169163f3fef3a3916044808201926020929091908290030181600087803b1580156115be57600080fd5b505af11580156115d2573d6000803e3d6000fd5b505050506040513d60208110156115e857600080fd5b50508454611600906001600160a01b0316338361317f565b604080518281529051879133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a3505060008083556001928301555080555050565b611653613259565b6001600160a01b0316611664611e5f565b6001600160a01b0316146116bf576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b81156116cd576116cd611846565b600060055443116116e0576005546116e2565b435b6004549091506116f290866131ff565b6004556040805160a0810182526001600160a01b0395861681526020810196875290810191825260006060820181815293861660808301908152600280546001810182559252915160059091027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace810180549288167fffffffffffffffffffffffff000000000000000000000000000000000000000093841617905596517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf88015591517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad087015591517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad186015590517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2909401805494909316931692909217905550565b6007546001600160a01b031681565b60025460005b818110156118655761185d816111a7565b60010161184c565b5050565b611871613259565b6001600160a01b0316611882611e5f565b6001600160a01b0316146118dd576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b80156118eb576118eb611846565b61192882611922600286815481106118ff57fe5b90600052602060002090600502016001015460045461305990919063ffffffff16565b906131ff565b600481905550816002848154811061193c57fe5b906000526020600020906005020160010181905550505050565b600260015414156119ae576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600155336001600160a01b03821614806119d25750326001600160a01b038216145b611a23576040805162461bcd60e51b815260206004820152601560248201527f68617276657374466f723a20464f5242494444454e0000000000000000000000604482015290519081900360640190fd5b611a2c826111a7565b600060028381548110611a3b57fe5b600091825260208083208684526003825260408085206001600160a01b0388168652909252922080546005909202909201925015611b16576000611aa18260010154610f6464e8d4a51000610f5e87600301548760000154612f9990919063ffffffff16565b90508015611b1457611ab384826130b6565b60038301548254611ace9164e8d4a5100091610f5e91612f99565b600183015560408051828152905186916001600160a01b038716917f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae06609249549181900360200190a35b505b5050600180555050565b611b28613259565b6001600160a01b0316611b39611e5f565b6001600160a01b031614611b94576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b600060028381548110611c0557fe5b60009182526020918290206004600590920201810154604080517f7bb108f1000000000000000000000000000000000000000000000000000000008152928301869052516001600160a01b0390911692637bb108f19260248082019391829003018186803b158015610a4d57600080fd5b73e9e7cea3dedca5984780bafc599bd69add087d5681565b8160005b81811015611cc4576000858583818110611ca857fe5b905060200201359050611cbb8185611956565b50600101611c92565b5050505050565b60008060028481548110611cdb57fe5b600091825260208083208784526003825260408085206001600160a01b03808a168752908452818620600460059096029093018581015483517f44a3955e000000000000000000000000000000000000000000000000000000008152935191985093969593909116936344a3955e9383810193919291829003018186803b158015611d6557600080fd5b505afa158015611d79573d6000803e3d6000fd5b505050506040513d6020811015611d8f57600080fd5b50516002805491925060009188908110611da557fe5b906000526020600020906005020160040160009054906101000a90046001600160a01b03166001600160a01b03166342da4eb36040518163ffffffff1660e01b815260040160206040518083038186803b158015611e0257600080fd5b505afa158015611e16573d6000803e3d6000fd5b505050506040513d6020811015611e2c57600080fd5b5051905081611e42576000945050505050610a7c565b8254611e54908390610f5e9084612f99565b979650505050505050565b6000546001600160a01b031690565b6000611e7a8284613059565b9392505050565b60036020908152600092835260408084209091529082529020805460019091015482565b60026001541415611efd576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600155611f2c817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610cd0565b5060018055565b60085481565b611f41611e5f565b6001600160a01b0316336001600160a01b03161480611f6a5750600b546001600160a01b031633145b611fbb576040805162461bcd60e51b815260206004820152601560248201527f6f6e6c7941646d696e733a20464f5242494444454e0000000000000000000000604482015290519081900360640190fd5b8015611fc957611fc9611846565b600754604080517f9d677ec100000000000000000000000000000000000000000000000000000000815290516000926001600160a01b031691639d677ec191600480830192602092919082900301818787803b15801561202857600080fd5b505af115801561203c573d6000803e3d6000fd5b505050506040513d602081101561205257600080fd5b505160095490915061206d9061271090610f5e908490612f99565b600881905543600a55604080519182525133917f6688cf13ff9c550fe981bc693bceb0f0070f69ff4c77a537f3281c0ca1634ceb919081900360200190a25050565b6120b7613259565b6001600160a01b03166120c8611e5f565b6001600160a01b031614612123576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600981905560408051828152905133917f0ec91de4d81ceaf7adcc108f4775070e0bde9cecd7e5a5cd6360480cba2141fe919081900360200190a250565b600b546001600160a01b031681565b6006546001600160a01b031681565b600061218a8261092f565b158015610a7c5750600061219d83612684565b1192915050565b6000600282815481106121b357fe5b906000526020600020906005020160040160009054906101000a90046001600160a01b03166001600160a01b0316631d21cea86040518163ffffffff1660e01b815260040160206040518083038186803b15801561099b57600080fd5b60026001541415612268576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600155612276826111a7565b60006002838154811061228557fe5b600091825260208083208684526003825260408085203386529092529220805460059092029092019250156122f65760006122e28260010154610f6464e8d4a51000610f5e87600301548760000154612f9990919063ffffffff16565b905080156122f4576122f433826130b6565b505b821561244c5761231c73e9e7cea3dedca5984780bafc599bd69add087d5633308661325d565b600482015461234a9073e9e7cea3dedca5984780bafc599bd69add087d56906001600160a01b0316856132e5565b600480830154604080517f4d4bd5a8000000000000000000000000000000000000000000000000000000008152339381019390935260248301869052516000926001600160a01b0390921691634d4bd5a891604480830192602092919082900301818787803b1580156123bc57600080fd5b505af11580156123d0573d6000803e3d6000fd5b505050506040513d60208110156123e657600080fd5b505190508061243c576040805162461bcd60e51b815260206004820152600e60248201527f4445504f534954204641494c4544000000000000000000000000000000000000604482015290519081900360640190fd5b815461244890826131ff565b8255505b600382015481546124679164e8d4a5100091610f5e91612f99565b6001820155604080518481529051859133917f8a2298614b2ccbbc8111d5698f4353b52ed97c61821ce6bb845f369a687cf4d39181900360200190a35050600180555050565b600080600284815481106124bd57fe5b60009182526020808320878452600380835260408086206001600160a01b03808b16885290855281872060059096029093019182015460048084015483517f44a3955e000000000000000000000000000000000000000000000000000000008152935194995096979196919591909416936344a3955e9383820193909190829003018186803b15801561254f57600080fd5b505afa158015612563573d6000803e3d6000fd5b505050506040513d602081101561257957600080fd5b505160028501549091504311801561259057508015155b156125f05760006125a5856002015443611e6e565b905060006125cc600454610f5e88600101546112b060085487612f9990919063ffffffff16565b90506125eb6125e484610f5e8464e8d4a51000612f99565b85906131ff565b935050505b611e548360010154610f6464e8d4a51000610f5e868860000154612f9990919063ffffffff16565b60006002828154811061262757fe5b906000526020600020906005020160040160009054906101000a90046001600160a01b03166001600160a01b03166344a3955e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561099b57600080fd5b60006002828154811061269357fe5b906000526020600020906005020160040160009054906101000a90046001600160a01b03166001600160a01b031663e5328e066040518163ffffffff1660e01b815260040160206040518083038186803b15801561099b57600080fd5b60026001541415612748576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600155612756826111a7565b60006002838154811061276557fe5b600091825260208083208684526003825260408085203386529092529220805460059092029092019250156127d65760006127c28260010154610f6464e8d4a51000610f5e87600301548760000154612f9990919063ffffffff16565b905080156127d4576127d433826130b6565b505b82156129135781546127f3906001600160a01b031633308661325d565b60048201548254612811916001600160a01b039182169116856132e5565b600480830154604080517f47e7ef24000000000000000000000000000000000000000000000000000000008152339381019390935260248301869052516000926001600160a01b03909216916347e7ef2491604480830192602092919082900301818787803b15801561288357600080fd5b505af1158015612897573d6000803e3d6000fd5b505050506040513d60208110156128ad57600080fd5b5051905080612903576040805162461bcd60e51b815260206004820152600e60248201527f4445504f534954204641494c4544000000000000000000000000000000000000604482015290519081900360640190fd5b815461290f90826131ff565b8255505b6003820154815461292e9164e8d4a5100091610f5e91612f99565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a35050600180555050565b61297c611e5f565b6001600160a01b0316336001600160a01b031614806129a55750600b546001600160a01b031633145b6129f6576040805162461bcd60e51b815260206004820152601560248201527f6f6e6c7941646d696e733a20464f5242494444454e0000000000000000000000604482015290519081900360640190fd5b600060028281548110612a0557fe5b9060005260206000209060050201905060008160040160009054906101000a90046001600160a01b03166001600160a01b03166342da4eb36040518163ffffffff1660e01b815260040160206040518083038186803b158015612a6757600080fd5b505afa158015612a7b573d6000803e3d6000fd5b505050506040513d6020811015612a9157600080fd5b5051600480840154604080517fd389800f00000000000000000000000000000000000000000000000000000000815290519394506001600160a01b039091169263d389800f9282810192600092919082900301818387803b158015612af557600080fd5b505af1158015612b09573d6000803e3d6000fd5b505050600480840154604080517f42da4eb30000000000000000000000000000000000000000000000000000000081529051600094506001600160a01b03909216926342da4eb3928282019260209290829003018186803b158015612b6d57600080fd5b505afa158015612b81573d6000803e3d6000fd5b505050506040513d6020811015612b9757600080fd5b5051905081811115612c9d576000612baf8284613059565b600480860154604080517f7f3ed247000000000000000000000000000000000000000000000000000000008152928301849052519293506000926001600160a01b0390911691637f3ed247916024808301926020929190829003018186803b158015612c1a57600080fd5b505afa158015612c2e573d6000803e3d6000fd5b505050506040513d6020811015612c4457600080fd5b50518554604080516001600160a01b039290921682526020820185905281810183905251919250879133917fca279ff97cc5ede9a1abf6b4055467750f5fca3f126e6437e73969c321ab47da919081900360600190a350505b50505050565b600060028281548110612cb257fe5b906000526020600020906005020160040160009054906101000a90046001600160a01b03166001600160a01b0316630fa4e01e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561099b57600080fd5b600a5481565b600060028381548110612d2457fe5b60009182526020918290206004600590920201810154604080517f7f3ed247000000000000000000000000000000000000000000000000000000008152928301869052516001600160a01b0390911692637f3ed2479260248082019391829003018186803b158015610a4d57600080fd5b612d9d613259565b6001600160a01b0316612dae611e5f565b6001600160a01b031614612e09576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116612e4e5760405162461bcd60e51b81526004018080602001828103825260268152602001806136dc6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600060028281548110612ed057fe5b906000526020600020906005020160040160009054906101000a90046001600160a01b03166001600160a01b031663faf783026040518163ffffffff1660e01b815260040160206040518083038186803b15801561099b57600080fd5b600060028281548110612f3c57fe5b906000526020600020906005020160040160009054906101000a90046001600160a01b03166001600160a01b03166338f1d2506040518163ffffffff1660e01b815260040160206040518083038186803b15801561099b57600080fd5b600082612fa857506000610a7c565b82820282848281612fb557fe5b0414611e7a5760405162461bcd60e51b81526004018080602001828103825260218152602001806137286021913960400191505060405180910390fd5b6000808211613048576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161305157fe5b049392505050565b6000828211156130b0576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600654604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561311a57600080fd5b505afa15801561312e573d6000803e3d6000fd5b505050506040513d602081101561314457600080fd5b505190508082111561316c57600654613167906001600160a01b0316848361317f565b6111a2565b6006546111a2906001600160a01b031684845b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526111a29084906133fa565b600082820183811015611e7a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052612c9d9085906133fa565b600061337b82856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561334957600080fd5b505afa15801561335d573d6000803e3d6000fd5b505050506040513d602081101561337357600080fd5b5051906131ff565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052909150612c9d9085905b606061344f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166134ab9092919063ffffffff16565b8051909150156111a25780806020019051602081101561346e57600080fd5b50516111a25760405162461bcd60e51b815260040180806020018281038252602a815260200180613749602a913960400191505060405180910390fd5b60606134ba84846000856134c2565b949350505050565b6060824710156135035760405162461bcd60e51b81526004018080602001828103825260268152602001806137026026913960400191505060405180910390fd5b61350c85613631565b61355d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106135ba57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161357d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461361c576040519150601f19603f3d011682016040523d82523d6000602084013e613621565b606091505b5091509150611e54828286613637565b3b151590565b60608315613646575081611e7a565b8251156136565782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156136a0578181015183820152602001613688565b50505050905090810190601f1680156136cd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212209d644fc06b84bc582261a17a9ee120be4ed236d4ac445783ab1e4850de2d752564736f6c634300060c0033000000000000000000000000b67764dbc9551e00631da0d36665cba752823c740000000000000000000000005bfe81fcb3708c8fc733bef60d313cafce1febeb

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

000000000000000000000000b67764dbc9551e00631da0d36665cba752823c740000000000000000000000005bfe81fcb3708c8fc733bef60d313cafce1febeb

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000b67764dbc9551e00631da0d36665cba752823c74
Arg [1] : 0000000000000000000000005bfe81fcb3708c8fc733bef60d313cafce1febeb


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
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.