Contract 0xd6b88257e91e4E4D4E990B3A858c849EF2DFdE8c 1

 
Txn Hash Method
Block
From
To
Value
0xe9267ff73b6ca258f54ad1c8871c6628de54c6e67e2c95e1594d7709f53bf2bdZap Out With Per...(pending)2021-09-19 9:20:286 hrs 45 mins ago0xa4872b5f08d59cf4bd329c6690d0b697beb51f16 IN 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether(Pending)(Pending)
0xdfccdbe0bdd31701ddb04c5d431bbe4d4e0372f04603f2b6fa64d89a4df44aefZap Out132570962021-09-19 16:03:152 mins ago0x706ced7dadc2324805ee59695457709ec1fd2675 IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.017309578296 50.591500353
0x0facef4e58a24afce4eda6aaf89eb35c4fdfe412b11e632c5068ac60b9c03082Zap Out132569972021-09-19 15:43:0722 mins agoENS Name jnyang2020.eth IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.005833871097 41.5115778
0xc6dc536f69db7f134fe2617a98908f11af3c1e7b65c3b091464bea1e441696cfZap Out132569942021-09-19 15:42:3823 mins agoENS Name greenfund.eth IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.017442452 47
0x704db796f256eadd5c6c98277d2e601f5d8a72eba8a56f3abf9ef913ba3d076dZap Out132568722021-09-19 15:13:2452 mins ago0x559652205ad65932ec6d665c9c743af0dfe5bde3 IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.04069241768855.257303523
0x67978291c99a2cca65793a2352a59d7086a5035830b6e4884a3e86c533a920d9Zap Out132560222021-09-19 12:01:014 hrs 5 mins ago0x585986626d1d66646613ff1eed4be53fbb763b35 IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.014376132624 35.678363179
0x51f98a55c8ee314d15be5a1c3d3984d32bd62a2022be8aef386ea8189fbc84e0Zap Out132560042021-09-19 11:57:094 hrs 8 mins ago0x35da61143072716e9ca1dc688e9b04145314e8d1 IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.048633209462 30.531851643
0xcd52ce244d08a92c3c325ab0053518e352e7d6a48db340d62069ca31e96d301eZap Out132559502021-09-19 11:46:364 hrs 19 mins agoENS Name fommes.eth IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.012692625348 37.08723881
0x08fe83da62717ce2f3f56eb56d94c0ec9b557f7ca91161ed140fb889586ceebbZap Out132557212021-09-19 10:53:505 hrs 12 mins ago0x910eba0bce65c9a7b8e0d9f1e008dfc137301b99 IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.029444704108 30.784282146
0xda6b2e1f73d5707f1045af243a9b2860bb25a14cfc86c7b5779b873671b845eaZap Out132554502021-09-19 9:51:166 hrs 14 mins ago0x5da7e3e73e36a576925e24285884403579186f28 IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.028719132 39
0xf3649bcff0a26c0982df186dfcf8523ab4c5e79fc3aa86075810502c00e61c76Zap Out132553802021-09-19 9:34:086 hrs 31 mins ago0xf0a088b7ec51804d662dcba2f0db039464d5eb44 IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.031598384542 32.74264164
0x5d4cb0908380f27d5e250f0afe7ccc4da1e1920ab53a28ac7775b253e0af7ba8Zap Out132553552021-09-19 9:27:556 hrs 38 mins ago0xbc42991b83817202a196688d862f619536ac760a IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.028698643237 31.427457987
0x6e97a5f79e3d6e8f09984051e76cff88be557144dcb00fe435aecf69265f24feZap Out132553462021-09-19 9:26:236 hrs 39 mins ago0xf30b7ae9dc4aa57d81c06fc25fab75ff5fab3c98 IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.010754030051 31.424501493
0xb9819788377e4a93fe801cfa24ecdb7b5232b8aeb376895ffc9fe8805f3ec2f8Zap Out132553132021-09-19 9:17:586 hrs 48 mins agoENS Name czbnb.eth IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.011554693302 32.158901481
0x0e4c1d0ca0e33ad1e30c0f4d476c4ddf2624a805a9f46e7a8172ea2eb51bfac1Zap Out With Per...132553022021-09-19 9:15:416 hrs 50 mins ago0xa4872b5f08d59cf4bd329c6690d0b697beb51f16 IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.021273165 27
0x851c917a22e59c5a757c753fd462172f3824a9190d3c83a3f503039c4a87f303Zap Out132549932021-09-19 8:11:197 hrs 54 mins ago0xd0dc07b98769f23a7bdbef15a35faa256cb65dcf IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.039974064 39
0xbf82fadefc00d7e5e0c0816ea3673afe74c47dcb63abbec10d0fec6d2f79b3b7Zap Out With Per...132548522021-09-19 7:40:038 hrs 26 mins ago0xd0dc07b98769f23a7bdbef15a35faa256cb65dcf IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.03803211 38
0xbf1c7c34eb16f080b64d1c67d8624a8885b6f7296be0933f56baeb28e38bd431Zap Out132546372021-09-19 6:52:209 hrs 13 mins ago0xf30b7ae9dc4aa57d81c06fc25fab75ff5fab3c98 IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.013619982983 39.797979662
0x512da5a6745a7aacf534ac6add835ea7255a44804143e2915b1e188e75b5b11dZap Out132542612021-09-19 5:20:1210 hrs 45 mins ago0x815b55b88b1a5a6704f9eaf8e8d40034064aeee0 IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.015014617249 38.780024612
0x3e896d2d316d282580fd44fba3240fccb8e3513d767aeba542b31ec12753fa4cZap Out132539902021-09-19 4:18:4811 hrs 47 mins agoENS Name zhishixingqiu.eth IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.012263318322 32.663682599
0x8db65a0cf2f3356a12c33036c476fa854350cf9e3b5f7db7c769c04134593d02Zap Out132535152021-09-19 2:35:5913 hrs 30 mins ago0xe8c6381475d1956e0dc9ef25278d087165ce9628 IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.023438101125 58.247515149
0xc1eb84860eacf041bd3e0444094e6dce5d457f952e40af48c3aad3d12cfa0b61Zap Out132535032021-09-19 2:31:1513 hrs 34 mins ago0x90c0b79cd87644f702147765756ece3f3ce0ba4a IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.0531489049 44.417491994
0xd815c25838dcaf9ce9646cefc07653bb191b95ac310bd6fdbd5c1a63ad178be1Zap Out132532672021-09-19 1:37:4314 hrs 28 mins agoENS Name richbuffalo.eth IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.044494983887 40.660793082
0xc5550ab76239d0dc48807a8e8b156630d2949dcc13143fddacaf92e11571d9fbZap Out132532112021-09-19 1:26:2514 hrs 39 mins ago0x67ac2318c51839ad41316cb40007b3c6c3c69d7d IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.008937145455 63.584233012
0x65fb2fbb311acf9253a8de4ad1b79d381ce3939e518b091ef3e268c83720f987Zap Out132526912021-09-18 23:32:5416 hrs 33 mins ago0xc8d744b4418fd52e6fb540a37fb1b9a8d0204e27 IN  0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0 Ether0.031368642841 42.597982099
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xdfccdbe0bdd31701ddb04c5d431bbe4d4e0372f04603f2b6fa64d89a4df44aef132570962021-09-19 16:03:152 mins ago 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0x706ced7dadc2324805ee59695457709ec1fd26755.376923687657548978 Ether
0xdfccdbe0bdd31701ddb04c5d431bbe4d4e0372f04603f2b6fa64d89a4df44aef132570962021-09-19 16:03:152 mins ago 0xe03a338d5c305613afc3877389dd3b0617233387 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c5.376923687657548978 Ether
0x0facef4e58a24afce4eda6aaf89eb35c4fdfe412b11e632c5068ac60b9c03082132569972021-09-19 15:43:0722 mins ago 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8cENS Name jnyang2020.eth0.059999999999999999 Ether
0x0facef4e58a24afce4eda6aaf89eb35c4fdfe412b11e632c5068ac60b9c03082132569972021-09-19 15:43:0722 mins ago Wrapped Ether 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0.059999999999999999 Ether
0x704db796f256eadd5c6c98277d2e601f5d8a72eba8a56f3abf9ef913ba3d076d132568722021-09-19 15:13:2452 mins ago 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0x559652205ad65932ec6d665c9c743af0dfe5bde371.998737782956096757 Ether
0x704db796f256eadd5c6c98277d2e601f5d8a72eba8a56f3abf9ef913ba3d076d132568722021-09-19 15:13:2452 mins ago 0xe03a338d5c305613afc3877389dd3b0617233387 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c71.998737782956096757 Ether
0xcd52ce244d08a92c3c325ab0053518e352e7d6a48db340d62069ca31e96d301e132559502021-09-19 11:46:364 hrs 19 mins ago 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8cENS Name fommes.eth0.599713900133157117 Ether
0xcd52ce244d08a92c3c325ab0053518e352e7d6a48db340d62069ca31e96d301e132559502021-09-19 11:46:364 hrs 19 mins ago 0xe03a338d5c305613afc3877389dd3b0617233387 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0.599713900133157117 Ether
0xda6b2e1f73d5707f1045af243a9b2860bb25a14cfc86c7b5779b873671b845ea132554502021-09-19 9:51:166 hrs 14 mins ago 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0x5da7e3e73e36a576925e24285884403579186f2810.151056039632971959 Ether
0xda6b2e1f73d5707f1045af243a9b2860bb25a14cfc86c7b5779b873671b845ea132554502021-09-19 9:51:166 hrs 14 mins ago 0xe03a338d5c305613afc3877389dd3b0617233387 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c10.151056039632971959 Ether
0x5d4cb0908380f27d5e250f0afe7ccc4da1e1920ab53a28ac7775b253e0af7ba8132553552021-09-19 9:27:556 hrs 38 mins ago 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0xbc42991b83817202a196688d862f619536ac760a3.943497114594159501 Ether
0x5d4cb0908380f27d5e250f0afe7ccc4da1e1920ab53a28ac7775b253e0af7ba8132553552021-09-19 9:27:556 hrs 38 mins ago 0x22f9dcf4647084d6c31b2765f6910cd85c178c18 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c3.943497114594159501 Ether
0x6e97a5f79e3d6e8f09984051e76cff88be557144dcb00fe435aecf69265f24fe132553462021-09-19 9:26:236 hrs 39 mins ago 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0xf30b7ae9dc4aa57d81c06fc25fab75ff5fab3c981.017469003027721268 Ether
0x6e97a5f79e3d6e8f09984051e76cff88be557144dcb00fe435aecf69265f24fe132553462021-09-19 9:26:236 hrs 39 mins ago 0xe03a338d5c305613afc3877389dd3b0617233387 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c1.017469003027721268 Ether
0xbf1c7c34eb16f080b64d1c67d8624a8885b6f7296be0933f56baeb28e38bd431132546372021-09-19 6:52:209 hrs 13 mins ago 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0xf30b7ae9dc4aa57d81c06fc25fab75ff5fab3c981.01744182278326483 Ether
0xbf1c7c34eb16f080b64d1c67d8624a8885b6f7296be0933f56baeb28e38bd431132546372021-09-19 6:52:209 hrs 13 mins ago 0xe03a338d5c305613afc3877389dd3b0617233387 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c1.01744182278326483 Ether
0x512da5a6745a7aacf534ac6add835ea7255a44804143e2915b1e188e75b5b11d132542612021-09-19 5:20:1210 hrs 45 mins ago 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0x815b55b88b1a5a6704f9eaf8e8d40034064aeee00.220125965783015937 Ether
0x512da5a6745a7aacf534ac6add835ea7255a44804143e2915b1e188e75b5b11d132542612021-09-19 5:20:1210 hrs 45 mins ago 0x22f9dcf4647084d6c31b2765f6910cd85c178c18 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0.220125965783015937 Ether
0xd815c25838dcaf9ce9646cefc07653bb191b95ac310bd6fdbd5c1a63ad178be1132532672021-09-19 1:37:4314 hrs 28 mins ago 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8cENS Name richbuffalo.eth37.240480164428540481 Ether
0xd815c25838dcaf9ce9646cefc07653bb191b95ac310bd6fdbd5c1a63ad178be1132532672021-09-19 1:37:4314 hrs 28 mins ago 0xe03a338d5c305613afc3877389dd3b0617233387 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c37.240480164428540481 Ether
0xc5550ab76239d0dc48807a8e8b156630d2949dcc13143fddacaf92e11571d9fb132532112021-09-19 1:26:2514 hrs 39 mins ago 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0x67ac2318c51839ad41316cb40007b3c6c3c69d7d0.274999999999999999 Ether
0xc5550ab76239d0dc48807a8e8b156630d2949dcc13143fddacaf92e11571d9fb132532112021-09-19 1:26:2514 hrs 39 mins ago Wrapped Ether 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0.274999999999999999 Ether
0x65fb2fbb311acf9253a8de4ad1b79d381ce3939e518b091ef3e268c83720f987132526912021-09-18 23:32:5416 hrs 33 mins ago 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0xc8d744b4418fd52e6fb540a37fb1b9a8d0204e2710.43668160697769741 Ether
0x65fb2fbb311acf9253a8de4ad1b79d381ce3939e518b091ef3e268c83720f987132526912021-09-18 23:32:5416 hrs 33 mins ago 0xe03a338d5c305613afc3877389dd3b0617233387 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c10.43668160697769741 Ether
0x1842db14dfb53e29451cee41f68198ecefd8b467ff8e1345b9d79b1ce0580b94132521872021-09-18 21:37:3018 hrs 28 mins ago 0xd6b88257e91e4e4d4e990b3a858c849ef2dfde8c0xc0c80d868c543656c6e8d066b6816f5a1a572b740.499999999999999971 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
yVault_ZapOut_V3_0_1

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv2 license
File 1 of 8 : ZapBaseV2.sol
// SPDX-License-Identifier: GPL-2.0
pragma solidity ^0.8.0;

