Contract 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af 1

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x76972d651201c5e8325c448fe6b82a9174a2c9f76a157dce023f819f003a1190Beef In ETH194811932021-10-19 6:45:585 mins ago0xfdbcffdb3dee6577e47d149b8dd466b0a8dd8831 IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af200 FTM0.160473861508
0xc8e416fb412141d2aeb074a6daccc89897e7188377e3c2fa29acdaa9d0c9b1b0Beef Out And Swa...194776512021-10-19 5:46:391 hr 4 mins ago0x51388750ae7e4b55bcc28a800b3a76a492b486e8 IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0 FTM0.189067430934
0x50e4ec9b92e00f8c830eaeb0c50217f4764c4b5e8a4140d94d6543740dd7e243Beef Out And Swa...194767822021-10-19 5:32:301 hr 19 mins ago0x0befe846d1f62cdbf84c161e1dd788d3ff90594f IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0 FTM0.194842777595
0xf114165f13d133b9231c0d6619a91a6647f5bb65c339f9afdfceba84f5534cd1Beef Out And Swa...194760362021-10-19 5:20:441 hr 30 mins ago0x031010be201eca7cb5c4a6726b8a6a2d1895b26f IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0 FTM0.131540908749
0xb7ab522d6665d07a808e172a0de259026553bda0407da1bdd8c4bf86a9130a5eBeef Out And Swa...194756932021-10-19 5:15:101 hr 36 mins ago0x7e2088e6fc6bab05bef02f1fe710e22200ad63bc IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0 FTM0.216898792546
0xd86d2bd50c4b167e99fd165b7e3a320a3474aa8ab3e70f12043ff81c141b8113Beef Out And Swa...194701742021-10-19 3:31:463 hrs 19 mins ago0xf6f478bf60e83f99485e958bb4e60ff1fe2eb95d IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0 FTM0.147518852953
0xd75ef82039692b27a09fa376f2a0a44b0934a97b1c618977de7935a3f7f191d3Beef Out And Swa...194672902021-10-19 2:39:534 hrs 11 mins ago0x217d08049bf68a3bb186257d20f242240299bfa8 IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0 FTM0.147334436689
0x03facb54e56ed888c254653f781a2a083b5c2a974233c080eb7cfa8f1beaa702Beef In194595112021-10-19 0:34:036 hrs 17 mins ago0xd1e36a5012a528b00a4b284995dc02c54d653126 IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0 FTM0.300963914196
0xf154982491a3e310cde3ed7f8b04de97d767c0e1a0570f438d339da12b6cd168Beef Out And Swa...194544812021-10-18 23:14:007 hrs 37 mins ago0x8be24c7e074ed966eae736e88f564223ce2dbce0 IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0 FTM0.084242273274
0x1b390cccde39cd44d6c871b46a3a20d4ea5656b8e4931fa3045dbe93b8d3406bBeef Out And Swa...194536762021-10-18 23:03:147 hrs 48 mins ago0x06926f4b46c2bb91de1c2aa7a7e89c55577228d7 IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0 FTM0.10866057525
0x056e6d9fa8f5c0502df9e54068f7c0adaddf10240961c3c3e7966790429ce367Beef Out And Swa...194536142021-10-18 23:02:227 hrs 49 mins ago0x06926f4b46c2bb91de1c2aa7a7e89c55577228d7 IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0 FTM0.10907401423
0x7aaa183ff87e099c4198c0734f5d7022b001119540616629cafa3b54aa5bcf34Beef In194519982021-10-18 22:39:348 hrs 12 mins ago0x2510a06f5fb794e893b273bc662a8a1e1e7c7fe0 IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0 FTM0.094981901779
0xb19ee9948c13f9b8c1bc9d876a4b1d45ac29158f7dcc0e564eb6b7b920238715Beef In ETH194514522021-10-18 22:31:438 hrs 19 mins ago0xef0f6e0a7d8547ddd76a05c797f7815301f251db IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af60.41519126 FTM0.437650893191
0x6cb1beff9f985c2b1e51aaac737297e754844b3c96dca75cb5ee92a360147b49Beef In194512562021-10-18 22:28:328 hrs 23 mins ago0x3c7108fad72aba31e2fa59dfbc458b54f58d9966 IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0 FTM0.3016107
0x669f86353712898e3a826013e488a25e9b952f28252344dbc5094a9da9438289Beef In ETH194508112021-10-18 22:21:388 hrs 29 mins ago0xd3020327e435709d2828fb378b9bf7ae3d759d76 IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af599.36345461 FTM0.14352893624
0xdc59181571ffc8bb6ff491d6044b9b038eca1574f02118423ea6eeb8f1470c8bBeef In ETH194507042021-10-18 22:19:418 hrs 31 mins ago0xe73ee30e15bcea1b902275f74592622a739155aa IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af250.30036096 FTM0.783763432086
0x3c589995422591d6500e2c6521d8cc4a038bad26b2313c7897079cd90482cd85Beef In ETH194466442021-10-18 21:17:179 hrs 34 mins ago0x0befe846d1f62cdbf84c161e1dd788d3ff90594f IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af2,120 FTM0.106324561212
0x732689cd7dd698af1f341c76023d7274867007bdfa4ed6d18cd09c8b0b48145aBeef Out And Swa...194427452021-10-18 20:18:4010 hrs 32 mins ago0xd2ce219b6bc6264798b4e43b7a98f8735587b87f IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0 FTM0.105216767492
0x3bc93d4289d63bdbf4a794cac31caa0d0a43700b27cce5f55de8a5babc1fba7aBeef In194421912021-10-18 20:10:1310 hrs 41 mins ago0xf786b0717f045595c5a3904262b8ef649bd666f2 IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0 FTM0.12119283897
0x8402900207d512cfb77a7e94f36e12653a50943337dc5e0cd54e80e3375dd858Beef Out And Swa...194409372021-10-18 19:53:0810 hrs 58 mins ago0x85b0db4b3097e0d1decc2cb2e21d9e4ac7ec20b6 IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0 FTM0.100467171064
0xf521be530da2b5c176fbfc6de5280d642f64252bd3019b8e8a830c0c16827178Beef In194366212021-10-18 18:53:0911 hrs 58 mins ago0x7afc2d6501686d7e66dda3038c90061ed354b6a4 IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0 FTM0.425701827446
0xee8abd172c8445172919e7f1eade4defe10d7161f57e8f1f7267591857662088Beef Out And Swa...194320992021-10-18 17:46:0913 hrs 5 mins ago0xddbb0d61f6debcfcc65d078f06f5d25277174eaa IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0 FTM0.110849525184
0x002ce91858bce23c022037bc242ace43bee283e9871b995f7a3c28cee4ebd88fBeef In194317382021-10-18 17:40:5313 hrs 10 mins ago0xf9ebfe2b0c205c437214a714a28903859349cede IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0 FTM0.11398724172
0x3c1118db1015b4e5c863bf3375028658e07449fd2ed71081c72dfac993a26906Beef Out And Swa...194314152021-10-18 17:36:5413 hrs 14 mins ago0x7a57fa6b29796c4f329171fbc771fd941ad434a1 IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0 FTM0.124943310944
0x7a6d1384edd09f32e56090e4d43f35cb93f10ebf967a0d6a726e39c2e9265625Beef In ETH194296492021-10-18 17:12:0213 hrs 39 mins ago0x7c8a67066d646e042c8fe457bda0bcaae10aca94 IN  0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af1,044 FTM0.167127813099
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x76972d651201c5e8325c448fe6b82a9174a2c9f76a157dce023f819f003a1190194811932021-10-19 6:45:585 mins ago 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0xfdbcffdb3dee6577e47d149b8dd466b0a8dd88310.000099085406080725 FTM
0x76972d651201c5e8325c448fe6b82a9174a2c9f76a157dce023f819f003a1190194811932021-10-19 6:45:585 mins ago Fantom Finance: Wrapped Fantom Token 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0.000099085406080725 FTM
0x76972d651201c5e8325c448fe6b82a9174a2c9f76a157dce023f819f003a1190194811932021-10-19 6:45:585 mins ago 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af Fantom Finance: Wrapped Fantom Token200 FTM
0x76972d651201c5e8325c448fe6b82a9174a2c9f76a157dce023f819f003a1190194811932021-10-19 6:45:585 mins ago 0xfdbcffdb3dee6577e47d149b8dd466b0a8dd8831 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af200 FTM
0xc8e416fb412141d2aeb074a6daccc89897e7188377e3c2fa29acdaa9d0c9b1b0194776512021-10-19 5:46:391 hr 4 mins ago 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0x51388750ae7e4b55bcc28a800b3a76a492b486e8206.698933048100583665 FTM
0xc8e416fb412141d2aeb074a6daccc89897e7188377e3c2fa29acdaa9d0c9b1b0194776512021-10-19 5:46:391 hr 4 mins ago Fantom Finance: Wrapped Fantom Token 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af206.698933048100583665 FTM
0x50e4ec9b92e00f8c830eaeb0c50217f4764c4b5e8a4140d94d6543740dd7e243194767822021-10-19 5:32:301 hr 19 mins ago 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0x0befe846d1f62cdbf84c161e1dd788d3ff90594f2,144.473230546453690109 FTM
0x50e4ec9b92e00f8c830eaeb0c50217f4764c4b5e8a4140d94d6543740dd7e243194767822021-10-19 5:32:301 hr 19 mins ago Fantom Finance: Wrapped Fantom Token 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af2,144.473230546453690109 FTM
0xf114165f13d133b9231c0d6619a91a6647f5bb65c339f9afdfceba84f5534cd1194760362021-10-19 5:20:441 hr 30 mins ago 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0x031010be201eca7cb5c4a6726b8a6a2d1895b26f2,902.03299032313061713 FTM
0xf114165f13d133b9231c0d6619a91a6647f5bb65c339f9afdfceba84f5534cd1194760362021-10-19 5:20:441 hr 30 mins ago Fantom Finance: Wrapped Fantom Token 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af2,902.03299032313061713 FTM
0xb7ab522d6665d07a808e172a0de259026553bda0407da1bdd8c4bf86a9130a5e194756932021-10-19 5:15:101 hr 36 mins ago 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0x7e2088e6fc6bab05bef02f1fe710e22200ad63bc227.327351924334673015 FTM
0xb7ab522d6665d07a808e172a0de259026553bda0407da1bdd8c4bf86a9130a5e194756932021-10-19 5:15:101 hr 36 mins ago Fantom Finance: Wrapped Fantom Token 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af227.327351924334673015 FTM
0xd86d2bd50c4b167e99fd165b7e3a320a3474aa8ab3e70f12043ff81c141b8113194701742021-10-19 3:31:463 hrs 19 mins ago 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0xf6f478bf60e83f99485e958bb4e60ff1fe2eb95d169.97032276811988956 FTM
0xd86d2bd50c4b167e99fd165b7e3a320a3474aa8ab3e70f12043ff81c141b8113194701742021-10-19 3:31:463 hrs 19 mins ago Fantom Finance: Wrapped Fantom Token 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af169.97032276811988956 FTM
0xd75ef82039692b27a09fa376f2a0a44b0934a97b1c618977de7935a3f7f191d3194672902021-10-19 2:39:534 hrs 11 mins ago 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0x217d08049bf68a3bb186257d20f242240299bfa82.792573271671374861 FTM
0xd75ef82039692b27a09fa376f2a0a44b0934a97b1c618977de7935a3f7f191d3194672902021-10-19 2:39:534 hrs 11 mins ago Fantom Finance: Wrapped Fantom Token 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af2.792573271671374861 FTM
0xf154982491a3e310cde3ed7f8b04de97d767c0e1a0570f438d339da12b6cd168194544812021-10-18 23:14:007 hrs 37 mins ago 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0x8be24c7e074ed966eae736e88f564223ce2dbce0576.978062937420888192 FTM
0xf154982491a3e310cde3ed7f8b04de97d767c0e1a0570f438d339da12b6cd168194544812021-10-18 23:14:007 hrs 37 mins ago Fantom Finance: Wrapped Fantom Token 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af576.978062937420888192 FTM
0x1b390cccde39cd44d6c871b46a3a20d4ea5656b8e4931fa3045dbe93b8d3406b194536762021-10-18 23:03:147 hrs 48 mins ago 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0x06926f4b46c2bb91de1c2aa7a7e89c55577228d73.257236533783637875 FTM
0x1b390cccde39cd44d6c871b46a3a20d4ea5656b8e4931fa3045dbe93b8d3406b194536762021-10-18 23:03:147 hrs 48 mins ago Fantom Finance: Wrapped Fantom Token 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af3.257236533783637875 FTM
0x056e6d9fa8f5c0502df9e54068f7c0adaddf10240961c3c3e7966790429ce367194536142021-10-18 23:02:227 hrs 49 mins ago 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0x06926f4b46c2bb91de1c2aa7a7e89c55577228d74.790011041178354253 FTM
0x056e6d9fa8f5c0502df9e54068f7c0adaddf10240961c3c3e7966790429ce367194536142021-10-18 23:02:227 hrs 49 mins ago Fantom Finance: Wrapped Fantom Token 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af4.790011041178354253 FTM
0xb19ee9948c13f9b8c1bc9d876a4b1d45ac29158f7dcc0e564eb6b7b920238715194514522021-10-18 22:31:438 hrs 19 mins ago 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0xef0f6e0a7d8547ddd76a05c797f7815301f251db0.000029512152294999 FTM
0xb19ee9948c13f9b8c1bc9d876a4b1d45ac29158f7dcc0e564eb6b7b920238715194514522021-10-18 22:31:438 hrs 19 mins ago Fantom Finance: Wrapped Fantom Token 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af0.000029512152294999 FTM
0xb19ee9948c13f9b8c1bc9d876a4b1d45ac29158f7dcc0e564eb6b7b920238715194514522021-10-18 22:31:438 hrs 19 mins ago 0x8afc0f9bdc5dca9f0408df03a03520bfa98a15af Fantom Finance: Wrapped Fantom Token60.41519126 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BeefyUniV2Zap

