FlashbotsArbitrage

Description:

Multi-signature wallet contract requiring multiple confirmations for transaction execution.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

{{
  "language": "Solidity",
  "sources": {
    "@openzeppelin/contracts/access/Ownable.sol": {
      "content": "// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
"
    },
    "@openzeppelin/contracts/token/ERC20/IERC20.sol": {
      "content": "// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)

pragma solidity >=0.4.16;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}
"
    },
    "@openzeppelin/contracts/utils/Context.sol": {
      "content": "// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}
"
    },
    "@openzeppelin/contracts/utils/ReentrancyGuard.sol": {
      "content": "// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

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

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

    uint256 private _status;

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

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

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

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}
"
    },
    "contracts/FlashbotsArbitrage_v2_PRODUCTION.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "./interfaces/balancer/vault/IVault.sol";
import "./interfaces/balancer/vault/IFlashLoanRecipient.sol";
import "./interfaces/uniswap/IUniswapV2Router02.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

/**
 * @title FlashbotsArbitrage v2 - Production Ready
 * @notice Secure arbitrage contract with Flashbots builder tip support
 * @dev Includes reentrancy protection, router whitelist, and comprehensive validation
 * 
 * ENHANCEMENTS FROM v1:
 * - ✅ ReentrancyGuard protection
 * - ✅ Router whitelist for security
 * - ✅ Comprehensive input validation
 * - ✅ Approval reset after swaps
 * - ✅ Removed duplicate tokenA parameter
 * - ✅ Added pausable functionality
 * - ✅ Added router management functions
 */
contract FlashbotsArbitrage is IFlashLoanRecipient, ReentrancyGuard, Ownable {
    IVault private constant BALANCER_VAULT = IVault(0xBA12222222228d8Ba445958a75a0704d566BF2C8);
    
    // Configuration
    uint256 public minProfitBasisPoints = 1500;  // Keep at least 15% of profit
    uint256 public maxBuilderTipBasisPoints = 8500;  // Max 85% to builder
    uint256 private constant SWAP_DEADLINE_SECONDS = 300;  // 5 minutes
    
    // Router whitelist for security
    mapping(address => bool) public approvedRouters;
    
    // Pause functionality for emergencies
    bool public paused = false;
    
    // Events for monitoring
    event ArbitrageExecuted(
        address indexed tokenA,
        address indexed tokenB,
        uint256 loanAmount,
        uint256 profit,
        uint256 builderTip,
        uint256 ownerProfit
    );
    
    event BuilderTipPaid(
        address indexed builder,
        uint256 tipAmount,
        uint256 tipPercent
    );
    
    event RouterApproved(address indexed router, bool approved);
    event ContractPaused(bool paused);
    
    modifier whenNotPaused() {
        require(!paused, "Contract is paused");
        _;
    }
    
    constructor() Ownable(msg.sender) {
        // Whitelist known DEX routers on Ethereum mainnet
        approvedRouters[0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D] = true; // Uniswap V2
        approvedRouters[0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F] = true; // Sushiswap
        approvedRouters[0xEfF92A263d31888d860bD50809A8D171709b7b1c] = true; // PancakeSwap
        approvedRouters[0x03f7724180AA6b939894B5Ca4314783B0b36b329] = true; // ShibaSwap
        
        emit RouterApproved(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, true);
        emit RouterApproved(0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F, true);
        emit RouterApproved(0xEfF92A263d31888d860bD50809A8D171709b7b1c, true);
        emit RouterApproved(0x03f7724180AA6b939894B5Ca4314783B0b36b329, true);
    }
    
    /**
     * @notice Execute inter-exchange arbitrage with Flashbots builder tip
     * @param token Token to flashloan and arbitrage
     * @param amount Flashloan amount
     * @param router1 First DEX router (buy on)
     * @param router2 Second DEX router (sell on)
     * @param tokenB Token to trade against
     * @param minForwardOut Minimum output from forward swap (slippage protection)
     * @param minReverseOut Minimum output from reverse swap (slippage protection)
     * @param builderTipBasisPoints Builder tip as % of profit (e.g., 5000 = 50%)
     */
    function executeArbitrage(
        IERC20 token,
        uint256 amount,
        address router1,
        address router2,
        address tokenB,
        uint256 minForwardOut,
        uint256 minReverseOut,
        uint256 builderTipBasisPoints
    ) external onlyOwner whenNotPaused {
        // Comprehensive input validation
        require(amount > 0, "Amount must be > 0");
        require(approvedRouters[router1], "Router1 not approved");
        require(approvedRouters[router2], "Router2 not approved");
        require(address(token) != tokenB, "Tokens must be different");
        require(address(token) != address(0) && tokenB != address(0), "Invalid token addresses");
        require(minForwardOut > 0, "Invalid minForwardOut");
        require(minReverseOut > 0, "Invalid minReverseOut");
        require(builderTipBasisPoints >= 1000, "Min 10% builder tip");
        require(builderTipBasisPoints <= maxBuilderTipBasisPoints, "Builder tip too high");
        
        // Prepare flashloan
        IERC20[] memory tokens = new IERC20[](1);
        uint256[] memory amounts = new uint256[](1);
        tokens[0] = token;
        amounts[0] = amount;
        
        address tokenA = address(token);  // Remove duplicate parameter
        
        // Encode parameters for callback
        bytes memory userData = abi.encode(
            router1, 
            router2, 
            tokenA, 
            tokenB, 
            minForwardOut, 
            minReverseOut, 
            builderTipBasisPoints
        );
        
        // Execute flashloan
        BALANCER_VAULT.flashLoan(this, tokens, amounts, userData);
    }
    
    /**
     * @notice Flashloan callback - executes arbitrage and pays builder
     * @dev Protected against reentrancy attacks
     */
    function receiveFlashLoan(
        IERC20[] memory tokens,
        uint256[] memory amounts,
        uint256[] memory feeAmounts,
        bytes memory userData
    ) external override nonReentrant {
        require(msg.sender == address(BALANCER_VAULT), "Caller must be Balancer Vault");
        
        // Decode parameters
        (
            address router1,
            address router2,
            address tokenA,
            address tokenB,
            uint256 minForwardOut,
            uint256 minReverseOut,
            uint256 builderTipBasisPoints
        ) = abi.decode(
            userData,
            (address, address, address, address, uint256, uint256, uint256)
        );
        
        // Validate
        require(address(tokens[0]) == tokenA, "Unexpected token");
        require(approvedRouters[router1], "Router1 not approved");
        require(approvedRouters[router2], "Router2 not approved");
        
        uint256 loanAmount = amounts[0];
        uint256 flashloanFee = feeAmounts[0];
        uint256 totalToRepay = loanAmount + flashloanFee;  // Flash loan amounts won't overflow
        
        // ===== STEP 1: Forward Swap (tokenA → tokenB on router1) =====
        // Reset approval for security
        tokens[0].approve(router1, 0);
        tokens[0].approve(router1, loanAmount);
        
        address[] memory pathForward = new address[](2);
        pathForward[0] = tokenA;
        pathForward[1] = tokenB;
        
        uint256[] memory amountsOut = IUniswapV2Router02(router1).swapExactTokensForTokens(
            loanAmount,
            minForwardOut,  // Slippage protection
            pathForward,
            address(this),
            block.timestamp + SWAP_DEADLINE_SECONDS
        );
        uint256 tokenBReceived = amountsOut[1];
        
        // Reset approval after swap
        tokens[0].approve(router1, 0);
        
        // ===== STEP 2: Reverse Swap (tokenB → tokenA on router2) =====
        // Reset approval for security
        IERC20(tokenB).approve(router2, 0);
        IERC20(tokenB).approve(router2, tokenBReceived);
        
        address[] memory pathReverse = new address[](2);
        pathReverse[0] = tokenB;
        pathReverse[1] = tokenA;
        
        uint256[] memory amountsBack = IUniswapV2Router02(router2).swapExactTokensForTokens(
            tokenBReceived,
            minReverseOut,  // Slippage protection
            pathReverse,
            address(this),
            block.timestamp + SWAP_DEADLINE_SECONDS
        );
        // amountsBack[1] is the tokenA received - will check via balanceOf
        
        // Reset approval after swap
        IERC20(tokenB).approve(router2, 0);
        
        // ===== STEP 3: Calculate Final Balance =====
        uint256 finalBalance = tokens[0].balanceOf(address(this));
        
        // ===== STEP 4: Verify Profitability =====
        require(finalBalance >= totalToRepay, "Arbitrage not profitable after swaps");
        
        // ===== STEP 5: Repay Flashloan =====
        tokens[0].transfer(address(BALANCER_VAULT), totalToRepay);
        
        // ===== STEP 6: Calculate Profit =====
        uint256 remainingBalance = tokens[0].balanceOf(address(this));
        uint256 profit = remainingBalance;
        
        require(profit > 0, "No profit after repayment");
        
        // ===== STEP 7: PAY BUILDER TIP FROM PROFITS =====
        uint256 builderTip;
        unchecked {
            builderTip = (profit * builderTipBasisPoints) / 10000;
        }
        
        // CRITICAL: Pay builder using block.coinbase.transfer()
        if (builderTip > 0 && tokenA == address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2)) {
            // If tokenA is WETH, unwrap and send ETH to builder
            IWETH(tokenA).withdraw(builderTip);
            payable(block.coinbase).transfer(builderTip);
            
            emit BuilderTipPaid(block.coinbase, builderTip, builderTipBasisPoints);
        }
        
        // ===== STEP 8: Verify Minimum Profit Retention =====
        uint256 ownerProfit;
        uint256 minProfit;
        unchecked {
            ownerProfit = profit - builderTip;
            minProfit = (profit * minProfitBasisPoints) / 10000;
        }
        require(ownerProfit >= minProfit, "Insufficient profit after builder tip");
        
        // ===== STEP 9: Transfer Remaining Profit to Owner =====
        if (ownerProfit > 0) {
            if (tokenA == address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2)) {
                // If WETH, unwrap and send ETH
                IWETH(tokenA).withdraw(ownerProfit);
                payable(owner()).transfer(ownerProfit);  // Note: owner() from Ownable
            } else {
                // If other token, send directly
                tokens[0].transfer(owner(), ownerProfit);
            }
        }
        
        emit ArbitrageExecuted(tokenA, tokenB, loanAmount, profit, builderTip, ownerProfit);
    }
    
    // ===== ROUTER MANAGEMENT =====
    
    /**
     * @notice Add approved router
     */
    function addApprovedRouter(address router) external onlyOwner {
        require(router != address(0), "Invalid router address");
        approvedRouters[router] = true;
        emit RouterApproved(router, true);
    }
    
    /**
     * @notice Remove approved router
     */
    function removeApprovedRouter(address router) external onlyOwner {
        approvedRouters[router] = false;
        emit RouterApproved(router, false);
    }
    
    /**
     * @notice Check if router is approved
     */
    function isRouterApproved(address router) external view returns (bool) {
        return approvedRouters[router];
    }
    
    // ===== CONFIGURATION =====
    
    /**
     * @notice Update minimum profit retention percentage
     * @param newMinBasisPoints New minimum in basis points (e.g., 1500 = 15%)
     */
    function setMinProfitBasisPoints(uint256 newMinBasisPoints) external onlyOwner {
        require(newMinBasisPoints <= 5000, "Min profit too high (max 50%)");
        minProfitBasisPoints = newMinBasisPoints;
    }
    
    /**
     * @notice Update maximum builder tip percentage
     * @param newMaxBasisPoints New maximum in basis points (e.g., 8500 = 85%)
     */
    function setMaxBuilderTipBasisPoints(uint256 newMaxBasisPoints) external onlyOwner {
        require(newMaxBasisPoints >= 5000, "Max tip too low (min 50%)");
        require(newMaxBasisPoints <= 9500, "Max tip too high (max 95%)");
        maxBuilderTipBasisPoints = newMaxBasisPoints;
    }
    
    /**
     * @notice Pause contract in emergency
     */
    function setPaused(bool _paused) external onlyOwner {
        paused = _paused;
        emit ContractPaused(_paused);
    }
    
    // ===== EMERGENCY FUNCTIONS =====
    
    /**
     * @notice Emergency withdraw (only if no active flashloan)
     */
    function emergencyWithdraw(address token) external onlyOwner {
        if (token == address(0)) {
            payable(owner()).transfer(address(this).balance);
        } else {
            uint256 balance = IERC20(token).balanceOf(address(this));
            require(balance > 0, "No balance to withdraw");
            IERC20(token).transfer(owner(), balance);
        }
    }
    
    /**
     * @notice Withdraw specific amount (for partial withdrawals)
     */
    function withdrawAmount(address token, uint256 amount) external onlyOwner {
        require(amount > 0, "Amount must be > 0");
        if (token == address(0)) {
            require(address(this).balance >= amount, "Insufficient ETH balance");
            payable(owner()).transfer(amount);
        } else {
            require(IERC20(token).balanceOf(address(this)) >= amount, "Insufficient token balance");
            IERC20(token).transfer(owner(), amount);
        }
    }
    
    // Receive ETH from WETH unwrapping
    receive() external payable {}
}

