S Price: $0.673417 (-3.57%)

Contract

0x354701bF154FcdC58F0B8c17f19D7B066549fD3e

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Dex Arbitrage33039552025-01-10 20:45:262 days ago1736541926IN
0x354701bF...66549fD3e
85 S0.002684716.93354615
Dex Arbitrage32996462025-01-10 20:07:452 days ago1736539665IN
0x354701bF...66549fD3e
85 S0.002190445
Dex Arbitrage32995492025-01-10 20:07:112 days ago1736539631IN
0x354701bF...66549fD3e
85 S0.002212585.8
Dex Arbitrage32994122025-01-10 20:06:192 days ago1736539579IN
0x354701bF...66549fD3e
85 S0.005518998.49596731
Dex Arbitrage32993312025-01-10 20:05:502 days ago1736539550IN
0x354701bF...66549fD3e
85 S0.0035658.28423577
Dex Arbitrage32992452025-01-10 20:05:202 days ago1736539520IN
0x354701bF...66549fD3e
85 S0.005932319.4
Dex Arbitrage32984362025-01-10 20:00:362 days ago1736539236IN
0x354701bF...66549fD3e
85 S0.002935837.51333333
Dex Arbitrage32949642025-01-10 19:31:322 days ago1736537492IN
0x354701bF...66549fD3e
85 S0.002553186.54727272
Dex Arbitrage32945162025-01-10 19:27:552 days ago1736537275IN
0x354701bF...66549fD3e
85 S0.0038949.6923923
Dex Arbitrage32928002025-01-10 19:11:562 days ago1736536316IN
0x354701bF...66549fD3e
85 S0.002333215.72727272
Dex Arbitrage32853642025-01-10 17:56:282 days ago1736531788IN
0x354701bF...66549fD3e
85 S0.002536446.1
Dex Arbitrage32845712025-01-10 17:49:242 days ago1736531364IN
0x354701bF...66549fD3e
85 S0.0045475611.775
Dex Arbitrage32712352025-01-10 15:33:272 days ago1736523207IN
0x354701bF...66549fD3e
50 S0.004879867.90666666
Dex Arbitrage32711602025-01-10 15:32:482 days ago1736523168IN
0x354701bF...66549fD3e
50 S0.0045467411.37898128
Dex Arbitrage32711242025-01-10 15:32:342 days ago1736523154IN
0x354701bF...66549fD3e
50 S0.00368529.24663474
Dex Arbitrage32711062025-01-10 15:32:282 days ago1736523148IN
0x354701bF...66549fD3e
50 S0.003503988.7693014
Dex Arbitrage32710762025-01-10 15:32:182 days ago1736523138IN
0x354701bF...66549fD3e
50 S0.003714049.319
Dex Arbitrage32705782025-01-10 15:28:112 days ago1736522891IN
0x354701bF...66549fD3e
50 S0.002025315
Dex Arbitrage32705562025-01-10 15:28:022 days ago1736522882IN
0x354701bF...66549fD3e
50 S0.002035985
Dex Arbitrage32705352025-01-10 15:27:522 days ago1736522872IN
0x354701bF...66549fD3e
50 S0.005602058.98346153
Dex Arbitrage32705282025-01-10 15:27:472 days ago1736522867IN
0x354701bF...66549fD3e
50 S0.002089325
Dex Arbitrage32693862025-01-10 15:18:332 days ago1736522313IN
0x354701bF...66549fD3e
50 S0.0045583411.91953944
Dex Arbitrage32667272025-01-10 14:56:222 days ago1736520982IN
0x354701bF...66549fD3e
50 S0.003292728.5
Dex Arbitrage32663002025-01-10 14:52:052 days ago1736520725IN
0x354701bF...66549fD3e
50 S0.0043884910.98416666
Dex Arbitrage32657272025-01-10 14:46:272 days ago1736520387IN
0x354701bF...66549fD3e
50 S0.00199465
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
33039552025-01-10 20:45:262 days ago1736541926
0x354701bF...66549fD3e
85 S
32996462025-01-10 20:07:452 days ago1736539665
0x354701bF...66549fD3e
85 S
32995492025-01-10 20:07:112 days ago1736539631
0x354701bF...66549fD3e
85 S
32994122025-01-10 20:06:192 days ago1736539579
0x354701bF...66549fD3e
85 S
32993312025-01-10 20:05:502 days ago1736539550
0x354701bF...66549fD3e
85 S
32992452025-01-10 20:05:202 days ago1736539520
0x354701bF...66549fD3e
85 S
32984362025-01-10 20:00:362 days ago1736539236
0x354701bF...66549fD3e
85 S
32949642025-01-10 19:31:322 days ago1736537492
0x354701bF...66549fD3e
85 S
32945162025-01-10 19:27:552 days ago1736537275
0x354701bF...66549fD3e
85 S
32928002025-01-10 19:11:562 days ago1736536316
0x354701bF...66549fD3e
85 S
32853642025-01-10 17:56:282 days ago1736531788
0x354701bF...66549fD3e
85 S
32845712025-01-10 17:49:242 days ago1736531364
0x354701bF...66549fD3e
85 S
32712352025-01-10 15:33:272 days ago1736523207
0x354701bF...66549fD3e
50 S
32711602025-01-10 15:32:482 days ago1736523168
0x354701bF...66549fD3e
50 S
32711242025-01-10 15:32:342 days ago1736523154
0x354701bF...66549fD3e
50 S
32711062025-01-10 15:32:282 days ago1736523148
0x354701bF...66549fD3e
50 S
32710762025-01-10 15:32:182 days ago1736523138
0x354701bF...66549fD3e
50 S
32705782025-01-10 15:28:112 days ago1736522891
0x354701bF...66549fD3e
50 S
32705562025-01-10 15:28:022 days ago1736522882
0x354701bF...66549fD3e
50 S
32705352025-01-10 15:27:522 days ago1736522872
0x354701bF...66549fD3e
50 S
32705282025-01-10 15:27:472 days ago1736522867
0x354701bF...66549fD3e
50 S
32693862025-01-10 15:18:332 days ago1736522313
0x354701bF...66549fD3e
50 S
32667272025-01-10 14:56:222 days ago1736520982
0x354701bF...66549fD3e
50 S
32663002025-01-10 14:52:052 days ago1736520725
0x354701bF...66549fD3e
50 S
32657272025-01-10 14:46:272 days ago1736520387
0x354701bF...66549fD3e
50 S
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ETHArbitrageV2