Compiler Version
v0.7.0+commit.9e61f92b

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at FtmScan.com on 2021-05-26
*/

// SPDX-License-Identifier: MIT
// File: contracts/BIFI/zap/IUniswapV2Pair.sol

pragma solidity >=0.5.0;

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

// File: contracts/BIFI/zap/Babylonian.sol


pragma solidity >=0.4.0;

// computes square roots using the babylonian method
// https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method
library Babylonian {
    // credit for this implementation goes to
    // https://github.com/abdk-consulting/abdk-libraries-solidity/blob/master/ABDKMath64x64.sol#L687
    function sqrt(uint256 x) internal pure returns (uint256) {
        if (x == 0) return 0;
        // this block is equivalent to r = uint256(1) << (BitMath.mostSignificantBit(x) / 2);
        // however that code costs significantly more gas
        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 (r < r1 ? r : r1);
    }
}

// File: contracts/BIFI/zap/IERC20.sol


pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

// File: contracts/BIFI/zap/SafeMath.sol


pragma solidity >=0.6.0 <0.8.0;

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

// File: contracts/BIFI/zap/Address.sol


pragma solidity >=0.6.2 <0.8.0;

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

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

// File: contracts/BIFI/zap/SafeERC20.sol


pragma solidity >=0.6.0 <0.8.0;




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

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

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

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

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

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

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

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

// File: contracts/BIFI/zap/LowGasSafeMath.sol

pragma solidity >=0.7.0;

/// @title Optimized overflow and underflow safe math operations
/// @notice Contains methods for doing math operations that revert on overflow or underflow for minimal gas cost
library LowGasSafeMath {
    /// @notice Returns x + y, reverts if sum overflows uint256
    /// @param x The augend
    /// @param y The addend
    /// @return z The sum of x and y
    function add(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require((z = x + y) >= x);
    }

    /// @notice Returns x - y, reverts if underflows
    /// @param x The minuend
    /// @param y The subtrahend
    /// @return z The difference of x and y
    function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require((z = x - y) <= x);
    }

    /// @notice Returns x * y, reverts if overflows
    /// @param x The multiplicand
    /// @param y The multiplier
    /// @return z The product of x and y
    function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require(x == 0 || (z = x * y) / x == y);
    }

    /// @notice Returns x + y, reverts if overflows or underflows
    /// @param x The augend
    /// @param y The addend
    /// @return z The sum of x and y
    function add(int256 x, int256 y) internal pure returns (int256 z) {
        require((z = x + y) >= x == (y >= 0));
    }

    /// @notice Returns x - y, reverts if overflows or underflows
    /// @param x The minuend
    /// @param y The subtrahend
    /// @return z The difference of x and y
    function sub(int256 x, int256 y) internal pure returns (int256 z) {
        require((z = x - y) <= x == (y >= 0));
    }
}