import "../oz/0.8.0/access/Ownable.sol";
import "../oz/0.8.0/token/ERC20/utils/SafeERC20.sol";

abstract contract ZapBaseV2 is Ownable {
    using SafeERC20 for IERC20;
    bool public stopped = false;

    // if true, goodwill is not deducted
    mapping(address => bool) public feeWhitelist;

    uint256 public goodwill;
    // % share of goodwill (0-100 %)
    uint256 affiliateSplit;
    // restrict affiliates
    mapping(address => bool) public affiliates;
    // affiliate => token => amount
    mapping(address => mapping(address => uint256)) public affiliateBalance;
    // token => amount
    mapping(address => uint256) public totalAffiliateBalance;
    // swapTarget => approval status
    mapping(address => bool) public approvedTargets;

    address internal constant ETHAddress =
        0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

    constructor(uint256 _goodwill, uint256 _affiliateSplit) {
        goodwill = _goodwill;
        affiliateSplit = _affiliateSplit;
    }

    // circuit breaker modifiers
    modifier stopInEmergency {
        if (stopped) {
            revert("Temporarily Paused");
        } else {
            _;
        }
    }

    function _getBalance(address token)
        internal
        view
        returns (uint256 balance)
    {
        if (token == address(0)) {
            balance = address(this).balance;
        } else {
            balance = IERC20(token).balanceOf(address(this));
        }
    }

    function _approveToken(address token, address spender) internal {
        IERC20 _token = IERC20(token);
        if (_token.allowance(address(this), spender) > 0) return;
        else {
            _token.safeApprove(spender, type(uint256).max);
        }
    }

    function _approveToken(
        address token,
        address spender,
        uint256 amount
    ) internal {
        IERC20(token).safeApprove(spender, 0);
        IERC20(token).safeApprove(spender, amount);
    }

    // - to Pause the contract
    function toggleContractActive() public onlyOwner {
        stopped = !stopped;
    }

    function set_feeWhitelist(address zapAddress, bool status)
        external
        onlyOwner
    {
        feeWhitelist[zapAddress] = status;
    }

    function set_new_goodwill(uint256 _new_goodwill) public onlyOwner {
        require(
            _new_goodwill >= 0 && _new_goodwill <= 100,
            "GoodWill Value not allowed"
        );
        goodwill = _new_goodwill;
    }

    function set_new_affiliateSplit(uint256 _new_affiliateSplit)
        external
        onlyOwner
    {
        require(
            _new_affiliateSplit <= 100,
            "Affiliate Split Value not allowed"
        );
        affiliateSplit = _new_affiliateSplit;
    }

    function set_affiliate(address _affiliate, bool _status)
        external
        onlyOwner
    {
        affiliates[_affiliate] = _status;
    }

    ///@notice Withdraw goodwill share, retaining affilliate share
    function withdrawTokens(address[] calldata tokens) external onlyOwner {
        for (uint256 i = 0; i < tokens.length; i++) {
            uint256 qty;

            if (tokens[i] == ETHAddress) {
                qty = address(this).balance - totalAffiliateBalance[tokens[i]];

                Address.sendValue(payable(owner()), qty);
            } else {
                qty =
                    IERC20(tokens[i]).balanceOf(address(this)) -
                    totalAffiliateBalance[tokens[i]];
                IERC20(tokens[i]).safeTransfer(owner(), qty);
            }
        }
    }

    ///@notice Withdraw affilliate share, retaining goodwill share
    function affilliateWithdraw(address[] calldata tokens) external {
        uint256 tokenBal;
        for (uint256 i = 0; i < tokens.length; i++) {
            tokenBal = affiliateBalance[msg.sender][tokens[i]];
            affiliateBalance[msg.sender][tokens[i]] = 0;
            totalAffiliateBalance[tokens[i]] =
                totalAffiliateBalance[tokens[i]] -
                tokenBal;

            if (tokens[i] == ETHAddress) {
                Address.sendValue(payable(msg.sender), tokenBal);
            } else {
                IERC20(tokens[i]).safeTransfer(msg.sender, tokenBal);
            }
        }
    }

    function setApprovedTargets(
        address[] calldata targets,
        bool[] calldata isApproved
    ) external onlyOwner {
        require(targets.length == isApproved.length, "Invalid Input length");

        for (uint256 i = 0; i < targets.length; i++) {
            approvedTargets[targets[i]] = isApproved[i];
        }
    }

    receive() external payable {
        require(msg.sender != tx.origin, "Do not send ETH directly");
    }
}

