ETH Price: $2,456.96 (+0.76%)

Contract

0x259db68C8adafFf7f35DE76A5e4b42e404BbaefE
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...142547492022-02-22 8:22:06963 days ago1645518126IN
0x259db68C...404BbaefE
0 ETH0.0015680254.83769883
Unstake141691792022-02-09 2:31:41977 days ago1644373901IN
0x259db68C...404BbaefE
0 ETH0.0054045944.15376985
Set Multiplier141691752022-02-09 2:31:12977 days ago1644373872IN
0x259db68C...404BbaefE
0 ETH0.0026730547.84846911
Withdraw Yield141691492022-02-09 2:27:39977 days ago1644373659IN
0x259db68C...404BbaefE
0 ETH0.0047952370.79723915
Withdraw Yield141691272022-02-09 2:22:16977 days ago1644373336IN
0x259db68C...404BbaefE
0 ETH0.0051100175.44467656
Withdraw Yield141691092022-02-09 2:16:59977 days ago1644373019IN
0x259db68C...404BbaefE
0 ETH0.0062778771.9164625
Set Multiplier141690952022-02-09 2:14:22977 days ago1644372862IN
0x259db68C...404BbaefE
0 ETH0.0062554277.60976947
Set Multiplier141690802022-02-09 2:10:45977 days ago1644372645IN
0x259db68C...404BbaefE
0 ETH0.0089348891.45130565
Set Multiplier141690632022-02-09 2:06:29977 days ago1644372389IN
0x259db68C...404BbaefE
0 ETH0.00572644102.50499601
Withdraw Yield141690632022-02-09 2:06:29977 days ago1644372389IN
0x259db68C...404BbaefE
0 ETH0.00984284103.00499601
Set Multiplier141690602022-02-09 2:05:17977 days ago1644372317IN
0x259db68C...404BbaefE
0 ETH0.008614588.17214362
Stake141690592022-02-09 2:04:42977 days ago1644372282IN
0x259db68C...404BbaefE
0 ETH0.011611280.39162442
Withdraw Fee141689722022-02-09 1:46:05977 days ago1644371165IN
0x259db68C...404BbaefE
0 ETH0.003863564.03001326
Set Multiplier136703422021-11-23 10:33:231054 days ago1637663603IN
0x259db68C...404BbaefE
0 ETH0.0049991389.48599754
Unstake135500372021-11-04 11:50:561073 days ago1636026656IN
0x259db68C...404BbaefE
0 ETH0.01473812130.53676334
Unstake132981072021-09-25 23:54:371113 days ago1632614077IN
0x259db68C...404BbaefE
0 ETH0.0033747529.2896956
Unstake132919582021-09-25 1:27:431114 days ago1632533263IN
0x259db68C...404BbaefE
0 ETH0.0050546848.51924717
Unstake132862852021-09-24 4:12:021114 days ago1632456722IN
0x259db68C...404BbaefE
0 ETH0.0060826458.39317069
Unstake132722152021-09-21 23:51:171117 days ago1632268277IN
0x259db68C...404BbaefE
0 ETH0.0092478670.05745322
Unstake132703172021-09-21 16:51:581117 days ago1632243118IN
0x259db68C...404BbaefE
0 ETH0.0070172362.1522319
Unstake132686642021-09-21 10:43:261117 days ago1632221006IN
0x259db68C...404BbaefE
0 ETH0.0044201334
Unstake132677422021-09-21 7:26:411117 days ago1632209201IN
0x259db68C...404BbaefE
0 ETH0.0070014455
Unstake132676652021-09-21 7:11:111117 days ago1632208271IN
0x259db68C...404BbaefE
0 ETH0.0078925362
Unstake132676452021-09-21 7:05:101117 days ago1632207910IN
0x259db68C...404BbaefE
0 ETH0.0053465542
Unstake132676402021-09-21 7:04:301117 days ago1632207870IN
0x259db68C...404BbaefE
0 ETH0.0072560457
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:
LPFarming

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 8 : LPFarm.sol
//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.4;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./FormToken.sol";
import "./LPToken.sol";

