ETH Price: $3,252.61 (+3.54%)
Gas: 3 Gwei

Contract

0xf46997fe33D626BFF2784F416D887B3C9a98D309
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Jeet203057872024-07-14 15:57:5912 days ago1720972679IN
0xf46997fe...C9a98D309
0 ETH0.000268149.19003051
Jeet203057862024-07-14 15:57:4712 days ago1720972667IN
0xf46997fe...C9a98D309
0 ETH0.000267459.16620909
Jeet203057852024-07-14 15:57:3512 days ago1720972655IN
0xf46997fe...C9a98D309
0 ETH0.000719838.94493109
Collect Bread203057722024-07-14 15:54:5912 days ago1720972499IN
0xf46997fe...C9a98D309
0 ETH0.001037768.65998638
Stay Baked202629572024-07-08 16:22:5917 days ago1720455779IN
0xf46997fe...C9a98D309
0 ETH0.001811768.50558306
Jeet202552172024-07-07 14:25:3519 days ago1720362335IN
0xf46997fe...C9a98D309
0 ETH0.000472185.7042252
Stay Baked202384302024-07-05 6:11:2321 days ago1720159883IN
0xf46997fe...C9a98D309
0 ETH0.0028459713.36080027
Stake Nbake202170462024-07-02 6:29:1124 days ago1719901751IN
0xf46997fe...C9a98D309
0 ETH0.001259726.20363849
Stay Baked201968602024-06-29 10:50:5927 days ago1719658259IN
0xf46997fe...C9a98D309
0 ETH0.000879284.12790548
Stake Nbake201863882024-06-27 23:44:5928 days ago1719531899IN
0xf46997fe...C9a98D309
0 ETH0.000185885.32707293
Stake Nbake201863852024-06-27 23:44:2328 days ago1719531863IN
0xf46997fe...C9a98D309
0 ETH0.000619643.05132364
Stay Baked201584542024-06-24 2:05:5932 days ago1719194759IN
0xf46997fe...C9a98D309
0 ETH0.00091854.31227939
Stake Nbake201198842024-06-18 16:39:1137 days ago1718728751IN
0xf46997fe...C9a98D309
0 ETH0.004334221.34289275
Stay Baked201144852024-06-17 22:27:5938 days ago1718663279IN
0xf46997fe...C9a98D309
0 ETH0.001503997.19451599
Stay Baked201144832024-06-17 22:27:3538 days ago1718663255IN
0xf46997fe...C9a98D309
0 ETH0.001605537.53739409
Stay Baked201059772024-06-16 17:55:1139 days ago1718560511IN
0xf46997fe...C9a98D309
0 ETH0.001425286.69117348
Stay Baked200876032024-06-14 4:16:5942 days ago1718338619IN
0xf46997fe...C9a98D309
0 ETH0.00195329.41714199
Stake Nbake200867392024-06-14 1:23:3542 days ago1718328215IN
0xf46997fe...C9a98D309
0 ETH0.00193119.08057943
Jeet200852472024-06-13 20:21:3542 days ago1718310095IN
0xf46997fe...C9a98D309
0 ETH0.0011391311.56579099
Stake Nbake200707282024-06-11 19:38:5944 days ago1718134739IN
0xf46997fe...C9a98D309
0 ETH0.0032023416.05384442
Stay Baked200707112024-06-11 19:35:3544 days ago1718134535IN
0xf46997fe...C9a98D309
0 ETH0.0035312116.89198624
Stay Baked200706812024-06-11 19:29:2344 days ago1718134163IN
0xf46997fe...C9a98D309
0 ETH0.0035418116.627522
Stake Nbake200706172024-06-11 19:16:1144 days ago1718133371IN
0xf46997fe...C9a98D309
0 ETH0.0029812214.34228132
Jeet200690662024-06-11 14:04:5945 days ago1718114699IN
0xf46997fe...C9a98D309
0 ETH0.0026620327.00597642
Jeet200634692024-06-10 19:18:3545 days ago1718047115IN
0xf46997fe...C9a98D309
0 ETH0.00203224.56667204
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LeOvenV4

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion
File 1 of 7 : le_oven_v2.sol
// SPDX-License-Identifier: MIT
// https://www.l3th1mc00k.xyz/
pragma solidity ^0.8.20;

import "../libraries/ABDKMath64x64.sol";
import "../libraries/UQ112x112.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