File 2 of 8 : ZapOutBaseV3.sol
// SPDX-License-Identifier: GPL-2.0

pragma solidity ^0.8.0;
import "./ZapBaseV2.sol";

abstract contract ZapOutBaseV3 is ZapBaseV2 {
    using SafeERC20 for IERC20;

    /**
        @dev Transfer tokens from msg.sender to this contract
        @param token The ERC20 token to transfer to this contract
        @param shouldSellEntireBalance If True transfers entrire allowable amount from another contract
        @return Quantity of tokens transferred to this contract
     */
    function _pullTokens(
        address token,
        uint256 amount,
        bool shouldSellEntireBalance
    ) internal returns (uint256) {
        if (shouldSellEntireBalance) {
            require(
                Address.isContract(msg.sender),
                "ERR: shouldSellEntireBalance is true for EOA"
            );

            uint256 allowance =
                IERC20(token).allowance(msg.sender, address(this));
            IERC20(token).safeTransferFrom(
                msg.sender,
                address(this),
                allowance
            );

            return allowance;
        } else {
            IERC20(token).safeTransferFrom(msg.sender, address(this), amount);

            return amount;
        }
    }

    function _subtractGoodwill(
        address token,
        uint256 amount,
        address affiliate,
        bool enableGoodwill
    ) internal returns (uint256 totalGoodwillPortion) {
        bool whitelisted = feeWhitelist[msg.sender];
        if (enableGoodwill && !whitelisted && goodwill > 0) {
            totalGoodwillPortion = (amount * goodwill) / 10000;

            if (affiliates[affiliate]) {
                if (token == address(0)) {
                    token = ETHAddress;
                }

                uint256 affiliatePortion =
                    (totalGoodwillPortion * affiliateSplit) / 100;
                affiliateBalance[affiliate][token] += affiliatePortion;
                totalAffiliateBalance[token] += affiliatePortion;
            }
        }
    }
}

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() {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

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

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

File 4 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 5 of 8 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using 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) + value;
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(
                token.approve.selector,
                spender,
                newAllowance
            )
        );
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(
                oldAllowance >= value,
                "SafeERC20: decreased allowance below zero"
            );
            uint256 newAllowance = oldAllowance - value;
            _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 6 of 8 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 7 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) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 8 of 8 : yVault_ZapOut_V3.sol