Compiler Version
v0.8.27+commit.40a35a09

Optimization Enabled:
Yes with 1000 runs

Other Settings:
paris EvmVersion
File 1 of 7 : ETHArbitrageV2.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.24;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {TransferHelper} from "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol";
import {IYakRouter, Trade, FormattedOffer} from "./IYakRouter.sol";
import {IWNative} from "./interfaces/IWNative.sol";

error ArbitrageError();

error NoRouteAvailableError();

contract ETHArbitrageV2 is Ownable {
    IYakRouter public immutable YAK_ROUTER;

    constructor(
        IYakRouter yakRouter,
        address owner
    ) Ownable(owner) {
        YAK_ROUTER = yakRouter;
    }

    function dexArbitrage(
        address[] calldata adapters,
        address[] calldata tokens
    ) external payable {
        uint256 adaptersLength = adapters.length;
        uint256 tokensLength = tokens.length;
        require(adaptersLength == tokensLength, "AT");
        require(tokens[0] == YAK_ROUTER.WNATIVE(), "T0-WN");
        address[] memory path = new address[](tokensLength + 1);
        for (uint256 i = 0; i < tokensLength; i++) {
            path[i] = tokens[i];
        }
        path[tokensLength] = tokens[0];
        IWNative(tokens[0]).deposit{value: msg.value}();
        TransferHelper.safeApprove(tokens[0], address(YAK_ROUTER), msg.value);
        YAK_ROUTER.swapNoSplitToAVAX(Trade({
            amountIn: msg.value,
            amountOut: msg.value + 1,
            adapters: adapters,
            path: path
        }), msg.sender, 0);
    }

    function recoverTokens(address tokenAddress) external onlyOwner {
        TransferHelper.safeTransfer(
            tokenAddress,
            owner(),
            IERC20(tokenAddress).balanceOf(address(this))
        );
    }

    function findArbitrageRoutes(
        address[] calldata tokens,
        uint256 fromAmount
    ) external view returns (address[] memory adapters) {
        uint256 numberOfTokens = tokens.length;
        require(
            numberOfTokens > 1,
            "Token arbitrage require at least 2 tokens"
        );
        adapters = new address[](tokens.length);
        uint256 amountIn = fromAmount;
        for (
            uint256 tokenInIndex = 0;
            tokenInIndex < numberOfTokens - 1;
            tokenInIndex++
        ) {
            FormattedOffer memory offer = YAK_ROUTER.findBestPath(
                amountIn,
                tokens[tokenInIndex],
                tokens[tokenInIndex + 1],
                1
            );
            if (offer.amounts.length < 1) {
                revert NoRouteAvailableError();
            }
            adapters[tokenInIndex] = offer.adapters[0];
            amountIn = offer.amounts[offer.amounts.length - 1];
        }
        FormattedOffer memory lastOffer = YAK_ROUTER.findBestPath(
            amountIn,
            tokens[numberOfTokens - 1],
            tokens[0],
            1
        );
        if (lastOffer.amounts.length < 1) {
            revert NoRouteAvailableError();
        }
        adapters[numberOfTokens - 1] = lastOffer.adapters[0];
        uint256 arbitrageAmountOut = lastOffer.amounts[
            lastOffer.amounts.length - 1
        ];
        if (arbitrageAmountOut < fromAmount) {
            revert ArbitrageError();
        }
    }
}

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

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

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

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

