BERA Price: $3.72 (+1.13%)

Contract

0x679a7C63FC83b6A4D9C1F931891d705483d4791F

Overview

BERA Balance

Berachain LogoBerachain LogoBerachain Logo0 BERA

BERA Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Add Liquidity Na...40794552025-04-23 8:48:0743 secs ago1745398087IN
Kodiak: Island Router
8.80849674 BERA00.000001
Add Liquidity Si...40794382025-04-23 8:47:341 min ago1745398054IN
Kodiak: Island Router
8 BERA0.000073740.18041417
Add Liquidity Na...40794072025-04-23 8:46:352 mins ago1745397995IN
Kodiak: Island Router
9,151.27047889 BERA0.000167230.5
Add Liquidity Si...40793652025-04-23 8:45:123 mins ago1745397912IN
Kodiak: Island Router
240.16078011 BERA0.000064830.15000001
Add Liquidity Na...40793362025-04-23 8:44:144 mins ago1745397854IN
Kodiak: Island Router
14,647.16201823 BERA0.000167350.5
Add Liquidity Si...40793042025-04-23 8:43:115 mins ago1745397791IN
Kodiak: Island Router
28 BERA0.000224490.5
Add Liquidity Si...40792402025-04-23 8:41:047 mins ago1745397664IN
Kodiak: Island Router
46 BERA0.000000510.001201
Add Liquidity Na...40790712025-04-23 8:35:2813 mins ago1745397328IN
Kodiak: Island Router
6.19759863 BERA0.000000750.002234
Add Liquidity Na...40789952025-04-23 8:32:5715 mins ago1745397177IN
Kodiak: Island Router
6.27480656 BERA0.000005060.01488
Add Liquidity Na...40789412025-04-23 8:31:1117 mins ago1745397071IN
Kodiak: Island Router
1.82972065 BERA0.000000390.0012
Add Liquidity Na...40787042025-04-23 8:23:2725 mins ago1745396607IN
Kodiak: Island Router
422.03253185 BERA0.000000410.00120001
Add Liquidity Si...40785752025-04-23 8:19:1229 mins ago1745396352IN
Kodiak: Island Router
17 BERA0.000000440.00116839
Add Liquidity Na...40785572025-04-23 8:18:3730 mins ago1745396317IN
Kodiak: Island Router
5,787.47225894 BERA0.000000440.00131999
Add Liquidity Na...40785522025-04-23 8:18:2730 mins ago1745396307IN
Kodiak: Island Router
750.09988609 BERA00.00000006
Add Liquidity Na...40784392025-04-23 8:14:4334 mins ago1745396083IN
Kodiak: Island Router
7,632.12607039 BERA00.00000005
Add Liquidity Na...40783162025-04-23 8:10:3738 mins ago1745395837IN
Kodiak: Island Router
229 BERA0.000166530.50000001
Add Liquidity Na...40782702025-04-23 8:09:0839 mins ago1745395748IN
Kodiak: Island Router
7,236.71661382 BERA00.0000003
Add Liquidity Na...40781332025-04-23 8:04:3644 mins ago1745395476IN
Kodiak: Island Router
71.3954956 BERA00.00000005
Add Liquidity Si...40781092025-04-23 8:03:5045 mins ago1745395430IN
Kodiak: Island Router
56 BERA0.000097330.23721
Add Liquidity Si...40778532025-04-23 7:55:2553 mins ago1745394925IN
Kodiak: Island Router
470 BERA0.000000470.0012
Add Liquidity Na...40778072025-04-23 7:53:5554 mins ago1745394835IN
Kodiak: Island Router
14.80786453 BERA00.00000005
Add Liquidity Na...40777242025-04-23 7:51:1157 mins ago1745394671IN
Kodiak: Island Router
24,184.86203516 BERA0.000171030.50000001
Add Liquidity Si...40775682025-04-23 7:46:041 hr ago1745394364IN
Kodiak: Island Router
652 BERA0.00000050.001201
Add Liquidity Na...40774692025-04-23 7:42:441 hr ago1745394164IN
Kodiak: Island Router
11,361.92635309 BERA0.000000390.001201
Add Liquidity Na...40773412025-04-23 7:38:321 hr ago1745393912IN
Kodiak: Island Router
50 BERA0.000050680.150001
VIEW ADVANCED FILTER

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
40794552025-04-23 8:48:0743 secs ago1745398087
Kodiak: Island Router
0 BERA
40794552025-04-23 8:48:0743 secs ago1745398087
Kodiak: Island Router
8.80849674 BERA
40794432025-04-23 8:47:451 min ago1745398065
Kodiak: Island Router
23.17908717 BERA
40794432025-04-23 8:47:451 min ago1745398065
Kodiak: Island Router
23.17908717 BERA
40794382025-04-23 8:47:341 min ago1745398054
Kodiak: Island Router
8 BERA
40794242025-04-23 8:47:071 min ago1745398027
Kodiak: Island Router
389.5871996 BERA
40794242025-04-23 8:47:071 min ago1745398027
Kodiak: Island Router
389.5871996 BERA
40794072025-04-23 8:46:352 mins ago1745397995
Kodiak: Island Router
9,151.27047889 BERA
40793652025-04-23 8:45:123 mins ago1745397912
Kodiak: Island Router
240.16078011 BERA
40793362025-04-23 8:44:144 mins ago1745397854
Kodiak: Island Router
12.78669212 BERA
40793362025-04-23 8:44:144 mins ago1745397854
Kodiak: Island Router
14,634.3753261 BERA
40793112025-04-23 8:43:255 mins ago1745397805
Kodiak: Island Router
0.18044838 BERA
40793042025-04-23 8:43:115 mins ago1745397791
Kodiak: Island Router
28 BERA
40792852025-04-23 8:42:346 mins ago1745397754
Kodiak: Island Router
503.29040333 BERA
40792852025-04-23 8:42:346 mins ago1745397754
Kodiak: Island Router
503.29040333 BERA
40792402025-04-23 8:41:047 mins ago1745397664
Kodiak: Island Router
46 BERA
40792372025-04-23 8:40:597 mins ago1745397659
Kodiak: Island Router
1,854.00838256 BERA
40792372025-04-23 8:40:597 mins ago1745397659
Kodiak: Island Router
1,854.00838256 BERA
40791962025-04-23 8:39:379 mins ago1745397577
Kodiak: Island Router
2,119.50727417 BERA
40791962025-04-23 8:39:379 mins ago1745397577
Kodiak: Island Router
2,119.50727417 BERA
40791732025-04-23 8:38:529 mins ago1745397532
Kodiak: Island Router
27.37206139 BERA
40791732025-04-23 8:38:529 mins ago1745397532
Kodiak: Island Router
27.37206139 BERA
40791362025-04-23 8:37:3511 mins ago1745397455
Kodiak: Island Router
0.00233603 BERA
40791302025-04-23 8:37:2411 mins ago1745397444
Kodiak: Island Router
2.81871843 BERA
40791302025-04-23 8:37:2411 mins ago1745397444
Kodiak: Island Router
2.81871843 BERA
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
IslandRouter

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 10 : IslandRouter.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.8.19;

import {IIslandRouter, RouterSwapParams} from "./interfaces/IIslandRouter.sol";
import {IKodiakIsland} from "./interfaces/IKodiakIsland.sol";
import {IWETH} from "./interfaces/IWETH.sol";
import {IERC20, SafeERC20} from "@openzeppelin-8/contracts/token/ERC20/utils/SafeERC20.sol";
import {Address} from "@openzeppelin-8/contracts/utils/Address.sol";