// ███████╗░█████╗░██████╗░██████╗░███████╗██████╗░░░░███████╗██╗
// ╚════██║██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔══██╗░░░██╔════╝██║
// ░░███╔═╝███████║██████╔╝██████╔╝█████╗░░██████╔╝░░░█████╗░░██║
// ██╔══╝░░██╔══██║██╔═══╝░██╔═══╝░██╔══╝░░██╔══██╗░░░██╔══╝░░██║
// ███████╗██║░░██║██║░░░░░██║░░░░░███████╗██║░░██║██╗██║░░░░░██║
// ╚══════╝╚═╝░░╚═╝╚═╝░░░░░╚═╝░░░░░╚══════╝╚═╝░░╚═╝╚═╝╚═╝░░░░░╚═╝
// Copyright (C) 2021 zapper

// 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 Zapper
///@notice This contract removes liquidity from yEarn Vaults to ETH or ERC20 Tokens.
// SPDX-License-Identifier: GPL-2.0

pragma solidity ^0.8.0;
import "../_base/ZapOutBaseV3.sol";

interface IWETH {
    function withdraw(uint256 wad) external;
}

interface IYVault {
    function deposit(uint256) external;

    function withdraw(uint256) external;

    function getPricePerFullShare() external view returns (uint256);

    function token() external view returns (address);

    function decimals() external view returns (uint256);

    // V2
    function pricePerShare() external view returns (uint256);

    function permit(
        address owner,
        address spender,
        uint256 amount,
        uint256 expiry,
        bytes calldata signature
    ) external returns (bool);

    function name() external pure returns (string memory);

    function nonces(address owner) external view returns (uint256);
}

interface IYVaultV1Registry {
    function getVaults() external view returns (address[] memory);

    function getVaultsLength() external view returns (uint256);
}

// -- Aave --
interface IAToken {
    function redeem(uint256 _amount) external;

    function underlyingAssetAddress() external returns (address);
}