contract LPFarming is Ownable {

    // base APR
    uint256 public BASE_APR;
    uint256 public MULTIPLIER;
    uint256 public FEE = 3;
    uint256 private FEE_BALANCE = 0;
    address private FEE_TO;
    address private FEE_TO_SETTER;
    uint256 private ONE_YEAR = 31536000;
    uint256 private ONE_ETH = 1000000000000000000;
    // user's staking balance
    mapping(address => uint256) public stakingBalanceReward;
    // user's staking balance
    mapping(address => uint256) public stakingBalanceLp;
    // staking start timestamp
    mapping(address => uint256) public startTime;  
    // user's yield to claim
    mapping(address => uint256) public yieldBalance;
    // user's index
    mapping(address => uint256) public trenchIndex;
    // Trenches
    uint256[2][] public trenches;
    // Staking and rewards token interface
    LPToken public lpToken;
    FormToken public formToken;

    // contract's events
    event Stake(address indexed from, uint256 amount);
    event Unstake(address indexed from, uint256 amount);
    event YieldWithdraw(address indexed to, uint256 amount);
    event FeeWithdraw(address indexed to, uint256 amount);

    constructor(
        FormToken _formToken,
        LPToken _lpToken,
        uint256 initialAPR,
        uint256 initialMultiplier,
        address _feeToSetter
        ) {
        formToken = _formToken;
        lpToken = _lpToken;
        BASE_APR = initialAPR;
        MULTIPLIER = initialMultiplier;
        FEE_TO_SETTER = _feeToSetter;
        FEE_TO = _feeToSetter;
        trenches.push([block.timestamp, BASE_APR*MULTIPLIER]);
    }

    /// APR and multiplier calculations
    function getAPRValue() external view returns(uint256) {
        return BASE_APR*MULTIPLIER;
    }
    function setMultiplier(uint256 newMultiplier) onlyOwner external {
        MULTIPLIER = newMultiplier;
        trenches.push([block.timestamp, BASE_APR*MULTIPLIER]);
    }
    function setFee(uint256 newFee) onlyOwner external {
        FEE = newFee;
    }
    function sendFeeTo(address feeTo) external {
        require(msg.sender == FEE_TO_SETTER, 'FORBIDDEN');
        FEE_TO = feeTo;
    }
    function setFeeToSetter(address newSetter) external {
        require(msg.sender == FEE_TO_SETTER, 'FORBIDDEN');
        FEE_TO_SETTER = newSetter;
    }
    function getFee() external view returns(uint256) {
        return FEE_BALANCE;
    }
    function getStakingBalance(uint256 amount) private view returns(uint256) {
        uint256 LPSupply = lpToken.totalSupply();
        uint256 FORMSupply = formToken.balanceOf(address(lpToken));
        uint256 formStakingBalance = FORMSupply * 2 * ((amount * ONE_ETH) / LPSupply);
        return formStakingBalance / ONE_ETH;
    }

    /// Yield calculations
    function _calculateYield(address user) private view returns(uint256) {
        // end means now
        uint256 end = block.timestamp;
        uint256 totalYield;
        // loop through trenches
        for(uint256 i = trenchIndex[user]; i < trenches.length; i++){
            // how long the user was staking during the trench
            uint256 stakingTimeWithinTier;
            // if comparing to the last trench then
            // check how long user was staking during that trench
            if (i + 1 == trenches.length) {
                if (startTime[user] > trenches[i][0]) {
                    stakingTimeWithinTier = end - startTime[user];
                } else {
                    stakingTimeWithinTier = end - trenches[i][0];
                    // if no at all, then work is done
                    if (stakingTimeWithinTier < 0) {
                        continue;
                    }
                }
            } else {
                // check if user was staking during that trench
                // if no skip to another trench
                if (startTime[user] >= trenches[i + 1][0]) {
                    continue;
                } else {
                    // check if user was staking during the entire trench or partially
                    uint256 stakingTimeRelative = trenches[i + 1][0] - startTime[user];
                    uint256 tierTime = trenches[i + 1][0] - trenches[i][0];
                    // that means entire timespan (even more)
                    if (stakingTimeRelative >= tierTime) {
                        stakingTimeWithinTier = tierTime;
                    } else {
                        // that means partially
                        stakingTimeWithinTier = stakingTimeRelative;
                    }
                }
            }
            // calculate yield earned during the trench
            uint256 yieldEarnedWithinTier = (((trenches[i][1] * ONE_ETH) / ONE_YEAR) * stakingTimeWithinTier) / 100;
            uint256 netYield = stakingBalanceReward[user] * yieldEarnedWithinTier;
            uint256 netYieldFormatted = netYield / ONE_ETH;
            // add to total yield (from all trenches eventually)
            totalYield += netYieldFormatted;
        }
        return totalYield;
    }

    function getUsersYieldAmount(address user) public view returns(uint256) {
        require(
            stakingBalanceLp[user] > 0,
            "You do not stake any tokens");
        uint256 yieldEarned = _calculateYield(user);
        uint256 yieldUpToDate = yieldBalance[msg.sender];
        uint256 yieldTotal = yieldEarned + yieldUpToDate;
        return yieldTotal;
    }

    /// Core functions
    function stake(uint256 amount) external {
        // amount to stake and user's balance can not be 0
        require(
            amount > 0 &&
            lpToken.balanceOf(msg.sender) >= amount, 
            "You cannot stake zero tokens");
        
        // if user is already staking, calculate up-to-date yield
        if(stakingBalanceLp[msg.sender] > 0){
            uint256 yieldEarned = getUsersYieldAmount(msg.sender);
            yieldBalance[msg.sender] = yieldEarned;
        }

        lpToken.transferFrom(msg.sender, address(this), amount); // add LP tokens to the staking pool
        stakingBalanceLp[msg.sender] += amount;
        uint256 stakingFORMBalance = getStakingBalance(amount);
        stakingBalanceReward[msg.sender] += stakingFORMBalance;
        startTime[msg.sender] = block.timestamp; // upserting the staking schedule whether user is already staking or not
        trenchIndex[msg.sender] = trenches.length - 1;
        emit Stake(msg.sender, amount);
    }

    function unstake(uint256 amount) external {
        require(
            stakingBalanceLp[msg.sender] >= amount, 
            "Nothing to unstake"
        );

        uint256 lpFeeValue = amount * FEE / 1000;
        uint256 lpTransferValue = amount - lpFeeValue;
        uint256 formTransferValue = getUsersYieldAmount(msg.sender);

        lpToken.transfer(msg.sender, lpTransferValue); // transfer LP tokens
        formToken.transfer(msg.sender, formTransferValue); // transfer FORM tokens
        yieldBalance[msg.sender] = 0;
        FEE_BALANCE += lpFeeValue;
        startTime[msg.sender] = block.timestamp;
        stakingBalanceLp[msg.sender] -= amount;
        uint256 stakingFORMBalance = getStakingBalance(amount);
        stakingBalanceReward[msg.sender] -= stakingFORMBalance;
        trenchIndex[msg.sender] = trenches.length - 1;

        emit Unstake(msg.sender, amount);
    }
    
    function withdrawYield() external {
        uint256 yieldEarned = getUsersYieldAmount(msg.sender);
        require(yieldEarned > 0, "Nothing to withdraw");

        uint256 transferValue = yieldEarned;

        formToken.transfer(msg.sender, transferValue);

        startTime[msg.sender] = block.timestamp;
        yieldBalance[msg.sender] = 0;
        trenchIndex[msg.sender] = trenches.length - 1;

        emit YieldWithdraw(msg.sender, transferValue);
    }

    function withdrawFee() external {
        require(FEE_BALANCE > 0, "Nothing to withdraw");
        require(msg.sender == FEE_TO, 'FORBIDDEN');
        uint256 transferValue = FEE_BALANCE;
        lpToken.transfer(msg.sender, transferValue);
        FEE_BALANCE = 0;
        emit FeeWithdraw(msg.sender, transferValue);
    }
}