interface IUniswapPair {
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function totalSupply() external view returns (uint);
    function transferFrom(address from, address to, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
}

interface IDOUGH {
    function totalSupply() external view returns (uint256);
    function mint(address to, uint256 amount) external;
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
    function transfer(address to, uint256 amount) external returns (bool);
    function burn(uint256 amount) external;
}

// Main contract for Le Oven - $DOUGH staking protocol.
contract LeOvenV4 is Ownable, ReentrancyGuard {
    using UQ112x112 for uint224;

    struct DepositInfo {
        uint128 amount; // How many tokens the user has provided.
        uint128 claimedRewards; // Amount of claimed rewards.
        uint128 shares; // Shares in reward pool. (amount * price difference multiple).
        uint128 rewardDeductible; // Reward deductible. (deposit.amount * accRewardPerShare at the time of staking)
        uint224 targetPrice; // Target price. Tokens can only be withdrawn if current price is above this.
        address account; // Owner account address.
        // pending reward = (deposit.shares * accRewardPerShare) - deposit.rewardDeductible
    }

    // Deposit ID counters
    uint256 public DEPOSIT_ID;
    uint256 public DEPOSIT_ID_LP;

    // Reward variables
    uint256 public accRewardPerShare; // Accumulated rewards per share.
    uint256 public totalShares; // Total number of shares.
    uint256 public accRewardPerShareLP; // Accumulated rewards per share.
    uint256 public totalSharesLP; // Total number of shares.
    uint256 public lastRewardBlock; // checkpoint block on last update of rewards for $dough staking
    uint256 public lastRewardBlockLP; // checkpoint block on last update of rewards for LP staking

    // Emission rates and decay
    uint256 public rewardPerBlock;
    uint256 public rewardPerBlockLP;
    uint256 public decay = 999999465 * 1e9; //0.999999465 * 1e18 ~ reward per block halvens every 6 months
    uint256 public decayLP = decay;

    // Min and max target price multiples
    uint256 public constant maxBakingTemp = 400; // Max price difference multiple (100x)
    uint256 public minBakingTemp = 8; // Min price difference multiple (2x)

    // Jeet penalty (penalty for withdrawing below target and forfeiting rewards)
    uint256 public jeetPenalty = 15; // 15% penalty for $DOUGH staking
    uint256 public jeetPenaltyLP = 20; // 20% penalty for LP staking

    // Variables that keep track of rewards: tokens burned (rewards) = netCirculatingDough - totalSupply
    uint256 public netCirculatingDough; //netCirculatingDough gets increased when new dough is minted, decreased when burned tokens are added to reward pool
    uint256 public burnRewardPercentage = 100; //Percentage of burned tokens that go towards rewards
    uint256 public burnRewardsLPRatio = 20; //Ratio of burned token rewards that go towards LP stakers


    // dough
    IDOUGH public dough;
    // dough lp
    IUniswapPair public doughLp;

    // Info of each deposit.
    mapping(uint256 => DepositInfo) private depositInfo;
    mapping(uint256 => DepositInfo) private depositInfoLP;

    // Bool to enable deposits
    bool public preheated;

    // Events
    event Deposit(address indexed user, uint256 indexed depositId, uint224 indexed targetPrice, uint256 amount, uint256 shares);
    event DepositLP(address indexed user, uint256 indexed depositId, uint224 indexed targetPrice, uint256 amount, uint256 shares);
    event Withdrawal(address indexed user, uint256 indexed depositId, uint256 amount, bool isLP);
    event Jeet(address indexed user, uint256 indexed depositId, uint256 amount, bool isLP);
    event Claim(address indexed user, uint256 indexed depositId, uint256 amount, bool isLP);

    // Modifier that ensures caller is not a smart contract
    modifier nonContractCaller() {
        require(msg.sender == tx.origin, "contract not allowed");
        _;
    }

    // Constructooor
    constructor(
        IDOUGH _dough,
        IUniswapPair _doughLp,
        uint256 _rewardPerBlock,
        uint256 _rewardPerBlockLP,
        uint256 _decay
    ) Ownable(msg.sender) ReentrancyGuard() {
        dough = _dough;
        doughLp = _doughLp;
        rewardPerBlock = _rewardPerBlock;
        rewardPerBlockLP = _rewardPerBlockLP;
        lastRewardBlock = lastRewardBlockLP = block.number;
        netCirculatingDough = 1_000_000_000 * 1e9;
        decay = decayLP = _decay;
    }

    /**
     * @dev Computes decay => principal * (ratio ^ n)
     * @param principal: Principal amount.
     * @param ratio: Ratio.
     * @param n: Number of blocks.
     */
    function computeDecay(
        uint256 principal,
        uint256 ratio,
        uint256 n
    ) private pure returns (uint256) {
        return
            ABDKMath64x64.mulu(
                ABDKMath64x64.pow(
                    ABDKMath64x64.divu(ratio, 1e18),
                    n
                ),
                principal
            );
    }

    /**
     * @dev View function to get pending rewards for a given deposit.
     * @param _depositId: Deposit ID.
     * @param _isLP: Whether the deposit is an LP deposit or not.
     * @param _withLimit: Whether to return raw pending rewards or to return pending rewards after deducting claimed rewards.
     * @notice If _withLimit is true, it returns pending rewards after checking if pending + claimed rewards > principal and reducing it appropriately.
     * @notice _withLimit only applies to $DOUGH stakers, as it this limit isn't there for LP stakers.
     */
    function getPendingRewards(uint256 _depositId, bool _isLP, bool _withLimit)
        external
        view
        returns (uint128)
    {
        DepositInfo storage dep = _isLP ? depositInfoLP[_depositId] : depositInfo[_depositId];
        uint128 pendingRaw = uint128(Math.mulDiv(
            dep.shares,
            _isLP ? accRewardPerShareLP : accRewardPerShare,
            1e12
        ));
        uint128 pending = pendingRaw - dep.rewardDeductible;
        if (!_withLimit) return pending;
        if (!_isLP) {
            uint128 pendingPlusClaimed = pending + dep.claimedRewards;
            if (pendingPlusClaimed > dep.amount) {
                pending -= (pendingPlusClaimed - dep.amount);
            }
        }
        return pending;
    }

    /**
     * @dev View function to get deposit info of _depositId
     * @param _depositId: Deposit ID.
     * @param _isLP: Whether the deposit is an LP deposit or not.
     */
    function getDepositInfo(uint256 _depositId, bool _isLP)
        external
        view
        returns (DepositInfo memory)
    {
        return _isLP ? depositInfoLP[_depositId] : depositInfo[_depositId];
    }

    /**
     * @dev Internal function to get current price from Uniswap V2 pool.
     */
    function _getCurrPrice() private view returns (uint224 currPrice) {
        (uint112 reserve0, uint112 reserve1, ) = doughLp.getReserves();
        currPrice = UQ112x112.encode(reserve0 * 1e9).uqdiv(reserve1); //scaling reserve0 (WETH) by factor of 1e9 for more precision
    }

    /**
     * @dev External view function to get current price from Uniswap V2 pool.
     */
    function getCurrPrice() external view returns (uint224) {
        return _getCurrPrice();
    }

    /**
     * @dev Preheat LeOven (enable/disable deposits)
     * @param _isPreheated: Whether to enable or disable deposits.
     * @notice Withdrawals/claims can never be disabled, this can only halt new deposits.
     */
    function preheat(bool _isPreheated) external onlyOwner {
        preheated = _isPreheated;
        if (_isPreheated) {
            //update last reward block if totalShares = 0
            if (totalShares == 0) lastRewardBlock = block.number;
            if (totalSharesLP == 0) lastRewardBlockLP = block.number;
        }
    }

    /**
     * @dev Updates reward variables.
     */
    function updateRewardVariables(
        uint256 _rewardPerBlock,
        uint256 _rewardPerBlockLP,
        uint256 _decay,
        uint256 _jeetPenalty,
        uint256 _minBakingTemp,
        uint256 _burnRewardPercentage,
        uint256 _burnRewardsLPRatio,
        bool _isLP
    ) external onlyOwner {
        if (_isLP) {
            require(_jeetPenalty <= 30, "exceeds max penalty for LP stakers");
            decayLP = _decay;
            jeetPenaltyLP = _jeetPenalty;
        } else {
            require(_jeetPenalty <= 30, "exceeds max penalty for Dough stakers");
            decay = _decay;
            jeetPenalty = _jeetPenalty;
        }
        require(_burnRewardPercentage <= 100 && _burnRewardPercentage > 30, "burn reward percentage out of bounds");

        //handle 2 cases - transitioning from burn rewards to emissions, and transitioning from emissions to burn rewards
        //case 1: transitioning from burn rewards to emissions
        if (rewardPerBlock == 0 && rewardPerBlockLP == 0 && (_rewardPerBlock > 0 || _rewardPerBlockLP > 0)) {
            lastRewardBlock = lastRewardBlockLP = block.number; //start new reward cycle
        }
        //case 2: transitioning from emissions to burn rewards
        if (rewardPerBlock > 0 && rewardPerBlockLP > 0 && (_rewardPerBlock == 0 || _rewardPerBlockLP == 0)) {
            netCirculatingDough = dough.totalSupply(); //set netCirculatingDough to totalSupply as we are now transitioning to burn tax rewards.
        }
        
        rewardPerBlock = _rewardPerBlock;
        rewardPerBlockLP = _rewardPerBlockLP;
        minBakingTemp = _minBakingTemp;
        burnRewardPercentage = _burnRewardPercentage;
        burnRewardsLPRatio = _burnRewardsLPRatio;
    }

    /**
     * @dev Force updates rewards for $DOUGH staking or LP staking.
     * @param _isLP: Whether to update rewards for LP staking or $DOUGH staking.
     */
    function forceUpdateRewards(bool _isLP) external onlyOwner {
        if (_isLP) updateRewardsLP();
        else updateRewards();
    }

    /**
     * @dev Internal function that updates the following for $DOUGH staking:
     * - rewardPerBlock - gets updated based on decay
     * - lastRewardBlock - gets updated to current block
     * - accRewardPerShare - gets increased by emissions (or burn tax if rewardPerBlock == 0) divided by totalShares
     */
    function updateRewards() private {
        if (totalShares == 0 || lastRewardBlock >= block.number) return;
        if (rewardPerBlock == 0) {
            // use burned tokens for rewards once emissions are depleted
            uint256 tokensBurnt = netCirculatingDough - dough.totalSupply(); //cannot underflow as netCirculatingDough >= totalSupply
            uint256 burntRewards = Math.mulDiv(tokensBurnt, burnRewardPercentage, 100);
            netCirculatingDough -= tokensBurnt; //netCirculatingDough == totalSupply after this
            if (totalSharesLP > 0 && rewardPerBlockLP == 0) {
                uint256 lpRewards = Math.mulDiv(burntRewards, burnRewardsLPRatio, 100);
                accRewardPerShare += Math.mulDiv(
                    burntRewards - lpRewards,
                    1e12,
                    totalShares
                );
                accRewardPerShareLP += Math.mulDiv(
                    lpRewards,
                    1e12,
                    totalSharesLP
                );
            } else {
                accRewardPerShare += Math.mulDiv(
                    burntRewards,
                    1e12,
                    totalShares
                );
            }
        } else {
            // accRewardPerShare += (block difference * rewardPerBlock) / total shares
            accRewardPerShare += Math.mulDiv(
                (block.number - lastRewardBlock) * rewardPerBlock,
                1e12,
                totalShares
            );
            rewardPerBlock = computeDecay(rewardPerBlock, decay, block.number - lastRewardBlock);
            lastRewardBlock = block.number; //don't need to update lastRewardBlock once emissions are depleted
            if (rewardPerBlock == 0) netCirculatingDough = dough.totalSupply(); //set netCirculatingDough to totalSupply as we are now transitioning to burn tax rewards.
        }
    }

    /**
     * @dev Internal function that updates the following for LP staking:
     * - rewardPerBlock - gets updated based on decay
     * - lastRewardBlock - gets updated to current block
     * - accRewardPerShare - gets increased by emissions (or burn tax if rewardPerBlock == 0) divided by totalShares
     */
    function updateRewardsLP() private {
        if (totalSharesLP == 0 || lastRewardBlockLP >= block.number) return;
        if (rewardPerBlockLP == 0) { 
            // use burned tokens for rewards once emissions are depleted
            uint256 tokensBurnt = netCirculatingDough - dough.totalSupply(); //cannot underflow as netCirculatingDough >= totalSupply
            uint256 burntRewards = Math.mulDiv(tokensBurnt, burnRewardPercentage, 100);
            netCirculatingDough -= tokensBurnt; //netCirculatingDough == totalSupply after this
            if (totalShares > 0 && rewardPerBlock == 0) {
                uint256 lpRewards = Math.mulDiv(burntRewards, burnRewardsLPRatio, 100);
                accRewardPerShare += Math.mulDiv(
                    burntRewards - lpRewards,
                    1e12,
                    totalShares
                );
                accRewardPerShareLP += Math.mulDiv(
                    lpRewards,
                    1e12,
                    totalSharesLP
                );
            } else {
                accRewardPerShareLP += Math.mulDiv(
                    burntRewards,
                    1e12,
                    totalSharesLP
                );
            }
        } else {
            // accRewardPerShare += (block difference * rewardPerBlock) / total shares
            accRewardPerShareLP += Math.mulDiv(
                (block.number - lastRewardBlockLP) * rewardPerBlockLP,
                1e12,
                totalSharesLP
            );
            rewardPerBlockLP = computeDecay(rewardPerBlockLP, decayLP, block.number - lastRewardBlockLP);
            lastRewardBlockLP = block.number;
            if (rewardPerBlockLP == 0) netCirculatingDough = dough.totalSupply(); //set netCirculatingDough to totalSupply as we are now transitioning to burn tax rewards.
        }
    }

    /**
     * @dev Deposit $DOUGH internal function
     * @param _amount: Amount of tokens to deposit.
     * @param _bakingTemperature: Target price multiple.
     * @param _account: Account address.
     */
    function _deposit(
        uint256 _amount,
        uint128 _bakingTemperature,
        address _account
    ) private {
        // Checks
        require(preheated, "oven not preheated");
        require(_amount > 0, "invalid amount");
        require(_bakingTemperature >= minBakingTemp && _bakingTemperature <= maxBakingTemp, "invalid target price"); // must be between 1.25x (+25%) and maxBakingTemp (max price multiple)

        // Get current price and target price
        uint224 currPrice = _getCurrPrice();
        uint224 targetPrice = UQ112x112.mul126_2x112_112(_bakingTemperature, currPrice);
        
        DepositInfo storage dep = depositInfo[++DEPOSIT_ID];

        //calculate shares, emit event
        uint256 shares = UQ112x112.mul126_2x256(_bakingTemperature, _amount);
        emit Deposit(_account, DEPOSIT_ID, targetPrice, _amount, shares);

        // Update reward variables
        updateRewards();

        //update storage variables
        dep.amount = uint128(_amount);
        dep.shares = uint128(shares);
        dep.rewardDeductible = uint128(Math.mulDiv(
            shares,
            accRewardPerShare,
            1e12
        ));
        dep.account = _account;
        dep.targetPrice = targetPrice;

        totalShares += shares;
    }

    /**
     * @dev Deposit LP tokens internal function
     * @param _amount: Amount of tokens to deposit.
     * @param _bakingTemperature: Target price multiple.
     * @param _account: Account address.
     */
    function _depositLP(
        uint256 _amount,
        uint128 _bakingTemperature,
        address _account
    ) private {
        // Checks
        require(preheated, "oven not preheated");
        require(_amount > 0, "invalid amount");
        require(_bakingTemperature >= minBakingTemp && _bakingTemperature <= maxBakingTemp, "invalid target price"); // must be between 1.25x (+25%) and maxBakingTemp (max price multiple)

        // Get current price and target price
        uint224 currPrice = _getCurrPrice();
        uint224 targetPrice = UQ112x112.mul126_2x112_112(_bakingTemperature, currPrice);
        
        DepositInfo storage dep = depositInfoLP[++DEPOSIT_ID_LP];

        //calculate shares, emit event
        uint256 shares = UQ112x112.mul126_2x256(_bakingTemperature, _amount);
        emit DepositLP(_account, DEPOSIT_ID_LP, targetPrice, _amount, shares);

        // Update reward variables
        updateRewardsLP();

        //update storage variables
        dep.amount = uint128(_amount);
        dep.shares = uint128(shares);
        dep.rewardDeductible = uint128(Math.mulDiv(
            shares,
            accRewardPerShareLP,
            1e12
        ));
        dep.account = _account;
        dep.targetPrice = targetPrice;

        totalSharesLP += shares;
    }

    /**
     * @dev Claim rewards internal function for claiming/compounding. Returns raw rewards (without subtracting deductible).
     * @param _dep: DepositInfo for deposit.
     * @param _isLP: Whether the deposit is an LP deposit or not.
     */
    function _claimRaw(DepositInfo storage _dep, bool _isLP)
        private
        returns (uint128)
    {
        if (_isLP) {
            updateRewardsLP();
            return uint128(Math.mulDiv(
                _dep.shares,
                accRewardPerShareLP,
                1e12
            ));
        } else {
            updateRewards();
            return uint128(Math.mulDiv(
                _dep.shares,
                accRewardPerShare,
                1e12
            ));
        }
    }

    /**
     * @dev Stakes (deposits) tokens in LeOven.
     * @param _amount: Amount of tokens to deposit.
     * @param _bakingTemperature: Target price multiple - a Q126.2 binary fixed point number representing price multiple in increments of .25x or 25%.
     * @param _isLP: Whether the deposit is an LP deposit or not.
     */
    function stakeNbake(
        uint256 _amount,
        uint128 _bakingTemperature,
        bool _isLP
    ) external nonReentrant nonContractCaller {
        if (_isLP) {
            doughLp.transferFrom(msg.sender, address(this), _amount);
            _depositLP(_amount, _bakingTemperature, msg.sender);
        } else {
            dough.transferFrom(msg.sender, address(this), _amount);
            _deposit(_amount, _bakingTemperature, msg.sender);
        }
    }

    /**
     * @dev Withdraws a deposit from LeOven
     * @param _depositId: Deposit ID.
     * @param _isLP: Whether the deposit is an LP deposit or not.
     * @notice Requirements:
     * - Deposit must be unlocked (current price >= target price)
     * - Only the owner of the deposit can withdraw
     * @notice Claims all pending rewards as well.
     */
    function removeWhenGoldenBrown(uint256 _depositId, bool _isLP) 
        external
        nonReentrant
        nonContractCaller
    {
        DepositInfo storage dep = _isLP ? depositInfoLP[_depositId] : depositInfo[_depositId];
        require(dep.account == msg.sender, "not allowed");

        // Check current market price and make sure it's >= target price.
        uint224 currPrice = _getCurrPrice();
        require(currPrice >= dep.targetPrice, "deposit not unlocked");

        // Get pending rewards
        uint256 pending = _claimRaw(dep, _isLP) - dep.rewardDeductible;

        //mint rewards to sender, log events
        dough.mint(msg.sender, pending);
        netCirculatingDough += pending;
        emit Claim(msg.sender, _depositId, pending, _isLP);
        emit Withdrawal(msg.sender, _depositId, dep.amount, _isLP);

        //transfer principal amount, clear storage
        if (_isLP) {
            unchecked {
                totalSharesLP -= dep.shares; 
            }
            doughLp.transfer(msg.sender, dep.amount);
            delete depositInfoLP[_depositId];
        } else {
            unchecked {
                totalShares -= dep.shares;
            }
            dough.transfer(msg.sender, dep.amount);
            delete depositInfo[_depositId];
        }
    }

    /**
     * @dev Claim pending rewards for a deposit.
     * @param _depositId: Deposit ID.
     * @param _isLP: Whether the deposit is an LP deposit or not.
     * @notice Requirements:
     * - Deposit cannot be unlocked, requires current price < target price. If deposit is unlocked user can only withdraw.
     * - Only the owner of the deposit can claim.
     * - Can only claim rewards up to principal staked amount.
     * @notice Claims all pending rewards, user cannot claim a specific amount.
     */
    function collectBread(uint256 _depositId, bool _isLP)
        external
        nonReentrant
        nonContractCaller
        returns (uint128 pending)
    {
        DepositInfo storage dep = _isLP ? depositInfoLP[_depositId] : depositInfo[_depositId];
        require(dep.account == msg.sender, "not allowed");

        // Checks if deposit is unlocked
        uint224 currPrice = _getCurrPrice();
        require(currPrice < dep.targetPrice, "cannot claim once deposit is unlocked, must withdraw");

        // Get pending rewards, check if pending + claimed rewards > principal, and adjusts
        uint128 pendingRaw = _claimRaw(dep, _isLP);
        pending = pendingRaw - dep.rewardDeductible;
        if (!_isLP) {
            uint128 pendingPlusClaimed = pending + dep.claimedRewards;
            if (pendingPlusClaimed > dep.amount) {
                pendingRaw -= (pendingPlusClaimed - dep.amount);
                pending -= (pendingPlusClaimed - dep.amount);
            }
        }
        dep.rewardDeductible = pendingRaw;
        dep.claimedRewards += pending;

        // Mint rewards to sender, log event
        emit Claim(msg.sender, _depositId, pending, _isLP);
        dough.mint(msg.sender, pending);
        netCirculatingDough += pending;
    }

    /**
     * @dev Compounds pending rewards and creates a new deposit.
     * @param _depositId: Deposit ID.
     * @param _bakingTemperature: Target price multiple - a Q126.2 binary fixed point number representing price multiple in increments of .25x or 25%.
     * @param _isLP: Whether the deposit is an LP deposit or not.
     * @notice Requirements:
     * - Deposit cannot be unlocked, requires current price < target price. If deposit is unlocked user can only withdraw.
     * - Only the owner of the deposit can compound
     * - Can only compound rewards up to principal staked amount.
     */
    function stayBaked(
        uint256 _depositId,
        uint128 _bakingTemperature,
        bool _isLP
    ) 
        external
        nonReentrant
        nonContractCaller
        returns (uint128 pending) 
    {
        DepositInfo storage dep = _isLP ? depositInfoLP[_depositId] : depositInfo[_depositId];
        require(dep.account == msg.sender, "not allowed");

        // Checks if deposit is unlocked
        uint224 currPrice = _getCurrPrice();
        require(currPrice < dep.targetPrice, "cannot compound once deposit is unlocked");

        // Get pending rewards, check if pending + claimed rewards > principal, and adjusts
        uint128 pendingRaw = _claimRaw(dep, _isLP);
        pending = pendingRaw - dep.rewardDeductible;
        if (!_isLP) {
            uint128 pendingPlusClaimed = pending + dep.claimedRewards;
            if (pendingPlusClaimed > dep.amount) {
                pendingRaw -= (pendingPlusClaimed - dep.amount);
                pending -= (pendingPlusClaimed - dep.amount);
            }
        }
        dep.rewardDeductible = pendingRaw;
        dep.claimedRewards += uint128(pending);

        //create new deposit, log event
        emit Claim(msg.sender, _depositId, pending, _isLP);
        dough.mint(address(this), pending);
        netCirculatingDough += pending;
        _deposit(pending, _bakingTemperature, msg.sender);
    }

    /**
     * @dev Emergency withdraw - forfeit rewards and withdraw principal with penalty.
     * @param _depositId: Deposit ID.
     * @param _isLP: Whether the deposit is an LP deposit or not.
     * @notice Requirements:
     * - Deposit cannot have any claimed rewards. Claiming rewards forfeits right to jeet.
     * - Only the owner of the deposit can jeet.
     */
    function jeet(uint256 _depositId, bool _isLP) external nonReentrant nonContractCaller {
        DepositInfo storage dep = _isLP ? depositInfoLP[_depositId] : depositInfo[_depositId];
        require(dep.account == msg.sender, "not allowed");

        // Transfer principal to owner, delete deposit
        if (_isLP) {
            unchecked {
                totalSharesLP -= dep.shares;
            }
            uint256 pendingRewards = Math.mulDiv(
                dep.shares,
                accRewardPerShareLP,
                1e12
            ) - dep.rewardDeductible;
            accRewardPerShareLP += Math.mulDiv(
                pendingRewards,
                1e12,
                totalSharesLP
            );
            uint256 penalty = Math.mulDiv(dep.amount, jeetPenaltyLP, 100, Math.Rounding.Ceil);
            doughLp.transfer(msg.sender, dep.amount - penalty);
            doughLp.transfer(address(0), penalty);
            emit Jeet(msg.sender, _depositId, dep.amount - penalty, true);
            delete depositInfoLP[_depositId];
        } else {
            unchecked {
                totalShares -= dep.shares;
            }
            uint256 pendingRewards = Math.mulDiv(
                dep.shares,
                accRewardPerShare,
                1e12
            ) - dep.rewardDeductible;
            accRewardPerShare += Math.mulDiv(
                pendingRewards,
                1e12,
                totalShares
            );
            uint256 penalty = Math.mulDiv(dep.amount, jeetPenalty, 100, Math.Rounding.Ceil);
            require(dep.amount - penalty > dep.claimedRewards, "claimed rewards exceeds deposit amount - penalty");
            dough.transfer(msg.sender, (dep.amount - penalty) - dep.claimedRewards);
            dough.burn(penalty);
            emit Jeet(msg.sender, _depositId, dep.amount - penalty, false);
            delete depositInfo[_depositId];
        }
    }
}

File 2 of 7 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

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

File 3 of 7 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 4 of 7 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Muldiv operation overflow.
     */
    error MathOverflowedMulDiv();