// File: contracts/BIFI/zap/IUniswapV2Router01.sol

pragma solidity >=0.6.2;

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

// File: contracts/BIFI/zap/IUniswapV2Router02.sol

pragma solidity >=0.6.2;


interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

// File: contracts/BIFI/zap/BeefyUniV2Zap.sol


// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.

// @author Wivern for Beefy.Finance
// @notice This contract adds liquidity to Uniswap V2 compatible liquidity pair pools and stake.

pragma solidity >=0.7.0;






interface IWETH is IERC20 {
    function deposit() external payable;
    function withdraw(uint256 wad) external;
}

interface IBeefyVaultV6 is IERC20 {
    function deposit(uint256 amount) external;
    function withdraw(uint256 shares) external;
    function want() external pure returns (address);
}

contract BeefyUniV2Zap {
    using LowGasSafeMath for uint256;
    using SafeERC20 for IERC20;
    using SafeERC20 for IBeefyVaultV6;

    IUniswapV2Router02 public immutable router;
    address public immutable WETH;
    uint256 public constant minimumAmount = 1000;

    constructor(address _router, address _WETH) {
        router = IUniswapV2Router02(_router);
        WETH = _WETH;
    }

    receive() external payable {
        assert(msg.sender == WETH);
    }

    function beefInETH (address beefyVault, uint256 tokenAmountOutMin) external payable {
        require(msg.value >= minimumAmount, 'Beefy: Insignificant input amount');

        IWETH(WETH).deposit{value: msg.value}();

        _swapAndStake(beefyVault, tokenAmountOutMin, WETH);
    }

    function beefIn (address beefyVault, uint256 tokenAmountOutMin, address tokenIn, uint256 tokenInAmount) external {
        require(tokenInAmount >= minimumAmount, 'Beefy: Insignificant input amount');
        require(IERC20(tokenIn).allowance(msg.sender, address(this)) >= tokenInAmount, 'Beefy: Input token is not approved');

        IERC20(tokenIn).safeTransferFrom(msg.sender, address(this), tokenInAmount);

        _swapAndStake(beefyVault, tokenAmountOutMin, tokenIn);
    }

    function beefOut (address beefyVault, uint256 withdrawAmount) external {
        (IBeefyVaultV6 vault, IUniswapV2Pair pair) = _getVaultPair(beefyVault);

        IERC20(beefyVault).safeTransferFrom(msg.sender, address(this), withdrawAmount);
        vault.withdraw(withdrawAmount);

        if (pair.token0() != WETH && pair.token1() != WETH) {
            return _removeLiqudity(address(pair), msg.sender);
        }

        _removeLiqudity(address(pair), address(this));

        address[] memory tokens = new address[](2);
        tokens[0] = pair.token0();
        tokens[1] = pair.token1();

        _returnAssets(tokens);
    }

    function beefOutAndSwap(address beefyVault, uint256 withdrawAmount, address desiredToken, uint256 desiredTokenOutMin) external {
        (IBeefyVaultV6 vault, IUniswapV2Pair pair) = _getVaultPair(beefyVault);
        address token0 = pair.token0();
        address token1 = pair.token1();
        require(token0 == desiredToken || token1 == desiredToken, 'Beefy: desired token not present in liqudity pair');

        vault.safeTransferFrom(msg.sender, address(this), withdrawAmount);
        vault.withdraw(withdrawAmount);
        _removeLiqudity(address(pair), address(this));

        address swapToken = token1 == desiredToken ? token0 : token1;
        address[] memory path = new address[](2);
        path[0] = swapToken;
        path[1] = desiredToken;

        _approveTokenIfNeeded(path[0], address(router));
        router.swapExactTokensForTokens(IERC20(swapToken).balanceOf(address(this)), desiredTokenOutMin, path, address(this), block.timestamp);

        _returnAssets(path);
    }

    function _removeLiqudity(address pair, address to) private {
        IERC20(pair).safeTransfer(pair, IERC20(pair).balanceOf(address(this)));
        (uint256 amount0, uint256 amount1) = IUniswapV2Pair(pair).burn(to);

        require(amount0 >= minimumAmount, 'UniswapV2Router: INSUFFICIENT_A_AMOUNT');
        require(amount1 >= minimumAmount, 'UniswapV2Router: INSUFFICIENT_B_AMOUNT');
    }

    function _getVaultPair (address beefyVault) private view returns (IBeefyVaultV6 vault, IUniswapV2Pair pair) {
        vault = IBeefyVaultV6(beefyVault);
        pair = IUniswapV2Pair(vault.want());
        require(pair.factory() == router.factory(), 'Beefy: Incompatible liquidity pair factory');
    }

    function _swapAndStake(address beefyVault, uint256 tokenAmountOutMin, address tokenIn) private {
        (IBeefyVaultV6 vault, IUniswapV2Pair pair) = _getVaultPair(beefyVault);

        (uint256 reserveA, uint256 reserveB,) = pair.getReserves();
        require(reserveA > minimumAmount && reserveB > minimumAmount, 'Beefy: Liquidity pair reserves too low');

        bool isInputA = pair.token0() == tokenIn;
        require(isInputA || pair.token1() == tokenIn, 'Beefy: Input token not present in liqudity pair');

        address[] memory path = new address[](2);
        path[0] = tokenIn;
        path[1] = isInputA ? pair.token1() : pair.token0();

        uint256 fullInvestment = IERC20(tokenIn).balanceOf(address(this));
        uint256 swapAmountIn;
        if (isInputA) {
            swapAmountIn = _getSwapAmount(fullInvestment, reserveA, reserveB);
        } else {
            swapAmountIn = _getSwapAmount(fullInvestment, reserveB, reserveA);
        }

        _approveTokenIfNeeded(path[0], address(router));
        uint256[] memory swapedAmounts = router
            .swapExactTokensForTokens(swapAmountIn, tokenAmountOutMin, path, address(this), block.timestamp);

        _approveTokenIfNeeded(path[1], address(router));
        (,, uint256 amountLiquidity) = router
            .addLiquidity(path[0], path[1], fullInvestment.sub(swapedAmounts[0]), swapedAmounts[1], 1, 1, address(this), block.timestamp);

        _approveTokenIfNeeded(address(pair), address(vault));
        vault.deposit(amountLiquidity);

        vault.safeTransfer(msg.sender, vault.balanceOf(address(this)));
        _returnAssets(path);
    }

    function _returnAssets(address[] memory tokens) private {
        uint256 balance;
        for (uint256 i; i < tokens.length; i++) {
            balance = IERC20(tokens[i]).balanceOf(address(this));
            if (balance > 0) {
                if (tokens[i] == WETH) {
                    IWETH(WETH).withdraw(balance);
                    (bool success,) = msg.sender.call{value: balance}(new bytes(0));
                    require(success, 'Beefy: ETH transfer failed');
                } else {
                    IERC20(tokens[i]).safeTransfer(msg.sender, balance);
                }
            }
        }
    }

    function _getSwapAmount(uint256 investmentA, uint256 reserveA, uint256 reserveB) private view returns (uint256 swapAmount) {
        uint256 halfInvestment = investmentA / 2;
        uint256 nominator = router.getAmountOut(halfInvestment, reserveA, reserveB);
        uint256 denominator = router.quote(halfInvestment, reserveA.add(halfInvestment), reserveB.sub(nominator));
        swapAmount = investmentA.sub(Babylonian.sqrt(halfInvestment * halfInvestment * nominator / denominator));
    }

    function estimateSwap(address beefyVault, address tokenIn, uint256 fullInvestmentIn) public view returns(uint256 swapAmountIn, uint256 swapAmountOut, address swapTokenOut) {
        checkWETH();
        (, IUniswapV2Pair pair) = _getVaultPair(beefyVault);

        bool isInputA = pair.token0() == tokenIn;
        require(isInputA || pair.token1() == tokenIn, 'Beefy: Input token not present in liqudity pair');

        (uint256 reserveA, uint256 reserveB,) = pair.getReserves();
        (reserveA, reserveB) = isInputA ? (reserveA, reserveB) : (reserveB, reserveA);

        swapAmountIn = _getSwapAmount(fullInvestmentIn, reserveA, reserveB);
        swapAmountOut = router.getAmountOut(swapAmountIn, reserveA, reserveB);
        swapTokenOut = isInputA ? pair.token1() : pair.token0();
    }

    function checkWETH() public view returns (bool isValid) {
        isValid = WETH == router.WETH();
        require(isValid, 'Beefy: WETH address not matching Router.WETH()');
    }

    function _approveTokenIfNeeded(address token, address spender) private {
        if (IERC20(token).allowance(address(this), spender) == 0) {
            IERC20(token).safeApprove(spender, uint256(~0));
        }
    }

}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_router","type":"address"},{"internalType":"address","name":"_WETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"beefyVault","type":"address"},{"internalType":"uint256","name":"tokenAmountOutMin","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"tokenInAmount","type":"uint256"}],"name":"beefIn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"beefyVault","type":"address"},{"internalType":"uint256","name":"tokenAmountOutMin","type":"uint256"}],"name":"beefInETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"beefyVault","type":"address"},{"internalType":"uint256","name":"withdrawAmount","type":"uint256"}],"name":"beefOut","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"beefyVault","type":"address"},{"internalType":"uint256","name":"withdrawAmount","type":"uint256"},{"internalType":"address","name":"desiredToken","type":"address"},{"internalType":"uint256","name":"desiredTokenOutMin","type":"uint256"}],"name":"beefOutAndSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"checkWETH","outputs":[{"internalType":"bool","name":"isValid","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"beefyVault","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"fullInvestmentIn","type":"uint256"}],"name":"estimateSwap","outputs":[{"internalType":"uint256","name":"swapAmountIn","type":"uint256"},{"internalType":"uint256","name":"swapAmountOut","type":"uint256"},{"internalType":"address","name":"swapTokenOut","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c060405234801561001057600080fd5b50604051612a9e380380612a9e8339818101604052604081101561003357600080fd5b5080516020909101516001600160601b0319606092831b8116608052911b1660a05260805160601c60a05160601c6129cc6100d260003980609a5280610b4d5280610bc65280610c775280610d6b5280610e0c528061101d52806117f752806118445250806104b252806108c152806108e75280610bf252806111665280611210528061134a52806113f65280611e085280611fb252506129cc6000f3fe60806040526004361061008a5760003560e01c8063a28c361b11610059578063a28c361b146101ce578063ad5c464814610207578063bb0c829814610238578063f5d07b601461025f578063f887ea40146102a6576100c3565b80633f2f869a146100c857806351c9cf911461013257806370fae20d146101795780638437fabe146101a5576100c3565b366100c357336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146100c157fe5b005b600080fd5b3480156100d457600080fd5b5061010b600480360360608110156100eb57600080fd5b506001600160a01b038135811691602081013590911690604001356102bb565b6040805193845260208401929092526001600160a01b031682820152519081900360600190f35b34801561013e57600080fd5b506100c16004803603608081101561015557600080fd5b506001600160a01b0381358116916020810135916040820135169060600135610636565b6100c16004803603604081101561018f57600080fd5b506001600160a01b038135169060200135610b0a565b3480156101b157600080fd5b506101ba610bee565b604080519115158252519081900360200190f35b3480156101da57600080fd5b506100c1600480360360408110156101f157600080fd5b506001600160a01b038135169060200135610ce5565b34801561021357600080fd5b5061021c61101b565b604080516001600160a01b039092168252519081900360200190f35b34801561024457600080fd5b5061024d61103f565b60408051918252519081900360200190f35b34801561026b57600080fd5b506100c16004803603608081101561028257600080fd5b506001600160a01b0381358116916020810135916040820135169060600135611045565b3480156102b257600080fd5b5061021c611164565b60008060006102c8610bee565b5060006102d487611188565b9150506000866001600160a01b0316826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561031c57600080fd5b505afa158015610330573d6000803e3d6000fd5b505050506040513d602081101561034657600080fd5b50516001600160a01b031614905080806103d55750866001600160a01b0316826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561039e57600080fd5b505afa1580156103b2573d6000803e3d6000fd5b505050506040513d60208110156103c857600080fd5b50516001600160a01b0316145b6104105760405162461bcd60e51b815260040180806020018281038252602f815260200180612887602f913960400191505060405180910390fd5b600080836001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561044c57600080fd5b505afa158015610460573d6000803e3d6000fd5b505050506040513d606081101561047657600080fd5b5080516020909101516001600160701b0391821693501690508261049b57808261049e565b81815b90925090506104ae88838361133d565b96507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663054d50d48884846040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b15801561052457600080fd5b505afa158015610538573d6000803e3d6000fd5b505050506040513d602081101561054e57600080fd5b50519550826105c157836001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561059057600080fd5b505afa1580156105a4573d6000803e3d6000fd5b505050506040513d60208110156105ba57600080fd5b5051610627565b836001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b1580156105fa57600080fd5b505afa15801561060e573d6000803e3d6000fd5b505050506040513d602081101561062457600080fd5b50515b94505050505093509350939050565b60008061064286611188565b915091506000816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561068157600080fd5b505afa158015610695573d6000803e3d6000fd5b505050506040513d60208110156106ab57600080fd5b50516040805163d21220a760e01b815290519192506000916001600160a01b0385169163d21220a7916004808301926020929190829003018186803b1580156106f357600080fd5b505afa158015610707573d6000803e3d6000fd5b505050506040513d602081101561071d57600080fd5b505190506001600160a01b03828116908716148061074c5750856001600160a01b0316816001600160a01b0316145b6107875760405162461bcd60e51b81526004018080602001828103825260318152602001806128b66031913960400191505060405180910390fd5b61079c6001600160a01b03851633308a6114cb565b836001600160a01b0316632e1a7d4d886040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156107e257600080fd5b505af11580156107f6573d6000803e3d6000fd5b505050506108048330611525565b6000866001600160a01b0316826001600160a01b0316146108255781610827565b825b604080516002808252606080830184529394509091602083019080368337019050509050818160008151811061085957fe5b60200260200101906001600160a01b031690816001600160a01b031681525050878160018151811061088757fe5b60200260200101906001600160a01b031690816001600160a01b0316815250506108e5816000815181106108b757fe5b60200260200101517f00000000000000000000000000000000000000000000000000000000000000006116be565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166338ed1739836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561096157600080fd5b505afa158015610975573d6000803e3d6000fd5b505050506040513d602081101561098b57600080fd5b50516040516001600160e01b031960e084901b16815260048101828152602482018c90523060648301819052426084840181905260a060448501908152885160a486015288518f958a95929160c4909101906020878101910280838360005b83811015610a025781810151838201526020016109ea565b505050509050019650505050505050600060405180830381600087803b158015610a2b57600080fd5b505af1158015610a3f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610a6857600080fd5b8101908080516040519392919084640100000000821115610a8857600080fd5b908301906020820185811115610a9d57600080fd5b8251866020820283011164010000000082111715610aba57600080fd5b82525081516020918201928201910280838360005b83811015610ae7578181015183820152602001610acf565b5050505090500160405250505050610afe81611754565b50505050505050505050565b6103e8341015610b4b5760405162461bcd60e51b81526004018080602001828103825260218152602001806127a46021913960400191505060405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610ba657600080fd5b505af1158015610bba573d6000803e3d6000fd5b5050505050610bea82827f0000000000000000000000000000000000000000000000000000000000000000611a02565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610c4957600080fd5b505afa158015610c5d573d6000803e3d6000fd5b505050506040513d6020811015610c7357600080fd5b50517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03908116911614905080610ce25760405162461bcd60e51b815260040180806020018281038252602e8152602001806127c5602e913960400191505060405180910390fd5b90565b600080610cf184611188565b9092509050610d0b6001600160a01b0385163330866114cb565b816001600160a01b0316632e1a7d4d846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610d5157600080fd5b505af1158015610d65573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610dcc57600080fd5b505afa158015610de0573d6000803e3d6000fd5b505050506040513d6020811015610df657600080fd5b50516001600160a01b031614801590610ea557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610e6d57600080fd5b505afa158015610e81573d6000803e3d6000fd5b505050506040513d6020811015610e9757600080fd5b50516001600160a01b031614155b15610ebb57610eb48133611525565b5050610bea565b610ec58130611525565b6040805160028082526060808301845292602083019080368337019050509050816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610f1e57600080fd5b505afa158015610f32573d6000803e3d6000fd5b505050506040513d6020811015610f4857600080fd5b505181518290600090610f5757fe5b60200260200101906001600160a01b031690816001600160a01b031681525050816001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610fb057600080fd5b505afa158015610fc4573d6000803e3d6000fd5b505050506040513d6020811015610fda57600080fd5b5051815182906001908110610feb57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505061101481611754565b5050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6103e881565b6103e88110156110865760405162461bcd60e51b81526004018080602001828103825260218152602001806127a46021913960400191505060405180910390fd5b60408051636eb1769f60e11b8152336004820152306024820152905182916001600160a01b0385169163dd62ed3e91604480820192602092909190829003018186803b1580156110d557600080fd5b505afa1580156110e9573d6000803e3d6000fd5b505050506040513d60208110156110ff57600080fd5b5051101561113e5760405162461bcd60e51b81526004018080602001828103825260228152602001806128656022913960400191505060405180910390fd5b6111536001600160a01b0383163330846114cb565b61115e848484611a02565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600080829150816001600160a01b0316631f1fcd516040518163ffffffff1660e01b815260040160206040518083038186803b1580156111c757600080fd5b505afa1580156111db573d6000803e3d6000fd5b505050506040513d60208110156111f157600080fd5b50516040805163c45a015560e01b815290519192506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163c45a015591600480820192602092909190829003018186803b15801561125757600080fd5b505afa15801561126b573d6000803e3d6000fd5b505050506040513d602081101561128157600080fd5b50516040805163c45a015560e01b815290516001600160a01b039283169284169163c45a0155916004808301926020929190829003018186803b1580156112c757600080fd5b505afa1580156112db573d6000803e3d6000fd5b505050506040513d60208110156112f157600080fd5b50516001600160a01b0316146113385760405162461bcd60e51b815260040180806020018281038252602a8152602001806128e7602a913960400191505060405180910390fd5b915091565b60008060028504905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663054d50d48387876040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b1580156113bc57600080fd5b505afa1580156113d0573d6000803e3d6000fd5b505050506040513d60208110156113e657600080fd5b5051905060006001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663ad615dec84611426898261220b565b6114308987612221565b6040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b15801561147257600080fd5b505afa158015611486573d6000803e3d6000fd5b505050506040513d602081101561149c57600080fd5b505190506114c06114b9828580028502816114b357fe5b04612231565b8890612221565b979650505050505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261115e908590612379565b6115b382836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561157657600080fd5b505afa15801561158a573d6000803e3d6000fd5b505050506040513d60208110156115a057600080fd5b50516001600160a01b038516919061242a565b600080836001600160a01b03166389afcb44846040518263ffffffff1660e01b815260040180826001600160a01b031681526020019150506040805180830381600087803b15801561160457600080fd5b505af1158015611618573d6000803e3d6000fd5b505050506040513d604081101561162e57600080fd5b50805160209091015190925090506103e882101561167d5760405162461bcd60e51b81526004018080602001828103825260268152602001806129116026913960400191505060405180910390fd5b6103e881101561115e5760405162461bcd60e51b81526004018080602001828103825260268152602001806128196026913960400191505060405180910390fd5b60408051636eb1769f60e11b81523060048201526001600160a01b03838116602483015291519184169163dd62ed3e91604480820192602092909190829003018186803b15801561170e57600080fd5b505afa158015611722573d6000803e3d6000fd5b505050506040513d602081101561173857600080fd5b5051610bea57610bea6001600160a01b0383168260001961247c565b6000805b82518110156119fd5782818151811061176d57fe5b60200260200101516001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156117c157600080fd5b505afa1580156117d5573d6000803e3d6000fd5b505050506040513d60208110156117eb57600080fd5b5051915081156119f5577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031683828151811061182b57fe5b60200260200101516001600160a01b031614156119c4577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156118a857600080fd5b505af11580156118bc573d6000803e3d6000fd5b505060408051600080825260208201928390528151909450339350869290819081908082805b602083106119015780518252601f1990920191602091820191016118e2565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611963576040519150601f19603f3d011682016040523d82523d6000602084013e611968565b606091505b50509050806119be576040805162461bcd60e51b815260206004820152601a60248201527f42656566793a20455448207472616e73666572206661696c6564000000000000604482015290519081900360640190fd5b506119f5565b6119f533838584815181106119d557fe5b60200260200101516001600160a01b031661242a9092919063ffffffff16565b600101611758565b505050565b600080611a0e85611188565b91509150600080826001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611a4e57600080fd5b505afa158015611a62573d6000803e3d6000fd5b505050506040513d6060811015611a7857600080fd5b5080516020909101516001600160701b0391821693501690506103e882118015611aa357506103e881115b611ade5760405162461bcd60e51b81526004018080602001828103825260268152602001806127f36026913960400191505060405180910390fd5b6000856001600160a01b0316846001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611b2357600080fd5b505afa158015611b37573d6000803e3d6000fd5b505050506040513d6020811015611b4d57600080fd5b50516001600160a01b03161490508080611bdc5750856001600160a01b0316846001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015611ba557600080fd5b505afa158015611bb9573d6000803e3d6000fd5b505050506040513d6020811015611bcf57600080fd5b50516001600160a01b0316145b611c175760405162461bcd60e51b815260040180806020018281038252602f815260200180612887602f913960400191505060405180910390fd5b60408051600280825260608083018452926020830190803683370190505090508681600081518110611c4557fe5b60200260200101906001600160a01b031690816001600160a01b03168152505081611cd457846001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611ca357600080fd5b505afa158015611cb7573d6000803e3d6000fd5b505050506040513d6020811015611ccd57600080fd5b5051611d3a565b846001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015611d0d57600080fd5b505afa158015611d21573d6000803e3d6000fd5b505050506040513d6020811015611d3757600080fd5b50515b81600181518110611d4757fe5b6001600160a01b03928316602091820292909201810191909152604080516370a0823160e01b815230600482015290516000938b16926370a082319260248082019391829003018186803b158015611d9e57600080fd5b505afa158015611db2573d6000803e3d6000fd5b505050506040513d6020811015611dc857600080fd5b5051905060008315611de657611ddf82878761133d565b9050611df4565b611df182868861133d565b90505b611e04836000815181106108b757fe5b60607f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166338ed1739838d8730426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611eaa578181015183820152602001611e92565b505050509050019650505050505050600060405180830381600087803b158015611ed357600080fd5b505af1158015611ee7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611f1057600080fd5b8101908080516040519392919084640100000000821115611f3057600080fd5b908301906020820185811115611f4557600080fd5b8251866020820283011164010000000082111715611f6257600080fd5b82525081516020918201928201910280838360005b83811015611f8f578181015183820152602001611f77565b505050509050016040525050509050611fae846001815181106108b757fe5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e8e3370086600081518110611fec57fe5b60200260200101518760018151811061200157fe5b60200260200101516120308660008151811061201957fe5b60200260200101518961222190919063ffffffff16565b8660018151811061203d57fe5b602002602001015160018030426040518963ffffffff1660e01b815260040180896001600160a01b03168152602001886001600160a01b03168152602001878152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200198505050505050505050606060405180830381600087803b1580156120cc57600080fd5b505af11580156120e0573d6000803e3d6000fd5b505050506040513d60608110156120f657600080fd5b50604001519050612107898b6116be565b896001600160a01b031663b6b55f25826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561214d57600080fd5b505af1158015612161573d6000803e3d6000fd5b505050506121f3338b6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156121b657600080fd5b505afa1580156121ca573d6000803e3d6000fd5b505050506040513d60208110156121e057600080fd5b50516001600160a01b038d16919061242a565b6121fc85611754565b50505050505050505050505050565b8082018281101561221b57600080fd5b92915050565b8082038281111561221b57600080fd5b60008161224057506000612374565b816001600160801b82106122595760809190911c9060401b5b6801000000000000000082106122745760409190911c9060201b5b640100000000821061228b5760209190911c9060101b5b6201000082106122a05760109190911c9060081b5b61010082106122b45760089190911c9060041b5b601082106122c75760049190911c9060021b5b600882106122d35760011b5b60018185816122de57fe5b048201901c905060018185816122f057fe5b048201901c9050600181858161230257fe5b048201901c9050600181858161231457fe5b048201901c9050600181858161232657fe5b048201901c9050600181858161233857fe5b048201901c9050600181858161234a57fe5b048201901c9050600081858161235c57fe5b04905080821061236c578061236e565b815b93505050505b919050565b60606123ce826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661258f9092919063ffffffff16565b8051909150156119fd578080602001905160208110156123ed57600080fd5b50516119fd5760405162461bcd60e51b815260040180806020018281038252602a815260200180612937602a913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526119fd908490612379565b801580612502575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156124d457600080fd5b505afa1580156124e8573d6000803e3d6000fd5b505050506040513d60208110156124fe57600080fd5b5051155b61253d5760405162461bcd60e51b81526004018080602001828103825260368152602001806129616036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526119fd908490612379565b606061259e84846000856125a8565b90505b9392505050565b6060824710156125e95760405162461bcd60e51b815260040180806020018281038252602681526020018061283f6026913960400191505060405180910390fd5b6125f2856126f9565b612643576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106126825780518252601f199092019160209182019101612663565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146126e4576040519150601f19603f3d011682016040523d82523d6000602084013e6126e9565b606091505b50915091506114c08282866126ff565b3b151590565b6060831561270e5750816125a1565b82511561271e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612768578181015183820152602001612750565b50505050905090810190601f1680156127955780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe42656566793a20496e7369676e69666963616e7420696e70757420616d6f756e7442656566793a20574554482061646472657373206e6f74206d61746368696e6720526f757465722e57455448282942656566793a204c6971756964697479207061697220726573657276657320746f6f206c6f77556e69737761705632526f757465723a20494e53554646494349454e545f425f414d4f554e54416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c42656566793a20496e70757420746f6b656e206973206e6f7420617070726f76656442656566793a20496e70757420746f6b656e206e6f742070726573656e7420696e206c69717564697479207061697242656566793a206465736972656420746f6b656e206e6f742070726573656e7420696e206c69717564697479207061697242656566793a20496e636f6d70617469626c65206c6971756964697479207061697220666163746f7279556e69737761705632526f757465723a20494e53554646494349454e545f415f414d4f554e545361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212201820f479943c0e522ebeee9f31fc0890ee5b3116243a648fa64579ab7ce5c58e64736f6c63430007000033000000000000000000000000f491e7b69e4244ad4002bc14e878a34207e38c2900000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83

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