contract IslandRouter is IIslandRouter {
    using Address for address payable;
    using SafeERC20 for IERC20;

    IWETH public immutable wBera;
    address public immutable kodiakRouter;

    constructor(IWETH _wBera, address _kodiakRouter) {
        wBera = _wBera;
        kodiakRouter = _kodiakRouter;
    }

    /// @notice addLiquidity adds liquidity to KodiakIsland of interest (mints Island tokens)
    /// @param island address of KodiakIsland to add liquidity to
    /// @param amount0Max the maximum amount of token0 msg.sender willing to input
    /// @param amount1Max the maximum amount of token1 msg.sender willing to input
    /// @param amount0Min the minimum amount of token0 actually input (slippage protection)
    /// @param amount1Min the minimum amount of token1 actually input (slippage protection)
    /// @param amountSharesMin the minimum amount of shares minted (slippage protection)
    /// @param receiver account to receive minted KodiakIsland tokens
    /// @return amount0 amount of token0 transferred from msg.sender to mint `mintAmount`
    /// @return amount1 amount of token1 transferred from msg.sender to mint `mintAmount`
    /// @return mintAmount amount of KodiakIsland tokens minted and transferred to `receiver`
    function addLiquidity(
        IKodiakIsland island,
        uint256 amount0Max,
        uint256 amount1Max,
        uint256 amount0Min,
        uint256 amount1Min,
        uint256 amountSharesMin,
        address receiver
    ) external override returns (uint256 amount0, uint256 amount1, uint256 mintAmount) {
        return _addLiquidity(island, amount0Max, amount1Max, amount0Min, amount1Min, amountSharesMin, receiver);
    }

    /// @notice addLiquidityNative same as addLiquidity but expects Bera transfers (instead of Wbera)
    function addLiquidityNative(
        IKodiakIsland island,
        uint256 amount0Max,
        uint256 amount1Max,
        uint256 amount0Min,
        uint256 amount1Min,
        uint256 amountSharesMin,
        address receiver
    ) external payable override returns (uint256 amount0, uint256 amount1, uint256 mintAmount) {
        return _addLiquidityNative(island, amount0Max, amount1Max, amount0Min, amount1Min, amountSharesMin, receiver);
    }

    /// @notice addLiquiditySingleNative adds liquidity to KodiakIsland with native token. Native token is wrapped and swapped for the other token. Returns unused wBera as native token back to msg.sender
    /// @param island address of KodiakIsland to add liquidity. One of the underlying island tokens must be wBera
    /// @param amountSharesMin the minimum amount of shares minted (slippage protection)
    /// @param maxStakingSlippageBPS the maximum slippage allowed for staking (in BPS)
    /// @param swapData the swap data for swapping wBera for token0 or token1
    /// @param receiver account to receive minted KodiakIsland tokens
    /// @return amount0 - amount of token0 transferred from msg.sender to mint `mintAmount`
    /// @return amount1 - amount of token1 transferred from msg.sender to mint `mintAmount`
    /// @return mintAmount - amount of KodiakIsland tokens minted and transferred to `receiver`
    function addLiquiditySingleNative(
        IKodiakIsland island,
        uint256 amountSharesMin,
        uint256 maxStakingSlippageBPS,
        RouterSwapParams calldata swapData,
        address receiver
    ) external payable override returns (uint256 amount0, uint256 amount1, uint256 mintAmount) {
        require(maxStakingSlippageBPS <= 10000, "staking slippage too high");
        wBera.deposit{value: msg.value}();
        IERC20 token0 = island.token0();
        IERC20 token1 = island.token1();

        // This also verifies that one of the tokens is wBera
        bool __isToken0WBera = _isToken0WBera(address(token0), address(token1));

        (uint256 token0Balance, uint256 token1Balance) = _swapAndVerify(token0, token1, IERC20(address(wBera)), swapData);

        (amount0, amount1, mintAmount) = island.getMintAmounts(token0Balance, token1Balance);
        require(mintAmount >= amountSharesMin, "Staking: below min share amount");

        token0Balance -= amount0;
        token1Balance -= amount1;

        if (__isToken0WBera) {
            require(amount1 >= (token1Balance + amount1) * (10000 - maxStakingSlippageBPS) / 10000, "Staking Slippage: below min amounts");
            _deposit(island, amount0, amount1, mintAmount, receiver);
            if (token0Balance > 0) {
                wBera.withdraw(token0Balance);
                payable(msg.sender).sendValue(token0Balance);
            }
            if (token1Balance > 0) token1.safeTransfer(msg.sender, token1Balance);
        } else {
            require(amount0 >= (token0Balance + amount0) * (10000 - maxStakingSlippageBPS) / 10000, "Staking Slippage: below min amounts");
            _deposit(island, amount0, amount1, mintAmount, receiver);
            if (token1Balance > 0) {
                wBera.withdraw(token1Balance);
                payable(msg.sender).sendValue(token1Balance);
            }
            if (token0Balance > 0) token0.safeTransfer(msg.sender, token0Balance);
        }
    }

    /// @notice addLiquiditySingle adds liquidity to KodiakIsland with one of the underlying Island tokens. Tokens are swapped for the other token to deposit into the island
    /// @param island address of KodiakIsland to add liquidity
    /// @param totalAmountIn the total amount of tokenIn transferred from msg.sender
    /// @param amountSharesMin the minimum amount of shares minted (slippage protection)
    /// @param maxStakingSlippageBPS the maximum slippage allowed for staking (in BPS)
    /// @param swapData the swap data for swapping tokenIn for token0 or token1
    /// @param receiver account to receive minted KodiakIsland tokens
    /// @return amount0 - amount of token0 transferred from msg.sender to mint `mintAmount`
    /// @return amount1 - amount of token1 transferred from msg.sender to mint `mintAmount`
    /// @return mintAmount - amount of KodiakIsland tokens minted and transferred to `receiver`
    function addLiquiditySingle(
        IKodiakIsland island,
        uint256 totalAmountIn,
        uint256 amountSharesMin,
        uint256 maxStakingSlippageBPS,
        RouterSwapParams calldata swapData,
        address receiver
    ) external override returns (uint256 amount0, uint256 amount1, uint256 mintAmount) {
        require(maxStakingSlippageBPS <= 10000, "staking slippage too high");
        IERC20 token0 = island.token0();
        IERC20 token1 = island.token1();
        IERC20 tokenIn = swapData.zeroForOne ? token0 : token1;
        tokenIn.safeTransferFrom(msg.sender, address(this), totalAmountIn);
        (uint256 token0Balance, uint256 token1Balance) = _swapAndVerify(token0, token1, tokenIn, swapData);
        //Find the amounts needed to mint
        (amount0, amount1, mintAmount) = island.getMintAmounts(token0Balance, token1Balance);
        require(mintAmount >= amountSharesMin, "Staking: below min share amount");

        if (swapData.zeroForOne) require(amount1 >= token1Balance * (10000 - maxStakingSlippageBPS) / 10000, "Staking Slippage: below min amounts");
        else require(amount0 >= token0Balance * (10000 - maxStakingSlippageBPS) / 10000, "Staking Slippage: below min amounts");

        token0Balance -= amount0;
        token1Balance -= amount1;

        _deposit(island, amount0, amount1, mintAmount, receiver);

        // refunds unused tokens
        if (token0Balance > 0) token0.safeTransfer(msg.sender, token0Balance);
        if (token1Balance > 0) token1.safeTransfer(msg.sender, token1Balance);
    }

    /// @notice removeLiquidity removes liquidity from a KodiakIsland and burns LP tokens
    /// @param burnAmount The number of KodiakIsland tokens to burn
    /// @param amount0Min Minimum amount of token0 received after burn (slippage protection)
    /// @param amount1Min Minimum amount of token1 received after burn (slippage protection)
    /// @param receiver The account to receive the underlying amounts of token0 and token1
    /// @return amount0 actual amount of token0 transferred to receiver for burning `burnAmount`
    /// @return amount1 actual amount of token1 transferred to receiver for burning `burnAmount`
    /// @return liquidityBurned amount of liquidity removed from the underlying Uniswap V3 position
    function removeLiquidity(
        IKodiakIsland island,
        uint256 burnAmount,
        uint256 amount0Min,
        uint256 amount1Min,
        address receiver
    ) external override returns (uint256 amount0, uint256 amount1, uint128 liquidityBurned) {
        IERC20(address(island)).safeTransferFrom(msg.sender, address(this), burnAmount);
        (amount0, amount1, liquidityBurned) = island.burn(burnAmount, receiver);
        require(amount0 >= amount0Min && amount1 >= amount1Min, "received below minimum");
    }

    /// @notice removeLiquidityNative same as removeLiquidity
    /// except this function unwraps Wbera and sends Bera to receiver account
    function removeLiquidityNative(
        IKodiakIsland island,
        uint256 burnAmount,
        uint256 amount0Min,
        uint256 amount1Min,
        address payable receiver
    ) external override returns (uint256 amount0, uint256 amount1, uint128 liquidityBurned) {
        IERC20 token0 = island.token0();
        IERC20 token1 = island.token1();

        bool wBeraToken0 = _isToken0WBera(address(token0), address(token1));

        IERC20(address(island)).safeTransferFrom(msg.sender, address(this), burnAmount);
        (amount0, amount1, liquidityBurned) = island.burn(burnAmount, address(this));
        require(amount0 >= amount0Min && amount1 >= amount1Min, "received below minimum");

        if (wBeraToken0) {
            if (amount0 > 0) {
                wBera.withdraw(amount0);
                receiver.sendValue(amount0);
            }
            if (amount1 > 0) token1.safeTransfer(receiver, amount1);
        } else {
            if (amount1 > 0) {
                wBera.withdraw(amount1);
                receiver.sendValue(amount1);
            }
            if (amount0 > 0) token0.safeTransfer(receiver, amount0);
        }
    }

    //// Fallback function
    receive() external payable {}

    //// Internal functions

    function _addLiquidity(
        IKodiakIsland island,
        uint256 amount0Max,
        uint256 amount1Max,
        uint256 amount0Min,
        uint256 amount1Min,
        uint256 amountSharesMin,
        address receiver
    ) internal returns (uint256 amount0, uint256 amount1, uint256 mintAmount) {
        IERC20 token0 = island.token0();
        IERC20 token1 = island.token1();
        (uint256 amount0In, uint256 amount1In, uint256 _mintAmount) = island.getMintAmounts(amount0Max, amount1Max);
        require(amount0In >= amount0Min && amount1In >= amount1Min && _mintAmount >= amountSharesMin, "below min amounts");

        if (amount0In > 0) token0.safeTransferFrom(msg.sender, address(this), amount0In);
        if (amount1In > 0) token1.safeTransferFrom(msg.sender, address(this), amount1In);

        return _deposit(island, amount0In, amount1In, _mintAmount, receiver);
    }

    function _addLiquidityNative(
        IKodiakIsland island,
        uint256 amount0Max,
        uint256 amount1Max,
        uint256 amount0Min,
        uint256 amount1Min,
        uint256 amountSharesMin,
        address receiver
    ) internal returns (uint256 amount0, uint256 amount1, uint256 mintAmount) {
        IERC20 token0 = island.token0();
        IERC20 token1 = island.token1();

        (uint256 amount0In, uint256 amount1In, uint256 _mintAmount) = island.getMintAmounts(amount0Max, amount1Max);
        require(amount0In >= amount0Min && amount1In >= amount1Min && _mintAmount >= amountSharesMin, "below min amounts");

        if (_isToken0WBera(address(token0), address(token1))) {
            require(amount0Max == msg.value, "not enough bera");
            if (amount0In > 0) wBera.deposit{value: amount0In}();
            if (amount1In > 0) token1.safeTransferFrom(msg.sender, address(this), amount1In);
        } else {
            require(amount1Max == msg.value, "not enough bera");
            if (amount1In > 0) wBera.deposit{value: amount1In}();
            if (amount0In > 0) token0.safeTransferFrom(msg.sender, address(this), amount0In);
        }

        (amount0, amount1, mintAmount) = _deposit(island, amount0In, amount1In, _mintAmount, receiver);

        if (_isToken0WBera(address(token0), address(token1))) {
            if (amount0Max > amount0) payable(msg.sender).sendValue(amount0Max - amount0);
        } else if (amount1Max > amount1) payable(msg.sender).sendValue(amount1Max - amount1);
    }

    function _deposit(
        IKodiakIsland island,
        uint256 amount0In,
        uint256 amount1In,
        uint256 _mintAmount,
        address receiver
    ) internal returns (uint256 amount0, uint256 amount1, uint256 mintAmount) {
        if (amount0In > 0) island.token0().safeIncreaseAllowance(address(island), amount0In);
        if (amount1In > 0) island.token1().safeIncreaseAllowance(address(island), amount1In);

        (amount0, amount1,) = island.mint(_mintAmount, receiver);
        require(amount0 == amount0In && amount1 == amount1In, "unexpected amounts deposited");
        mintAmount = _mintAmount;
    }

    function _isToken0WBera(address token0, address token1) internal view returns (bool wBeraToken0) {
        if (token0 == address(wBera)) wBeraToken0 = true;
        else if (token1 == address(wBera)) wBeraToken0 = false;
        else revert("one island token must be wBera");
    }

    /// @notice _swapAndVerify swaps tokenIn for token0 or token1
    /// @param token0 the first token of the island
    /// @param token1 the second token of the island
    /// @param tokenIn the token to swap
    /// @param swapData the swap
    /// @return token0Balance the balance of token0 after the swap
    /// @return token1Balance the balance of token1 after the swap
    function _swapAndVerify(IERC20 token0, IERC20 token1, IERC20 tokenIn, RouterSwapParams calldata swapData) internal returns (uint256 token0Balance, uint256 token1Balance) {
        tokenIn.safeIncreaseAllowance(kodiakRouter, swapData.amountIn);
        (bool success,) = kodiakRouter.call(swapData.routeData);
        require(success, "Swap: swap failed");
        token0Balance = token0.balanceOf(address(this));
        token1Balance = token1.balanceOf(address(this));
        if (address(token0) == address(tokenIn)) require(token1Balance >= swapData.minAmountOut, "Swap: insufficient tokenOut");
        else require(token0Balance >= swapData.minAmountOut, "Swap: insufficient tokenOut");
    }
}