File 2 of 8 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 3 of 8 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 4 of 8 : FormToken.sol
//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.4;

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

contract FormToken is ERC20, Ownable {

    constructor() ERC20("FormToken", "FORM") {}

    function mint(address to, uint256 amount) public onlyOwner {
        _mint(to, amount);
    }

    function _transferOwnership(address newOwner) public onlyOwner {
        transferOwnership(newOwner);
    }
}

File 5 of 8 : LPToken.sol
//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.4;

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

contract LPToken is ERC20, Ownable {

    constructor() ERC20("FORM-LP", "FORM-LP") {}

    function mint(address to, uint256 amount) public onlyOwner {
        _mint(to, amount);
    }

    function _transferOwnership(address newOwner) public onlyOwner {
        transferOwnership(newOwner);
    }
}

File 6 of 8 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 7 of 8 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

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

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

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

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

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

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

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

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

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

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

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

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

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

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC20.sol";

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract FormToken","name":"_formToken","type":"address"},{"internalType":"contract LPToken","name":"_lpToken","type":"address"},{"internalType":"uint256","name":"initialAPR","type":"uint256"},{"internalType":"uint256","name":"initialMultiplier","type":"uint256"},{"internalType":"address","name":"_feeToSetter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FeeWithdraw","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":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"YieldWithdraw","type":"event"},{"inputs":[],"name":"BASE_APR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"formToken","outputs":[{"internalType":"contract FormToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAPRValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUsersYieldAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpToken","outputs":[{"internalType":"contract LPToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"feeTo","type":"address"}],"name":"sendFeeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSetter","type":"address"}],"name":"setFeeToSetter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMultiplier","type":"uint256"}],"name":"setMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakingBalanceLp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakingBalanceReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"trenchIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"trenches","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawYield","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"yieldBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60806040526003805560006004556301e13380600755670de0b6b3a76400006008553480156200002e57600080fd5b5060405162001731380380620017318339810160408190526200005191620001ab565b6200005c3362000101565b601080546001600160a01b038088166001600160a01b031992831617909255600f805487841690831617905560018590556002849055600680549284169282168317905560058054909116909117905560408051808201909152428152600e9060208101620000cc858762000213565b9052815460018101835560009283526020909220620000f5926002908102909101919062000151565b50505050505062000258565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b826002810192821562000182579160200282015b828111156200018257825182559160200191906001019062000165565b506200019092915062000194565b5090565b5b8082111562000190576000815560010162000195565b600080600080600060a08688031215620001c3578081fd5b8551620001d0816200023f565b6020870151909550620001e3816200023f565b809450506040860151925060608601519150608086015162000205816200023f565b809150509295509295909350565b60008160001904831182151516156200023a57634e487b7160e01b81526011600452602481fd5b500290565b6001600160a01b03811681146200025557600080fd5b50565b6114c980620002686000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80639c2d8853116100de578063d9f582f911610097578063e941fa7811610071578063e941fa781461031c578063eec3248e14610324578063f2fde38b14610337578063fffd343e1461034a57600080fd5b8063d9f582f9146102f8578063e4fd18c91461030b578063e507a8a41461031457600080fd5b80639c2d885314610281578063a2e74af6146102a1578063a694fc3a146102b4578063c5710a82146102c7578063c57981b5146102e7578063ced72f87146102f057600080fd5b8063641579a611610130578063641579a61461021a57806369fe0e2d1461022d5780636e1dc66e14610240578063715018a6146102605780638da5cb5b1461026857806390d8c2631461027957600080fd5b8063059f8b16146101785780630d17b90114610194578063280e8395146101bf5780632d6948fd146101d25780632e17de78146101f25780635fcbd28514610207575b600080fd5b61018160025481565b6040519081526020015b60405180910390f35b6010546101a7906001600160a01b031681565b6040516001600160a01b03909116815260200161018b565b6101816101cd36600461137b565b61036a565b6101816101e03660046112fd565b600d6020526000908152604090205481565b61020561020036600461134b565b61039f565b005b600f546101a7906001600160a01b031681565b61020561022836600461134b565b61062e565b61020561023b36600461134b565b6106ad565b61018161024e3660046112fd565b600b6020526000908152604090205481565b6102056106dc565b6000546001600160a01b03166101a7565b610181610712565b61018161028f3660046112fd565b600a6020526000908152604090205481565b6102056102af3660046112fd565b610729565b6102056102c236600461134b565b610775565b6101816102d53660046112fd565b600c6020526000908152604090205481565b61018160035481565b600454610181565b6101816103063660046112fd565b6109d3565b61018160015481565b610205610a69565b610205610bb3565b6102056103323660046112fd565b610cef565b6102056103453660046112fd565b610d3b565b6101816103583660046112fd565b60096020526000908152604090205481565b600e828154811061037a57600080fd5b9060005260206000209060020201816002811061039657600080fd5b01549150829050565b336000908152600a60205260409020548111156103f85760405162461bcd60e51b81526020600482015260126024820152714e6f7468696e6720746f20756e7374616b6560701b60448201526064015b60405180910390fd5b60006103e86003548361040b919061142c565b610415919061140c565b90506000610423828461144b565b90506000610430336109d3565b600f5460405163a9059cbb60e01b8152336004820152602481018590529192506001600160a01b03169063a9059cbb90604401602060405180830381600087803b15801561047d57600080fd5b505af1158015610491573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b5919061132b565b5060105460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b15801561050257600080fd5b505af1158015610516573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053a919061132b565b50336000908152600c602052604081208190556004805485929061055f9084906113f4565b9091555050336000908152600b60209081526040808320429055600a9091528120805486929061059090849061144b565b90915550600090506105a185610dd6565b336000908152600960205260408120805492935083929091906105c590849061144b565b9091555050600e546105d99060019061144b565b336000818152600d6020526040908190209290925590517f85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd9061061f9088815260200190565b60405180910390a25050505050565b6000546001600160a01b031633146106585760405162461bcd60e51b81526004016103ef906113bf565b80600281905550600e6040518060400160405280428152602001600254600154610682919061142c565b90528154600181018355600092835260209092206106a992600290810290910191906112aa565b5050565b6000546001600160a01b031633146106d75760405162461bcd60e51b81526004016103ef906113bf565b600355565b6000546001600160a01b031633146107065760405162461bcd60e51b81526004016103ef906113bf565b6107106000610f26565b565b6000600254600154610724919061142c565b905090565b6006546001600160a01b031633146107535760405162461bcd60e51b81526004016103ef9061139c565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6000811180156107fe5750600f546040516370a0823160e01b815233600482015282916001600160a01b0316906370a082319060240160206040518083038186803b1580156107c357600080fd5b505afa1580156107d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fb9190611363565b10155b61084a5760405162461bcd60e51b815260206004820152601c60248201527f596f752063616e6e6f74207374616b65207a65726f20746f6b656e730000000060448201526064016103ef565b336000908152600a60205260409020541561087c57600061086a336109d3565b336000908152600c6020526040902055505b600f546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b1580156108ce57600080fd5b505af11580156108e2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610906919061132b565b50336000908152600a6020526040812080548392906109269084906113f4565b909155506000905061093782610dd6565b3360009081526009602052604081208054929350839290919061095b9084906113f4565b9091555050336000908152600b60205260409020429055600e546109819060019061144b565b336000818152600d6020526040908190209290925590517febedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a906109c79085815260200190565b60405180910390a25050565b6001600160a01b0381166000908152600a6020526040812054610a385760405162461bcd60e51b815260206004820152601b60248201527f596f7520646f206e6f74207374616b6520616e7920746f6b656e73000000000060448201526064016103ef565b6000610a4383610f76565b336000908152600c6020526040812054919250610a6082846113f4565b95945050505050565b6000610a74336109d3565b905060008111610abc5760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b60448201526064016103ef565b60105460405163a9059cbb60e01b81523360048201526024810183905282916001600160a01b03169063a9059cbb90604401602060405180830381600087803b158015610b0857600080fd5b505af1158015610b1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b40919061132b565b50336000908152600b60209081526040808320429055600c909152812055600e54610b6d9060019061144b565b336000818152600d6020526040908190209290925590517f92044e3943309ee5950e21bc7421d02c1df75f0df33c0d97c1143687b49a4c57906109c79084815260200190565b600060045411610bfb5760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b60448201526064016103ef565b6005546001600160a01b03163314610c255760405162461bcd60e51b81526004016103ef9061139c565b60048054600f5460405163a9059cbb60e01b815233938101939093526024830182905290916001600160a01b039091169063a9059cbb90604401602060405180830381600087803b158015610c7957600080fd5b505af1158015610c8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb1919061132b565b50600060045560405181815233907fb28509e7b62b3347888ca8147b67de29ff057a5a187185b272fb9a4ccb0f7fa19060200160405180910390a250565b6006546001600160a01b03163314610d195760405162461bcd60e51b81526004016103ef9061139c565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610d655760405162461bcd60e51b81526004016103ef906113bf565b6001600160a01b038116610dca5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103ef565b610dd381610f26565b50565b600080600f60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e2757600080fd5b505afa158015610e3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5f9190611363565b601054600f546040516370a0823160e01b81526001600160a01b0391821660048201529293506000929116906370a082319060240160206040518083038186803b158015610eac57600080fd5b505afa158015610ec0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee49190611363565b905060008260085486610ef7919061142c565b610f01919061140c565b610f0c83600261142c565b610f16919061142c565b905060085481610a60919061140c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600d6020526040812054429082905b600e548110156112a257600e54600090610faf8360016113f4565b141561106c57600e8281548110610fd657634e487b7160e01b600052603260045260246000fd5b60009182526020822060029091020101546001600160a01b0387166000908152600b60205260409020541115611030576001600160a01b0386166000908152600b6020526040902054611029908561144b565b90506111bf565b600e828154811061105157634e487b7160e01b600052603260045260246000fd5b6000918252602082206002909102010154611029908561144b565b600e6110798360016113f4565b8154811061109757634e487b7160e01b600052603260045260246000fd5b60009182526020822060029091020101546001600160a01b0387166000908152600b6020526040902054106110cc5750611290565b6001600160a01b0386166000908152600b6020526040812054600e6110f28560016113f4565b8154811061111057634e487b7160e01b600052603260045260246000fd5b600091825260208220600290910201015461112b919061144b565b90506000600e848154811061115057634e487b7160e01b600052603260045260246000fd5b6000918252602082206002909102010154600e61116e8660016113f4565b8154811061118c57634e487b7160e01b600052603260045260246000fd5b60009182526020822060029091020101546111a7919061144b565b90508082106111b8578092506111bc565b8192505b50505b6000606482600754600854600e87815481106111eb57634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160016002811061121957634e487b7160e01b600052603260045260246000fd5b0154611225919061142c565b61122f919061140c565b611239919061142c565b611243919061140c565b6001600160a01b0388166000908152600960205260408120549192509061126b90839061142c565b905060006008548261127d919061140c565b905061128981876113f4565b9550505050505b8061129a81611462565b915050610f94565b509392505050565b82600281019282156112d8579160200282015b828111156112d85782518255916020019190600101906112bd565b506112e49291506112e8565b5090565b5b808211156112e457600081556001016112e9565b60006020828403121561130e578081fd5b81356001600160a01b0381168114611324578182fd5b9392505050565b60006020828403121561133c578081fd5b81518015158114611324578182fd5b60006020828403121561135c578081fd5b5035919050565b600060208284031215611374578081fd5b5051919050565b6000806040838503121561138d578081fd5b50508035926020909101359150565b6020808252600990820152682327a92124a22222a760b91b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600082198211156114075761140761147d565b500190565b60008261142757634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156114465761144661147d565b500290565b60008282101561145d5761145d61147d565b500390565b60006000198214156114765761147661147d565b5060010190565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220fc92f8ac112f0b0ba3f8bc13bb370f93c8958900db7f6eaed218bb08a368ba7364736f6c6343000804003300000000000000000000000021381e026ad6d8266244f2a583b35f9e4413fa2a000000000000000000000000b058b2612d4cd6e548438b10cb57371bbae133280000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000005400000000000000000000000098a8f350853a1451d7e961480c1fbfdac39f8efc

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101735760003560e01c80639c2d8853116100de578063d9f582f911610097578063e941fa7811610071578063e941fa781461031c578063eec3248e14610324578063f2fde38b14610337578063fffd343e1461034a57600080fd5b8063d9f582f9146102f8578063e4fd18c91461030b578063e507a8a41461031457600080fd5b80639c2d885314610281578063a2e74af6146102a1578063a694fc3a146102b4578063c5710a82146102c7578063c57981b5146102e7578063ced72f87146102f057600080fd5b8063641579a611610130578063641579a61461021a57806369fe0e2d1461022d5780636e1dc66e14610240578063715018a6146102605780638da5cb5b1461026857806390d8c2631461027957600080fd5b8063059f8b16146101785780630d17b90114610194578063280e8395146101bf5780632d6948fd146101d25780632e17de78146101f25780635fcbd28514610207575b600080fd5b61018160025481565b6040519081526020015b60405180910390f35b6010546101a7906001600160a01b031681565b6040516001600160a01b03909116815260200161018b565b6101816101cd36600461137b565b61036a565b6101816101e03660046112fd565b600d6020526000908152604090205481565b61020561020036600461134b565b61039f565b005b600f546101a7906001600160a01b031681565b61020561022836600461134b565b61062e565b61020561023b36600461134b565b6106ad565b61018161024e3660046112fd565b600b6020526000908152604090205481565b6102056106dc565b6000546001600160a01b03166101a7565b610181610712565b61018161028f3660046112fd565b600a6020526000908152604090205481565b6102056102af3660046112fd565b610729565b6102056102c236600461134b565b610775565b6101816102d53660046112fd565b600c6020526000908152604090205481565b61018160035481565b600454610181565b6101816103063660046112fd565b6109d3565b61018160015481565b610205610a69565b610205610bb3565b6102056103323660046112fd565b610cef565b6102056103453660046112fd565b610d3b565b6101816103583660046112fd565b60096020526000908152604090205481565b600e828154811061037a57600080fd5b9060005260206000209060020201816002811061039657600080fd5b01549150829050565b336000908152600a60205260409020548111156103f85760405162461bcd60e51b81526020600482015260126024820152714e6f7468696e6720746f20756e7374616b6560701b60448201526064015b60405180910390fd5b60006103e86003548361040b919061142c565b610415919061140c565b90506000610423828461144b565b90506000610430336109d3565b600f5460405163a9059cbb60e01b8152336004820152602481018590529192506001600160a01b03169063a9059cbb90604401602060405180830381600087803b15801561047d57600080fd5b505af1158015610491573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b5919061132b565b5060105460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b15801561050257600080fd5b505af1158015610516573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053a919061132b565b50336000908152600c602052604081208190556004805485929061055f9084906113f4565b9091555050336000908152600b60209081526040808320429055600a9091528120805486929061059090849061144b565b90915550600090506105a185610dd6565b336000908152600960205260408120805492935083929091906105c590849061144b565b9091555050600e546105d99060019061144b565b336000818152600d6020526040908190209290925590517f85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd9061061f9088815260200190565b60405180910390a25050505050565b6000546001600160a01b031633146106585760405162461bcd60e51b81526004016103ef906113bf565b80600281905550600e6040518060400160405280428152602001600254600154610682919061142c565b90528154600181018355600092835260209092206106a992600290810290910191906112aa565b5050565b6000546001600160a01b031633146106d75760405162461bcd60e51b81526004016103ef906113bf565b600355565b6000546001600160a01b031633146107065760405162461bcd60e51b81526004016103ef906113bf565b6107106000610f26565b565b6000600254600154610724919061142c565b905090565b6006546001600160a01b031633146107535760405162461bcd60e51b81526004016103ef9061139c565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6000811180156107fe5750600f546040516370a0823160e01b815233600482015282916001600160a01b0316906370a082319060240160206040518083038186803b1580156107c357600080fd5b505afa1580156107d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fb9190611363565b10155b61084a5760405162461bcd60e51b815260206004820152601c60248201527f596f752063616e6e6f74207374616b65207a65726f20746f6b656e730000000060448201526064016103ef565b336000908152600a60205260409020541561087c57600061086a336109d3565b336000908152600c6020526040902055505b600f546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b1580156108ce57600080fd5b505af11580156108e2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610906919061132b565b50336000908152600a6020526040812080548392906109269084906113f4565b909155506000905061093782610dd6565b3360009081526009602052604081208054929350839290919061095b9084906113f4565b9091555050336000908152600b60205260409020429055600e546109819060019061144b565b336000818152600d6020526040908190209290925590517febedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a906109c79085815260200190565b60405180910390a25050565b6001600160a01b0381166000908152600a6020526040812054610a385760405162461bcd60e51b815260206004820152601b60248201527f596f7520646f206e6f74207374616b6520616e7920746f6b656e73000000000060448201526064016103ef565b6000610a4383610f76565b336000908152600c6020526040812054919250610a6082846113f4565b95945050505050565b6000610a74336109d3565b905060008111610abc5760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b60448201526064016103ef565b60105460405163a9059cbb60e01b81523360048201526024810183905282916001600160a01b03169063a9059cbb90604401602060405180830381600087803b158015610b0857600080fd5b505af1158015610b1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b40919061132b565b50336000908152600b60209081526040808320429055600c909152812055600e54610b6d9060019061144b565b336000818152600d6020526040908190209290925590517f92044e3943309ee5950e21bc7421d02c1df75f0df33c0d97c1143687b49a4c57906109c79084815260200190565b600060045411610bfb5760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b60448201526064016103ef565b6005546001600160a01b03163314610c255760405162461bcd60e51b81526004016103ef9061139c565b60048054600f5460405163a9059cbb60e01b815233938101939093526024830182905290916001600160a01b039091169063a9059cbb90604401602060405180830381600087803b158015610c7957600080fd5b505af1158015610c8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb1919061132b565b50600060045560405181815233907fb28509e7b62b3347888ca8147b67de29ff057a5a187185b272fb9a4ccb0f7fa19060200160405180910390a250565b6006546001600160a01b03163314610d195760405162461bcd60e51b81526004016103ef9061139c565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610d655760405162461bcd60e51b81526004016103ef906113bf565b6001600160a01b038116610dca5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103ef565b610dd381610f26565b50565b600080600f60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e2757600080fd5b505afa158015610e3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5f9190611363565b601054600f546040516370a0823160e01b81526001600160a01b0391821660048201529293506000929116906370a082319060240160206040518083038186803b158015610eac57600080fd5b505afa158015610ec0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee49190611363565b905060008260085486610ef7919061142c565b610f01919061140c565b610f0c83600261142c565b610f16919061142c565b905060085481610a60919061140c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600d6020526040812054429082905b600e548110156112a257600e54600090610faf8360016113f4565b141561106c57600e8281548110610fd657634e487b7160e01b600052603260045260246000fd5b60009182526020822060029091020101546001600160a01b0387166000908152600b60205260409020541115611030576001600160a01b0386166000908152600b6020526040902054611029908561144b565b90506111bf565b600e828154811061105157634e487b7160e01b600052603260045260246000fd5b6000918252602082206002909102010154611029908561144b565b600e6110798360016113f4565b8154811061109757634e487b7160e01b600052603260045260246000fd5b60009182526020822060029091020101546001600160a01b0387166000908152600b6020526040902054106110cc5750611290565b6001600160a01b0386166000908152600b6020526040812054600e6110f28560016113f4565b8154811061111057634e487b7160e01b600052603260045260246000fd5b600091825260208220600290910201015461112b919061144b565b90506000600e848154811061115057634e487b7160e01b600052603260045260246000fd5b6000918252602082206002909102010154600e61116e8660016113f4565b8154811061118c57634e487b7160e01b600052603260045260246000fd5b60009182526020822060029091020101546111a7919061144b565b90508082106111b8578092506111bc565b8192505b50505b6000606482600754600854600e87815481106111eb57634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160016002811061121957634e487b7160e01b600052603260045260246000fd5b0154611225919061142c565b61122f919061140c565b611239919061142c565b611243919061140c565b6001600160a01b0388166000908152600960205260408120549192509061126b90839061142c565b905060006008548261127d919061140c565b905061128981876113f4565b9550505050505b8061129a81611462565b915050610f94565b509392505050565b82600281019282156112d8579160200282015b828111156112d85782518255916020019190600101906112bd565b506112e49291506112e8565b5090565b5b808211156112e457600081556001016112e9565b60006020828403121561130e578081fd5b81356001600160a01b0381168114611324578182fd5b9392505050565b60006020828403121561133c578081fd5b81518015158114611324578182fd5b60006020828403121561135c578081fd5b5035919050565b600060208284031215611374578081fd5b5051919050565b6000806040838503121561138d578081fd5b50508035926020909101359150565b6020808252600990820152682327a92124a22222a760b91b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600082198211156114075761140761147d565b500190565b60008261142757634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156114465761144661147d565b500290565b60008282101561145d5761145d61147d565b500390565b60006000198214156114765761147661147d565b5060010190565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220fc92f8ac112f0b0ba3f8bc13bb370f93c8958900db7f6eaed218bb08a368ba7364736f6c63430008040033

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

00000000000000000000000021381e026ad6d8266244f2a583b35f9e4413fa2a000000000000000000000000b058b2612d4cd6e548438b10cb57371bbae133280000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000005400000000000000000000000098a8f350853a1451d7e961480c1fbfdac39f8efc

-----Decoded View---------------
Arg [0] : _formToken (address): 0x21381e026Ad6d8266244f2A583b35F9E4413FA2a
Arg [1] : _lpToken (address): 0xB058b2612d4cd6e548438b10Cb57371BBaE13328
Arg [2] : initialAPR (uint256): 5
Arg [3] : initialMultiplier (uint256): 84
Arg [4] : _feeToSetter (address): 0x98A8F350853a1451D7E961480c1fBfdaC39F8efC

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000021381e026ad6d8266244f2a583b35f9e4413fa2a
Arg [1] : 000000000000000000000000b058b2612d4cd6e548438b10cb57371bbae13328
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000054
Arg [4] : 00000000000000000000000098a8f350853a1451d7e961480c1fbfdac39f8efc


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.