000000000000000000000000f491e7b69e4244ad4002bc14e878a34207e38c2900000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83

-----Decoded View---------------
Arg [0] : _router (address): 0xf491e7b69e4244ad4002bc14e878a34207e38c29
Arg [1] : _WETH (address): 0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000f491e7b69e4244ad4002bc14e878a34207e38c29
Arg [1] : 00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83


Deployed ByteCode Sourcemap

30949:7754:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31406:10;-1:-1:-1;;;;;31420:4:0;31406:18;;31399:26;;;;30949:7754;;;;;37469:809;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;37469:809:0;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;-1:-1:-1;;;;;37469:809:0;;;;;;;;;;;;;;32894:1017;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;32894:1017:0;;;;;;;;;;;;;;;;;;;;:::i;31441:290::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;31441:290:0;;;;;;;;:::i;38286:183::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;32235:651;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;32235:651:0;;;;;;;;:::i;31142:29::-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;31142:29:0;;;;;;;;;;;;;;31178:44;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;31739:488;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;31739:488:0;;;;;;;;;;;;;;;;;;;;:::i;31093:42::-;;;;;;;;;;;;;:::i;37469:809::-;37574:20;37596:21;37619:20;37652:11;:9;:11::i;:::-;;37677:19;37700:25;37714:10;37700:13;:25::i;:::-;37674:51;;;37738:13;37771:7;-1:-1:-1;;;;;37754:24:0;:4;-1:-1:-1;;;;;37754:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37754:13:0;-1:-1:-1;;;;;37754:24:0;;;-1:-1:-1;37754:24:0;;37797:36;;;37826:7;-1:-1:-1;;;;;37809:24:0;:4;-1:-1:-1;;;;;37809:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37809:13:0;-1:-1:-1;;;;;37809:24:0;;37797:36;37789:96;;;;-1:-1:-1;;;37789:96:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;37899:16;37917;37938:4;-1:-1:-1;;;;;37938:16:0;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37938:18:0;;;;;;;-1:-1:-1;;;;;37898:58:0;;;;-1:-1:-1;37898:58:0;;-1:-1:-1;37990:8:0;:54;;38025:8;38035;37990:54;;;38002:8;38012;37990:54;37967:77;;-1:-1:-1;37967:77:0;-1:-1:-1;38072:52:0;38087:16;37967:77;;38072:14;:52::i;:::-;38057:67;;38151:6;-1:-1:-1;;;;;38151:19:0;;38171:12;38185:8;38195;38151:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;38151:53:0;;-1:-1:-1;38230:8:0;:40;;38257:4;-1:-1:-1;;;;;38257:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;38257:13:0;38230:40;;;38241:4;-1:-1:-1;;;;;38241:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;38241:13:0;38230:40;38215:55;;37469:809;;;;;;;;;;;:::o;32894:1017::-;33033:19;33054;33077:25;33091:10;33077:13;:25::i;:::-;33032:70;;;;33113:14;33130:4;-1:-1:-1;;;;;33130:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33130:13:0;33171;;;-1:-1:-1;;;33171:13:0;;;;33130;;-1:-1:-1;33154:14:0;;-1:-1:-1;;;;;33171:11:0;;;;;:13;;;;;33130;;33171;;;;;;;:11;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33171:13:0;;-1:-1:-1;;;;;;33203:22:0;;;;;;;;:48;;;33239:12;-1:-1:-1;;;;;33229:22:0;:6;-1:-1:-1;;;;;33229:22:0;;33203:48;33195:110;;;;-1:-1:-1;;;33195:110:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33318:65;-1:-1:-1;;;;;33318:22:0;;33341:10;33361:4;33368:14;33318:22;:65::i;:::-;33394:5;-1:-1:-1;;;;;33394:14:0;;33409;33394:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33435:45;33459:4;33474;33435:15;:45::i;:::-;33493:17;33523:12;-1:-1:-1;;;;;33513:22:0;:6;-1:-1:-1;;;;;33513:22:0;;:40;;33547:6;33513:40;;;33538:6;33513:40;33588:16;;;33602:1;33588:16;;;33564:21;33588:16;;;;;33493:60;;-1:-1:-1;33588:16:0;;;;;;;;;;;;-1:-1:-1;33588:16:0;33564:40;;33625:9;33615:4;33620:1;33615:7;;;;;;;;;;;;;:19;-1:-1:-1;;;;;33615:19:0;;;-1:-1:-1;;;;;33615:19:0;;;;;33655:12;33645:4;33650:1;33645:7;;;;;;;;;;;;;:22;-1:-1:-1;;;;;33645:22:0;;;-1:-1:-1;;;;;33645:22:0;;;;;33680:47;33702:4;33707:1;33702:7;;;;;;;;;;;;;;33719:6;33680:21;:47::i;:::-;33738:6;-1:-1:-1;;;;;33738:31:0;;33777:9;-1:-1:-1;;;;;33770:27:0;;33806:4;33770:42;;;;;;;;;;;;;-1:-1:-1;;;;;33770:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33770:42:0;33738:133;;-1:-1:-1;;;;;;33738:133:0;;;;;;;;;;;;;;;;;;;33848:4;33738:133;;;;;;33855:15;33738:133;;;;;;;;;;;;;;;;;;;;;33814:18;;33834:4;;33738:133;;;;;;;33770:42;33738:133;;;;;;;;-1:-1:-1;33738:133:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;33738:133:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33738:133:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33884:19;33898:4;33884:13;:19::i;:::-;32894:1017;;;;;;;;;;:::o;31441:290::-;31218:4;31544:9;:26;;31536:72;;;;-1:-1:-1;;;31536:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31627:4;-1:-1:-1;;;;;31621:19:0;;31648:9;31621:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31673:50;31687:10;31699:17;31718:4;31673:13;:50::i;:::-;31441:290;;:::o;38286:183::-;38328:12;38371:6;-1:-1:-1;;;;;38371:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;38371:13:0;38363:4;-1:-1:-1;;;;;38363:21:0;;;;;;;-1:-1:-1;38363:21:0;38395:66;;;;-1:-1:-1;;;38395:66:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38286:183;:::o;32235:651::-;32318:19;32339;32362:25;32376:10;32362:13;:25::i;:::-;32317:70;;-1:-1:-1;32317:70:0;-1:-1:-1;32400:78:0;-1:-1:-1;;;;;32400:35:0;;32436:10;32456:4;32463:14;32400:35;:78::i;:::-;32489:5;-1:-1:-1;;;;;32489:14:0;;32504;32489:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32553:4;-1:-1:-1;;;;;32536:21:0;:4;-1:-1:-1;;;;;32536:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32536:13:0;-1:-1:-1;;;;;32536:21:0;;;;;:46;;;32578:4;-1:-1:-1;;;;;32561:21:0;:4;-1:-1:-1;;;;;32561:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32561:13:0;-1:-1:-1;;;;;32561:21:0;;;32536:46;32532:128;;;32606:42;32630:4;32637:10;32606:15;:42::i;:::-;32599:49;;;;32532:128;32672:45;32696:4;32711;32672:15;:45::i;:::-;32756:16;;;32770:1;32756:16;;;32730:23;32756:16;;;;;32730:23;32756:16;;;;;;;;;;-1:-1:-1;32756:16:0;32730:42;;32795:4;-1:-1:-1;;;;;32795:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32795:13:0;32783:9;;:6;;32790:1;;32783:9;;;;;;;;;:25;-1:-1:-1;;;;;32783:25:0;;;-1:-1:-1;;;;;32783:25:0;;;;;32831:4;-1:-1:-1;;;;;32831:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32831:13:0;32819:9;;:6;;32826:1;;32819:9;;;;;;;;;;;:25;-1:-1:-1;;;;;32819:25:0;;;-1:-1:-1;;;;;32819:25:0;;;;;32857:21;32871:6;32857:13;:21::i;:::-;32235:651;;;;;:::o;31142:29::-;;;:::o;31178:44::-;31218:4;31178:44;:::o;31739:488::-;31218:4;31871:13;:30;;31863:76;;;;-1:-1:-1;;;31863:76:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31958:52;;;-1:-1:-1;;;31958:52:0;;31984:10;31958:52;;;;32004:4;31958:52;;;;;;32014:13;;-1:-1:-1;;;;;31958:25:0;;;;;:52;;;;;;;;;;;;;;;:25;:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;31958:52:0;:69;;31950:116;;;;-1:-1:-1;;;31950:116:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32079:74;-1:-1:-1;;;;;32079:32:0;;32112:10;32132:4;32139:13;32079:32;:74::i;:::-;32166:53;32180:10;32192:17;32211:7;32166:13;:53::i;:::-;31739:488;;;;:::o;31093:42::-;;;:::o;34326:306::-;34392:19;34413;34467:10;34445:33;;34511:5;-1:-1:-1;;;;;34511:10:0;;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34511:12:0;34561:16;;;-1:-1:-1;;;34561:16:0;;;;34511:12;;-1:-1:-1;;;;;;34561:6:0;:14;;;;:16;;;;;34511:12;;34561:16;;;;;;;;:14;:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34561:16:0;34543:14;;;-1:-1:-1;;;34543:14:0;;;;-1:-1:-1;;;;;34543:34:0;;;;:12;;;;;:14;;;;;34561:16;;34543:14;;;;;;;:12;:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34543:14:0;-1:-1:-1;;;;;34543:34:0;;34535:89;;;;-1:-1:-1;;;34535:89:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34326:306;;;:::o;36962:499::-;37065:18;;37135:1;37121:11;:15;37096:40;;37147:17;37167:6;-1:-1:-1;;;;;37167:19:0;;37187:14;37203:8;37213;37167:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37167:55:0;;-1:-1:-1;37233:19:0;-1:-1:-1;;;;;37255:6:0;:12;;37268:14;37284:28;:8;37268:14;37284:12;:28::i;:::-;37314:23;:8;37327:9;37314:12;:23::i;:::-;37255:83;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37255:83:0;;-1:-1:-1;37362:91:0;37378:74;37255:83;37394:31;;;:43;;37255:83;37394:57;;;;;37378:15;:74::i;:::-;37362:11;;:15;:91::i;:::-;37349:104;36962:499;-1:-1:-1;;;;;;;36962:499:0:o;20219:205::-;20347:68;;;-1:-1:-1;;;;;20347:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;20347:68:0;-1:-1:-1;;;20347:68:0;;;20320:96;;20340:5;;20320:19;:96::i;33919:399::-;33989:70;34015:4;34028;-1:-1:-1;;;;;34021:22:0;;34052:4;34021:37;;;;;;;;;;;;;-1:-1:-1;;;;;34021:37:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34021:37:0;-1:-1:-1;;;;;33989:25:0;;;:70;:25;:70::i;:::-;34071:15;34088;34122:4;-1:-1:-1;;;;;34107:25:0;;34133:2;34107:29;;;;;;;;;;;;;-1:-1:-1;;;;;34107:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34107:29:0;;;;;;;;;-1:-1:-1;34107:29:0;-1:-1:-1;31218:4:0;34157:24;;;34149:75;;;;-1:-1:-1;;;34149:75:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31218:4;34243:7;:24;;34235:75;;;;-1:-1:-1;;;34235:75:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38477:221;38563:47;;;-1:-1:-1;;;38563:47:0;;38595:4;38563:47;;;;-1:-1:-1;;;;;38563:47:0;;;;;;;;;:23;;;;;;:47;;;;;;;;;;;;;;;:23;:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;38563:47:0;38559:132;;38632:47;-1:-1:-1;;;;;38632:25:0;;38658:7;-1:-1:-1;;38632:25:0;:47::i;36320:634::-;36387:15;36418:9;36413:534;36433:6;:13;36429:1;:17;36413:534;;;36485:6;36492:1;36485:9;;;;;;;;;;;;;;-1:-1:-1;;;;;36478:27:0;;36514:4;36478:42;;;;;;;;;;;;;-1:-1:-1;;;;;36478:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36478:42:0;;-1:-1:-1;36539:11:0;;36535:401;;36588:4;-1:-1:-1;;;;;36575:17:0;:6;36582:1;36575:9;;;;;;;;;;;;;;-1:-1:-1;;;;;36575:17:0;;36571:350;;;36623:4;-1:-1:-1;;;;;36617:20:0;;36638:7;36617:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;36719:12:0;;;36670;36719;;;;;;;;;;36687:45;;36670:12;;-1:-1:-1;36687:10:0;;-1:-1:-1;36710:7:0;;36719:12;;;;;36687:45;36719:12;;36687:45;;;;;;;;;;-1:-1:-1;;36687:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;36669:63;;;36763:7;36755:46;;;;;-1:-1:-1;;;36755:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;36571:350;;;;36850:51;36881:10;36893:7;36857:6;36864:1;36857:9;;;;;;;;;;;;;;-1:-1:-1;;;;;36850:30:0;;;:51;;;;;:::i;:::-;36448:3;;36413:534;;;;36320:634;;:::o;34640:1672::-;34747:19;34768;34791:25;34805:10;34791:13;:25::i;:::-;34746:70;;;;34830:16;34848;34869:4;-1:-1:-1;;;;;34869:16:0;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34869:18:0;;;;;;;-1:-1:-1;;;;;34829:58:0;;;;-1:-1:-1;34829:58:0;;-1:-1:-1;31218:4:0;34906:24;;:52;;;;;31218:4;34934:8;:24;34906:52;34898:103;;;;-1:-1:-1;;;34898:103:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35014:13;35047:7;-1:-1:-1;;;;;35030:24:0;:4;-1:-1:-1;;;;;35030:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35030:13:0;-1:-1:-1;;;;;35030:24:0;;;-1:-1:-1;35030:24:0;;35073:36;;;35102:7;-1:-1:-1;;;;;35085:24:0;:4;-1:-1:-1;;;;;35085:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35085:13:0;-1:-1:-1;;;;;35085:24:0;;35073:36;35065:96;;;;-1:-1:-1;;;35065:96:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35198:16;;;35212:1;35198:16;;;35174:21;35198:16;;;;;35174:21;35198:16;;;;;;;;;;-1:-1:-1;35198:16:0;35174:40;;35235:7;35225:4;35230:1;35225:7;;;;;;;;;;;;;:17;-1:-1:-1;;;;;35225:17:0;;;-1:-1:-1;;;;;35225:17:0;;;;;35263:8;:40;;35290:4;-1:-1:-1;;;;;35290:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35290:13:0;35263:40;;;35274:4;-1:-1:-1;;;;;35274:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35274:13:0;35263:40;35253:4;35258:1;35253:7;;;;;;;;-1:-1:-1;;;;;35253:50:0;;;:7;;;;;;;;;;:50;;;;35341:40;;;-1:-1:-1;;;35341:40:0;;35375:4;35341:40;;;;;;35316:22;;35341:25;;;;;:40;;;;;;;;;;;:25;:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35341:40:0;;-1:-1:-1;35392:20:0;35423:204;;;;35467:50;35482:14;35498:8;35508;35467:14;:50::i;:::-;35452:65;;35423:204;;;35565:50;35580:14;35596:8;35606;35565:14;:50::i;:::-;35550:65;;35423:204;35639:47;35661:4;35666:1;35661:7;;;;;;;35639:47;35697:30;35730:6;-1:-1:-1;;;;;35730:45:0;;35776:12;35790:17;35809:4;35823;35830:15;35730:116;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;35730:116:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;35730:116:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35730:116:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35697:149;;35859:47;35881:4;35886:1;35881:7;;;;;;;35859:47;35921:23;35948:6;-1:-1:-1;;;;;35948:33:0;;35982:4;35987:1;35982:7;;;;;;;;;;;;;;35991:4;35996:1;35991:7;;;;;;;;;;;;;;36000:36;36019:13;36033:1;36019:16;;;;;;;;;;;;;;36000:14;:18;;:36;;;;:::i;:::-;36038:13;36052:1;36038:16;;;;;;;;;;;;;;36056:1;36059;36070:4;36077:15;35948:145;;;;;;;;;;;;;-1:-1:-1;;;;;35948:145:0;;;;;;-1:-1:-1;;;;;35948:145:0;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;35948:145:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35948:145:0;;;;-1:-1:-1;36106:52:0;36136:4;36151:5;36106:21;:52::i;:::-;36169:5;-1:-1:-1;;;;;36169:13:0;;36183:15;36169:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;36212:62;36231:10;36243:5;-1:-1:-1;;;;;36243:15:0;;36267:4;36243:30;;;;;;;;;;;;;-1:-1:-1;;;;;36243:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36243:30:0;-1:-1:-1;;;;;36212:18:0;;;:62;:18;:62::i;:::-;36285:19;36299:4;36285:13;:19::i;:::-;34640:1672;;;;;;;;;;;;;:::o;23556:113::-;23649:5;;;23644:16;;;;23636:25;;;;;;23556:113;;;;:::o;23839:::-;23932:5;;;23927:16;;;;23919:25;;;;;2952:1239;3000:7;3024:6;3020:20;;-1:-1:-1;3039:1:0;3032:8;;3020:20;3218:1;3242;-1:-1:-1;;;3258:41:0;;3254:107;;3323:3;3316:10;;;;;3347:2;3341:8;3254:107;3381:19;3375:2;:25;3371:90;;3424:2;3417:9;;;;;3447:2;3441:8;3371:90;3481:11;3475:2;:17;3471:82;;3516:2;3509:9;;;;;3539:2;3533:8;3471:82;3573:7;3567:2;:13;3563:77;;3604:2;3597:9;;;;;3627:1;3621:7;3563:77;3660:5;3654:2;:11;3650:74;;3689:1;3682:8;;;;;3711:1;3705:7;3650:74;3744:4;3738:2;:10;3734:73;;3772:1;3765:8;;;;;3794:1;3788:7;3734:73;3827:3;3821:2;:9;3817:49;;3853:1;3847:7;3817:49;3895:1;3889;3885;:5;;;;;;3881:1;:9;3880:16;;3876:20;;3926:1;3920;3916;:5;;;;;;3912:1;:9;3911:16;;3907:20;;3957:1;3951;3947;:5;;;;;;3943:1;:9;3942:16;;3938:20;;3988:1;3982;3978;:5;;;;;;3974:1;:9;3973:16;;3969:20;;4019:1;4013;4009;:5;;;;;;4005:1;:9;4004:16;;4000:20;;4050:1;4044;4040;:5;;;;;;4036:1;:9;4035:16;;4031:20;;4081:1;4075;4071;:5;;;;;;4067:1;:9;4066:16;;4062:20;;4130:10;4147:1;4143;:5;;;;;;4130:18;;4171:2;4167:1;:6;:15;;4180:2;4167:15;;;4176:1;4167:15;4159:24;;;;;2952:1239;;;;:::o;22339:761::-;22763:23;22789:69;22817:4;22789:69;;;;;;;;;;;;;;;;;22797:5;-1:-1:-1;;;;;22789:27:0;;;:69;;;;;:::i;:::-;22873:17;;22763:95;;-1:-1:-1;22873:21:0;22869:224;;23015:10;23004:30;;;;;;;;;;;;;;;-1:-1:-1;23004:30:0;22996:85;;;;-1:-1:-1;;;22996:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20034:177;20144:58;;;-1:-1:-1;;;;;20144:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;20144:58:0;-1:-1:-1;;;20144:58:0;;;20117:86;;20137:5;;20117:19;:86::i;20693:622::-;21063:10;;;21062:62;;-1:-1:-1;21079:39:0;;;-1:-1:-1;;;21079:39:0;;21103:4;21079:39;;;;-1:-1:-1;;;;;21079:39:0;;;;;;;;;:15;;;;;;:39;;;;;;;;;;;;;;;:15;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21079:39:0;:44;21062:62;21054:152;;;;-1:-1:-1;;;21054:152:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21244:62;;;-1:-1:-1;;;;;21244:62:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;21244:62:0;-1:-1:-1;;;21244:62:0;;;21217:90;;21237:5;;21217:19;:90::i;16050:195::-;16153:12;16185:52;16207:6;16215:4;16221:1;16224:12;16185:21;:52::i;:::-;16178:59;;16050:195;;;;;;:::o;17102:530::-;17229:12;17287:5;17262:21;:30;;17254:81;;;;-1:-1:-1;;;17254:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17354:18;17365:6;17354:10;:18::i;:::-;17346:60;;;;;-1:-1:-1;;;17346:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;17480:12;17494:23;17521:6;-1:-1:-1;;;;;17521:11:0;17541:5;17549:4;17521:33;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;17521:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17479:75;;;;17572:52;17590:7;17599:10;17611:12;17572:17;:52::i;13132:422::-;13499:20;13538:8;;;13132:422::o;18638:742::-;18753:12;18782:7;18778:595;;;-1:-1:-1;18813:10:0;18806:17;;18778:595;18927:17;;:21;18923:439;;19190:10;19184:17;19251:15;19238:10;19234:2;19230:19;19223:44;19138:148;19333:12;19326:20;;-1:-1:-1;;;19326:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Swarm Source

ipfs://1820f479943c0e522ebeee9f31fc0890ee5b3116243a648fa64579ab7ce5c58e
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.