File 2 of 10 : IIslandRouter.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.8.19;

import {IKodiakIsland} from "./IKodiakIsland.sol";
import {IWETH} from "./IWETH.sol";
struct RouterSwapParams {
    uint256 amountIn;
    uint256 minAmountOut;
    bool zeroForOne;
    bytes routeData;
}

interface IIslandRouter {
    function addLiquidity(
        IKodiakIsland island,
        uint256 amount0Max,
        uint256 amount1Max,
        uint256 amount0Min,
        uint256 amount1Min,
        uint256 amountSharesMin,
        address receiver
    ) external returns (uint256 amount0, uint256 amount1, uint256 mintAmount);

    function addLiquidityNative(
        IKodiakIsland island,
        uint256 amount0Max,
        uint256 amount1Max,
        uint256 amount0Min,
        uint256 amount1Min,
        uint256 amountSharesMin,
        address receiver
    ) external payable returns (uint256 amount0, uint256 amount1, uint256 mintAmount);

    function removeLiquidity(
        IKodiakIsland island,
        uint256 burnAmount,
        uint256 amount0Min,
        uint256 amount1Min,
        address receiver
    ) external returns (uint256 amount0, uint256 amount1, uint128 liquidityBurned);

    function removeLiquidityNative(
        IKodiakIsland island,
        uint256 burnAmount,
        uint256 amount0Min,
        uint256 amount1Min,
        address payable receiver
    ) external returns (uint256 amount0, uint256 amount1, uint128 liquidityBurned);

    function addLiquiditySingle(
        IKodiakIsland island,
        uint256 totalAmountIn,
        uint256 amountSharesMin,
        uint256 maxStakingSlippageBPS,
        RouterSwapParams calldata swapData,
        address receiver
    ) external returns (uint256 amount0, uint256 amount1, uint256 mintAmount);