contract yVault_ZapOut_V3_0_1 is ZapOutBaseV3 {
    using SafeERC20 for IERC20;

    IYVaultV1Registry V1Registry =
        IYVaultV1Registry(0x3eE41C098f9666ed2eA246f4D2558010e59d63A0);

    address private constant wethTokenAddress =
        0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;

    uint256 private constant deadline =
        0xf000000000000000000000000000000000000000000000000000000000000000;

    uint256 private constant permitAllowance = 79228162514260000000000000000;

    event zapOut(
        address sender,
        address pool,
        address token,
        uint256 tokensRec
    );

    constructor(
        address _curveZapOut,
        uint256 _goodwill,
        uint256 _affiliateSplit
    ) ZapBaseV2(_goodwill, _affiliateSplit) {
        // Curve ZapOut
        approvedTargets[_curveZapOut] = true;
        // 0x exchange
        approvedTargets[0xDef1C0ded9bec7F1a1670819833240f027b25EfF] = true;
    }

    /**
        @notice Zap out in to a single token with permit
        @param fromVault Vault from which to remove liquidity
        @param amountIn Quantity of vault tokens to remove
        @param toToken Address of desired token
        @param isAaveUnderlying True if vault contains aave token
        @param minToTokens Minimum quantity of tokens to receive, reverts otherwise
        @param permitSig Encoded permit hash, which contains r,s,v values
        @param swapTarget Execution targets for swap or Zap
        @param swapData DEX or Zap data
        @param affiliate Affiliate address
        @param shouldSellEntireBalance If True transfers entrire allowable amount from another contract
        @return tokensReceived Quantity of tokens or ETH received
    */
    function ZapOutWithPermit(
        address fromVault,
        uint256 amountIn,
        address toToken,
        bool isAaveUnderlying,
        uint256 minToTokens,
        bytes calldata permitSig,
        address swapTarget,
        bytes calldata swapData,
        address affiliate,
        bool shouldSellEntireBalance
    ) external returns (uint256 tokensReceived) {
        // permit
        _permit(fromVault, permitAllowance, permitSig);

        return
            ZapOut(
                fromVault,
                amountIn,
                toToken,
                isAaveUnderlying,
                minToTokens,
                swapTarget,
                swapData,
                affiliate,
                shouldSellEntireBalance
            );
    }

    function _permit(
        address fromVault,
        uint256 amountIn,
        bytes memory permitSig
    ) internal {
        bool success =
            IYVault(fromVault).permit(
                msg.sender,
                address(this),
                amountIn,
                deadline,
                permitSig
            );
        require(success, "Could Not Permit");
    }

    /**
        @notice Zap out in to a single token with permit
        @param fromVault Vault from which to remove liquidity
        @param amountIn Quantity of vault tokens to remove
        @param toToken Address of desired token
        @param isAaveUnderlying True if vault contains aave token
        @param minToTokens Minimum quantity of tokens to receive, reverts otherwise
        @param swapTarget Execution targets for swap or Zap
        @param swapData DEX or Zap data
        @param affiliate Affiliate address
        @param shouldSellEntireBalance If True transfers entrire allowable amount from another contract
        @return tokensReceived Quantity of tokens or ETH received
    */
    function ZapOut(
        address fromVault,
        uint256 amountIn,
        address toToken,
        bool isAaveUnderlying,
        uint256 minToTokens,
        address swapTarget,
        bytes memory swapData,
        address affiliate,
        bool shouldSellEntireBalance
    ) public stopInEmergency returns (uint256 tokensReceived) {
        _pullTokens(fromVault, amountIn, shouldSellEntireBalance);

        // get underlying token from vault
        address underlyingToken = IYVault(fromVault).token();
        uint256 underlyingTokenReceived =
            _vaultWithdraw(fromVault, amountIn, underlyingToken);

        // swap to toToken
        uint256 toTokenAmt;

        if (isAaveUnderlying) {
            address underlyingAsset =
                IAToken(underlyingToken).underlyingAssetAddress();
            // unwrap atoken
            IAToken(underlyingToken).redeem(underlyingTokenReceived);

            // aTokens are 1:1
            if (underlyingAsset == toToken) {
                toTokenAmt = underlyingTokenReceived;
            } else {
                toTokenAmt = _fillQuote(
                    underlyingAsset,
                    toToken,
                    underlyingTokenReceived,
                    swapTarget,
                    swapData
                );
            }
        } else {
            toTokenAmt = _fillQuote(
                underlyingToken,
                toToken,
                underlyingTokenReceived,
                swapTarget,
                swapData
            );
        }
        require(toTokenAmt >= minToTokens, "Err: High Slippage");

        uint256 totalGoodwillPortion =
            _subtractGoodwill(toToken, toTokenAmt, affiliate, true);
        tokensReceived = toTokenAmt - totalGoodwillPortion;

        // send toTokens
        if (toToken == address(0)) {
            Address.sendValue(payable(msg.sender), tokensReceived);
        } else {
            IERC20(toToken).safeTransfer(msg.sender, tokensReceived);
        }
        emit zapOut(msg.sender, fromVault, toToken, tokensReceived);
    }

    function _vaultWithdraw(
        address fromVault,
        uint256 amount,
        address underlyingVaultToken
    ) internal returns (uint256 underlyingReceived) {
        uint256 iniUnderlyingBal = _getBalance(underlyingVaultToken);

        IYVault(fromVault).withdraw(amount);

        underlyingReceived =
            _getBalance(underlyingVaultToken) -
            iniUnderlyingBal;
    }

    function _fillQuote(
        address _fromTokenAddress,
        address toToken,
        uint256 _amount,
        address _swapTarget,
        bytes memory swapData
    ) internal returns (uint256 amtBought) {
        if (_fromTokenAddress == toToken) {
            return _amount;
        }

        if (_fromTokenAddress == wethTokenAddress && toToken == address(0)) {
            IWETH(wethTokenAddress).withdraw(_amount);
            return _amount;
        }

        uint256 valueToSend;
        if (_fromTokenAddress == address(0)) {
            valueToSend = _amount;
        } else {
            _approveToken(_fromTokenAddress, _swapTarget, _amount);
        }

        uint256 iniBal = _getBalance(toToken);
        require(approvedTargets[_swapTarget], "Target not Authorized");
        (bool success, ) = _swapTarget.call{ value: valueToSend }(swapData);
        require(success, "Error Swapping Tokens 1");
        uint256 finalBal = _getBalance(toToken);

        require(finalBal > 0, "ERR: Swapped to wrong token");
        amtBought = finalBal - iniBal;
    }

    /**
        @notice Utility function to determine the quantity of underlying tokens removed from vault
        @param fromVault Yearn vault from which to remove liquidity
        @param liquidity Quantity of vault tokens to remove
        @return Quantity of underlying LP or token removed
    */
    function removeLiquidityReturn(address fromVault, uint256 liquidity)
        external
        view
        returns (uint256)
    {
        IYVault vault = IYVault(fromVault);

        address[] memory V1Vaults = V1Registry.getVaults();

        for (uint256 i = 0; i < V1Registry.getVaultsLength(); i++) {
            if (V1Vaults[i] == fromVault)
                return (liquidity * (vault.getPricePerFullShare())) / (10**18);
        }
        return (liquidity * (vault.pricePerShare())) / (10**vault.decimals());
    }
}