File 3 of 7 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

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

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

pragma solidity ^0.8.20;

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

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

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

File 5 of 7 : TransferHelper.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.0;

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

library TransferHelper {
    /// @notice Transfers tokens from the targeted address to the given destination
    /// @notice Errors with 'STF' if transfer fails
    /// @param token The contract address of the token to be transferred
    /// @param from The originating address from which the tokens will be transferred
    /// @param to The destination address of the transfer
    /// @param value The amount to be transferred
    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) =
            token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'STF');
    }

    /// @notice Transfers tokens from msg.sender to a recipient
    /// @dev Errors with ST if transfer fails
    /// @param token The contract address of the token which will be transferred
    /// @param to The recipient of the transfer
    /// @param value The value of the transfer
    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'ST');
    }

    /// @notice Approves the stipulated contract to spend the given allowance in the given token
    /// @dev Errors with 'SA' if transfer fails
    /// @param token The contract address of the token to be approved
    /// @param to The target of the approval
    /// @param value The amount of the given token the target will be allowed to spend
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'SA');
    }

    /// @notice Transfers ETH to the recipient address
    /// @dev Fails with `STE`
    /// @param to The destination of the transfer
    /// @param value The value to be transferred
    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'STE');
    }
}

File 6 of 7 : IWNative.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

interface IWNative is IERC20 {
    function withdraw(uint256 amount) external;
    function withdrawTo(address account, uint256 amount) external;
    function deposit() external payable;
}

File 7 of 7 : IYakRouter.sol
//       ╟╗                                                                      ╔╬
//       ╞╬╬                                                                    ╬╠╬
//      ╔╣╬╬╬                                                                  ╠╠╠╠╦
//     ╬╬╬╬╬╩                                                                  ╘╠╠╠╠╬
//    ║╬╬╬╬╬                                                                    ╘╠╠╠╠╬
//    ╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬      ╒╬╬╬╬╬╬╬╜   ╠╠╬╬╬╬╬╬╬         ╠╬╬╬╬╬╬╬    ╬╬╬╬╬╬╬╬╠╠╠╠╠╠╠╠
//    ╙╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╕    ╬╬╬╬╬╬╬╜   ╣╠╠╬╬╬╬╬╬╬╬        ╠╬╬╬╬╬╬╬   ╬╬╬╬╬╬╬╬╬╠╠╠╠╠╠╠╩
//     ╙╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬  ╔╬╬╬╬╬╬╬    ╔╠╠╠╬╬╬╬╬╬╬╬        ╠╬╬╬╬╬╬╬ ╣╬╬╬╬╬╬╬╬╬╬╬╠╠╠╠╝╙
//               ╘╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬    ╒╠╠╠╬╠╬╩╬╬╬╬╬╬       ╠╬╬╬╬╬╬╬╣╬╬╬╬╬╬╬╙
//                 ╣╬╬╬╬╬╬╬╬╬╬╠╣     ╣╬╠╠╠╬╩ ╚╬╬╬╬╬╬      ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬
//                  ╣╬╬╬╬╬╬╬╬╬╣     ╣╬╠╠╠╬╬   ╣╬╬╬╬╬╬     ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬
//                   ╟╬╬╬╬╬╬╬╩      ╬╬╠╠╠╠╬╬╬╬╬╬╬╬╬╬╬     ╠╬╬╬╬╬╬╬╠╬╬╬╬╬╬╬
//                    ╬╬╬╬╬╬╬     ╒╬╬╠╠╬╠╠╬╬╬╬╬╬╬╬╬╬╬╬    ╠╬╬╬╬╬╬╬ ╣╬╬╬╬╬╬╬
//                    ╬╬╬╬╬╬╬     ╬╬╬╠╠╠╠╝╝╝╝╝╝╝╠╬╬╬╬╬╬   ╠╬╬╬╬╬╬╬  ╚╬╬╬╬╬╬╬╬
//                    ╬╬╬╬╬╬╬    ╣╬╬╬╬╠╠╩       ╘╬╬╬╬╬╬╬  ╠╬╬╬╬╬╬╬   ╙╬╬╬╬╬╬╬╬
//

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;