// WETH interface for unwrapping
interface IWETH {
    function withdraw(uint256) external;
    function deposit() external payable;
}

"
    },
    "contracts/interfaces/balancer/vault/IFlashLoanRecipient.sol": {
      "content": "// SPDX-License-Identifier: GPL-3.0-or-later
// From Balancer V2: https://github.com/balancer/balancer-v2-monorepo
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IFlashLoanRecipient {
    /**
     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.
     *
     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this
     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the
     * Vault, or else the entire flash loan will revert.
     *
     * `userData` is the same value passed in the `IVault.flashLoan` call.
     */
    function receiveFlashLoan(
        IERC20[] memory tokens,
        uint256[] memory amounts,
        uint256[] memory feeAmounts,
        bytes memory userData
    ) external;
}

"
    },
    "contracts/interfaces/balancer/vault/IVault.sol": {
      "content": "// SPDX-License-Identifier: GPL-3.0-or-later
// From Balancer V2: https://github.com/balancer/balancer-v2-monorepo
pragma solidity ^0.8.0;

import "./IFlashLoanRecipient.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IVault {
    /**
     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,
     * and then reverting unless the tokens plus a proportional protocol fee have been returned.
     *
     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount
     * for each token contract. `tokens` must be sorted in ascending order.
     *
     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of its
     * `receiveFlashLoan` call.
     *
     * Emits `FlashLoan` events.
     */
    function flashLoan(
        IFlashLoanRecipient recipient,
        IERC20[] memory tokens,
        uint256[] memory amounts,
        bytes memory userData
    ) external;
}

"
    },
    "contracts/interfaces/uniswap/IUniswapV2Router02.sol": {
      "content": "// SPDX-License-Identifier: GPL-3.0-or-later
// From Uniswap V2: https://github.com/Uniswap/v2-periphery
pragma solidity ^0.8.0;

interface IUniswapV2Router02 {
    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);
}

"
    }
  },
  "settings": {
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "viaIR": true,
    "evmVersion": "paris",
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    }
  }
}}

Tags:
ERC20, Multisig, Swap, Upgradeable, Multi-Signature, Factory|addr:0x52886614ac0edd3e0cd6e17db0b49c549c03ee77|verified:true|block:23631288|tx:0xc0d1967b927f406b0dc54617cf66cc49e1750c7af4716d6c36a971ab92ecb7e3|first_check:1761237106

Submitted on: 2025-10-23 18:31:48

Comments

Log in to comment.

No comments yet.