    enum Rounding {
        Floor, // Toward negative infinity
        Ceil, // Toward positive infinity
        Trunc, // Toward zero
        Expand // Away from zero
    }

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

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

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

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

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            return a / b;
        }

        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
     * denominator == 0.
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
     * Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0 = x * y; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.
            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.

            uint256 twos = denominator & (0 - denominator);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
            // works in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
     * towards zero.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
        }
    }

    /**
     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
     */
    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
        return uint8(rounding) % 2 == 1;
    }
}

File 5 of 7 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @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;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _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 making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

File 6 of 7 : ABDKMath64x64.sol
// SPDX-License-Identifier: BSD-4-Clause
/*
 * ABDK Math 64.64 Smart Contract Library.  Copyright © 2019 by ABDK Consulting.
 * Author: Mikhail Vladimirov <[email protected]>
 */
pragma solidity ^0.8.0;

/**
 * Smart contract library of mathematical functions operating with signed
 * 64.64-bit fixed point numbers.  Signed 64.64-bit fixed point number is
 * basically a simple fraction whose numerator is signed 128-bit integer and
 * denominator is 2^64.  As long as denominator is always the same, there is no
 * need to store it, thus in Solidity signed 64.64-bit fixed point numbers are
 * represented by int128 type holding only the numerator.
 */