    function addLiquiditySingleNative(
        IKodiakIsland island,
        uint256 amountSharesMin,
        uint256 maxStakingSlippageBPS,
        RouterSwapParams calldata swapData,
        address receiver
    ) external payable returns (uint256 amount0, uint256 amount1, uint256 mintAmount);

    function kodiakRouter() external view returns (address);

    function wBera() external view returns (IWETH);
}

File 3 of 10 : IKodiakIsland.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.8.19;
import {IERC20} from "@openzeppelin-8/contracts/interfaces/IERC20.sol";
import {IUniswapV3Pool} from "./IUniswapV3Pool.sol";

interface IKodiakIsland {
    function mint(uint256 mintAmount, address receiver) external returns (uint256 amount0, uint256 amount1, uint128 liquidityMinted);
    function burn(uint256 burnAmount, address receiver) external returns (uint256 amount0, uint256 amount1, uint128 liquidityBurned);
    function getMintAmounts(uint256 amount0Max, uint256 amount1Max) external view returns (uint256 amount0, uint256 amount1, uint256 mintAmount);
    function token0() external view returns (IERC20);
    function token1() external view returns (IERC20);
    function getUnderlyingBalances() external view returns (uint256 amount0, uint256 amount1);
    // Additional view functions that might be useful to expose:
    function totalSupply() external view returns (uint256);
    function pool() external view returns (IUniswapV3Pool);
    function lowerTick() external view returns (int24);
    function upperTick() external view returns (int24);
    function managerFeeBPS() external view returns (uint16);
    function managerBalance0() external view returns (uint256);
    function managerBalance1() external view returns (uint256);
    function managerTreasury() external view returns (address);
    function compounderSlippageInterval() external view returns (uint32);
    function compounderSlippageBPS() external view returns (uint16);
}

File 4 of 10 : IWETH.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.8.19;

interface IWETH {
    function deposit() external payable;

    function transfer(address to, uint256 value) external returns (bool);

    function withdraw(uint256) external;
}

File 5 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/IERC20Permit.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;

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    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'
        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));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    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");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}

File 6 of 10 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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://consensys.net/diligence/blog/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.8.0/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");

        (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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 7 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/IERC20.sol";

File 8 of 10 : IUniswapV3Pool.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.8.19;

interface IUniswapV3Pool {
    function mint(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount,
        bytes calldata data
    ) external returns (uint256 amount0, uint256 amount1);

    function positions(bytes32 key) external view returns (
        uint128 _liquidity,
        uint256 feeGrowthInside0LastX128,
        uint256 feeGrowthInside1LastX128,
        uint128 tokensOwed0,
        uint128 tokensOwed1
    );

    function swap(
        address recipient,
        bool zeroForOne,
        int256 amountSpecified,
        uint160 sqrtPriceLimitX96,
        bytes calldata data
    ) external returns (int256 amount0, int256 amount1);

    function burn(
        int24 tickLower,
        int24 tickUpper,
        uint128 amount
    ) external returns (uint256 amount0, uint256 amount1);

    function collect(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external returns (uint128 amount0, uint128 amount1);

    function slot0() external view returns (
        uint160 sqrtPriceX96,
        int24 tick,
        uint16 observationIndex,
        uint16 observationCardinality,
        uint16 observationCardinalityNext,
        uint32 feeProtocol,
        bool unlocked
    );

    function feeGrowthGlobal0X128() external view returns (uint256);

    function feeGrowthGlobal1X128() external view returns (uint256);

    function ticks(int24 tick) external view returns (
        uint128 liquidityGross,
        int128 liquidityNet,
        uint256 feeGrowthOutside0X128,
        uint256 feeGrowthOutside1X128,
        int56 tickCumulativeOutside,
        uint160 secondsPerLiquidityOutsideX128,
        uint32 secondsOutside,
        bool initialized
    );

    function observe(uint32[] calldata secondsAgos) external view returns (
        int56[] memory tickCumulatives,
        uint160[] memory secondsPerLiquidityCumulativeX128s
    );


    function factory() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function fee() external view returns (uint24);

    function tickSpacing() external view returns (int24);

    function maxLiquidityPerTick() external view returns (uint128);
}

File 9 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
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 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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool);
}

File 10 of 10 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