Settings
{
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_curveZapOut","type":"address"},{"internalType":"uint256","name":"_goodwill","type":"uint256"},{"internalType":"uint256","name":"_affiliateSplit","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokensRec","type":"uint256"}],"name":"zapOut","type":"event"},{"inputs":[{"internalType":"address","name":"fromVault","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"toToken","type":"address"},{"internalType":"bool","name":"isAaveUnderlying","type":"bool"},{"internalType":"uint256","name":"minToTokens","type":"uint256"},{"internalType":"address","name":"swapTarget","type":"address"},{"internalType":"bytes","name":"swapData","type":"bytes"},{"internalType":"address","name":"affiliate","type":"address"},{"internalType":"bool","name":"shouldSellEntireBalance","type":"bool"}],"name":"ZapOut","outputs":[{"internalType":"uint256","name":"tokensReceived","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"fromVault","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"toToken","type":"address"},{"internalType":"bool","name":"isAaveUnderlying","type":"bool"},{"internalType":"uint256","name":"minToTokens","type":"uint256"},{"internalType":"bytes","name":"permitSig","type":"bytes"},{"internalType":"address","name":"swapTarget","type":"address"},{"internalType":"bytes","name":"swapData","type":"bytes"},{"internalType":"address","name":"affiliate","type":"address"},{"internalType":"bool","name":"shouldSellEntireBalance","type":"bool"}],"name":"ZapOutWithPermit","outputs":[{"internalType":"uint256","name":"tokensReceived","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"affiliateBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"affiliates","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"affilliateWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approvedTargets","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"feeWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"goodwill","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"fromVault","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"name":"removeLiquidityReturn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"bool[]","name":"isApproved","type":"bool[]"}],"name":"setApprovedTargets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_affiliate","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"set_affiliate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"zapAddress","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"set_feeWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_new_affiliateSplit","type":"uint256"}],"name":"set_new_affiliateSplit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_new_goodwill","type":"uint256"}],"name":"set_new_goodwill","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopped","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleContractActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalAffiliateBalance","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":"tokens","type":"address[]"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040526000805460ff60a01b19169055600880546001600160a01b031916733ee41c098f9666ed2ea246f4d2558010e59d63a01790553480156200004457600080fd5b5060405162002a7538038062002a75833981016040819052620000679162000124565b600080546001600160a01b03191633908117825560405184928492918291907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060029190915560035550506001600160a01b031660009081526007602052604081208054600160ff19918216811790925573def1c0ded9bec7f1a1670819833240f027b25eff9092527ff6019cd1944dc466e824190b288e5a63528dd4c9a6d8cbd707956fd30d2f1e0d805490921617905562000167565b60008060006060848603121562000139578283fd5b83516001600160a01b038116811462000150578384fd5b602085015160409095015190969495509392505050565b6128fe80620001776000396000f3fe60806040526004361061012e5760003560e01c80635ecb16cd116100ab5780638da5cb5b1161006f5780638da5cb5b146103a85780639735a634146103d05780639779d1a6146103f0578063d408f65714610420578063f2fde38b14610450578063fbec27bf1461047057600080fd5b80635ecb16cd14610312578063715018a61461033257806375f12b21146103475780637ee992831461036857806389c6973b1461038857600080fd5b80632c6ca9ac116100f25780632c6ca9ac1461025c5780633ff428c71461027c5780634f51e2941461029c578063550bfa56146102dc5780635de0398e146102fc57600080fd5b806301e980d41461018f5780630dc9de85146101af5780631385d24c146101cf5780631781261f146101e457806318b135e31461022f57600080fd5b3661018a57333214156101885760405162461bcd60e51b815260206004820152601860248201527f446f206e6f742073656e6420455448206469726563746c79000000000000000060448201526064015b60405180910390fd5b005b600080fd5b34801561019b57600080fd5b506101886101aa3660046125ab565b610490565b3480156101bb57600080fd5b506101886101ca366004612416565b61051a565b3480156101db57600080fd5b50610188610775565b3480156101f057600080fd5b5061021c6101ff36600461218c565b600560209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b34801561023b57600080fd5b5061021c61024a366004612154565b60066020526000908152604090205481565b34801561026857600080fd5b5061021c610277366004612329565b6107c0565b34801561028857600080fd5b506101886102973660046121c4565b610869565b3480156102a857600080fd5b506102cc6102b7366004612154565b60046020526000908152604090205460ff1681565b6040519015158152602001610226565b3480156102e857600080fd5b506101886102f73660046125ab565b6108be565b34801561030857600080fd5b5061021c60025481565b34801561031e57600080fd5b5061018861032d366004612416565b61093e565b34801561033e57600080fd5b50610188610baf565b34801561035357600080fd5b506000546102cc90600160a01b900460ff1681565b34801561037457600080fd5b5061021c6103833660046121f1565b610c23565b34801561039457600080fd5b5061021c6103a336600461221c565b610f3f565b3480156103b457600080fd5b506000546040516001600160a01b039091168152602001610226565b3480156103dc57600080fd5b506101886103eb366004612456565b611247565b3480156103fc57600080fd5b506102cc61040b366004612154565b60076020526000908152604090205460ff1681565b34801561042c57600080fd5b506102cc61043b366004612154565b60016020526000908152604090205460ff1681565b34801561045c57600080fd5b5061018861046b366004612154565b611371565b34801561047c57600080fd5b5061018861048b3660046121c4565b61145b565b6000546001600160a01b031633146104ba5760405162461bcd60e51b815260040161017f90612670565b60648111156105155760405162461bcd60e51b815260206004820152602160248201527f416666696c696174652053706c69742056616c7565206e6f7420616c6c6f77656044820152601960fa1b606482015260840161017f565b600355565b6000805b8281101561076f573360009081526005602052604081209085858481811061055657634e487b7160e01b600052603260045260246000fd5b905060200201602081019061056b9190612154565b6001600160a01b031681526020808201929092526040908101600090812054338252600590935290812091935090818686858181106105ba57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105cf9190612154565b6001600160a01b03166001600160a01b0316815260200190815260200160002081905550816006600086868581811061061857634e487b7160e01b600052603260045260246000fd5b905060200201602081019061062d9190612154565b6001600160a01b03166001600160a01b03168152602001908152602001600020546106589190612818565b6006600086868581811061067c57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106919190612154565b6001600160a01b0316815260208101919091526040016000205573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8484838181106106e057634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106f59190612154565b6001600160a01b031614156107135761070e33836114b0565b61075d565b61075d338386868581811061073857634e487b7160e01b600052603260045260246000fd5b905060200201602081019061074d9190612154565b6001600160a01b031691906115c9565b806107678161285b565b91505061051e565b50505050565b6000546001600160a01b0316331461079f5760405162461bcd60e51b815260040161017f90612670565b6000805460ff60a01b198116600160a01b9182900460ff1615909102179055565b600061080f8d6bfffffffffff096fb4da200008a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061162c92505050565b6108588d8d8d8d8d8b8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d92508c9150610f3f9050565b9d9c50505050505050505050505050565b6000546001600160a01b031633146108935760405162461bcd60e51b815260040161017f90612670565b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146108e85760405162461bcd60e51b815260040161017f90612670565b60648111156109395760405162461bcd60e51b815260206004820152601a60248201527f476f6f6457696c6c2056616c7565206e6f7420616c6c6f776564000000000000604482015260640161017f565b600255565b6000546001600160a01b031633146109685760405162461bcd60e51b815260040161017f90612670565b60005b81811015610baa57600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8484848181106109aa57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906109bf9190612154565b6001600160a01b03161415610a4d57600660008585858181106109f257634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610a079190612154565b6001600160a01b03168152602081019190915260400160002054610a2b9047612818565b9050610a48610a426000546001600160a01b031690565b826114b0565b610b97565b60066000858585818110610a7157634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610a869190612154565b6001600160a01b03166001600160a01b0316815260200190815260200160002054848484818110610ac757634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610adc9190612154565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b158015610b1d57600080fd5b505afa158015610b31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5591906125c3565b610b5f9190612818565b9050610b97610b766000546001600160a01b031690565b8286868681811061073857634e487b7160e01b600052603260045260246000fd5b5080610ba28161285b565b91505061096b565b505050565b6000546001600160a01b03163314610bd95760405162461bcd60e51b815260040161017f90612670565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000808390506000600860009054906101000a90046001600160a01b03166001600160a01b03166344d00f826040518163ffffffff1660e01b815260040160006040518083038186803b158015610c7957600080fd5b505afa158015610c8d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610cb591908101906124bf565b905060005b600860009054906101000a90046001600160a01b03166001600160a01b03166344b19dfc6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d0857600080fd5b505afa158015610d1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4091906125c3565b811015610e3257856001600160a01b0316828281518110610d7157634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03161415610e2057670de0b6b3a7640000836001600160a01b03166377c7b8fc6040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0291906125c3565b610e0c90876127f9565b610e1691906126ee565b9350505050610f39565b80610e2a8161285b565b915050610cba565b50816001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610e6c57600080fd5b505afa158015610e80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea491906125c3565b610eaf90600a612751565b826001600160a01b03166399530b066040518163ffffffff1660e01b815260040160206040518083038186803b158015610ee857600080fd5b505afa158015610efc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2091906125c3565b610f2a90866127f9565b610f3491906126ee565b925050505b92915050565b60008054600160a01b900460ff1615610f8f5760405162461bcd60e51b815260206004820152601260248201527115195b5c1bdc985c9a5b1e4814185d5cd95960721b604482015260640161017f565b610f9a8a8a846116fb565b5060008a6001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610fd657600080fd5b505afa158015610fea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100e9190612170565b9050600061101d8c8c84611823565b905060008915611131576000836001600160a01b03166389d1a0fc6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561106457600080fd5b505af1158015611078573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109c9190612170565b60405163db006a7560e01b8152600481018590529091506001600160a01b0385169063db006a7590602401600060405180830381600087803b1580156110e157600080fd5b505af11580156110f5573d6000803e3d6000fd5b505050508b6001600160a01b0316816001600160a01b0316141561111b5782915061112b565b611128818d858c8c6118a9565b91505b50611141565b61113e838c848b8b6118a9565b90505b888110156111865760405162461bcd60e51b81526020600482015260126024820152714572723a204869676820536c69707061676560701b604482015260640161017f565b60006111958c83896001611b24565b90506111a18183612818565b94506001600160a01b038c166111c0576111bb33866114b0565b6111d4565b6111d46001600160a01b038d1633876115c9565b7ff2d3e32195f8631c70e1d996c9bd5d4a3369d0580786dcd662bf13139310355d338f8e8860405161122e94939291906001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b60405180910390a1505050509998505050505050505050565b6000546001600160a01b031633146112715760405162461bcd60e51b815260040161017f90612670565b8281146112b75760405162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c84092dce0eae840d8cadccee8d60631b604482015260640161017f565b60005b8381101561136a578282828181106112e257634e487b7160e01b600052603260045260246000fd5b90506020020160208101906112f79190612573565b6007600087878581811061131b57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906113309190612154565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806113628161285b565b9150506112ba565b5050505050565b6000546001600160a01b0316331461139b5760405162461bcd60e51b815260040161017f90612670565b6001600160a01b0381166114005760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161017f565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146114855760405162461bcd60e51b815260040161017f90612670565b6001600160a01b03919091166000908152600160205260409020805460ff1916911515919091179055565b804710156115005760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161017f565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461154d576040519150601f19603f3d011682016040523d82523d6000602084013e611552565b606091505b5050905080610baa5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161017f565b6040516001600160a01b038316602482015260448101829052610baa90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611c4f565b604051639fd5a6cf60e01b81526000906001600160a01b03851690639fd5a6cf9061166790339030908890600f60fc1b908990600401612623565b602060405180830381600087803b15801561168157600080fd5b505af1158015611695573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116b9919061258f565b90508061076f5760405162461bcd60e51b815260206004820152601060248201526f10dbdd5b1908139bdd0814195c9b5a5d60821b604482015260640161017f565b6000811561180457333b6117665760405162461bcd60e51b815260206004820152602c60248201527f4552523a2073686f756c6453656c6c456e7469726542616c616e63652069732060448201526b7472756520666f7220454f4160a01b606482015260840161017f565b604051636eb1769f60e11b81523360048201523060248201526000906001600160a01b0386169063dd62ed3e9060440160206040518083038186803b1580156117ae57600080fd5b505afa1580156117c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e691906125c3565b90506117fd6001600160a01b038616333084611d21565b905061181c565b6118196001600160a01b038516333086611d21565b50815b9392505050565b60008061182f83611d59565b604051632e1a7d4d60e01b8152600481018690529091506001600160a01b03861690632e1a7d4d90602401600060405180830381600087803b15801561187457600080fd5b505af1158015611888573d6000803e3d6000fd5b505050508061189684611d59565b6118a09190612818565b95945050505050565b6000846001600160a01b0316866001600160a01b031614156118cc5750826118a0565b6001600160a01b03861673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21480156118ff57506001600160a01b038516155b1561197157604051632e1a7d4d60e01b81526004810185905273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290632e1a7d4d90602401600060405180830381600087803b15801561195157600080fd5b505af1158015611965573d6000803e3d6000fd5b505050508390506118a0565b60006001600160a01b038716611988575083611993565b611993878587611def565b600061199e87611d59565b6001600160a01b03861660009081526007602052604090205490915060ff16611a015760405162461bcd60e51b815260206004820152601560248201527415185c99d95d081b9bdd08105d5d1a1bdc9a5e9959605a1b604482015260640161017f565b6000856001600160a01b03168386604051611a1c9190612607565b60006040518083038185875af1925050503d8060008114611a59576040519150601f19603f3d011682016040523d82523d6000602084013e611a5e565b606091505b5050905080611aaf5760405162461bcd60e51b815260206004820152601760248201527f4572726f72205377617070696e6720546f6b656e732031000000000000000000604482015260640161017f565b6000611aba89611d59565b905060008111611b0c5760405162461bcd60e51b815260206004820152601b60248201527f4552523a205377617070656420746f2077726f6e6720746f6b656e0000000000604482015260640161017f565b611b168382612818565b9a9950505050505050505050565b3360009081526001602052604081205460ff16828015611b42575080155b8015611b5057506000600254115b15611c465761271060025486611b6691906127f9565b611b7091906126ee565b6001600160a01b03851660009081526004602052604090205490925060ff1615611c46576001600160a01b038616611bba5773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee95505b6000606460035484611bcc91906127f9565b611bd691906126ee565b6001600160a01b038087166000908152600560209081526040808320938c16835292905290812080549293508392909190611c129084906126d6565b90915550506001600160a01b03871660009081526006602052604081208054839290611c3f9084906126d6565b9091555050505b50949350505050565b6000611ca4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611e189092919063ffffffff16565b805190915015610baa5780806020019051810190611cc2919061258f565b610baa5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161017f565b6040516001600160a01b038085166024830152831660448201526064810182905261076f9085906323b872dd60e01b906084016115f5565b60006001600160a01b038216611d70575047919050565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b158015611daf57600080fd5b505afa158015611dc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611de791906125c3565b90505b919050565b611e046001600160a01b038416836000611e2f565b610baa6001600160a01b0384168383611e2f565b6060611e278484600085611f53565b949350505050565b801580611eb85750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015611e7e57600080fd5b505afa158015611e92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb691906125c3565b155b611f235760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161017f565b6040516001600160a01b038316602482015260448101829052610baa90849063095ea7b360e01b906064016115f5565b606082471015611fb45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161017f565b843b6120025760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161017f565b600080866001600160a01b0316858760405161201e9190612607565b60006040518083038185875af1925050503d806000811461205b576040519150601f19603f3d011682016040523d82523d6000602084013e612060565b606091505b509150915061207082828661207b565b979650505050505050565b6060831561208a57508161181c565b82511561209a5782518084602001fd5b8160405162461bcd60e51b815260040161017f919061265d565b8035611dea816128a2565b60008083601f8401126120d0578182fd5b50813567ffffffffffffffff8111156120e7578182fd5b6020830191508360208260051b850101111561210257600080fd5b9250929050565b8035611dea816128ba565b60008083601f840112612125578182fd5b50813567ffffffffffffffff81111561213c578182fd5b60208301915083602082850101111561210257600080fd5b600060208284031215612165578081fd5b813561181c816128a2565b600060208284031215612181578081fd5b815161181c816128a2565b6000806040838503121561219e578081fd5b82356121a9816128a2565b915060208301356121b9816128a2565b809150509250929050565b600080604083850312156121d6578182fd5b82356121e1816128a2565b915060208301356121b9816128ba565b60008060408385031215612203578182fd5b823561220e816128a2565b946020939093013593505050565b60008060008060008060008060006101208a8c03121561223a578485fd5b8935612245816128a2565b985060208a810135985060408b013561225d816128a2565b975060608b013561226d816128ba565b965060808b0135955060a08b0135612284816128a2565b945060c08b013567ffffffffffffffff808211156122a0578586fd5b818d0191508d601f8301126122b3578586fd5b8135818111156122c5576122c561288c565b6122d7601f8201601f191685016126a5565b91508082528e848285010111156122ec578687fd5b8084840185840137810190920194909452925061230b60e08b016120b4565b915061231a6101008b01612109565b90509295985092959850929598565b6000806000806000806000806000806000806101408d8f03121561234b578283fd5b6123548d6120b4565b9b5060208d01359a5061236960408e016120b4565b995061237760608e01612109565b985060808d0135975067ffffffffffffffff60a08e01351115612398578283fd5b6123a88e60a08f01358f01612114565b90975095506123b960c08e016120b4565b945067ffffffffffffffff60e08e013511156123d3578283fd5b6123e38e60e08f01358f01612114565b90945092506123f56101008e016120b4565b91506124046101208e01612109565b90509295989b509295989b509295989b565b60008060208385031215612428578182fd5b823567ffffffffffffffff81111561243e578283fd5b61244a858286016120bf565b90969095509350505050565b6000806000806040858703121561246b578182fd5b843567ffffffffffffffff80821115612482578384fd5b61248e888389016120bf565b909650945060208701359150808211156124a6578384fd5b506124b3878288016120bf565b95989497509550505050565b600060208083850312156124d1578182fd5b825167ffffffffffffffff808211156124e8578384fd5b818501915085601f8301126124fb578384fd5b81518181111561250d5761250d61288c565b8060051b915061251e8483016126a5565b8181528481019084860184860187018a1015612538578788fd5b8795505b838610156125665780519450612551856128a2565b8483526001959095019491860191860161253c565b5098975050505050505050565b600060208284031215612584578081fd5b813561181c816128ba565b6000602082840312156125a0578081fd5b815161181c816128ba565b6000602082840312156125bc578081fd5b5035919050565b6000602082840312156125d4578081fd5b5051919050565b600081518084526125f381602086016020860161282f565b601f01601f19169290920160200192915050565b6000825161261981846020870161282f565b9190910192915050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612070908301846125db565b60208152600061181c60208301846125db565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604051601f8201601f1916810167ffffffffffffffff811182821017156126ce576126ce61288c565b604052919050565b600082198211156126e9576126e9612876565b500190565b60008261270957634e487b7160e01b81526012600452602481fd5b500490565b600181815b8085111561274957816000190482111561272f5761272f612876565b8085161561273c57918102915b93841c9390800290612713565b509250929050565b600061181c838360008261276757506001610f39565b8161277457506000610f39565b816001811461278a5760028114612794576127b0565b6001915050610f39565b60ff8411156127a5576127a5612876565b50506001821b610f39565b5060208310610133831016604e8410600b84101617156127d3575081810a610f39565b6127dd838361270e565b80600019048211156127f1576127f1612876565b029392505050565b600081600019048311821515161561281357612813612876565b500290565b60008282101561282a5761282a612876565b500390565b60005b8381101561284a578181015183820152602001612832565b8381111561076f5750506000910152565b600060001982141561286f5761286f612876565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146128b757600080fd5b50565b80151581146128b757600080fdfea26469706673582212204ed383ed449f7ee575a77b901e327d866aaad08bf711c6832b21bf127e7c948864736f6c63430008040033000000000000000000000000d754ffb697cd276ad6b0f0273521775c1a11b17500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

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

000000000000000000000000d754ffb697cd276ad6b0f0273521775c1a11b17500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _curveZapOut (address): 0xd754ffb697cd276ad6b0f0273521775c1a11b175
Arg [1] : _goodwill (uint256): 0
Arg [2] : _affiliateSplit (uint256): 0

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000d754ffb697cd276ad6b0f0273521775c1a11b175
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
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.