struct Query {
    address adapter;
    address tokenIn;
    address tokenOut;
    uint256 amountOut;
}
struct Offer {
    bytes amounts;
    bytes adapters;
    bytes path;
    uint256 gasEstimate;
}
struct FormattedOffer {
    uint256[] amounts;
    address[] adapters;
    address[] path;
    uint256 gasEstimate;
}
struct Trade {
    uint256 amountIn;
    uint256 amountOut;
    address[] path;
    address[] adapters;
}

interface IYakRouter {

    event UpdatedTrustedTokens(address[] _newTrustedTokens);
    event UpdatedAdapters(address[] _newAdapters);
    event UpdatedMinFee(uint256 _oldMinFee, uint256 _newMinFee);
    event UpdatedFeeClaimer(address _oldFeeClaimer, address _newFeeClaimer);
    event YakSwap(address indexed _tokenIn, address indexed _tokenOut, uint256 _amountIn, uint256 _amountOut);

    // admin
    function WNATIVE() external view returns (address);
    function setTrustedTokens(address[] memory _trustedTokens) external;
    function setAdapters(address[] memory _adapters) external;
    function setFeeClaimer(address _claimer) external;
    function setMinFee(uint256 _fee) external;

    // misc
    function trustedTokensCount() external view returns (uint256);
    function adaptersCount() external view returns (uint256);

    // query

    function queryAdapter(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint8 _index
    ) external returns (uint256);

    function queryNoSplit(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint8[] calldata _options
    ) external view returns (Query memory);

    function queryNoSplit(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut
    ) external view returns (Query memory);

    function findBestPathWithGas(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint256 _maxSteps,
        uint256 _gasPrice
    ) external view returns (FormattedOffer memory);

    function findBestPath(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint256 _maxSteps
    ) external view returns (FormattedOffer memory);

    // swap

    function swapNoSplit(
        Trade calldata _trade,
        address _to,
        uint256 _fee
    ) external;

    function swapNoSplitFromAVAX(
        Trade calldata _trade,
        address _to,
        uint256 _fee
    ) external payable;

    function swapNoSplitToAVAX(
        Trade calldata _trade,
        address _to,
        uint256 _fee
    ) external; 

    function swapNoSplitWithPermit(
        Trade calldata _trade,
        address _to,
        uint256 _fee,
        uint256 _deadline,
        uint8 _v,
        bytes32 _r,
        bytes32 _s
    ) external;