Settings
{
  "remappings": [
    "forge-std/=lib/forge-std/src/",
    "@uniswap/lib/=lib/solidity-lib/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "base64-sol/=lib/base64/",
    "@kodiak-finance/v3-periphery/contracts/=src/pools/v3-periphery/",
    "@kodiak-finance/v2-periphery/contracts/=src/pools/v2-periphery/",
    "@kodiak-finance/v2-core/contracts/=lib/v2-core/contracts/",
    "@kodiak-finance/v3-core/contracts/libraries/=lib/v3-core/contracts/libraries/",
    "@kodiak-finance/v3-core/contracts/interfaces/=lib/@kodiak-finance/v3-core/contracts/interfaces/",
    "@openzeppelin-8/contracts/=lib/openzeppelin-contracts-new/contracts/",
    "base64/=lib/base64/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts-new/lib/erc4626-tests/",
    "openzeppelin-contracts-new/=lib/openzeppelin-contracts-new/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
    "openzeppelin/=lib/openzeppelin-contracts-new/contracts/",
    "solidity-lib/=lib/solidity-lib/contracts/",
    "v2-core/=lib/v2-core/contracts/",
    "v3-core/=lib/v3-core/",
    "@kodiak-finance/v3-periphery/contracts/=src/pools/v3-periphery/",
    "@kodiak-finance/v2-periphery/contracts/=src/pools/v2-periphery/",
    "@kodiak-finance/v2-core/contracts/=lib/v2-core/contracts/",
    "@kodiak-finance/v3-core/contracts/libraries/=lib/v3-core/contracts/libraries/",
    "@openzeppelin/contracts-upgradeable/=lib/kodiak-core/lib/openzeppelin-contracts-upgradeable/contracts/",
    "@uniswap/v2-core/=lib/kodiak-core/lib/v2-core/",
    "@uniswap/v2-periphery/=lib/kodiak-core/lib/v2-periphery/",
    "@uniswap/v3-core/=lib/kodiak-core/lib/v3-core/",
    "@uniswap/v3-periphery/=lib/kodiak-core/lib/v3-periphery/",
    "create3-factory/=lib/kodiak-core/lib/create3-factory/",
    "kodiak-core/=lib/kodiak-core/",
    "local/=lib/kodiak-core/src/",
    "openzeppelin-contracts-upgradeable/=lib/kodiak-core/lib/openzeppelin-contracts-upgradeable/contracts/",
    "oz-8-upgradeable/=lib/oz-8-upgradeable/contracts/",
    "oz-8/=lib/oz-8/contracts/",
    "solmate/=lib/solmate/src/",
    "v2-periphery/=lib/v2-periphery/contracts/",
    "v3-periphery/=lib/v3-periphery/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IWETH","name":"_wBera","type":"address"},{"internalType":"address","name":"_kodiakRouter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"contract IKodiakIsland","name":"island","type":"address"},{"internalType":"uint256","name":"amount0Max","type":"uint256"},{"internalType":"uint256","name":"amount1Max","type":"uint256"},{"internalType":"uint256","name":"amount0Min","type":"uint256"},{"internalType":"uint256","name":"amount1Min","type":"uint256"},{"internalType":"uint256","name":"amountSharesMin","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"addLiquidity","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"uint256","name":"mintAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IKodiakIsland","name":"island","type":"address"},{"internalType":"uint256","name":"amount0Max","type":"uint256"},{"internalType":"uint256","name":"amount1Max","type":"uint256"},{"internalType":"uint256","name":"amount0Min","type":"uint256"},{"internalType":"uint256","name":"amount1Min","type":"uint256"},{"internalType":"uint256","name":"amountSharesMin","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"addLiquidityNative","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"uint256","name":"mintAmount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract IKodiakIsland","name":"island","type":"address"},{"internalType":"uint256","name":"totalAmountIn","type":"uint256"},{"internalType":"uint256","name":"amountSharesMin","type":"uint256"},{"internalType":"uint256","name":"maxStakingSlippageBPS","type":"uint256"},{"components":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"},{"internalType":"bool","name":"zeroForOne","type":"bool"},{"internalType":"bytes","name":"routeData","type":"bytes"}],"internalType":"struct RouterSwapParams","name":"swapData","type":"tuple"},{"internalType":"address","name":"receiver","type":"address"}],"name":"addLiquiditySingle","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"uint256","name":"mintAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IKodiakIsland","name":"island","type":"address"},{"internalType":"uint256","name":"amountSharesMin","type":"uint256"},{"internalType":"uint256","name":"maxStakingSlippageBPS","type":"uint256"},{"components":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"},{"internalType":"bool","name":"zeroForOne","type":"bool"},{"internalType":"bytes","name":"routeData","type":"bytes"}],"internalType":"struct RouterSwapParams","name":"swapData","type":"tuple"},{"internalType":"address","name":"receiver","type":"address"}],"name":"addLiquiditySingleNative","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"uint256","name":"mintAmount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"kodiakRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IKodiakIsland","name":"island","type":"address"},{"internalType":"uint256","name":"burnAmount","type":"uint256"},{"internalType":"uint256","name":"amount0Min","type":"uint256"},{"internalType":"uint256","name":"amount1Min","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"removeLiquidity","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"uint128","name":"liquidityBurned","type":"uint128"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IKodiakIsland","name":"island","type":"address"},{"internalType":"uint256","name":"burnAmount","type":"uint256"},{"internalType":"uint256","name":"amount0Min","type":"uint256"},{"internalType":"uint256","name":"amount1Min","type":"uint256"},{"internalType":"address payable","name":"receiver","type":"address"}],"name":"removeLiquidityNative","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"uint128","name":"liquidityBurned","type":"uint128"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wBera","outputs":[{"internalType":"contract IWETH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c06040523480156200001157600080fd5b50604051620023f6380380620023f6833981016040819052620000349162000065565b6001600160a01b039182166080521660a052620000a4565b6001600160a01b03811681146200006257600080fd5b50565b600080604083850312156200007957600080fd5b825162000086816200004c565b602084015190925062000099816200004c565b809150509250929050565b60805160a0516122d86200011e6000396000818161016701528181610f4b0152610f7d0152600081816101b30152818161024f015281816103a50152818161052b01528181610632015281816108af0152818161096201528181610e6b01528181610eac01528181611755015261183101526122d86000f3fe60806040526004361061007f5760003560e01c806374dbc2481161004e57806374dbc24814610135578063b4838ba814610155578063e335851f146101a1578063f7933ba7146101d557600080fd5b806318545b601461008b5780632b772da5146100be5780633005f5711461010257806359f842b21461011557600080fd5b3661008657005b600080fd5b61009e610099366004611e78565b6101f5565b604080519384526020840192909252908201526060015b60405180910390f35b3480156100ca57600080fd5b506100de6100d9366004611ef0565b6106cd565b6040805193845260208401929092526001600160801b0316908201526060016100b5565b61009e610110366004611f38565b610a02565b34801561012157600080fd5b506100de610130366004611ef0565b610a29565b34801561014157600080fd5b5061009e610150366004611f38565b610b1c565b34801561016157600080fd5b506101897f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b5565b3480156101ad57600080fd5b506101897f000000000000000000000000000000000000000000000000000000000000000081565b3480156101e157600080fd5b5061009e6101f0366004611fa1565b610b30565b600080600061271086111561024d5760405162461bcd60e51b81526020600482015260196024820152780e6e8c2d6d2dcce40e6d8d2e0e0c2ceca40e8dede40d0d2ced603b1b60448201526064015b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156102a857600080fd5b505af11580156102bc573d6000803e3d6000fd5b50505050506000886001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610301573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103259190612021565b90506000896001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610367573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038b9190612021565b905060006103998383610e67565b90506000806103ca85857f00000000000000000000000000000000000000000000000000000000000000008d610f39565b604051634c4a790d60e11b8152600481018390526024810182905291935091506001600160a01b038e1690639894f21a90604401606060405180830381865afa15801561041b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043f9190612045565b919950975095508b8610156104965760405162461bcd60e51b815260206004820152601f60248201527f5374616b696e673a2062656c6f77206d696e20736861726520616d6f756e74006044820152606401610244565b6104a08883612089565b91506104ac8782612089565b905082156105bb576127106104c18c82612089565b6104cb898461209c565b6104d591906120af565b6104df91906120c6565b8710156104fe5760405162461bcd60e51b8152600401610244906120e8565b61050b8d8989898d6111e4565b50508215905061059c57604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561057757600080fd5b505af115801561058b573d6000803e3d6000fd5b5061059c925033915084905061138f565b80156105b6576105b66001600160a01b03851633836114ad565b6106bd565b6127106105c88c82612089565b6105d28a8561209c565b6105dc91906120af565b6105e691906120c6565b8810156106055760405162461bcd60e51b8152600401610244906120e8565b6106128d8989898d6111e4565b5050811590506106a357604051632e1a7d4d60e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561067e57600080fd5b505af1158015610692573d6000803e3d6000fd5b506106a3925033915083905061138f565b81156106bd576106bd6001600160a01b03861633846114ad565b5050505050955095509592505050565b600080600080886001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610711573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107359190612021565b90506000896001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190612021565b905060006107a98383610e67565b90506107c06001600160a01b038c1633308d611510565b604051633f34d4cf60e21b8152600481018b90523060248201526001600160a01b038c169063fcd3533c906044016060604051808303816000875af115801561080d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610831919061212b565b919750955093508886108015906108485750878510155b61088d5760405162461bcd60e51b815260206004820152601660248201527572656365697665642062656c6f77206d696e696d756d60501b6044820152606401610244565b801561094657851561092757604051632e1a7d4d60e01b8152600481018790527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156108fb57600080fd5b505af115801561090f573d6000803e3d6000fd5b50610927925050506001600160a01b0388168761138f565b8415610941576109416001600160a01b03831688876114ad565b6109f4565b84156109da57604051632e1a7d4d60e01b8152600481018690527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156109ae57600080fd5b505af11580156109c2573d6000803e3d6000fd5b506109da925050506001600160a01b0388168661138f565b85156109f4576109f46001600160a01b03841688886114ad565b505050955095509592505050565b6000806000610a168a8a8a8a8a8a8a61154e565b9250925092509750975097945050505050565b60008080610a426001600160a01b03891633308a611510565b604051633f34d4cf60e21b8152600481018890526001600160a01b03858116602483015289169063fcd3533c906044016060604051808303816000875af1158015610a91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab5919061212b565b91945092509050858310801590610acc5750848210155b610b115760405162461bcd60e51b815260206004820152601660248201527572656365697665642062656c6f77206d696e696d756d60501b6044820152606401610244565b955095509592505050565b6000806000610a168a8a8a8a8a8a8a61192c565b6000806000612710861115610b835760405162461bcd60e51b81526020600482015260196024820152780e6e8c2d6d2dcce40e6d8d2e0e0c2ceca40e8dede40d0d2ced603b1b6044820152606401610244565b6000896001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be79190612021565b905060008a6001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4d9190612021565b90506000610c616060890160408a0161217e565b610c6b5781610c6d565b825b9050610c846001600160a01b03821633308e611510565b600080610c938585858d610f39565b604051634c4a790d60e11b8152600481018390526024810182905291935091506001600160a01b038f1690639894f21a90604401606060405180830381865afa158015610ce4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d089190612045565b919950975095508b861015610d5f5760405162461bcd60e51b815260206004820152601f60248201527f5374616b696e673a2062656c6f77206d696e20736861726520616d6f756e74006044820152606401610244565b610d6f60608b0160408c0161217e565b15610db957612710610d818c82612089565b610d8b90836120af565b610d9591906120c6565b871015610db45760405162461bcd60e51b8152600401610244906120e8565b610df9565b612710610dc68c82612089565b610dd090846120af565b610dda91906120c6565b881015610df95760405162461bcd60e51b8152600401610244906120e8565b610e038883612089565b9150610e0f8782612089565b9050610e1e8e8989898d6111e4565b505082159050610e3c57610e3c6001600160a01b03861633846114ad565b8015610e5657610e566001600160a01b03851633836114ad565b505050505096509650969350505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b031603610eaa57506001610f33565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031603610eeb57506000610f33565b60405162461bcd60e51b815260206004820152601e60248201527f6f6e652069736c616e6420746f6b656e206d75737420626520774265726100006044820152606401610244565b92915050565b600080610f716001600160a01b0385167f00000000000000000000000000000000000000000000000000000000000000008535611b36565b60006001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016610faa606086018661219b565b604051610fb89291906121e9565b6000604051808303816000865af19150503d8060008114610ff5576040519150601f19603f3d011682016040523d82523d6000602084013e610ffa565b606091505b505090508061103f5760405162461bcd60e51b815260206004820152601160248201527014ddd85c0e881cddd85c0819985a5b1959607a1b6044820152606401610244565b6040516370a0823160e01b81523060048201526001600160a01b038816906370a0823190602401602060405180830381865afa158015611083573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a791906121f9565b6040516370a0823160e01b81523060048201529093506001600160a01b038716906370a0823190602401602060405180830381865afa1580156110ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111291906121f9565b9150846001600160a01b0316876001600160a01b0316036111865783602001358210156111815760405162461bcd60e51b815260206004820152601b60248201527f537761703a20696e73756666696369656e7420746f6b656e4f757400000000006044820152606401610244565b6111da565b83602001358310156111da5760405162461bcd60e51b815260206004820152601b60248201527f537761703a20696e73756666696369656e7420746f6b656e4f757400000000006044820152606401610244565b5094509492505050565b6000808086156112655761126588888a6001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611231573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112559190612021565b6001600160a01b03169190611b36565b85156112ae576112ae88878a6001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611231573d6000803e3d6000fd5b6040516394bf804d60e01b8152600481018690526001600160a01b0385811660248301528916906394bf804d906044016060604051808303816000875af11580156112fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611321919061212b565b509093509150868314801561133557508582145b6113815760405162461bcd60e51b815260206004820152601c60248201527f756e657870656374656420616d6f756e7473206465706f7369746564000000006044820152606401610244565b849050955095509592505050565b804710156113df5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610244565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461142c576040519150601f19603f3d011682016040523d82523d6000602084013e611431565b606091505b50509050806114a85760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610244565b505050565b6040516001600160a01b0383166024820152604481018290526114a890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611be3565b6040516001600160a01b03808516602483015283166044820152606481018290526115489085906323b872dd60e01b906084016114d9565b50505050565b6000806000808a6001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611592573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115b69190612021565b905060008b6001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161c9190612021565b905060008060008e6001600160a01b0316639894f21a8f8f6040518363ffffffff1660e01b815260040161165a929190918252602082015260400190565b606060405180830381865afa158015611677573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169b9190612045565b9250925092508b83101580156116b157508a8210155b80156116bd5750898110155b6116fd5760405162461bcd60e51b815260206004820152601160248201527062656c6f77206d696e20616d6f756e747360781b6044820152606401610244565b6117078585610e67565b156117e857348e1461174d5760405162461bcd60e51b815260206004820152600f60248201526e6e6f7420656e6f756768206265726160881b6044820152606401610244565b82156117c8577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0846040518263ffffffff1660e01b81526004016000604051808303818588803b1580156117ae57600080fd5b505af11580156117c2573d6000803e3d6000fd5b50505050505b81156117e3576117e36001600160a01b038516333085611510565b6118bf565b348d146118295760405162461bcd60e51b815260206004820152600f60248201526e6e6f7420656e6f756768206265726160881b6044820152606401610244565b81156118a4577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561188a57600080fd5b505af115801561189e573d6000803e3d6000fd5b50505050505b82156118bf576118bf6001600160a01b038616333086611510565b6118cc8f8484848d6111e4565b919950975095506118dd8585610e67565b1561190557878e111561190057611900888f6118f99190612089565b339061138f565b61191a565b868d111561191a5761191a6118f9888f612089565b50505050509750975097945050505050565b6000806000808a6001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611970573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119949190612021565b905060008b6001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119fa9190612021565b905060008060008e6001600160a01b0316639894f21a8f8f6040518363ffffffff1660e01b8152600401611a38929190918252602082015260400190565b606060405180830381865afa158015611a55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a799190612045565b9250925092508b8310158015611a8f57508a8210155b8015611a9b5750898110155b611adb5760405162461bcd60e51b815260206004820152601160248201527062656c6f77206d696e20616d6f756e747360781b6044820152606401610244565b8215611af657611af66001600160a01b038616333086611510565b8115611b1157611b116001600160a01b038516333085611510565b611b1e8f8484848d6111e4565b97509750975050505050509750975097945050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa158015611b86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611baa91906121f9565b90506115488463095ea7b360e01b85611bc3868661209c565b6040516001600160a01b03909216602483015260448201526064016114d9565b6000611c38826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611cb89092919063ffffffff16565b9050805160001480611c59575080806020019051810190611c599190612212565b6114a85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610244565b6060611cc78484600085611ccf565b949350505050565b606082471015611d305760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610244565b600080866001600160a01b03168587604051611d4c9190612253565b60006040518083038185875af1925050503d8060008114611d89576040519150601f19603f3d011682016040523d82523d6000602084013e611d8e565b606091505b5091509150611d9f87838387611daa565b979650505050505050565b60608315611e19578251600003611e12576001600160a01b0385163b611e125760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610244565b5081611cc7565b611cc78383815115611e2e5781518083602001fd5b8060405162461bcd60e51b8152600401610244919061226f565b6001600160a01b0381168114611e5d57600080fd5b50565b600060808284031215611e7257600080fd5b50919050565b600080600080600060a08688031215611e9057600080fd5b8535611e9b81611e48565b94506020860135935060408601359250606086013567ffffffffffffffff811115611ec557600080fd5b611ed188828901611e60565b9250506080860135611ee281611e48565b809150509295509295909350565b600080600080600060a08688031215611f0857600080fd5b8535611f1381611e48565b94506020860135935060408601359250606086013591506080860135611ee281611e48565b600080600080600080600060e0888a031215611f5357600080fd5b8735611f5e81611e48565b96506020880135955060408801359450606088013593506080880135925060a0880135915060c0880135611f9181611e48565b8091505092959891949750929550565b60008060008060008060c08789031215611fba57600080fd5b8635611fc581611e48565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff811115611ff657600080fd5b61200289828a01611e60565b92505060a087013561201381611e48565b809150509295509295509295565b60006020828403121561203357600080fd5b815161203e81611e48565b9392505050565b60008060006060848603121561205a57600080fd5b8351925060208401519150604084015190509250925092565b634e487b7160e01b600052601160045260246000fd5b81810381811115610f3357610f33612073565b80820180821115610f3357610f33612073565b8082028115828204841417610f3357610f33612073565b6000826120e357634e487b7160e01b600052601260045260246000fd5b500490565b60208082526023908201527f5374616b696e6720536c6970706167653a2062656c6f77206d696e20616d6f756040820152626e747360e81b606082015260800190565b60008060006060848603121561214057600080fd5b835192506020840151915060408401516001600160801b038116811461216557600080fd5b809150509250925092565b8015158114611e5d57600080fd5b60006020828403121561219057600080fd5b813561203e81612170565b6000808335601e198436030181126121b257600080fd5b83018035915067ffffffffffffffff8211156121cd57600080fd5b6020019150368190038213156121e257600080fd5b9250929050565b8183823760009101908152919050565b60006020828403121561220b57600080fd5b5051919050565b60006020828403121561222457600080fd5b815161203e81612170565b60005b8381101561224a578181015183820152602001612232565b50506000910152565b6000825161226581846020870161222f565b9190910192915050565b602081526000825180602084015261228e81604085016020870161222f565b601f01601f1916919091016040019291505056fea26469706673582212202211cfd4f5b5f787a982788192fb87b6f37da69558d46402095cd8f67d2353f064736f6c634300081300330000000000000000000000006969696969696969696969696969696969696969000000000000000000000000e301e48f77963d3f7dbd2a4796962bd7f3867fb4

Deployed Bytecode

0x60806040526004361061007f5760003560e01c806374dbc2481161004e57806374dbc24814610135578063b4838ba814610155578063e335851f146101a1578063f7933ba7146101d557600080fd5b806318545b601461008b5780632b772da5146100be5780633005f5711461010257806359f842b21461011557600080fd5b3661008657005b600080fd5b61009e610099366004611e78565b6101f5565b604080519384526020840192909252908201526060015b60405180910390f35b3480156100ca57600080fd5b506100de6100d9366004611ef0565b6106cd565b6040805193845260208401929092526001600160801b0316908201526060016100b5565b61009e610110366004611f38565b610a02565b34801561012157600080fd5b506100de610130366004611ef0565b610a29565b34801561014157600080fd5b5061009e610150366004611f38565b610b1c565b34801561016157600080fd5b506101897f000000000000000000000000e301e48f77963d3f7dbd2a4796962bd7f3867fb481565b6040516001600160a01b0390911681526020016100b5565b3480156101ad57600080fd5b506101897f000000000000000000000000696969696969696969696969696969696969696981565b3480156101e157600080fd5b5061009e6101f0366004611fa1565b610b30565b600080600061271086111561024d5760405162461bcd60e51b81526020600482015260196024820152780e6e8c2d6d2dcce40e6d8d2e0e0c2ceca40e8dede40d0d2ced603b1b60448201526064015b60405180910390fd5b7f00000000000000000000000069696969696969696969696969696969696969696001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156102a857600080fd5b505af11580156102bc573d6000803e3d6000fd5b50505050506000886001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610301573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103259190612021565b90506000896001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610367573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038b9190612021565b905060006103998383610e67565b90506000806103ca85857f00000000000000000000000069696969696969696969696969696969696969698d610f39565b604051634c4a790d60e11b8152600481018390526024810182905291935091506001600160a01b038e1690639894f21a90604401606060405180830381865afa15801561041b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043f9190612045565b919950975095508b8610156104965760405162461bcd60e51b815260206004820152601f60248201527f5374616b696e673a2062656c6f77206d696e20736861726520616d6f756e74006044820152606401610244565b6104a08883612089565b91506104ac8782612089565b905082156105bb576127106104c18c82612089565b6104cb898461209c565b6104d591906120af565b6104df91906120c6565b8710156104fe5760405162461bcd60e51b8152600401610244906120e8565b61050b8d8989898d6111e4565b50508215905061059c57604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000069696969696969696969696969696969696969696001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561057757600080fd5b505af115801561058b573d6000803e3d6000fd5b5061059c925033915084905061138f565b80156105b6576105b66001600160a01b03851633836114ad565b6106bd565b6127106105c88c82612089565b6105d28a8561209c565b6105dc91906120af565b6105e691906120c6565b8810156106055760405162461bcd60e51b8152600401610244906120e8565b6106128d8989898d6111e4565b5050811590506106a357604051632e1a7d4d60e01b8152600481018290527f00000000000000000000000069696969696969696969696969696969696969696001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561067e57600080fd5b505af1158015610692573d6000803e3d6000fd5b506106a3925033915083905061138f565b81156106bd576106bd6001600160a01b03861633846114ad565b5050505050955095509592505050565b600080600080886001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610711573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107359190612021565b90506000896001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190612021565b905060006107a98383610e67565b90506107c06001600160a01b038c1633308d611510565b604051633f34d4cf60e21b8152600481018b90523060248201526001600160a01b038c169063fcd3533c906044016060604051808303816000875af115801561080d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610831919061212b565b919750955093508886108015906108485750878510155b61088d5760405162461bcd60e51b815260206004820152601660248201527572656365697665642062656c6f77206d696e696d756d60501b6044820152606401610244565b801561094657851561092757604051632e1a7d4d60e01b8152600481018790527f00000000000000000000000069696969696969696969696969696969696969696001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156108fb57600080fd5b505af115801561090f573d6000803e3d6000fd5b50610927925050506001600160a01b0388168761138f565b8415610941576109416001600160a01b03831688876114ad565b6109f4565b84156109da57604051632e1a7d4d60e01b8152600481018690527f00000000000000000000000069696969696969696969696969696969696969696001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156109ae57600080fd5b505af11580156109c2573d6000803e3d6000fd5b506109da925050506001600160a01b0388168661138f565b85156109f4576109f46001600160a01b03841688886114ad565b505050955095509592505050565b6000806000610a168a8a8a8a8a8a8a61154e565b9250925092509750975097945050505050565b60008080610a426001600160a01b03891633308a611510565b604051633f34d4cf60e21b8152600481018890526001600160a01b03858116602483015289169063fcd3533c906044016060604051808303816000875af1158015610a91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab5919061212b565b91945092509050858310801590610acc5750848210155b610b115760405162461bcd60e51b815260206004820152601660248201527572656365697665642062656c6f77206d696e696d756d60501b6044820152606401610244565b955095509592505050565b6000806000610a168a8a8a8a8a8a8a61192c565b6000806000612710861115610b835760405162461bcd60e51b81526020600482015260196024820152780e6e8c2d6d2dcce40e6d8d2e0e0c2ceca40e8dede40d0d2ced603b1b6044820152606401610244565b6000896001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be79190612021565b905060008a6001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4d9190612021565b90506000610c616060890160408a0161217e565b610c6b5781610c6d565b825b9050610c846001600160a01b03821633308e611510565b600080610c938585858d610f39565b604051634c4a790d60e11b8152600481018390526024810182905291935091506001600160a01b038f1690639894f21a90604401606060405180830381865afa158015610ce4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d089190612045565b919950975095508b861015610d5f5760405162461bcd60e51b815260206004820152601f60248201527f5374616b696e673a2062656c6f77206d696e20736861726520616d6f756e74006044820152606401610244565b610d6f60608b0160408c0161217e565b15610db957612710610d818c82612089565b610d8b90836120af565b610d9591906120c6565b871015610db45760405162461bcd60e51b8152600401610244906120e8565b610df9565b612710610dc68c82612089565b610dd090846120af565b610dda91906120c6565b881015610df95760405162461bcd60e51b8152600401610244906120e8565b610e038883612089565b9150610e0f8782612089565b9050610e1e8e8989898d6111e4565b505082159050610e3c57610e3c6001600160a01b03861633846114ad565b8015610e5657610e566001600160a01b03851633836114ad565b505050505096509650969350505050565b60007f00000000000000000000000069696969696969696969696969696969696969696001600160a01b0316836001600160a01b031603610eaa57506001610f33565b7f00000000000000000000000069696969696969696969696969696969696969696001600160a01b0316826001600160a01b031603610eeb57506000610f33565b60405162461bcd60e51b815260206004820152601e60248201527f6f6e652069736c616e6420746f6b656e206d75737420626520774265726100006044820152606401610244565b92915050565b600080610f716001600160a01b0385167f000000000000000000000000e301e48f77963d3f7dbd2a4796962bd7f3867fb48535611b36565b60006001600160a01b037f000000000000000000000000e301e48f77963d3f7dbd2a4796962bd7f3867fb416610faa606086018661219b565b604051610fb89291906121e9565b6000604051808303816000865af19150503d8060008114610ff5576040519150601f19603f3d011682016040523d82523d6000602084013e610ffa565b606091505b505090508061103f5760405162461bcd60e51b815260206004820152601160248201527014ddd85c0e881cddd85c0819985a5b1959607a1b6044820152606401610244565b6040516370a0823160e01b81523060048201526001600160a01b038816906370a0823190602401602060405180830381865afa158015611083573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a791906121f9565b6040516370a0823160e01b81523060048201529093506001600160a01b038716906370a0823190602401602060405180830381865afa1580156110ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111291906121f9565b9150846001600160a01b0316876001600160a01b0316036111865783602001358210156111815760405162461bcd60e51b815260206004820152601b60248201527f537761703a20696e73756666696369656e7420746f6b656e4f757400000000006044820152606401610244565b6111da565b83602001358310156111da5760405162461bcd60e51b815260206004820152601b60248201527f537761703a20696e73756666696369656e7420746f6b656e4f757400000000006044820152606401610244565b5094509492505050565b6000808086156112655761126588888a6001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611231573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112559190612021565b6001600160a01b03169190611b36565b85156112ae576112ae88878a6001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611231573d6000803e3d6000fd5b6040516394bf804d60e01b8152600481018690526001600160a01b0385811660248301528916906394bf804d906044016060604051808303816000875af11580156112fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611321919061212b565b509093509150868314801561133557508582145b6113815760405162461bcd60e51b815260206004820152601c60248201527f756e657870656374656420616d6f756e7473206465706f7369746564000000006044820152606401610244565b849050955095509592505050565b804710156113df5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610244565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461142c576040519150601f19603f3d011682016040523d82523d6000602084013e611431565b606091505b50509050806114a85760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610244565b505050565b6040516001600160a01b0383166024820152604481018290526114a890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611be3565b6040516001600160a01b03808516602483015283166044820152606481018290526115489085906323b872dd60e01b906084016114d9565b50505050565b6000806000808a6001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611592573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115b69190612021565b905060008b6001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161c9190612021565b905060008060008e6001600160a01b0316639894f21a8f8f6040518363ffffffff1660e01b815260040161165a929190918252602082015260400190565b606060405180830381865afa158015611677573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169b9190612045565b9250925092508b83101580156116b157508a8210155b80156116bd5750898110155b6116fd5760405162461bcd60e51b815260206004820152601160248201527062656c6f77206d696e20616d6f756e747360781b6044820152606401610244565b6117078585610e67565b156117e857348e1461174d5760405162461bcd60e51b815260206004820152600f60248201526e6e6f7420656e6f756768206265726160881b6044820152606401610244565b82156117c8577f00000000000000000000000069696969696969696969696969696969696969696001600160a01b031663d0e30db0846040518263ffffffff1660e01b81526004016000604051808303818588803b1580156117ae57600080fd5b505af11580156117c2573d6000803e3d6000fd5b50505050505b81156117e3576117e36001600160a01b038516333085611510565b6118bf565b348d146118295760405162461bcd60e51b815260206004820152600f60248201526e6e6f7420656e6f756768206265726160881b6044820152606401610244565b81156118a4577f00000000000000000000000069696969696969696969696969696969696969696001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561188a57600080fd5b505af115801561189e573d6000803e3d6000fd5b50505050505b82156118bf576118bf6001600160a01b038616333086611510565b6118cc8f8484848d6111e4565b919950975095506118dd8585610e67565b1561190557878e111561190057611900888f6118f99190612089565b339061138f565b61191a565b868d111561191a5761191a6118f9888f612089565b50505050509750975097945050505050565b6000806000808a6001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611970573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119949190612021565b905060008b6001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119fa9190612021565b905060008060008e6001600160a01b0316639894f21a8f8f6040518363ffffffff1660e01b8152600401611a38929190918252602082015260400190565b606060405180830381865afa158015611a55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a799190612045565b9250925092508b8310158015611a8f57508a8210155b8015611a9b5750898110155b611adb5760405162461bcd60e51b815260206004820152601160248201527062656c6f77206d696e20616d6f756e747360781b6044820152606401610244565b8215611af657611af66001600160a01b038616333086611510565b8115611b1157611b116001600160a01b038516333085611510565b611b1e8f8484848d6111e4565b97509750975050505050509750975097945050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa158015611b86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611baa91906121f9565b90506115488463095ea7b360e01b85611bc3868661209c565b6040516001600160a01b03909216602483015260448201526064016114d9565b6000611c38826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611cb89092919063ffffffff16565b9050805160001480611c59575080806020019051810190611c599190612212565b6114a85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610244565b6060611cc78484600085611ccf565b949350505050565b606082471015611d305760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610244565b600080866001600160a01b03168587604051611d4c9190612253565b60006040518083038185875af1925050503d8060008114611d89576040519150601f19603f3d011682016040523d82523d6000602084013e611d8e565b606091505b5091509150611d9f87838387611daa565b979650505050505050565b60608315611e19578251600003611e12576001600160a01b0385163b611e125760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610244565b5081611cc7565b611cc78383815115611e2e5781518083602001fd5b8060405162461bcd60e51b8152600401610244919061226f565b6001600160a01b0381168114611e5d57600080fd5b50565b600060808284031215611e7257600080fd5b50919050565b600080600080600060a08688031215611e9057600080fd5b8535611e9b81611e48565b94506020860135935060408601359250606086013567ffffffffffffffff811115611ec557600080fd5b611ed188828901611e60565b9250506080860135611ee281611e48565b809150509295509295909350565b600080600080600060a08688031215611f0857600080fd5b8535611f1381611e48565b94506020860135935060408601359250606086013591506080860135611ee281611e48565b600080600080600080600060e0888a031215611f5357600080fd5b8735611f5e81611e48565b96506020880135955060408801359450606088013593506080880135925060a0880135915060c0880135611f9181611e48565b8091505092959891949750929550565b60008060008060008060c08789031215611fba57600080fd5b8635611fc581611e48565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff811115611ff657600080fd5b61200289828a01611e60565b92505060a087013561201381611e48565b809150509295509295509295565b60006020828403121561203357600080fd5b815161203e81611e48565b9392505050565b60008060006060848603121561205a57600080fd5b8351925060208401519150604084015190509250925092565b634e487b7160e01b600052601160045260246000fd5b81810381811115610f3357610f33612073565b80820180821115610f3357610f33612073565b8082028115828204841417610f3357610f33612073565b6000826120e357634e487b7160e01b600052601260045260246000fd5b500490565b60208082526023908201527f5374616b696e6720536c6970706167653a2062656c6f77206d696e20616d6f756040820152626e747360e81b606082015260800190565b60008060006060848603121561214057600080fd5b835192506020840151915060408401516001600160801b038116811461216557600080fd5b809150509250925092565b8015158114611e5d57600080fd5b60006020828403121561219057600080fd5b813561203e81612170565b6000808335601e198436030181126121b257600080fd5b83018035915067ffffffffffffffff8211156121cd57600080fd5b6020019150368190038213156121e257600080fd5b9250929050565b8183823760009101908152919050565b60006020828403121561220b57600080fd5b5051919050565b60006020828403121561222457600080fd5b815161203e81612170565b60005b8381101561224a578181015183820152602001612232565b50506000910152565b6000825161226581846020870161222f565b9190910192915050565b602081526000825180602084015261228e81604085016020870161222f565b601f01601f1916919091016040019291505056fea26469706673582212202211cfd4f5b5f787a982788192fb87b6f37da69558d46402095cd8f67d2353f064736f6c63430008130033

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

0000000000000000000000006969696969696969696969696969696969696969000000000000000000000000e301e48f77963d3f7dbd2a4796962bd7f3867fb4

-----Decoded View---------------
Arg [0] : _wBera (address): 0x6969696969696969696969696969696969696969
Arg [1] : _kodiakRouter (address): 0xe301E48F77963D3F7DbD2a4796962Bd7f3867Fb4

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000006969696969696969696969696969696969696969
Arg [1] : 000000000000000000000000e301e48f77963d3f7dbd2a4796962bd7f3867fb4


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.