library ABDKMath64x64 {
    /*
     * Minimum value signed 64.64-bit fixed point number may have.
     */
    int128 private constant MIN_64x64 = -0x80000000000000000000000000000000;

    /*
     * Maximum value signed 64.64-bit fixed point number may have.
     */
    int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;

    /**
     * Convert signed 256-bit integer number into signed 64.64-bit fixed point
     * number.  Revert on overflow.
     *
     * @param x signed 256-bit integer number
     * @return signed 64.64-bit fixed point number
     */
    function fromInt(int256 x) internal pure returns (int128) {
        unchecked {
            require(x >= -0x8000000000000000 && x <= 0x7FFFFFFFFFFFFFFF);
            return int128(x << 64);
        }
    }

    /**
     * Convert signed 64.64 fixed point number into signed 64-bit integer number
     * rounding down.
     *
     * @param x signed 64.64-bit fixed point number
     * @return signed 64-bit integer number
     */
    function toInt(int128 x) internal pure returns (int64) {
        unchecked {
            return int64(x >> 64);
        }
    }

    /**
     * Convert unsigned 256-bit integer number into signed 64.64-bit fixed point
     * number.  Revert on overflow.
     *
     * @param x unsigned 256-bit integer number
     * @return signed 64.64-bit fixed point number
     */
    function fromUInt(uint256 x) internal pure returns (int128) {
        unchecked {
            require(x <= 0x7FFFFFFFFFFFFFFF);
            return int128(int256(x << 64));
        }
    }

    /**
     * Convert signed 64.64 fixed point number into unsigned 64-bit integer
     * number rounding down.  Revert on underflow.
     *
     * @param x signed 64.64-bit fixed point number
     * @return unsigned 64-bit integer number
     */
    function toUInt(int128 x) internal pure returns (uint64) {
        unchecked {
            require(x >= 0);
            return uint64(uint128(x >> 64));
        }
    }

    /**
     * Convert signed 128.128 fixed point number into signed 64.64-bit fixed point
     * number rounding down.  Revert on overflow.
     *
     * @param x signed 128.128-bin fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function from128x128(int256 x) internal pure returns (int128) {
        unchecked {
            int256 result = x >> 64;
            require(result >= MIN_64x64 && result <= MAX_64x64);
            return int128(result);
        }
    }

    /**
     * Convert signed 64.64 fixed point number into signed 128.128 fixed point
     * number.
     *
     * @param x signed 64.64-bit fixed point number
     * @return signed 128.128 fixed point number
     */
    function to128x128(int128 x) internal pure returns (int256) {
        unchecked {
            return int256(x) << 64;
        }
    }

    /**
     * Calculate x + y.  Revert on overflow.
     * The
     * @param x signed 64.64-bit fixed point number
     * @param y signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function add(int128 x, int128 y) internal pure returns (int128) {
        unchecked {
            int256 result = int256(x) + y;
            require(result >= MIN_64x64 && result <= MAX_64x64);
            return int128(result);
        }
    }

    /**
     * Calculate x - y.  Revert on overflow.
     *
     * @param x signed 64.64-bit fixed point number
     * @param y signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function sub(int128 x, int128 y) internal pure returns (int128) {
        unchecked {
            int256 result = int256(x) - y;
            require(result >= MIN_64x64 && result <= MAX_64x64);
            return int128(result);
        }
    }

    /**
     * Calculate x * y rounding down.  Revert on overflow.
     *
     * @param x signed 64.64-bit fixed point number
     * @param y signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function mul(int128 x, int128 y) internal pure returns (int128) {
        unchecked {
            int256 result = (int256(x) * y) >> 64;
            require(result >= MIN_64x64 && result <= MAX_64x64);
            return int128(result);
        }
    }

    /**
     * Calculate x * y rounding towards zero, where x is signed 64.64 fixed point
     * number and y is signed 256-bit integer number.  Revert on overflow.
     *
     * @param x signed 64.64 fixed point number
     * @param y signed 256-bit integer number
     * @return signed 256-bit integer number
     */
    function muli(int128 x, int256 y) internal pure returns (int256) {
        unchecked {
            if (x == MIN_64x64) {
                require(
                    y >= -0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF &&
                        y <= 0x1000000000000000000000000000000000000000000000000
                );
                return -y << 63;
            } else {
                bool negativeResult = false;
                if (x < 0) {
                    x = -x;
                    negativeResult = true;
                }
                if (y < 0) {
                    y = -y; // We rely on overflow behavior here
                    negativeResult = !negativeResult;
                }
                uint256 absoluteResult = mulu(x, uint256(y));
                if (negativeResult) {
                    require(
                        absoluteResult <=
                            0x8000000000000000000000000000000000000000000000000000000000000000
                    );
                    return -int256(absoluteResult); // We rely on overflow behavior here
                } else {
                    require(
                        absoluteResult <=
                            0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
                    );
                    return int256(absoluteResult);
                }
            }
        }
    }

    /**
     * Calculate x * y rounding down, where x is signed 64.64 fixed point number
     * and y is unsigned 256-bit integer number.  Revert on overflow.
     * beginning
     * @param x signed 64.64 fixed point number
     * @param y unsigned 256-bit integer number
     * @return unsigned 256-bit integer number
     */
    function mulu(int128 x, uint256 y) internal pure returns (uint256) {
        unchecked {
            if (y == 0) return 0;

            require(x >= 0);

            uint256 lo = (uint256(int256(x)) *
                (y & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)) >> 64;
            uint256 hi = uint256(int256(x)) * (y >> 128);

            require(hi <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
            hi <<= 64;

            require(
                hi <=
                    0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -
                        lo
            );
            return hi + lo;
        }
    }

    /**
     * Calculate x / y rounding towards zero.  Revert on overflow or when y is
     * zero.
     *
     * @param x signed 64.64-bit fixed point number
     * @param y signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function div(int128 x, int128 y) internal pure returns (int128) {
        unchecked {
            require(y != 0);
            int256 result = (int256(x) << 64) / y;
            require(result >= MIN_64x64 && result <= MAX_64x64);
            return int128(result);
        }
    }

    /**
     * Calculate x / y rounding towards zero, where x and y are signed 256-bit
     * integer numbers.  Revert on overflow or when y is zero.
     *
     * @param x signed 256-bit integer number
     * @param y signed 256-bit integer number
     * @return signed 64.64-bit fixed point number
     */
    function divi(int256 x, int256 y) internal pure returns (int128) {
        unchecked {
            require(y != 0);

            bool negativeResult = false;
            if (x < 0) {
                x = -x; // We rely on overflow behavior here
                negativeResult = true;
            }
            if (y < 0) {
                y = -y; // We rely on overflow behavior here
                negativeResult = !negativeResult;
            }
            uint128 absoluteResult = divuu(uint256(x), uint256(y));
            if (negativeResult) {
                require(absoluteResult <= 0x80000000000000000000000000000000);
                return -int128(absoluteResult); // We rely on overflow behavior here
            } else {
                require(absoluteResult <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
                return int128(absoluteResult); // We rely on overflow behavior here
            }
        }
    }

    /**
     * Calculate x / y rounding towards zero, where x and y are unsigned 256-bit
     * integer numbers.  Revert on overflow or when y is zero.
     *
     * @param x unsigned 256-bit integer number
     * @param y unsigned 256-bit integer number
     * @return signed 64.64-bit fixed point number
     */
    function divu(uint256 x, uint256 y) internal pure returns (int128) {
        unchecked {
            require(y != 0);
            uint128 result = divuu(x, y);
            require(result <= uint128(MAX_64x64));
            return int128(result);
        }
    }

    /**
     * Calculate -x.  Revert on overflow.
     *
     * @param x signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function neg(int128 x) internal pure returns (int128) {
        unchecked {
            require(x != MIN_64x64);
            return -x;
        }
    }

    /**
     * Calculate |x|.  Revert on overflow.
     *
     * @param x signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function abs(int128 x) internal pure returns (int128) {
        unchecked {
            require(x != MIN_64x64);
            return x < 0 ? -x : x;
        }
    }

    /**
     * Calculate 1 / x rounding towards zero.  Revert on overflow or when x is
     * zero.
     *
     * @param x signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function inv(int128 x) internal pure returns (int128) {
        unchecked {
            require(x != 0);
            int256 result = int256(0x100000000000000000000000000000000) / x;
            require(result >= MIN_64x64 && result <= MAX_64x64);
            return int128(result);
        }
    }

    /**
     * Calculate arithmetics average of x and y, i.e. (x + y) / 2 rounding down.
     *
     * @param x signed 64.64-bit fixed point number
     * @param y signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function avg(int128 x, int128 y) internal pure returns (int128) {
        unchecked {
            return int128((int256(x) + int256(y)) >> 1);
        }
    }

    /**
     * Calculate geometric average of x and y, i.e. sqrt (x * y) rounding down.
     * Revert on overflow or in case x * y is negative.
     *
     * @param x signed 64.64-bit fixed point number
     * @param y signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function gavg(int128 x, int128 y) internal pure returns (int128) {
        unchecked {
            int256 m = int256(x) * int256(y);
            require(m >= 0);
            require(
                m <
                    0x4000000000000000000000000000000000000000000000000000000000000000
            );
            return int128(sqrtu(uint256(m)));
        }
    }

    /**
     * Calculate x^y assuming 0^0 is 1, where x is signed 64.64 fixed point number
     * and y is unsigned 256-bit integer number.  Revert on overflow.
     *
     * @param x signed 64.64-bit fixed point number
     * @param y uint256 value
     * @return signed 64.64-bit fixed point number
     */
    function pow(int128 x, uint256 y) internal pure returns (int128) {
        unchecked {
            bool negative = x < 0 && y & 1 == 1;

            uint256 absX = uint128(x < 0 ? -x : x);
            uint256 absResult;
            absResult = 0x100000000000000000000000000000000;

            if (absX <= 0x10000000000000000) {
                absX <<= 63;
                while (y != 0) {
                    if (y & 0x1 != 0) {
                        absResult = (absResult * absX) >> 127;
                    }
                    absX = (absX * absX) >> 127;

                    if (y & 0x2 != 0) {
                        absResult = (absResult * absX) >> 127;
                    }
                    absX = (absX * absX) >> 127;

                    if (y & 0x4 != 0) {
                        absResult = (absResult * absX) >> 127;
                    }
                    absX = (absX * absX) >> 127;

                    if (y & 0x8 != 0) {
                        absResult = (absResult * absX) >> 127;
                    }
                    absX = (absX * absX) >> 127;

                    y >>= 4;
                }

                absResult >>= 64;
            } else {
                uint256 absXShift = 63;
                if (absX < 0x1000000000000000000000000) {
                    absX <<= 32;
                    absXShift -= 32;
                }
                if (absX < 0x10000000000000000000000000000) {
                    absX <<= 16;
                    absXShift -= 16;
                }
                if (absX < 0x1000000000000000000000000000000) {
                    absX <<= 8;
                    absXShift -= 8;
                }
                if (absX < 0x10000000000000000000000000000000) {
                    absX <<= 4;
                    absXShift -= 4;
                }
                if (absX < 0x40000000000000000000000000000000) {
                    absX <<= 2;
                    absXShift -= 2;
                }
                if (absX < 0x80000000000000000000000000000000) {
                    absX <<= 1;
                    absXShift -= 1;
                }

                uint256 resultShift = 0;
                while (y != 0) {
                    require(absXShift < 64);

                    if (y & 0x1 != 0) {
                        absResult = (absResult * absX) >> 127;
                        resultShift += absXShift;
                        if (absResult > 0x100000000000000000000000000000000) {
                            absResult >>= 1;
                            resultShift += 1;
                        }
                    }
                    absX = (absX * absX) >> 127;
                    absXShift <<= 1;
                    if (absX >= 0x100000000000000000000000000000000) {
                        absX >>= 1;
                        absXShift += 1;
                    }

                    y >>= 1;
                }

                require(resultShift < 64);
                absResult >>= 64 - resultShift;
            }
            int256 result = negative ? -int256(absResult) : int256(absResult);
            require(result >= MIN_64x64 && result <= MAX_64x64);
            return int128(result);
        }
    }

    /**
     * Calculate sqrt (x) rounding down.  Revert if x < 0.
     * of
     * @param x signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function sqrt(int128 x) internal pure returns (int128) {
        unchecked {
            require(x >= 0);
            return int128(sqrtu(uint256(int256(x)) << 64));
        }
    }

    /**
     * Calculate binary logarithm of x.  Revert if x <= 0.
     *
     * @param x signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function log_2(int128 x) internal pure returns (int128) {
        unchecked {
            require(x > 0);

            int256 msb = 0;
            int256 xc = x;
            if (xc >= 0x10000000000000000) {
                xc >>= 64;
                msb += 64;
            }
            if (xc >= 0x100000000) {
                xc >>= 32;
                msb += 32;
            }
            if (xc >= 0x10000) {
                xc >>= 16;
                msb += 16;
            }
            if (xc >= 0x100) {
                xc >>= 8;
                msb += 8;
            }
            if (xc >= 0x10) {
                xc >>= 4;
                msb += 4;
            }
            if (xc >= 0x4) {
                xc >>= 2;
                msb += 2;
            }
            if (xc >= 0x2) msb += 1; // No need to shift xc anymore

            int256 result = (msb - 64) << 64;
            uint256 ux = uint256(int256(x)) << uint256(127 - msb);
            for (int256 bit = 0x8000000000000000; bit > 0; bit >>= 1) {
                ux *= ux;
                uint256 b = ux >> 255;
                ux >>= 127 + b;
                result += bit * int256(b);
            }

            return int128(result);
        }
    }

    /**
     * Calculate natural logarithm of x.  Revert if x <= 0.
     *
     * @param x signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function ln(int128 x) internal pure returns (int128) {
        unchecked {
            require(x > 0);

            return
                int128(
                    int256(
                        (uint256(int256(log_2(x))) *
                            0xB17217F7D1CF79ABC9E3B39803F2F6AF) >> 128
                    )
                );
        }
    }

    /**
     * Calculate binary exponent of x.  Revert on overflow.
     *
     * @param x signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function exp_2(int128 x) internal pure returns (int128) {
        unchecked {
            require(x < 0x400000000000000000); // Overflow

            if (x < -0x400000000000000000) return 0; // Underflow

            uint256 result = 0x80000000000000000000000000000000;

            if (x & 0x8000000000000000 > 0)
                result = (result * 0x16A09E667F3BCC908B2FB1366EA957D3E) >> 128;
            if (x & 0x4000000000000000 > 0)
                result = (result * 0x1306FE0A31B7152DE8D5A46305C85EDEC) >> 128;
            if (x & 0x2000000000000000 > 0)
                result = (result * 0x1172B83C7D517ADCDF7C8C50EB14A791F) >> 128;
            if (x & 0x1000000000000000 > 0)
                result = (result * 0x10B5586CF9890F6298B92B71842A98363) >> 128;
            if (x & 0x800000000000000 > 0)
                result = (result * 0x1059B0D31585743AE7C548EB68CA417FD) >> 128;
            if (x & 0x400000000000000 > 0)
                result = (result * 0x102C9A3E778060EE6F7CACA4F7A29BDE8) >> 128;
            if (x & 0x200000000000000 > 0)
                result = (result * 0x10163DA9FB33356D84A66AE336DCDFA3F) >> 128;
            if (x & 0x100000000000000 > 0)
                result = (result * 0x100B1AFA5ABCBED6129AB13EC11DC9543) >> 128;
            if (x & 0x80000000000000 > 0)
                result = (result * 0x10058C86DA1C09EA1FF19D294CF2F679B) >> 128;
            if (x & 0x40000000000000 > 0)
                result = (result * 0x1002C605E2E8CEC506D21BFC89A23A00F) >> 128;
            if (x & 0x20000000000000 > 0)
                result = (result * 0x100162F3904051FA128BCA9C55C31E5DF) >> 128;
            if (x & 0x10000000000000 > 0)
                result = (result * 0x1000B175EFFDC76BA38E31671CA939725) >> 128;
            if (x & 0x8000000000000 > 0)
                result = (result * 0x100058BA01FB9F96D6CACD4B180917C3D) >> 128;
            if (x & 0x4000000000000 > 0)
                result = (result * 0x10002C5CC37DA9491D0985C348C68E7B3) >> 128;
            if (x & 0x2000000000000 > 0)
                result = (result * 0x1000162E525EE054754457D5995292026) >> 128;
            if (x & 0x1000000000000 > 0)
                result = (result * 0x10000B17255775C040618BF4A4ADE83FC) >> 128;
            if (x & 0x800000000000 > 0)
                result = (result * 0x1000058B91B5BC9AE2EED81E9B7D4CFAB) >> 128;
            if (x & 0x400000000000 > 0)
                result = (result * 0x100002C5C89D5EC6CA4D7C8ACC017B7C9) >> 128;
            if (x & 0x200000000000 > 0)
                result = (result * 0x10000162E43F4F831060E02D839A9D16D) >> 128;
            if (x & 0x100000000000 > 0)
                result = (result * 0x100000B1721BCFC99D9F890EA06911763) >> 128;
            if (x & 0x80000000000 > 0)
                result = (result * 0x10000058B90CF1E6D97F9CA14DBCC1628) >> 128;
            if (x & 0x40000000000 > 0)
                result = (result * 0x1000002C5C863B73F016468F6BAC5CA2B) >> 128;
            if (x & 0x20000000000 > 0)
                result = (result * 0x100000162E430E5A18F6119E3C02282A5) >> 128;
            if (x & 0x10000000000 > 0)
                result = (result * 0x1000000B1721835514B86E6D96EFD1BFE) >> 128;
            if (x & 0x8000000000 > 0)
                result = (result * 0x100000058B90C0B48C6BE5DF846C5B2EF) >> 128;
            if (x & 0x4000000000 > 0)
                result = (result * 0x10000002C5C8601CC6B9E94213C72737A) >> 128;
            if (x & 0x2000000000 > 0)
                result = (result * 0x1000000162E42FFF037DF38AA2B219F06) >> 128;
            if (x & 0x1000000000 > 0)
                result = (result * 0x10000000B17217FBA9C739AA5819F44F9) >> 128;
            if (x & 0x800000000 > 0)
                result = (result * 0x1000000058B90BFCDEE5ACD3C1CEDC823) >> 128;
            if (x & 0x400000000 > 0)
                result = (result * 0x100000002C5C85FE31F35A6A30DA1BE50) >> 128;
            if (x & 0x200000000 > 0)
                result = (result * 0x10000000162E42FF0999CE3541B9FFFCF) >> 128;
            if (x & 0x100000000 > 0)
                result = (result * 0x100000000B17217F80F4EF5AADDA45554) >> 128;
            if (x & 0x80000000 > 0)
                result = (result * 0x10000000058B90BFBF8479BD5A81B51AD) >> 128;
            if (x & 0x40000000 > 0)
                result = (result * 0x1000000002C5C85FDF84BD62AE30A74CC) >> 128;
            if (x & 0x20000000 > 0)
                result = (result * 0x100000000162E42FEFB2FED257559BDAA) >> 128;
            if (x & 0x10000000 > 0)
                result = (result * 0x1000000000B17217F7D5A7716BBA4A9AE) >> 128;
            if (x & 0x8000000 > 0)
                result = (result * 0x100000000058B90BFBE9DDBAC5E109CCE) >> 128;
            if (x & 0x4000000 > 0)
                result = (result * 0x10000000002C5C85FDF4B15DE6F17EB0D) >> 128;
            if (x & 0x2000000 > 0)
                result = (result * 0x1000000000162E42FEFA494F1478FDE05) >> 128;
            if (x & 0x1000000 > 0)
                result = (result * 0x10000000000B17217F7D20CF927C8E94C) >> 128;
            if (x & 0x800000 > 0)
                result = (result * 0x1000000000058B90BFBE8F71CB4E4B33D) >> 128;
            if (x & 0x400000 > 0)
                result = (result * 0x100000000002C5C85FDF477B662B26945) >> 128;
            if (x & 0x200000 > 0)
                result = (result * 0x10000000000162E42FEFA3AE53369388C) >> 128;
            if (x & 0x100000 > 0)
                result = (result * 0x100000000000B17217F7D1D351A389D40) >> 128;
            if (x & 0x80000 > 0)
                result = (result * 0x10000000000058B90BFBE8E8B2D3D4EDE) >> 128;
            if (x & 0x40000 > 0)
                result = (result * 0x1000000000002C5C85FDF4741BEA6E77E) >> 128;
            if (x & 0x20000 > 0)
                result = (result * 0x100000000000162E42FEFA39FE95583C2) >> 128;
            if (x & 0x10000 > 0)
                result = (result * 0x1000000000000B17217F7D1CFB72B45E1) >> 128;
            if (x & 0x8000 > 0)
                result = (result * 0x100000000000058B90BFBE8E7CC35C3F0) >> 128;
            if (x & 0x4000 > 0)
                result = (result * 0x10000000000002C5C85FDF473E242EA38) >> 128;
            if (x & 0x2000 > 0)
                result = (result * 0x1000000000000162E42FEFA39F02B772C) >> 128;
            if (x & 0x1000 > 0)
                result = (result * 0x10000000000000B17217F7D1CF7D83C1A) >> 128;
            if (x & 0x800 > 0)
                result = (result * 0x1000000000000058B90BFBE8E7BDCBE2E) >> 128;
            if (x & 0x400 > 0)
                result = (result * 0x100000000000002C5C85FDF473DEA871F) >> 128;
            if (x & 0x200 > 0)
                result = (result * 0x10000000000000162E42FEFA39EF44D91) >> 128;
            if (x & 0x100 > 0)
                result = (result * 0x100000000000000B17217F7D1CF79E949) >> 128;
            if (x & 0x80 > 0)
                result = (result * 0x10000000000000058B90BFBE8E7BCE544) >> 128;
            if (x & 0x40 > 0)
                result = (result * 0x1000000000000002C5C85FDF473DE6ECA) >> 128;
            if (x & 0x20 > 0)
                result = (result * 0x100000000000000162E42FEFA39EF366F) >> 128;
            if (x & 0x10 > 0)
                result = (result * 0x1000000000000000B17217F7D1CF79AFA) >> 128;
            if (x & 0x8 > 0)
                result = (result * 0x100000000000000058B90BFBE8E7BCD6D) >> 128;
            if (x & 0x4 > 0)
                result = (result * 0x10000000000000002C5C85FDF473DE6B2) >> 128;
            if (x & 0x2 > 0)
                result = (result * 0x1000000000000000162E42FEFA39EF358) >> 128;
            if (x & 0x1 > 0)
                result = (result * 0x10000000000000000B17217F7D1CF79AB) >> 128;

            result >>= uint256(int256(63 - (x >> 64)));
            require(result <= uint256(int256(MAX_64x64)));

            return int128(int256(result));
        }
    }

    /**
     * Calculate natural exponent of x.  Revert on overflow.
     * his
     * @param x signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function exp(int128 x) internal pure returns (int128) {
        unchecked {
            require(x < 0x400000000000000000); // Overflow

            if (x < -0x400000000000000000) return 0; // Underflow

            return
                exp_2(
                    int128(
                        (int256(x) * 0x171547652B82FE1777D0FFDA0D23A7D12) >> 128
                    )
                );
        }
    }

    /**
     * Calculate x / y rounding towards zero, where x and y are unsigned 256-bit
     * integer numbers.  Revert on overflow or when y is zero.
     *
     * @param x unsigned 256-bit integer number
     * @param y unsigned 256-bit integer number
     * @return unsigned 64.64-bit fixed point number
     */
    function divuu(uint256 x, uint256 y) private pure returns (uint128) {
        unchecked {
            require(y != 0);

            uint256 result;

            if (x <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
                result = (x << 64) / y;
            else {
                uint256 msb = 192;
                uint256 xc = x >> 192;
                if (xc >= 0x100000000) {
                    xc >>= 32;
                    msb += 32;
                }
                if (xc >= 0x10000) {
                    xc >>= 16;
                    msb += 16;
                }
                if (xc >= 0x100) {
                    xc >>= 8;
                    msb += 8;
                }
                if (xc >= 0x10) {
                    xc >>= 4;
                    msb += 4;
                }
                if (xc >= 0x4) {
                    xc >>= 2;
                    msb += 2;
                }
                if (xc >= 0x2) msb += 1; // No need to shift xc anymore

                result = (x << (255 - msb)) / (((y - 1) >> (msb - 191)) + 1);
                require(result <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);

                uint256 hi = result * (y >> 128);
                uint256 lo = result * (y & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);

                uint256 xh = x >> 192;
                uint256 xl = x << 64;

                if (xl < lo) xh -= 1;
                xl -= lo; // We rely on overflow behavior here
                lo = hi << 128;
                if (xl < lo) xh -= 1;
                xl -= lo; // We rely on overflow behavior here

                assert(xh == hi >> 128);

                result += xl / y;
            }

            require(result <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
            return uint128(result);
        }
    }

    /**
     * Calculate sqrt (x) rounding down, where x is unsigned 256-bit integer
     * number.
     *
     * @param x unsigned 256-bit integer number
     * @return unsigned 128-bit integer number
     */
    function sqrtu(uint256 x) private pure returns (uint128) {
        unchecked {
            if (x == 0) return 0;
            else {
                uint256 xx = x;
                uint256 r = 1;
                if (xx >= 0x100000000000000000000000000000000) {
                    xx >>= 128;
                    r <<= 64;
                }
                if (xx >= 0x10000000000000000) {
                    xx >>= 64;
                    r <<= 32;
                }
                if (xx >= 0x100000000) {
                    xx >>= 32;
                    r <<= 16;
                }
                if (xx >= 0x10000) {
                    xx >>= 16;
                    r <<= 8;
                }
                if (xx >= 0x100) {
                    xx >>= 8;
                    r <<= 4;
                }
                if (xx >= 0x10) {
                    xx >>= 4;
                    r <<= 2;
                }
                if (xx >= 0x8) {
                    r <<= 1;
                }
                r = (r + x / r) >> 1;
                r = (r + x / r) >> 1;
                r = (r + x / r) >> 1;
                r = (r + x / r) >> 1;
                r = (r + x / r) >> 1;
                r = (r + x / r) >> 1;
                r = (r + x / r) >> 1; // Seven iterations should be enough
                uint256 r1 = x / r;
                return uint128(r < r1 ? r : r1);
            }
        }
    }
}

File 7 of 7 : UQ112x112.sol
//SPDX-License-Identifier: None
pragma solidity ^0.8.0;

// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
// range: [0, 2**112 - 1]
// resolution: 1 / 2**112
library UQ112x112 {
    uint224 constant Q112 = 2**112;
    uint224 constant Q224 = 2**224 - 1;

    // encode a uint112 as a UQ112x112
    function encode(uint112 y) internal pure returns (uint224 z) {
        z = uint224(y) * Q112; // never overflows
    }

    // divide a UQ112x112 by a uint112, returning a UQ112x112
    function uqdiv(uint224 x, uint112 y) internal pure returns (uint224 z) {
        z = x / uint224(y);
    }

    // divide a UQ112x112 by a UQ112x112, returning a UQ112x112
    function div(uint224 x, uint224 y) internal pure returns (uint224 z) {
        unchecked {
            require (y != 0);
            // xDec = x & 2**112-1 i.e 112 precision 112 bits of padding on the left
            uint224 xDec = x & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
             //xInt x *2**-112 i.e. 112 precision 112 bits of padding on the right
            uint224 xInt = x >> 112;
            //hi = xInt*2**224-1 /y ==> leave a full uint224 of bits to store the integer representation of the fractional decimal with 112.112 precision
            uint224 hi = xInt * (Q224 / y);
            //lo = xDec*2**224-1 /y ==> leave full uint224 of bits to store the integer representation of fractional decimal with 112.112 precision, right shift 112 bits since output should be the right 112 bits of precision on the output
            uint224 lo = (xDec * (Q224 / y)) >> 112;

            require (hi <= Q224 - lo);
            return hi+lo;
        }
    }

    // Computes x * y where x is a Q126.2 fixed point number and y is an unsigned integer, rounding down to the nearest integer.
    function mul126_2x256(uint128 x, uint256 y) internal pure returns (uint256) {
        unchecked {
            if (y == 0) return 0;

            uint256 lo = (uint256(x) *
                (y & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)) >> 2; //last 128 bits of y, right shift 2 bits to remove the 2 decimal bits at the end
            uint256 hi = uint256(x) * (y >> 128); //first 128 bits of y

            require(hi <= 0x3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF); //2^254 - 1
            hi <<= 2; //left shift 2 bits to account for the 2 decimal bits in x

            require(
                hi <=
                    0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -
                        lo
            ); //ensure hi + lo does not overflow
            return hi + lo;
        }
    }

    //computes x * y where x is a Q126.2 fixed point number and y is a Q112.112 fixed point number, returning a Q112.112 fixed point number
    function mul126_2x112_112(uint128 x, uint224 y) internal pure returns (uint224) {
        unchecked {
            uint256 result = (uint256(x) * y) >> 2;
            require(result <= Q224);
            return uint224(result);
        }
    }
    
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IDOUGH","name":"_dough","type":"address"},{"internalType":"contract IUniswapPair","name":"_doughLp","type":"address"},{"internalType":"uint256","name":"_rewardPerBlock","type":"uint256"},{"internalType":"uint256","name":"_rewardPerBlockLP","type":"uint256"},{"internalType":"uint256","name":"_decay","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"MathOverflowedMulDiv","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"depositId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isLP","type":"bool"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"depositId","type":"uint256"},{"indexed":true,"internalType":"uint224","name":"targetPrice","type":"uint224"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"depositId","type":"uint256"},{"indexed":true,"internalType":"uint224","name":"targetPrice","type":"uint224"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"DepositLP","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"depositId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isLP","type":"bool"}],"name":"Jeet","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":true,"internalType":"uint256","name":"depositId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isLP","type":"bool"}],"name":"Withdrawal","type":"event"},{"inputs":[],"name":"DEPOSIT_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPOSIT_ID_LP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accRewardPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accRewardPerShareLP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnRewardPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnRewardsLPRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_depositId","type":"uint256"},{"internalType":"bool","name":"_isLP","type":"bool"}],"name":"collectBread","outputs":[{"internalType":"uint128","name":"pending","type":"uint128"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decayLP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dough","outputs":[{"internalType":"contract IDOUGH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"doughLp","outputs":[{"internalType":"contract IUniswapPair","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_isLP","type":"bool"}],"name":"forceUpdateRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getCurrPrice","outputs":[{"internalType":"uint224","name":"","type":"uint224"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_depositId","type":"uint256"},{"internalType":"bool","name":"_isLP","type":"bool"}],"name":"getDepositInfo","outputs":[{"components":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint128","name":"claimedRewards","type":"uint128"},{"internalType":"uint128","name":"shares","type":"uint128"},{"internalType":"uint128","name":"rewardDeductible","type":"uint128"},{"internalType":"uint224","name":"targetPrice","type":"uint224"},{"internalType":"address","name":"account","type":"address"}],"internalType":"struct LeOvenV4.DepositInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_depositId","type":"uint256"},{"internalType":"bool","name":"_isLP","type":"bool"},{"internalType":"bool","name":"_withLimit","type":"bool"}],"name":"getPendingRewards","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_depositId","type":"uint256"},{"internalType":"bool","name":"_isLP","type":"bool"}],"name":"jeet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"jeetPenalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"jeetPenaltyLP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastRewardBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastRewardBlockLP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBakingTemp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBakingTemp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"netCirculatingDough","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":"bool","name":"_isPreheated","type":"bool"}],"name":"preheat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"preheated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_depositId","type":"uint256"},{"internalType":"bool","name":"_isLP","type":"bool"}],"name":"removeWhenGoldenBrown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerBlockLP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint128","name":"_bakingTemperature","type":"uint128"},{"internalType":"bool","name":"_isLP","type":"bool"}],"name":"stakeNbake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_depositId","type":"uint256"},{"internalType":"uint128","name":"_bakingTemperature","type":"uint128"},{"internalType":"bool","name":"_isLP","type":"bool"}],"name":"stayBaked","outputs":[{"internalType":"uint128","name":"pending","type":"uint128"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSharesLP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardPerBlock","type":"uint256"},{"internalType":"uint256","name":"_rewardPerBlockLP","type":"uint256"},{"internalType":"uint256","name":"_decay","type":"uint256"},{"internalType":"uint256","name":"_jeetPenalty","type":"uint256"},{"internalType":"uint256","name":"_minBakingTemp","type":"uint256"},{"internalType":"uint256","name":"_burnRewardPercentage","type":"uint256"},{"internalType":"uint256","name":"_burnRewardsLPRatio","type":"uint256"},{"internalType":"bool","name":"_isLP","type":"bool"}],"name":"updateRewardVariables","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052670de0b63716e7da00600c55600c54600d556008600e55600f80556014601055606460125560146013553480156200003a575f80fd5b5060405162003e6b38038062003e6b8339810160408190526200005d9162000156565b33806200008357604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b6200008e81620000ef565b5060018055601480546001600160a01b039687166001600160a01b0319918216179091556015805495909616941693909317909355600a55600b91909155436009819055600855670de0b6b3a7640000601155600d819055600c55620001aa565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811462000153575f80fd5b50565b5f805f805f60a086880312156200016b575f80fd5b855162000178816200013e565b60208701519095506200018b816200013e565b6040870151606088015160809098015196999198509695945092505050565b613cb380620001b85f395ff3fe608060405234801561000f575f80fd5b506004361061024f575f3560e01c80638bc3486e1161013d578063adc2347b116100b8578063e31304ce11610088578063ee7be3571161006e578063ee7be35714610530578063f2fde38b14610550578063f64e777f14610563575f80fd5b8063e31304ce1461051e578063e747340314610527575f80fd5b8063adc2347b146104cf578063ae9557bf146104d8578063bbca6210146104e1578063d6de53d214610501575f80fd5b80639972c5491161010d578063a97bc5b9116100f3578063a97bc5b9146104aa578063a9f8d181146104bd578063acbefb80146104c6575f80fd5b80639972c549146104845780639d03396114610497575f80fd5b80638bc3486e146103885780638da5cb5b14610434578063939d62371461047257806395ccba291461047b575f80fd5b806347fe810f116101cd5780636f178b2c1161019d5780637f7a8dc5116101835780637f7a8dc5146103635780638ae39cac146103765780638aff120d1461037f575f80fd5b80636f178b2c14610352578063715018a61461035b575f80fd5b806347fe810f1461030257806354fac9191461033757806360f6bad8146103405780636f076efd14610349575f80fd5b80632a2f77a6116102225780632bbb28c0116102085780632bbb28c0146102d35780633a98ef39146102e657806347575429146102ef575f80fd5b80632a2f77a61461028a5780632b9f0a4e1461029f575f80fd5b8063089f80ac1461025357806315f068f71461026f5780631bef5af414610278578063234f06ff14610281575b5f80fd5b61025c60115481565b6040519081526020015b60405180910390f35b61025c60065481565b61025c60075481565b61025c60135481565b61029d61029836600461383b565b610576565b005b6102b26102ad36600461383b565b61073f565b6040516fffffffffffffffffffffffffffffffff9091168152602001610266565b61029d6102e136600461388e565b610bac565b61025c60055481565b61029d6102fd36600461388e565b6110ff565b61030a61187b565b6040517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9091168152602001610266565b61025c600c5481565b61025c60025481565b61025c60105481565b61025c600e5481565b61029d611889565b6102b26103713660046138bc565b61189c565b61025c600a5481565b61025c61019081565b61039b61039636600461388e565b6119dc565b60405161026691905f60c0820190506fffffffffffffffffffffffffffffffff808451168352806020850151166020840152806040850151166040840152806060850151166060840152507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff608084015116608083015273ffffffffffffffffffffffffffffffffffffffff60a08401511660a083015292915050565b5f5473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610266565b61025c60045481565b61025c600d5481565b61029d6104923660046138e0565b611adc565b61029d6104a53660046138fb565b611b38565b61029d6104b83660046138e0565b611dd8565b61025c60085481565b61025c60035481565b61025c600b5481565b61025c60095481565b60145461044d9073ffffffffffffffffffffffffffffffffffffffff1681565b60185461050e9060ff1681565b6040519015158152602001610266565b61025c600f5481565b61025c60125481565b60155461044d9073ffffffffffffffffffffffffffffffffffffffff1681565b61029d61055e366004613960565b611df6565b6102b261057136600461388e565b611e56565b61057e61229f565b3332146105d25760405162461bcd60e51b815260206004820152601460248201527f636f6e7472616374206e6f7420616c6c6f77656400000000000000000000000060448201526064015b60405180910390fd5b8015610687576015546040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810185905273ffffffffffffffffffffffffffffffffffffffff909116906323b872dd906064016020604051808303815f875af1158015610652573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106769190613993565b506106828383336122e2565b610731565b6014546040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810185905273ffffffffffffffffffffffffffffffffffffffff909116906323b872dd906064016020604051808303815f875af1158015610701573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107259190613993565b5061073183833361261e565b61073a60018055565b505050565b5f61074861229f565b3332146107975760405162461bcd60e51b815260206004820152601460248201527f636f6e7472616374206e6f7420616c6c6f77656400000000000000000000000060448201526064016105c9565b5f826107af575f8581526016602052604090206107bd565b5f8581526017602052604090205b600381015490915073ffffffffffffffffffffffffffffffffffffffff1633146108295760405162461bcd60e51b815260206004820152600b60248201527f6e6f7420616c6c6f77656400000000000000000000000000000000000000000060448201526064016105c9565b5f61083261294c565b60028301549091507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff908116908216106108d05760405162461bcd60e51b815260206004820152602860248201527f63616e6e6f7420636f6d706f756e64206f6e6365206465706f7369742069732060448201527f756e6c6f636b656400000000000000000000000000000000000000000000000060648201526084016105c9565b5f6108db8386612a28565b60018401549091506109139070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16826139db565b9350846109c85782545f9061094e9070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1686613a0b565b84549091506fffffffffffffffffffffffffffffffff90811690821611156109c657835461098e906fffffffffffffffffffffffffffffffff16826139db565b61099890836139db565b84549092506109b9906fffffffffffffffffffffffffffffffff16826139db565b6109c390866139db565b94505b505b6001830180546fffffffffffffffffffffffffffffffff908116700100000000000000000000000000000000848316810291909117909255845486928692601092610a17928692910416613a0b565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550863373ffffffffffffffffffffffffffffffffffffffff167fad82e4ded87b4f1d117a62956445ec6ff411c4f2eb80134db1573f8cb74b86e78688604051610ab59291906fffffffffffffffffffffffffffffffff9290921682521515602082015260400190565b60405180910390a36014546040517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526fffffffffffffffffffffffffffffffff8616602482015273ffffffffffffffffffffffffffffffffffffffff909116906340c10f19906044015f604051808303815f87803b158015610b3d575f80fd5b505af1158015610b4f573d5f803e3d5ffd5b50505050836fffffffffffffffffffffffffffffffff1660115f828254610b769190613a34565b90915550610b9990506fffffffffffffffffffffffffffffffff8516873361261e565b505050610ba560018055565b9392505050565b610bb461229f565b333214610c035760405162461bcd60e51b815260206004820152601460248201527f636f6e7472616374206e6f7420616c6c6f77656400000000000000000000000060448201526064016105c9565b5f81610c1b575f838152601660205260409020610c29565b5f8381526017602052604090205b600381015490915073ffffffffffffffffffffffffffffffffffffffff163314610c955760405162461bcd60e51b815260206004820152600b60248201527f6e6f7420616c6c6f77656400000000000000000000000000000000000000000060448201526064016105c9565b5f610c9e61294c565b60028301549091507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9081169082161015610d175760405162461bcd60e51b815260206004820152601460248201527f6465706f736974206e6f7420756e6c6f636b656400000000000000000000000060448201526064016105c9565b60018201545f9070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16610d4e8486612a28565b610d5891906139db565b6014546040517f40c10f190000000000000000000000000000000000000000000000000000000081523360048201526fffffffffffffffffffffffffffffffff9290921660248301819052925073ffffffffffffffffffffffffffffffffffffffff16906340c10f19906044015f604051808303815f87803b158015610ddc575f80fd5b505af1158015610dee573d5f803e3d5ffd5b505050508060115f828254610e039190613a34565b9091555050604080518281528515156020820152869133917fad82e4ded87b4f1d117a62956445ec6ff411c4f2eb80134db1573f8cb74b86e7910160405180910390a38254604080516fffffffffffffffffffffffffffffffff90921682528515156020830152869133917f46dd9e4b82d9e89c62b1b3b25840a0a2f3161eaa17476317281b564987d3680f910160405180910390a38315610fc9576001830154600780546fffffffffffffffffffffffffffffffff9283169003905560155484546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201529216602483015273ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044016020604051808303815f875af1158015610f34573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f589190613993565b505f85815260176020526040812081815560018101919091556002810180547fffffffff0000000000000000000000000000000000000000000000000000000016905560030180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556110ef565b6001830154600580546fffffffffffffffffffffffffffffffff9283169003905560145484546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201529216602483015273ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044016020604051808303815f875af115801561105e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110829190613993565b505f85815260166020526040812081815560018101919091556002810180547fffffffff0000000000000000000000000000000000000000000000000000000016905560030180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b5050506110fb60018055565b5050565b61110761229f565b3332146111565760405162461bcd60e51b815260206004820152601460248201527f636f6e7472616374206e6f7420616c6c6f77656400000000000000000000000060448201526064016105c9565b5f8161116e575f83815260166020526040902061117c565b5f8381526017602052604090205b600381015490915073ffffffffffffffffffffffffffffffffffffffff1633146111e85760405162461bcd60e51b815260206004820152600b60248201527f6e6f7420616c6c6f77656400000000000000000000000000000000000000000060448201526064016105c9565b81156114d957600181018054600780546fffffffffffffffffffffffffffffffff9283169003905590546006545f9270010000000000000000000000000000000083048116926112409291169064e8d4a51000612a96565b61124a9190613a47565b905061125e8164e8d4a51000600754612a96565b60065f82825461126e9190613a34565b909155505081546010545f9161129c916fffffffffffffffffffffffffffffffff9091169060646001612b8d565b601554845491925073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb9033906112e09085906fffffffffffffffffffffffffffffffff16613a47565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303815f875af115801561134d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113719190613993565b506015546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081525f60048201526024810183905273ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb906044016020604051808303815f875af11580156113e6573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061140a9190613993565b508254859033907f7cc693a6833d0461515d5029c299209a04f6826c244d4658b43e49265f227405906114509085906fffffffffffffffffffffffffffffffff16613a47565b60408051918252600160208301520160405180910390a350505f83815260176020526040812081815560018101919091556002810180547fffffffff0000000000000000000000000000000000000000000000000000000016905560030180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055611871565b600181018054600580546fffffffffffffffffffffffffffffffff9283169003905590546004545f92700100000000000000000000000000000000830481169261152b9291169064e8d4a51000612a96565b6115359190613a47565b90506115498164e8d4a51000600554612a96565b60045f8282546115599190613a34565b90915550508154600f545f91611587916fffffffffffffffffffffffffffffffff9091169060646001612b8d565b83549091506fffffffffffffffffffffffffffffffff70010000000000000000000000000000000082048116916115c091849116613a47565b116116335760405162461bcd60e51b815260206004820152603060248201527f636c61696d656420726577617264732065786365656473206465706f7369742060448201527f616d6f756e74202d2070656e616c74790000000000000000000000000000000060648201526084016105c9565b601454835473ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb9033906fffffffffffffffffffffffffffffffff700100000000000000000000000000000000820481169161168d91879116613a47565b6116979190613a47565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303815f875af1158015611704573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117289190613993565b506014546040517f42966c680000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff909116906342966c68906024015f604051808303815f87803b158015611792575f80fd5b505af11580156117a4573d5f803e3d5ffd5b505084548792503391507f7cc693a6833d0461515d5029c299209a04f6826c244d4658b43e49265f227405906117ed9085906fffffffffffffffffffffffffffffffff16613a47565b604080519182525f60208301520160405180910390a350505f83815260166020526040812081815560018101919091556002810180547fffffffff0000000000000000000000000000000000000000000000000000000016905560030180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b506110fb60018055565b5f61188461294c565b905090565b611891612bdc565b61189a5f612c2e565b565b5f80836118b5575f8581526016602052604090206118c3565b5f8581526017602052604090205b60018101549091505f906118ff906fffffffffffffffffffffffffffffffff16866118f0576004546118f4565b6006545b64e8d4a51000612a96565b60018301549091505f906119399070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16836139db565b90508461194a579250610ba5915050565b856119d25782545f906119839070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1683613a0b565b84549091506fffffffffffffffffffffffffffffffff90811690821611156119d05783546119c3906fffffffffffffffffffffffffffffffff16826139db565b6119cd90836139db565b91505b505b9695505050505050565b6040805160c0810182525f80825260208201819052918101829052606081018290526080810182905260a081019190915281611a24575f838152601660205260409020611a32565b5f8381526017602052604090205b6040805160c08101825282546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000091829004811660208401526001850154808216948401949094529204909116606082015260028201547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16608082015260039091015473ffffffffffffffffffffffffffffffffffffffff1660a082015290505b92915050565b611ae4612bdc565b601880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215801591909117909155611b35576005545f03611b2757436008555b6007545f03611b3557436009555b50565b611b40612bdc565b8015611bcc57601e851115611bbd5760405162461bcd60e51b815260206004820152602260248201527f65786365656473206d61782070656e616c747920666f72204c50207374616b6560448201527f727300000000000000000000000000000000000000000000000000000000000060648201526084016105c9565b600d8690556010859055611c4e565b601e851115611c435760405162461bcd60e51b815260206004820152602560248201527f65786365656473206d61782070656e616c747920666f7220446f75676820737460448201527f616b65727300000000000000000000000000000000000000000000000000000060648201526084016105c9565b600c869055600f8590555b60648311158015611c5f5750601e83115b611cd05760405162461bcd60e51b8152602060048201526024808201527f6275726e207265776172642070657263656e74616765206f7574206f6620626f60448201527f756e64730000000000000000000000000000000000000000000000000000000060648201526084016105c9565b600a54158015611ce05750600b54155b8015611cf457505f881180611cf457505f87115b15611d03574360098190556008555b5f600a54118015611d1557505f600b54115b8015611d275750871580611d27575086155b15611dbe5760145f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d96573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611dba9190613a5a565b6011555b50600a96909655600b94909455600e555050601255601355565b611de0612bdc565b8015611dee57611b35612ca2565b611b35612f3d565b611dfe612bdc565b73ffffffffffffffffffffffffffffffffffffffff8116611e4d576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105c9565b611b3581612c2e565b5f611e5f61229f565b333214611eae5760405162461bcd60e51b815260206004820152601460248201527f636f6e7472616374206e6f7420616c6c6f77656400000000000000000000000060448201526064016105c9565b5f82611ec6575f848152601660205260409020611ed4565b5f8481526017602052604090205b600381015490915073ffffffffffffffffffffffffffffffffffffffff163314611f405760405162461bcd60e51b815260206004820152600b60248201527f6e6f7420616c6c6f77656400000000000000000000000000000000000000000060448201526064016105c9565b5f611f4961294c565b60028301549091507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90811690821610611fe75760405162461bcd60e51b815260206004820152603460248201527f63616e6e6f7420636c61696d206f6e6365206465706f73697420697320756e6c60448201527f6f636b65642c206d75737420776974686472617700000000000000000000000060648201526084016105c9565b5f611ff28386612a28565b600184015490915061202a9070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16826139db565b9350846120df5782545f906120659070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1686613a0b565b84549091506fffffffffffffffffffffffffffffffff90811690821611156120dd5783546120a5906fffffffffffffffffffffffffffffffff16826139db565b6120af90836139db565b84549092506120d0906fffffffffffffffffffffffffffffffff16826139db565b6120da90866139db565b94505b505b6001830180546fffffffffffffffffffffffffffffffff90811670010000000000000000000000000000000084831681029190911790925584548692869260109261212e928692910416613a0b565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550853373ffffffffffffffffffffffffffffffffffffffff167fad82e4ded87b4f1d117a62956445ec6ff411c4f2eb80134db1573f8cb74b86e786886040516121cc9291906fffffffffffffffffffffffffffffffff9290921682521515602082015260400190565b60405180910390a36014546040517f40c10f190000000000000000000000000000000000000000000000000000000081523360048201526fffffffffffffffffffffffffffffffff8616602482015273ffffffffffffffffffffffffffffffffffffffff909116906340c10f19906044015f604051808303815f87803b158015612254575f80fd5b505af1158015612266573d5f803e3d5ffd5b50505050836fffffffffffffffffffffffffffffffff1660115f82825461228d9190613a34565b90915550506001805550611ad6915050565b6002600154036122db576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600155565b60185460ff166123345760405162461bcd60e51b815260206004820152601260248201527f6f76656e206e6f7420707265686561746564000000000000000000000000000060448201526064016105c9565b5f83116123835760405162461bcd60e51b815260206004820152600e60248201527f696e76616c696420616d6f756e7400000000000000000000000000000000000060448201526064016105c9565b600e54826fffffffffffffffffffffffffffffffff16101580156123bb5750610190826fffffffffffffffffffffffffffffffff1611155b6124075760405162461bcd60e51b815260206004820152601460248201527f696e76616c69642074617267657420707269636500000000000000000000000060448201526064016105c9565b5f61241061294c565b90505f61241d8483613131565b90505f60175f60035f815461243190613a71565b91905081905581526020019081526020015f2090505f6124518688613175565b9050827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166003548673ffffffffffffffffffffffffffffffffffffffff167fb56d5e7ca9e15dbbf6d919abf39bd22d59294ab4fc013b414035bcc4ac9581818a856040516124c6929190918252602082015260400190565b60405180910390a46124d6612ca2565b81546fffffffffffffffffffffffffffffffff8089167fffffffffffffffffffffffffffffffff000000000000000000000000000000009283161784556001840180549184169190921617905560065461253790829064e8d4a51000612a96565b6001830180546fffffffffffffffffffffffffffffffff92831670010000000000000000000000000000000002921691909117905560038201805473ffffffffffffffffffffffffffffffffffffffff87167fffffffffffffffffffffffff00000000000000000000000000000000000000009091161790556002820180547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff85167fffffffff00000000000000000000000000000000000000000000000000000000909116179055600780548291905f90612610908490613a34565b909155505050505050505050565b60185460ff166126705760405162461bcd60e51b815260206004820152601260248201527f6f76656e206e6f7420707265686561746564000000000000000000000000000060448201526064016105c9565b5f83116126bf5760405162461bcd60e51b815260206004820152600e60248201527f696e76616c696420616d6f756e7400000000000000000000000000000000000060448201526064016105c9565b600e54826fffffffffffffffffffffffffffffffff16101580156126f75750610190826fffffffffffffffffffffffffffffffff1611155b6127435760405162461bcd60e51b815260206004820152601460248201527f696e76616c69642074617267657420707269636500000000000000000000000060448201526064016105c9565b5f61274c61294c565b90505f6127598483613131565b90505f60165f60025f815461276d90613a71565b91905081905581526020019081526020015f2090505f61278d8688613175565b9050827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166002548673ffffffffffffffffffffffffffffffffffffffff167fa32c6c21d79da8a70c5e42528702e356ade2ed38f6e956ce02cbb58b22083e4f8a85604051612802929190918252602082015260400190565b60405180910390a4612812612f3d565b81546fffffffffffffffffffffffffffffffff8089167fffffffffffffffffffffffffffffffff000000000000000000000000000000009283161784556001840180549184169190921617905560045461287390829064e8d4a51000612a96565b6001830180546fffffffffffffffffffffffffffffffff92831670010000000000000000000000000000000002921691909117905560038201805473ffffffffffffffffffffffffffffffffffffffff87167fffffffffffffffffffffffff00000000000000000000000000000000000000009091161790556002820180547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff85167fffffffff00000000000000000000000000000000000000000000000000000000909116179055600580548291905f90612610908490613a34565b5f805f60155f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156129b9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129dd9190613aca565b509092509050612a21816129fd6129f885633b9aca00613b0b565b6131eb565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690613215565b9250505090565b5f8115612a6857612a37612ca2565b6001830154600654612a61916fffffffffffffffffffffffffffffffff169064e8d4a51000612a96565b9050611ad6565b612a70612f3d565b6001830154600454612a61916fffffffffffffffffffffffffffffffff169064e8d4a510005b5f838302817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85870982811083820303915050805f03612ae957838281612adf57612adf613b3d565b0492505050610ba5565b808411612b22576040517f227bc15300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b5f80612b9a868686612a96565b9050612ba583613230565b8015612bc057505f8480612bbb57612bbb613b3d565b868809115b15612bd357612bd0600182613a34565b90505b95945050505050565b5f5473ffffffffffffffffffffffffffffffffffffffff16331461189a576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105c9565b5f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6007541580612cb357504360095410155b15612cba57565b600b545f03612e3c57601454604080517f18160ddd00000000000000000000000000000000000000000000000000000000815290515f9273ffffffffffffffffffffffffffffffffffffffff16916318160ddd9160048083019260209291908290030181865afa158015612d30573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d549190613a5a565b601154612d619190613a47565b90505f612d72826012546064612a96565b90508160115f828254612d859190613a47565b909155505060055415801590612d9b5750600a54155b15612e11575f612daf826013546064612a96565b9050612dcc612dbe8284613a47565b64e8d4a51000600554612a96565b60045f828254612ddc9190613a34565b92505081905550612df58164e8d4a51000600754612a96565b60065f828254612e059190613a34565b909155506110fb915050565b612e238164e8d4a51000600754612a96565b60065f828254612e339190613a34565b90915550505050565b612e68600b5460095443612e509190613a47565b612e5a9190613b6a565b64e8d4a51000600754612a96565b60065f828254612e789190613a34565b92505081905550612e9b600b54600d5460095443612e969190613a47565b61325c565b600b819055436009555f0361189a5760145f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f14573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612f389190613a5a565b601155565b6005541580612f4e57504360085410155b15612f5557565b600a545f0361306c57601454604080517f18160ddd00000000000000000000000000000000000000000000000000000000815290515f9273ffffffffffffffffffffffffffffffffffffffff16916318160ddd9160048083019260209291908290030181865afa158015612fcb573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fef9190613a5a565b601154612ffc9190613a47565b90505f61300d826012546064612a96565b90508160115f8282546130209190613a47565b9091555050600754158015906130365750600b54155b1561304a575f612daf826013546064612a96565b61305c8164e8d4a51000600554612a96565b60045f828254612e339190613a34565b61308a600a54600854436130809190613a47565b612dbe9190613b6a565b60045f82825461309a9190613a34565b925050819055506130b8600a54600c5460085443612e969190613a47565b600a819055436008555f0361189a5760145f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f14573d5f803e3d5ffd5b5f7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8281166fffffffffffffffffffffffffffffffff85160260021c90811115610ba5575f80fd5b5f815f0361318457505f611ad6565b6fffffffffffffffffffffffffffffffff838116908316810260021c90608084901c027f3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8111156131d3575f80fd5b60021b81198111156131e3575f80fd5b019392505050565b5f611ad66e0100000000000000000000000000006dffffffffffffffffffffffffffff8416613b81565b5f610ba56dffffffffffffffffffffffffffff831684613bc8565b5f600282600381111561324557613245613c02565b61324f9190613c2f565b60ff166001149050919050565b5f61328161327b61327585670de0b6b3a7640000613289565b846132d0565b8561362d565b949350505050565b5f815f03613295575f80fd5b5f6132a084846136a3565b90506f7fffffffffffffffffffffffffffffff6fffffffffffffffffffffffffffffffff82161115610ba5575f80fd5b5f805f84600f0b1280156132e75750826001166001145b90505f8085600f0b126132fa57846132fe565b845f035b6fffffffffffffffffffffffffffffffff1690507001000000000000000000000000000000006801000000000000000082116133ae57603f82901b91505b84156133a6576001851615613351578102607f1c5b908002607f1c906002851615613367578102607f1c5b908002607f1c90600485161561337d578102607f1c5b908002607f1c906008851615613393578102607f1c5b60049490941c93908002607f1c9061333c565b60401c6135d3565b603f6c010000000000000000000000008310156133ef5760209290921b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015b6e0100000000000000000000000000008310156134305760109290921b917ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0015b6f010000000000000000000000000000008310156134725760089290921b917ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8015b6f100000000000000000000000000000008310156134b45760049290921b917ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc015b6f400000000000000000000000000000008310156134f65760029290921b917ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe015b6f800000000000000000000000000000008310156135385760019290921b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b5f5b86156135bd576040821061354c575f80fd5b600187161561357f57918302607f1c91810170010000000000000000000000000000000083111561357f57600192831c92015b928002607f1c9260019190911b9070010000000000000000000000000000000084106135b157600193841c9391909101905b600187901c965061353a565b604081106135c9575f80fd5b6040039190911c90505b5f836135df57816135e3565b815f035b90507fffffffffffffffffffffffffffffffff80000000000000000000000000000000811280159061362557506f7fffffffffffffffffffffffffffffff8113155b6119d2575f80fd5b5f815f0361363c57505f611ad6565b5f83600f0b121561364b575f80fd5b600f83900b6fffffffffffffffffffffffffffffffff8316810260401c90608084901c0277ffffffffffffffffffffffffffffffffffffffffffffffff811115613693575f80fd5b60401b81198111156131e3575f80fd5b5f815f036136af575f80fd5b5f77ffffffffffffffffffffffffffffffffffffffffffffffff84116136ea5782604085901b816136e2576136e2613b3d565b049050613812565b60c084811c6401000000008110613703576020918201911c5b620100008110613715576010918201911c5b6101008110613726576008918201911c5b60108110613736576004918201911c5b60048110613746576002918201911c5b60028110613755576001820191505b60bf820360018603901c6001018260ff0387901b8161377657613776613b3d565b0492506fffffffffffffffffffffffffffffffff831115613795575f80fd5b608085901c83026fffffffffffffffffffffffffffffffff8616840260c088901c604089901b828110156137ca576001820391505b608084901b929003828110156137e1576001820391505b829003608084901c82146137f7576137f7613c50565b88818161380657613806613b3d565b04870196505050505050505b6fffffffffffffffffffffffffffffffff811115610ba5575f80fd5b8015158114611b35575f80fd5b5f805f6060848603121561384d575f80fd5b8335925060208401356fffffffffffffffffffffffffffffffff81168114613873575f80fd5b915060408401356138838161382e565b809150509250925092565b5f806040838503121561389f575f80fd5b8235915060208301356138b18161382e565b809150509250929050565b5f805f606084860312156138ce575f80fd5b8335925060208401356138738161382e565b5f602082840312156138f0575f80fd5b8135610ba58161382e565b5f805f805f805f80610100898b031215613913575f80fd5b883597506020890135965060408901359550606089013594506080890135935060a0890135925060c0890135915060e089013561394f8161382e565b809150509295985092959890939650565b5f60208284031215613970575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610ba5575f80fd5b5f602082840312156139a3575f80fd5b8151610ba58161382e565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b6fffffffffffffffffffffffffffffffff828116828216039080821115613a0457613a046139ae565b5092915050565b6fffffffffffffffffffffffffffffffff818116838216019080821115613a0457613a046139ae565b80820180821115611ad657611ad66139ae565b81810381811115611ad657611ad66139ae565b5f60208284031215613a6a575f80fd5b5051919050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613aa157613aa16139ae565b5060010190565b80516dffffffffffffffffffffffffffff81168114613ac5575f80fd5b919050565b5f805f60608486031215613adc575f80fd5b613ae584613aa8565b9250613af360208501613aa8565b9150604084015163ffffffff81168114613883575f80fd5b6dffffffffffffffffffffffffffff818116838216028082169190828114613b3557613b356139ae565b505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b8082028115828204841417611ad657611ad66139ae565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff828116828216818102831692918115828504821417613bbf57613bbf6139ae565b50505092915050565b5f7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff80841680613bf657613bf6613b3d565b92169190910492915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f60ff831680613c4157613c41613b3d565b8060ff84160691505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52600160045260245ffdfea264697066735822122039365a32fef88f44d4d8600e9375413693bcf592a7c20e4bb2c5c4e03cc3c99a64736f6c63430008140033000000000000000000000000fc116ea24f002f600e363bdce4b91715fe5e0392000000000000000000000000b5b3245e2dcfca6474e3b8588e6bafee9b683496000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561000f575f80fd5b506004361061024f575f3560e01c80638bc3486e1161013d578063adc2347b116100b8578063e31304ce11610088578063ee7be3571161006e578063ee7be35714610530578063f2fde38b14610550578063f64e777f14610563575f80fd5b8063e31304ce1461051e578063e747340314610527575f80fd5b8063adc2347b146104cf578063ae9557bf146104d8578063bbca6210146104e1578063d6de53d214610501575f80fd5b80639972c5491161010d578063a97bc5b9116100f3578063a97bc5b9146104aa578063a9f8d181146104bd578063acbefb80146104c6575f80fd5b80639972c549146104845780639d03396114610497575f80fd5b80638bc3486e146103885780638da5cb5b14610434578063939d62371461047257806395ccba291461047b575f80fd5b806347fe810f116101cd5780636f178b2c1161019d5780637f7a8dc5116101835780637f7a8dc5146103635780638ae39cac146103765780638aff120d1461037f575f80fd5b80636f178b2c14610352578063715018a61461035b575f80fd5b806347fe810f1461030257806354fac9191461033757806360f6bad8146103405780636f076efd14610349575f80fd5b80632a2f77a6116102225780632bbb28c0116102085780632bbb28c0146102d35780633a98ef39146102e657806347575429146102ef575f80fd5b80632a2f77a61461028a5780632b9f0a4e1461029f575f80fd5b8063089f80ac1461025357806315f068f71461026f5780631bef5af414610278578063234f06ff14610281575b5f80fd5b61025c60115481565b6040519081526020015b60405180910390f35b61025c60065481565b61025c60075481565b61025c60135481565b61029d61029836600461383b565b610576565b005b6102b26102ad36600461383b565b61073f565b6040516fffffffffffffffffffffffffffffffff9091168152602001610266565b61029d6102e136600461388e565b610bac565b61025c60055481565b61029d6102fd36600461388e565b6110ff565b61030a61187b565b6040517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9091168152602001610266565b61025c600c5481565b61025c60025481565b61025c60105481565b61025c600e5481565b61029d611889565b6102b26103713660046138bc565b61189c565b61025c600a5481565b61025c61019081565b61039b61039636600461388e565b6119dc565b60405161026691905f60c0820190506fffffffffffffffffffffffffffffffff808451168352806020850151166020840152806040850151166040840152806060850151166060840152507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff608084015116608083015273ffffffffffffffffffffffffffffffffffffffff60a08401511660a083015292915050565b5f5473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610266565b61025c60045481565b61025c600d5481565b61029d6104923660046138e0565b611adc565b61029d6104a53660046138fb565b611b38565b61029d6104b83660046138e0565b611dd8565b61025c60085481565b61025c60035481565b61025c600b5481565b61025c60095481565b60145461044d9073ffffffffffffffffffffffffffffffffffffffff1681565b60185461050e9060ff1681565b6040519015158152602001610266565b61025c600f5481565b61025c60125481565b60155461044d9073ffffffffffffffffffffffffffffffffffffffff1681565b61029d61055e366004613960565b611df6565b6102b261057136600461388e565b611e56565b61057e61229f565b3332146105d25760405162461bcd60e51b815260206004820152601460248201527f636f6e7472616374206e6f7420616c6c6f77656400000000000000000000000060448201526064015b60405180910390fd5b8015610687576015546040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810185905273ffffffffffffffffffffffffffffffffffffffff909116906323b872dd906064016020604051808303815f875af1158015610652573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106769190613993565b506106828383336122e2565b610731565b6014546040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810185905273ffffffffffffffffffffffffffffffffffffffff909116906323b872dd906064016020604051808303815f875af1158015610701573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107259190613993565b5061073183833361261e565b61073a60018055565b505050565b5f61074861229f565b3332146107975760405162461bcd60e51b815260206004820152601460248201527f636f6e7472616374206e6f7420616c6c6f77656400000000000000000000000060448201526064016105c9565b5f826107af575f8581526016602052604090206107bd565b5f8581526017602052604090205b600381015490915073ffffffffffffffffffffffffffffffffffffffff1633146108295760405162461bcd60e51b815260206004820152600b60248201527f6e6f7420616c6c6f77656400000000000000000000000000000000000000000060448201526064016105c9565b5f61083261294c565b60028301549091507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff908116908216106108d05760405162461bcd60e51b815260206004820152602860248201527f63616e6e6f7420636f6d706f756e64206f6e6365206465706f7369742069732060448201527f756e6c6f636b656400000000000000000000000000000000000000000000000060648201526084016105c9565b5f6108db8386612a28565b60018401549091506109139070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16826139db565b9350846109c85782545f9061094e9070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1686613a0b565b84549091506fffffffffffffffffffffffffffffffff90811690821611156109c657835461098e906fffffffffffffffffffffffffffffffff16826139db565b61099890836139db565b84549092506109b9906fffffffffffffffffffffffffffffffff16826139db565b6109c390866139db565b94505b505b6001830180546fffffffffffffffffffffffffffffffff908116700100000000000000000000000000000000848316810291909117909255845486928692601092610a17928692910416613a0b565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550863373ffffffffffffffffffffffffffffffffffffffff167fad82e4ded87b4f1d117a62956445ec6ff411c4f2eb80134db1573f8cb74b86e78688604051610ab59291906fffffffffffffffffffffffffffffffff9290921682521515602082015260400190565b60405180910390a36014546040517f40c10f190000000000000000000000000000000000000000000000000000000081523060048201526fffffffffffffffffffffffffffffffff8616602482015273ffffffffffffffffffffffffffffffffffffffff909116906340c10f19906044015f604051808303815f87803b158015610b3d575f80fd5b505af1158015610b4f573d5f803e3d5ffd5b50505050836fffffffffffffffffffffffffffffffff1660115f828254610b769190613a34565b90915550610b9990506fffffffffffffffffffffffffffffffff8516873361261e565b505050610ba560018055565b9392505050565b610bb461229f565b333214610c035760405162461bcd60e51b815260206004820152601460248201527f636f6e7472616374206e6f7420616c6c6f77656400000000000000000000000060448201526064016105c9565b5f81610c1b575f838152601660205260409020610c29565b5f8381526017602052604090205b600381015490915073ffffffffffffffffffffffffffffffffffffffff163314610c955760405162461bcd60e51b815260206004820152600b60248201527f6e6f7420616c6c6f77656400000000000000000000000000000000000000000060448201526064016105c9565b5f610c9e61294c565b60028301549091507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9081169082161015610d175760405162461bcd60e51b815260206004820152601460248201527f6465706f736974206e6f7420756e6c6f636b656400000000000000000000000060448201526064016105c9565b60018201545f9070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16610d4e8486612a28565b610d5891906139db565b6014546040517f40c10f190000000000000000000000000000000000000000000000000000000081523360048201526fffffffffffffffffffffffffffffffff9290921660248301819052925073ffffffffffffffffffffffffffffffffffffffff16906340c10f19906044015f604051808303815f87803b158015610ddc575f80fd5b505af1158015610dee573d5f803e3d5ffd5b505050508060115f828254610e039190613a34565b9091555050604080518281528515156020820152869133917fad82e4ded87b4f1d117a62956445ec6ff411c4f2eb80134db1573f8cb74b86e7910160405180910390a38254604080516fffffffffffffffffffffffffffffffff90921682528515156020830152869133917f46dd9e4b82d9e89c62b1b3b25840a0a2f3161eaa17476317281b564987d3680f910160405180910390a38315610fc9576001830154600780546fffffffffffffffffffffffffffffffff9283169003905560155484546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201529216602483015273ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044016020604051808303815f875af1158015610f34573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f589190613993565b505f85815260176020526040812081815560018101919091556002810180547fffffffff0000000000000000000000000000000000000000000000000000000016905560030180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556110ef565b6001830154600580546fffffffffffffffffffffffffffffffff9283169003905560145484546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201529216602483015273ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044016020604051808303815f875af115801561105e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110829190613993565b505f85815260166020526040812081815560018101919091556002810180547fffffffff0000000000000000000000000000000000000000000000000000000016905560030180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b5050506110fb60018055565b5050565b61110761229f565b3332146111565760405162461bcd60e51b815260206004820152601460248201527f636f6e7472616374206e6f7420616c6c6f77656400000000000000000000000060448201526064016105c9565b5f8161116e575f83815260166020526040902061117c565b5f8381526017602052604090205b600381015490915073ffffffffffffffffffffffffffffffffffffffff1633146111e85760405162461bcd60e51b815260206004820152600b60248201527f6e6f7420616c6c6f77656400000000000000000000000000000000000000000060448201526064016105c9565b81156114d957600181018054600780546fffffffffffffffffffffffffffffffff9283169003905590546006545f9270010000000000000000000000000000000083048116926112409291169064e8d4a51000612a96565b61124a9190613a47565b905061125e8164e8d4a51000600754612a96565b60065f82825461126e9190613a34565b909155505081546010545f9161129c916fffffffffffffffffffffffffffffffff9091169060646001612b8d565b601554845491925073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb9033906112e09085906fffffffffffffffffffffffffffffffff16613a47565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303815f875af115801561134d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113719190613993565b506015546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081525f60048201526024810183905273ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb906044016020604051808303815f875af11580156113e6573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061140a9190613993565b508254859033907f7cc693a6833d0461515d5029c299209a04f6826c244d4658b43e49265f227405906114509085906fffffffffffffffffffffffffffffffff16613a47565b60408051918252600160208301520160405180910390a350505f83815260176020526040812081815560018101919091556002810180547fffffffff0000000000000000000000000000000000000000000000000000000016905560030180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055611871565b600181018054600580546fffffffffffffffffffffffffffffffff9283169003905590546004545f92700100000000000000000000000000000000830481169261152b9291169064e8d4a51000612a96565b6115359190613a47565b90506115498164e8d4a51000600554612a96565b60045f8282546115599190613a34565b90915550508154600f545f91611587916fffffffffffffffffffffffffffffffff9091169060646001612b8d565b83549091506fffffffffffffffffffffffffffffffff70010000000000000000000000000000000082048116916115c091849116613a47565b116116335760405162461bcd60e51b815260206004820152603060248201527f636c61696d656420726577617264732065786365656473206465706f7369742060448201527f616d6f756e74202d2070656e616c74790000000000000000000000000000000060648201526084016105c9565b601454835473ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb9033906fffffffffffffffffffffffffffffffff700100000000000000000000000000000000820481169161168d91879116613a47565b6116979190613a47565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303815f875af1158015611704573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117289190613993565b506014546040517f42966c680000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff909116906342966c68906024015f604051808303815f87803b158015611792575f80fd5b505af11580156117a4573d5f803e3d5ffd5b505084548792503391507f7cc693a6833d0461515d5029c299209a04f6826c244d4658b43e49265f227405906117ed9085906fffffffffffffffffffffffffffffffff16613a47565b604080519182525f60208301520160405180910390a350505f83815260166020526040812081815560018101919091556002810180547fffffffff0000000000000000000000000000000000000000000000000000000016905560030180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b506110fb60018055565b5f61188461294c565b905090565b611891612bdc565b61189a5f612c2e565b565b5f80836118b5575f8581526016602052604090206118c3565b5f8581526017602052604090205b60018101549091505f906118ff906fffffffffffffffffffffffffffffffff16866118f0576004546118f4565b6006545b64e8d4a51000612a96565b60018301549091505f906119399070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16836139db565b90508461194a579250610ba5915050565b856119d25782545f906119839070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1683613a0b565b84549091506fffffffffffffffffffffffffffffffff90811690821611156119d05783546119c3906fffffffffffffffffffffffffffffffff16826139db565b6119cd90836139db565b91505b505b9695505050505050565b6040805160c0810182525f80825260208201819052918101829052606081018290526080810182905260a081019190915281611a24575f838152601660205260409020611a32565b5f8381526017602052604090205b6040805160c08101825282546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000091829004811660208401526001850154808216948401949094529204909116606082015260028201547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16608082015260039091015473ffffffffffffffffffffffffffffffffffffffff1660a082015290505b92915050565b611ae4612bdc565b601880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215801591909117909155611b35576005545f03611b2757436008555b6007545f03611b3557436009555b50565b611b40612bdc565b8015611bcc57601e851115611bbd5760405162461bcd60e51b815260206004820152602260248201527f65786365656473206d61782070656e616c747920666f72204c50207374616b6560448201527f727300000000000000000000000000000000000000000000000000000000000060648201526084016105c9565b600d8690556010859055611c4e565b601e851115611c435760405162461bcd60e51b815260206004820152602560248201527f65786365656473206d61782070656e616c747920666f7220446f75676820737460448201527f616b65727300000000000000000000000000000000000000000000000000000060648201526084016105c9565b600c869055600f8590555b60648311158015611c5f5750601e83115b611cd05760405162461bcd60e51b8152602060048201526024808201527f6275726e207265776172642070657263656e74616765206f7574206f6620626f60448201527f756e64730000000000000000000000000000000000000000000000000000000060648201526084016105c9565b600a54158015611ce05750600b54155b8015611cf457505f881180611cf457505f87115b15611d03574360098190556008555b5f600a54118015611d1557505f600b54115b8015611d275750871580611d27575086155b15611dbe5760145f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d96573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611dba9190613a5a565b6011555b50600a96909655600b94909455600e555050601255601355565b611de0612bdc565b8015611dee57611b35612ca2565b611b35612f3d565b611dfe612bdc565b73ffffffffffffffffffffffffffffffffffffffff8116611e4d576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105c9565b611b3581612c2e565b5f611e5f61229f565b333214611eae5760405162461bcd60e51b815260206004820152601460248201527f636f6e7472616374206e6f7420616c6c6f77656400000000000000000000000060448201526064016105c9565b5f82611ec6575f848152601660205260409020611ed4565b5f8481526017602052604090205b600381015490915073ffffffffffffffffffffffffffffffffffffffff163314611f405760405162461bcd60e51b815260206004820152600b60248201527f6e6f7420616c6c6f77656400000000000000000000000000000000000000000060448201526064016105c9565b5f611f4961294c565b60028301549091507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90811690821610611fe75760405162461bcd60e51b815260206004820152603460248201527f63616e6e6f7420636c61696d206f6e6365206465706f73697420697320756e6c60448201527f6f636b65642c206d75737420776974686472617700000000000000000000000060648201526084016105c9565b5f611ff28386612a28565b600184015490915061202a9070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16826139db565b9350846120df5782545f906120659070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1686613a0b565b84549091506fffffffffffffffffffffffffffffffff90811690821611156120dd5783546120a5906fffffffffffffffffffffffffffffffff16826139db565b6120af90836139db565b84549092506120d0906fffffffffffffffffffffffffffffffff16826139db565b6120da90866139db565b94505b505b6001830180546fffffffffffffffffffffffffffffffff90811670010000000000000000000000000000000084831681029190911790925584548692869260109261212e928692910416613a0b565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550853373ffffffffffffffffffffffffffffffffffffffff167fad82e4ded87b4f1d117a62956445ec6ff411c4f2eb80134db1573f8cb74b86e786886040516121cc9291906fffffffffffffffffffffffffffffffff9290921682521515602082015260400190565b60405180910390a36014546040517f40c10f190000000000000000000000000000000000000000000000000000000081523360048201526fffffffffffffffffffffffffffffffff8616602482015273ffffffffffffffffffffffffffffffffffffffff909116906340c10f19906044015f604051808303815f87803b158015612254575f80fd5b505af1158015612266573d5f803e3d5ffd5b50505050836fffffffffffffffffffffffffffffffff1660115f82825461228d9190613a34565b90915550506001805550611ad6915050565b6002600154036122db576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600155565b60185460ff166123345760405162461bcd60e51b815260206004820152601260248201527f6f76656e206e6f7420707265686561746564000000000000000000000000000060448201526064016105c9565b5f83116123835760405162461bcd60e51b815260206004820152600e60248201527f696e76616c696420616d6f756e7400000000000000000000000000000000000060448201526064016105c9565b600e54826fffffffffffffffffffffffffffffffff16101580156123bb5750610190826fffffffffffffffffffffffffffffffff1611155b6124075760405162461bcd60e51b815260206004820152601460248201527f696e76616c69642074617267657420707269636500000000000000000000000060448201526064016105c9565b5f61241061294c565b90505f61241d8483613131565b90505f60175f60035f815461243190613a71565b91905081905581526020019081526020015f2090505f6124518688613175565b9050827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166003548673ffffffffffffffffffffffffffffffffffffffff167fb56d5e7ca9e15dbbf6d919abf39bd22d59294ab4fc013b414035bcc4ac9581818a856040516124c6929190918252602082015260400190565b60405180910390a46124d6612ca2565b81546fffffffffffffffffffffffffffffffff8089167fffffffffffffffffffffffffffffffff000000000000000000000000000000009283161784556001840180549184169190921617905560065461253790829064e8d4a51000612a96565b6001830180546fffffffffffffffffffffffffffffffff92831670010000000000000000000000000000000002921691909117905560038201805473ffffffffffffffffffffffffffffffffffffffff87167fffffffffffffffffffffffff00000000000000000000000000000000000000009091161790556002820180547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff85167fffffffff00000000000000000000000000000000000000000000000000000000909116179055600780548291905f90612610908490613a34565b909155505050505050505050565b60185460ff166126705760405162461bcd60e51b815260206004820152601260248201527f6f76656e206e6f7420707265686561746564000000000000000000000000000060448201526064016105c9565b5f83116126bf5760405162461bcd60e51b815260206004820152600e60248201527f696e76616c696420616d6f756e7400000000000000000000000000000000000060448201526064016105c9565b600e54826fffffffffffffffffffffffffffffffff16101580156126f75750610190826fffffffffffffffffffffffffffffffff1611155b6127435760405162461bcd60e51b815260206004820152601460248201527f696e76616c69642074617267657420707269636500000000000000000000000060448201526064016105c9565b5f61274c61294c565b90505f6127598483613131565b90505f60165f60025f815461276d90613a71565b91905081905581526020019081526020015f2090505f61278d8688613175565b9050827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166002548673ffffffffffffffffffffffffffffffffffffffff167fa32c6c21d79da8a70c5e42528702e356ade2ed38f6e956ce02cbb58b22083e4f8a85604051612802929190918252602082015260400190565b60405180910390a4612812612f3d565b81546fffffffffffffffffffffffffffffffff8089167fffffffffffffffffffffffffffffffff000000000000000000000000000000009283161784556001840180549184169190921617905560045461287390829064e8d4a51000612a96565b6001830180546fffffffffffffffffffffffffffffffff92831670010000000000000000000000000000000002921691909117905560038201805473ffffffffffffffffffffffffffffffffffffffff87167fffffffffffffffffffffffff00000000000000000000000000000000000000009091161790556002820180547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff85167fffffffff00000000000000000000000000000000000000000000000000000000909116179055600580548291905f90612610908490613a34565b5f805f60155f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156129b9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129dd9190613aca565b509092509050612a21816129fd6129f885633b9aca00613b0b565b6131eb565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690613215565b9250505090565b5f8115612a6857612a37612ca2565b6001830154600654612a61916fffffffffffffffffffffffffffffffff169064e8d4a51000612a96565b9050611ad6565b612a70612f3d565b6001830154600454612a61916fffffffffffffffffffffffffffffffff169064e8d4a510005b5f838302817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85870982811083820303915050805f03612ae957838281612adf57612adf613b3d565b0492505050610ba5565b808411612b22576040517f227bc15300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b5f80612b9a868686612a96565b9050612ba583613230565b8015612bc057505f8480612bbb57612bbb613b3d565b868809115b15612bd357612bd0600182613a34565b90505b95945050505050565b5f5473ffffffffffffffffffffffffffffffffffffffff16331461189a576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105c9565b5f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6007541580612cb357504360095410155b15612cba57565b600b545f03612e3c57601454604080517f18160ddd00000000000000000000000000000000000000000000000000000000815290515f9273ffffffffffffffffffffffffffffffffffffffff16916318160ddd9160048083019260209291908290030181865afa158015612d30573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d549190613a5a565b601154612d619190613a47565b90505f612d72826012546064612a96565b90508160115f828254612d859190613a47565b909155505060055415801590612d9b5750600a54155b15612e11575f612daf826013546064612a96565b9050612dcc612dbe8284613a47565b64e8d4a51000600554612a96565b60045f828254612ddc9190613a34565b92505081905550612df58164e8d4a51000600754612a96565b60065f828254612e059190613a34565b909155506110fb915050565b612e238164e8d4a51000600754612a96565b60065f828254612e339190613a34565b90915550505050565b612e68600b5460095443612e509190613a47565b612e5a9190613b6a565b64e8d4a51000600754612a96565b60065f828254612e789190613a34565b92505081905550612e9b600b54600d5460095443612e969190613a47565b61325c565b600b819055436009555f0361189a5760145f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f14573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612f389190613a5a565b601155565b6005541580612f4e57504360085410155b15612f5557565b600a545f0361306c57601454604080517f18160ddd00000000000000000000000000000000000000000000000000000000815290515f9273ffffffffffffffffffffffffffffffffffffffff16916318160ddd9160048083019260209291908290030181865afa158015612fcb573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fef9190613a5a565b601154612ffc9190613a47565b90505f61300d826012546064612a96565b90508160115f8282546130209190613a47565b9091555050600754158015906130365750600b54155b1561304a575f612daf826013546064612a96565b61305c8164e8d4a51000600554612a96565b60045f828254612e339190613a34565b61308a600a54600854436130809190613a47565b612dbe9190613b6a565b60045f82825461309a9190613a34565b925050819055506130b8600a54600c5460085443612e969190613a47565b600a819055436008555f0361189a5760145f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f14573d5f803e3d5ffd5b5f7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8281166fffffffffffffffffffffffffffffffff85160260021c90811115610ba5575f80fd5b5f815f0361318457505f611ad6565b6fffffffffffffffffffffffffffffffff838116908316810260021c90608084901c027f3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8111156131d3575f80fd5b60021b81198111156131e3575f80fd5b019392505050565b5f611ad66e0100000000000000000000000000006dffffffffffffffffffffffffffff8416613b81565b5f610ba56dffffffffffffffffffffffffffff831684613bc8565b5f600282600381111561324557613245613c02565b61324f9190613c2f565b60ff166001149050919050565b5f61328161327b61327585670de0b6b3a7640000613289565b846132d0565b8561362d565b949350505050565b5f815f03613295575f80fd5b5f6132a084846136a3565b90506f7fffffffffffffffffffffffffffffff6fffffffffffffffffffffffffffffffff82161115610ba5575f80fd5b5f805f84600f0b1280156132e75750826001166001145b90505f8085600f0b126132fa57846132fe565b845f035b6fffffffffffffffffffffffffffffffff1690507001000000000000000000000000000000006801000000000000000082116133ae57603f82901b91505b84156133a6576001851615613351578102607f1c5b908002607f1c906002851615613367578102607f1c5b908002607f1c90600485161561337d578102607f1c5b908002607f1c906008851615613393578102607f1c5b60049490941c93908002607f1c9061333c565b60401c6135d3565b603f6c010000000000000000000000008310156133ef5760209290921b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015b6e0100000000000000000000000000008310156134305760109290921b917ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0015b6f010000000000000000000000000000008310156134725760089290921b917ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8015b6f100000000000000000000000000000008310156134b45760049290921b917ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc015b6f400000000000000000000000000000008310156134f65760029290921b917ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe015b6f800000000000000000000000000000008310156135385760019290921b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b5f5b86156135bd576040821061354c575f80fd5b600187161561357f57918302607f1c91810170010000000000000000000000000000000083111561357f57600192831c92015b928002607f1c9260019190911b9070010000000000000000000000000000000084106135b157600193841c9391909101905b600187901c965061353a565b604081106135c9575f80fd5b6040039190911c90505b5f836135df57816135e3565b815f035b90507fffffffffffffffffffffffffffffffff80000000000000000000000000000000811280159061362557506f7fffffffffffffffffffffffffffffff8113155b6119d2575f80fd5b5f815f0361363c57505f611ad6565b5f83600f0b121561364b575f80fd5b600f83900b6fffffffffffffffffffffffffffffffff8316810260401c90608084901c0277ffffffffffffffffffffffffffffffffffffffffffffffff811115613693575f80fd5b60401b81198111156131e3575f80fd5b5f815f036136af575f80fd5b5f77ffffffffffffffffffffffffffffffffffffffffffffffff84116136ea5782604085901b816136e2576136e2613b3d565b049050613812565b60c084811c6401000000008110613703576020918201911c5b620100008110613715576010918201911c5b6101008110613726576008918201911c5b60108110613736576004918201911c5b60048110613746576002918201911c5b60028110613755576001820191505b60bf820360018603901c6001018260ff0387901b8161377657613776613b3d565b0492506fffffffffffffffffffffffffffffffff831115613795575f80fd5b608085901c83026fffffffffffffffffffffffffffffffff8616840260c088901c604089901b828110156137ca576001820391505b608084901b929003828110156137e1576001820391505b829003608084901c82146137f7576137f7613c50565b88818161380657613806613b3d565b04870196505050505050505b6fffffffffffffffffffffffffffffffff811115610ba5575f80fd5b8015158114611b35575f80fd5b5f805f6060848603121561384d575f80fd5b8335925060208401356fffffffffffffffffffffffffffffffff81168114613873575f80fd5b915060408401356138838161382e565b809150509250925092565b5f806040838503121561389f575f80fd5b8235915060208301356138b18161382e565b809150509250929050565b5f805f606084860312156138ce575f80fd5b8335925060208401356138738161382e565b5f602082840312156138f0575f80fd5b8135610ba58161382e565b5f805f805f805f80610100898b031215613913575f80fd5b883597506020890135965060408901359550606089013594506080890135935060a0890135925060c0890135915060e089013561394f8161382e565b809150509295985092959890939650565b5f60208284031215613970575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610ba5575f80fd5b5f602082840312156139a3575f80fd5b8151610ba58161382e565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b6fffffffffffffffffffffffffffffffff828116828216039080821115613a0457613a046139ae565b5092915050565b6fffffffffffffffffffffffffffffffff818116838216019080821115613a0457613a046139ae565b80820180821115611ad657611ad66139ae565b81810381811115611ad657611ad66139ae565b5f60208284031215613a6a575f80fd5b5051919050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613aa157613aa16139ae565b5060010190565b80516dffffffffffffffffffffffffffff81168114613ac5575f80fd5b919050565b5f805f60608486031215613adc575f80fd5b613ae584613aa8565b9250613af360208501613aa8565b9150604084015163ffffffff81168114613883575f80fd5b6dffffffffffffffffffffffffffff818116838216028082169190828114613b3557613b356139ae565b505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b8082028115828204841417611ad657611ad66139ae565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff828116828216818102831692918115828504821417613bbf57613bbf6139ae565b50505092915050565b5f7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff80841680613bf657613bf6613b3d565b92169190910492915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f60ff831680613c4157613c41613b3d565b8060ff84160691505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52600160045260245ffdfea264697066735822122039365a32fef88f44d4d8600e9375413693bcf592a7c20e4bb2c5c4e03cc3c99a64736f6c63430008140033

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

000000000000000000000000fc116ea24f002f600e363bdce4b91715fe5e0392000000000000000000000000b5b3245e2dcfca6474e3b8588e6bafee9b683496000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _dough (address): 0xFc116eA24F002F600e363bdce4b91715fe5e0392
Arg [1] : _doughLp (address): 0xb5B3245e2dcFCA6474e3B8588e6baFEE9B683496
Arg [2] : _rewardPerBlock (uint256): 0
Arg [3] : _rewardPerBlockLP (uint256): 0
Arg [4] : _decay (uint256): 0

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000fc116ea24f002f600e363bdce4b91715fe5e0392
Arg [1] : 000000000000000000000000b5b3245e2dcfca6474e3b8588e6bafee9b683496
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.