    function swapNoSplitToAVAXWithPermit(
        Trade calldata _trade,
        address _to,
        uint256 _fee,
        uint256 _deadline,
        uint8 _v,
        bytes32 _r,
        bytes32 _s
    ) external;

}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IYakRouter","name":"yakRouter","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ArbitrageError","type":"error"},{"inputs":[],"name":"NoRouteAvailableError","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"YAK_ROUTER","outputs":[{"internalType":"contract IYakRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"adapters","type":"address[]"},{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"dexArbitrage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint256","name":"fromAmount","type":"uint256"}],"name":"findArbitrageRoutes","outputs":[{"internalType":"address[]","name":"adapters","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"recoverTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a0346100f157601f61115638819003918201601f19168301916001600160401b038311848410176100f65780849260409485528339810103126100f1578051906001600160a01b03821682036100f157602001516001600160a01b03811691908290036100f15781156100db57600080546001600160a01b031981168417825560405193916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3608052611049908161010d823960805181818161015d015281816101d9015261064d0152f35b631e4fbdf760e01b600052600060045260246000fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe6080604052600436101561001257600080fd5b6000803560e01c806316114acd14610adc5780632f602904146105dd578063715018a614610577578063781f7db9146101815780637d9b5a5a1461013d5780638da5cb5b146101175763f2fde38b1461006a57600080fd5b34610114576020366003190112610114576001600160a01b0361008b610c83565b610093610f79565b1680156100e8576001600160a01b0382548273ffffffffffffffffffffffffffffffffffffffff198216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6024827f1e4fbdf700000000000000000000000000000000000000000000000000000000815280600452fd5b80fd5b50346101145780600319360112610114576001600160a01b036020915416604051908152f35b503461011457806003193601126101145760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346101145760403660031901126101145760043567ffffffffffffffff8111610573576101b3903690600401610c9e565b60243590600181111561050957916101ca83610d89565b91809385926001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692600019830183811197885b6104f5578187101561033e5761022461021f888787610d23565b610d49565b6001880180891161032a579061023f61021f8d938989610d23565b604051632604e7a760e11b815260048101949094526001600160a01b0391821660248501521660448301526001606483015281608481895afa90811561031f578a916102fd575b506001815151106102ee576001600160a01b036102a66020830151610dbb565b51166102b2888a610dc8565b525180516000198101919082116102da576102d08a92600192610dc8565b5197019690610205565b60248b634e487b7160e01b81526011600452fd5b60048a6374e8b73f60e11b8152fd5b61031991503d808c833e6103118183610d01565b810190610e7e565b38610286565b6040513d8c823e3d90fd5b60248c634e487b7160e01b81526011600452fd5b858a9589958b6104e15761035661021f868484610d23565b91156104cd57916103ae94939161036d8994610d49565b9260405196879485938493632604e7a760e11b8552600485016001600160a01b03606092959481600195608085019885521660208401521660408201520152565b03915afa9182156104c25785926104a6575b50600182515110610497576103ec6001600160a01b036103e36020850151610dbb565b51169185610dc8565b52518051600019810191908211610483579061040791610dc8565b511061045b5790604051918291602083016020845282518091526020604085019301915b818110610439575050500390f35b82516001600160a01b031684528594506020938401939092019160010161042b565b6004827fca26aaa9000000000000000000000000000000000000000000000000000000008152fd5b602485634e487b7160e01b81526011600452fd5b6004856374e8b73f60e11b8152fd5b6104bb9192503d8087833e6103118183610d01565b90856103c0565b6040513d87823e3d90fd5b602488634e487b7160e01b81526032600452fd5b602488634e487b7160e01b81526011600452fd5b60248a634e487b7160e01b81526011600452fd5b608460405162461bcd60e51b815260206004820152602960248201527f546f6b656e206172626974726167652072657175697265206174206c6561737460448201527f203220746f6b656e7300000000000000000000000000000000000000000000006064820152fd5b5080fd5b5034610114578060031936011261011457610590610f79565b806001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5060403660031901126101145760043567ffffffffffffffff81116105735761060a903690600401610c9e565b919060243567ffffffffffffffff8111610ad85761062c903690600401610c9e565b808503610a94578015610a805761064282610d49565b916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016926040517fb381cf40000000000000000000000000000000000000000000000000000000008152602081600481885afa908115610a75578791610a2d575b506001600160a01b038091169116036109e957600182018083116109d5576106d290610d89565b91855b8181106109a857506001600160a01b036106f86106f184610d49565b9285610dc8565b911690526001600160a01b0361070d82610d49565b16803b156108ea5785600491604051928380927fd0e30db000000000000000000000000000000000000000000000000000000000825234905af1801561099d57610989575b508461075e8192610d49565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000602082019081526001600160a01b03871660248301523460448301529083906107b881606481015b03601f198101835282610d01565b51925af16107c4610fbb565b8161095a575b501561091657600134019182341161048357604051926107e984610ccf565b348452602084019081526040840192835261080387610d71565b946108116040519687610d01565b878652602086019760051b81019036821161091257975b8189106108ee57505085965060608401948552813b156108ea578580946108b161089e97604051988997889687957ff03503820000000000000000000000000000000000000000000000000000000087526060600488015251606487015251608486015251608060a486015260e4850190610ddc565b90518382036063190160c4850152610ddc565b33602483015282604483015203925af180156108df576108ce5750f35b816108d891610d01565b6101145780f35b6040513d84823e3d90fd5b8580fd5b88356001600160a01b038116810361090e57815260209889019801610828565b8880fd5b8780fd5b606460405162461bcd60e51b815260206004820152600260248201527f53410000000000000000000000000000000000000000000000000000000000006044820152fd5b805180159250821561096f575b5050386107ca565b6109829250602080918301019101610ffb565b3880610967565b946109978161075e97610d01565b94610752565b6040513d88823e3d90fd5b806109b961021f6001938587610d23565b6001600160a01b036109cb8388610dc8565b91169052016106d5565b602486634e487b7160e01b81526011600452fd5b606460405162461bcd60e51b815260206004820152600560248201527f54302d574e0000000000000000000000000000000000000000000000000000006044820152fd5b90506020813d602011610a6d575b81610a4860209383610d01565b81010312610a69576001600160a01b03610a628192610d5d565b91506106ab565b8680fd5b3d9150610a3b565b6040513d89823e3d90fd5b602484634e487b7160e01b81526032600452fd5b606460405162461bcd60e51b815260206004820152600260248201527f41540000000000000000000000000000000000000000000000000000000000006044820152fd5b8280fd5b50346101145760203660031901126101145780610af7610c83565b610aff610f79565b6001600160a01b0382541690604051917f70a082310000000000000000000000000000000000000000000000000000000083523060048401526020836024816001600160a01b0386165afa8015610c785784938491610c3a575b506040517fa9059cbb00000000000000000000000000000000000000000000000000000000602082019081526001600160a01b03909316602482015260448101919091528390610bac81606481016107aa565b51925af1610bb8610fbb565b81610c0b575b5015610bc75780f35b606460405162461bcd60e51b815260206004820152600260248201527f53540000000000000000000000000000000000000000000000000000000000006044820152fd5b8051801592508215610c20575b505038610bbe565b610c339250602080918301019101610ffb565b3880610c18565b9350506020833d602011610c70575b81610c5660209383610d01565b81010312610c6b5791518392906107aa610b59565b505050fd5b3d9150610c49565b6040513d86823e3d90fd5b600435906001600160a01b0382168203610c9957565b600080fd5b9181601f84011215610c995782359167ffffffffffffffff8311610c99576020808501948460051b010111610c9957565b6080810190811067ffffffffffffffff821117610ceb57604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff821117610ceb57604052565b9190811015610d335760051b0190565b634e487b7160e01b600052603260045260246000fd5b356001600160a01b0381168103610c995790565b51906001600160a01b0382168203610c9957565b67ffffffffffffffff8111610ceb5760051b60200190565b90610d9382610d71565b610da06040519182610d01565b8281528092610db1601f1991610d71565b0190602036910137565b805115610d335760200190565b8051821015610d335760209160051b010190565b906020808351928381520192019060005b818110610dfa5750505090565b82516001600160a01b0316845260209384019390920191600101610ded565b9080601f83011215610c99578151610e3081610d71565b92610e3e6040519485610d01565b81845260208085019260051b820101928311610c9957602001905b828210610e665750505090565b60208091610e7384610d5d565b815201910190610e59565b602081830312610c995780519067ffffffffffffffff8211610c99570190608082820312610c995760405191610eb383610ccf565b805167ffffffffffffffff8111610c9957810182601f82011215610c9957805190610edd82610d71565b91610eeb6040519384610d01565b80835260208084019160051b83010191858311610c9957602001905b828210610f69575050508352602081015167ffffffffffffffff8111610c995782610f33918301610e19565b6020840152604081015167ffffffffffffffff8111610c9957606092610f5a918301610e19565b60408401520151606082015290565b8151815260209182019101610f07565b6001600160a01b03600054163303610f8d57565b7f118cdaa7000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b3d15610ff6573d9067ffffffffffffffff8211610ceb5760405191610fea601f8201601f191660200184610d01565b82523d6000602084013e565b606090565b90816020910312610c9957518015158103610c99579056fea2646970667358221220d58b4fbae19309aeae65b8439f99e45cbca2fb9dea7e1c7f6cfdd2181d7b742364736f6c634300081b00330000000000000000000000006275486f3da664c7f17283c5a30d0ebf6d80cd1c000000000000000000000000c683c8ae60d4f1962f2c8a234d2c3b85cbc26be6

Deployed Bytecode

0x6080604052600436101561001257600080fd5b6000803560e01c806316114acd14610adc5780632f602904146105dd578063715018a614610577578063781f7db9146101815780637d9b5a5a1461013d5780638da5cb5b146101175763f2fde38b1461006a57600080fd5b34610114576020366003190112610114576001600160a01b0361008b610c83565b610093610f79565b1680156100e8576001600160a01b0382548273ffffffffffffffffffffffffffffffffffffffff198216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6024827f1e4fbdf700000000000000000000000000000000000000000000000000000000815280600452fd5b80fd5b50346101145780600319360112610114576001600160a01b036020915416604051908152f35b503461011457806003193601126101145760206040516001600160a01b037f0000000000000000000000006275486f3da664c7f17283c5a30d0ebf6d80cd1c168152f35b50346101145760403660031901126101145760043567ffffffffffffffff8111610573576101b3903690600401610c9e565b60243590600181111561050957916101ca83610d89565b91809385926001600160a01b037f0000000000000000000000006275486f3da664c7f17283c5a30d0ebf6d80cd1c1692600019830183811197885b6104f5578187101561033e5761022461021f888787610d23565b610d49565b6001880180891161032a579061023f61021f8d938989610d23565b604051632604e7a760e11b815260048101949094526001600160a01b0391821660248501521660448301526001606483015281608481895afa90811561031f578a916102fd575b506001815151106102ee576001600160a01b036102a66020830151610dbb565b51166102b2888a610dc8565b525180516000198101919082116102da576102d08a92600192610dc8565b5197019690610205565b60248b634e487b7160e01b81526011600452fd5b60048a6374e8b73f60e11b8152fd5b61031991503d808c833e6103118183610d01565b810190610e7e565b38610286565b6040513d8c823e3d90fd5b60248c634e487b7160e01b81526011600452fd5b858a9589958b6104e15761035661021f868484610d23565b91156104cd57916103ae94939161036d8994610d49565b9260405196879485938493632604e7a760e11b8552600485016001600160a01b03606092959481600195608085019885521660208401521660408201520152565b03915afa9182156104c25785926104a6575b50600182515110610497576103ec6001600160a01b036103e36020850151610dbb565b51169185610dc8565b52518051600019810191908211610483579061040791610dc8565b511061045b5790604051918291602083016020845282518091526020604085019301915b818110610439575050500390f35b82516001600160a01b031684528594506020938401939092019160010161042b565b6004827fca26aaa9000000000000000000000000000000000000000000000000000000008152fd5b602485634e487b7160e01b81526011600452fd5b6004856374e8b73f60e11b8152fd5b6104bb9192503d8087833e6103118183610d01565b90856103c0565b6040513d87823e3d90fd5b602488634e487b7160e01b81526032600452fd5b602488634e487b7160e01b81526011600452fd5b60248a634e487b7160e01b81526011600452fd5b608460405162461bcd60e51b815260206004820152602960248201527f546f6b656e206172626974726167652072657175697265206174206c6561737460448201527f203220746f6b656e7300000000000000000000000000000000000000000000006064820152fd5b5080fd5b5034610114578060031936011261011457610590610f79565b806001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5060403660031901126101145760043567ffffffffffffffff81116105735761060a903690600401610c9e565b919060243567ffffffffffffffff8111610ad85761062c903690600401610c9e565b808503610a94578015610a805761064282610d49565b916001600160a01b037f0000000000000000000000006275486f3da664c7f17283c5a30d0ebf6d80cd1c16926040517fb381cf40000000000000000000000000000000000000000000000000000000008152602081600481885afa908115610a75578791610a2d575b506001600160a01b038091169116036109e957600182018083116109d5576106d290610d89565b91855b8181106109a857506001600160a01b036106f86106f184610d49565b9285610dc8565b911690526001600160a01b0361070d82610d49565b16803b156108ea5785600491604051928380927fd0e30db000000000000000000000000000000000000000000000000000000000825234905af1801561099d57610989575b508461075e8192610d49565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000602082019081526001600160a01b03871660248301523460448301529083906107b881606481015b03601f198101835282610d01565b51925af16107c4610fbb565b8161095a575b501561091657600134019182341161048357604051926107e984610ccf565b348452602084019081526040840192835261080387610d71565b946108116040519687610d01565b878652602086019760051b81019036821161091257975b8189106108ee57505085965060608401948552813b156108ea578580946108b161089e97604051988997889687957ff03503820000000000000000000000000000000000000000000000000000000087526060600488015251606487015251608486015251608060a486015260e4850190610ddc565b90518382036063190160c4850152610ddc565b33602483015282604483015203925af180156108df576108ce5750f35b816108d891610d01565b6101145780f35b6040513d84823e3d90fd5b8580fd5b88356001600160a01b038116810361090e57815260209889019801610828565b8880fd5b8780fd5b606460405162461bcd60e51b815260206004820152600260248201527f53410000000000000000000000000000000000000000000000000000000000006044820152fd5b805180159250821561096f575b5050386107ca565b6109829250602080918301019101610ffb565b3880610967565b946109978161075e97610d01565b94610752565b6040513d88823e3d90fd5b806109b961021f6001938587610d23565b6001600160a01b036109cb8388610dc8565b91169052016106d5565b602486634e487b7160e01b81526011600452fd5b606460405162461bcd60e51b815260206004820152600560248201527f54302d574e0000000000000000000000000000000000000000000000000000006044820152fd5b90506020813d602011610a6d575b81610a4860209383610d01565b81010312610a69576001600160a01b03610a628192610d5d565b91506106ab565b8680fd5b3d9150610a3b565b6040513d89823e3d90fd5b602484634e487b7160e01b81526032600452fd5b606460405162461bcd60e51b815260206004820152600260248201527f41540000000000000000000000000000000000000000000000000000000000006044820152fd5b8280fd5b50346101145760203660031901126101145780610af7610c83565b610aff610f79565b6001600160a01b0382541690604051917f70a082310000000000000000000000000000000000000000000000000000000083523060048401526020836024816001600160a01b0386165afa8015610c785784938491610c3a575b506040517fa9059cbb00000000000000000000000000000000000000000000000000000000602082019081526001600160a01b03909316602482015260448101919091528390610bac81606481016107aa565b51925af1610bb8610fbb565b81610c0b575b5015610bc75780f35b606460405162461bcd60e51b815260206004820152600260248201527f53540000000000000000000000000000000000000000000000000000000000006044820152fd5b8051801592508215610c20575b505038610bbe565b610c339250602080918301019101610ffb565b3880610c18565b9350506020833d602011610c70575b81610c5660209383610d01565b81010312610c6b5791518392906107aa610b59565b505050fd5b3d9150610c49565b6040513d86823e3d90fd5b600435906001600160a01b0382168203610c9957565b600080fd5b9181601f84011215610c995782359167ffffffffffffffff8311610c99576020808501948460051b010111610c9957565b6080810190811067ffffffffffffffff821117610ceb57604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff821117610ceb57604052565b9190811015610d335760051b0190565b634e487b7160e01b600052603260045260246000fd5b356001600160a01b0381168103610c995790565b51906001600160a01b0382168203610c9957565b67ffffffffffffffff8111610ceb5760051b60200190565b90610d9382610d71565b610da06040519182610d01565b8281528092610db1601f1991610d71565b0190602036910137565b805115610d335760200190565b8051821015610d335760209160051b010190565b906020808351928381520192019060005b818110610dfa5750505090565b82516001600160a01b0316845260209384019390920191600101610ded565b9080601f83011215610c99578151610e3081610d71565b92610e3e6040519485610d01565b81845260208085019260051b820101928311610c9957602001905b828210610e665750505090565b60208091610e7384610d5d565b815201910190610e59565b602081830312610c995780519067ffffffffffffffff8211610c99570190608082820312610c995760405191610eb383610ccf565b805167ffffffffffffffff8111610c9957810182601f82011215610c9957805190610edd82610d71565b91610eeb6040519384610d01565b80835260208084019160051b83010191858311610c9957602001905b828210610f69575050508352602081015167ffffffffffffffff8111610c995782610f33918301610e19565b6020840152604081015167ffffffffffffffff8111610c9957606092610f5a918301610e19565b60408401520151606082015290565b8151815260209182019101610f07565b6001600160a01b03600054163303610f8d57565b7f118cdaa7000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b3d15610ff6573d9067ffffffffffffffff8211610ceb5760405191610fea601f8201601f191660200184610d01565b82523d6000602084013e565b606090565b90816020910312610c9957518015158103610c99579056fea2646970667358221220d58b4fbae19309aeae65b8439f99e45cbca2fb9dea7e1c7f6cfdd2181d7b742364736f6c634300081b0033

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

0000000000000000000000006275486f3da664c7f17283c5a30d0ebf6d80cd1c000000000000000000000000c683c8ae60d4f1962f2c8a234d2c3b85cbc26be6

-----Decoded View---------------
Arg [0] : yakRouter (address): 0x6275486f3dA664c7f17283c5A30d0ebF6d80CD1c
Arg [1] : owner (address): 0xC683C8aE60d4f1962F2c8a234d2c3b85cBc26be6

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000006275486f3da664c7f17283c5a30d0ebf6d80cd1c
Arg [1] : 000000000000000000000000c683c8ae60d4f1962f2c8a234d2c3b85cbc26be6


Block Transaction Gas Used Reward
view all blocks produced

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

Validator Index Block Amount
View All Withdrawals

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

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