The Kodiak Island contracts provide a framework for creating and managing concentrated liquidity positions on Kodiak V3. They enable users to deposit tokens into a managed Kodiak V3 position, receiving shares in return. They allow managers to rebalance the position, collect fees, and adjust the position and management parameters. The contracts support minting, burning, rebalancing, and integration with external routers for complex strategies.
These functions are used to mint/burn island shares resulting in adding/removing liquidity from the island's underlying v3 pool position. It is highly recommended to use the Island Router to add/remove liquidity as it handles slippage settings.
Mints new Island tokens by providing liquidity to the underlying Kodiak V3 position.
Burns Island tokens to withdraw underlying assets.
Collects the fee earned by the island's position and reinvests as much of token0 and token1 into the position as possible after deducting the manager fee from the collected fee.
This function allows you to find the optimal deposit amounts for token0 and token1 in correct ratio to deposit maximally into the underlying island position Arguments:
This function calculates the underlying token balances at a specific price point Arguments:
Returns the current manager address. Should be address(0) for unmanaged islands
This is applicable only for managed islands. Permissionless islands only expose the functionality to compound the fee collected.
For active management of the island, the manager fee is collected from the UniV3 earned fees. For Kodiak team managed islands the manager fee is 0.
Rebalances the position by changing price range and optionally performing underlying pool swaps Arguments:
Notes: In order to generate the parameters for an executive rebalance one has to understand the flow of this operation. First, the Kodiak island removes all the liquidity and fees earned. Then, it tries to deposit as much liquidity as possible around the new price range. Next, whatever is leftover is then swapped based on the swap parameters. Finally, another deposit of maximal liquidity to the position is attempted and any leftover sits in the contract balance waiting to be reinvested.
Rebalances using an external router for optimized swaps across all available liquidity. Arguments:
Updates unmanaged island parameters to match factory settings when updated.
Copy [
{
"type": "function",
"name": "DOMAIN_SEPARATOR",
"inputs": [],
"outputs": [
{
"name": "result",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "allowance",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
},
{
"name": "spender",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "result",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "approve",
"inputs": [
{
"name": "spender",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "balanceOf",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "result",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "burn",
"inputs": [
{
"name": "burnAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "receiver",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "amount0",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "amount1",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "liquidityBurned",
"type": "uint128",
"internalType": "uint128"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "compounderSlippageBPS",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint16",
"internalType": "uint16"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "compounderSlippageInterval",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint32",
"internalType": "uint32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "decimals",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint8",
"internalType": "uint8"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "executiveRebalance",
"inputs": [
{
"name": "newLowerTick",
"type": "int24",
"internalType": "int24"
},
{
"name": "newUpperTick",
"type": "int24",
"internalType": "int24"
},
{
"name": "swapThresholdPrice",
"type": "uint160",
"internalType": "uint160"
},
{
"name": "swapAmountBPS",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "zeroForOne",
"type": "bool",
"internalType": "bool"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "executiveRebalanceWithRouter",
"inputs": [
{
"name": "newLowerTick",
"type": "int24",
"internalType": "int24"
},
{
"name": "newUpperTick",
"type": "int24",
"internalType": "int24"
},
{
"name": "swapData",
"type": "tuple",
"internalType": "struct SwapData",
"components": [
{
"name": "router",
"type": "address",
"internalType": "address"
},
{
"name": "amountIn",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "minAmountOut",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "zeroForOne",
"type": "bool",
"internalType": "bool"
},
{
"name": "routeData",
"type": "bytes",
"internalType": "bytes"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "getAvgPrice",
"inputs": [
{
"name": "interval",
"type": "uint32",
"internalType": "uint32"
}
],
"outputs": [
{
"name": "avgSqrtPriceX96",
"type": "uint160",
"internalType": "uint160"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getMintAmounts",
"inputs": [
{
"name": "amount0Max",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "amount1Max",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "amount0",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "amount1",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "mintAmount",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getPositionID",
"inputs": [],
"outputs": [
{
"name": "positionID",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getUnderlyingBalances",
"inputs": [],
"outputs": [
{
"name": "amount0Current",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "amount1Current",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getUnderlyingBalancesAtPrice",
"inputs": [
{
"name": "sqrtRatioX96",
"type": "uint160",
"internalType": "uint160"
}
],
"outputs": [
{
"name": "amount0Current",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "amount1Current",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "initialize",
"inputs": [
{
"name": "_name",
"type": "string",
"internalType": "string"
},
{
"name": "_symbol",
"type": "string",
"internalType": "string"
},
{
"name": "_pool",
"type": "address",
"internalType": "address"
},
{
"name": "_managerFeeBPS",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "_lowerTick",
"type": "int24",
"internalType": "int24"
},
{
"name": "_upperTick",
"type": "int24",
"internalType": "int24"
},
{
"name": "_manager_",
"type": "address",
"internalType": "address"
},
{
"name": "_managerTreasury",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "isManaged",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "islandFactory",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IKodiakIslandFactory"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "lowerTick",
"inputs": [],
"outputs": [
{
"name": "",
"type": "int24",
"internalType": "int24"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "manager",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "managerBalance0",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "managerBalance1",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "managerFeeBPS",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint16",
"internalType": "uint16"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "managerTreasury",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "mint",
"inputs": [
{
"name": "mintAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "receiver",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "amount0",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "amount1",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "liquidityMinted",
"type": "uint128",
"internalType": "uint128"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "name",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "nonces",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "result",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "pause",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "paused",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "pauser",
"inputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "permit",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
},
{
"name": "spender",
"type": "address",
"internalType": "address"
},
{
"name": "value",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "deadline",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "v",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "r",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "s",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "pool",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IUniswapV3Pool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "rebalance",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "renounceOwnership",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "restrictedMint",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "setPauser",
"inputs": [
{
"name": "_pauser",
"type": "address",
"internalType": "address"
},
{
"name": "_status",
"type": "bool",
"internalType": "bool"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setRestrictedMint",
"inputs": [
{
"name": "_status",
"type": "bool",
"internalType": "bool"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setRouter",
"inputs": [
{
"name": "_router",
"type": "address",
"internalType": "address"
},
{
"name": "_status",
"type": "bool",
"internalType": "bool"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "swapRouter",
"inputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "symbol",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "syncToFactory",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "token0",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IERC20"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "token1",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IERC20"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "totalSupply",
"inputs": [],
"outputs": [
{
"name": "result",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "transfer",
"inputs": [
{
"name": "to",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "transferFrom",
"inputs": [
{
"name": "from",
"type": "address",
"internalType": "address"
},
{
"name": "to",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "transferOwnership",
"inputs": [
{
"name": "newOwner",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "uniswapV3MintCallback",
"inputs": [
{
"name": "amount0Owed",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "amount1Owed",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "uniswapV3SwapCallback",
"inputs": [
{
"name": "amount0Delta",
"type": "int256",
"internalType": "int256"
},
{
"name": "amount1Delta",
"type": "int256",
"internalType": "int256"
},
{
"name": "",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "unpause",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "updateManagerParams",
"inputs": [
{
"name": "newManagerFeeBPS",
"type": "int16",
"internalType": "int16"
},
{
"name": "newManagerTreasury",
"type": "address",
"internalType": "address"
},
{
"name": "newSlippageBPS",
"type": "int16",
"internalType": "int16"
},
{
"name": "newSlippageInterval",
"type": "int32",
"internalType": "int32"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "upperTick",
"inputs": [],
"outputs": [
{
"name": "",
"type": "int24",
"internalType": "int24"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "version",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "withdrawManagerBalance",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "worstAmountOut",
"inputs": [
{
"name": "amountIn",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "slippageBPS",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "avgSqrtPriceX96",
"type": "uint160",
"internalType": "uint160"
},
{
"name": "zeroForOne",
"type": "bool",
"internalType": "bool"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "pure"
},
{
"type": "event",
"name": "Approval",
"inputs": [
{
"name": "owner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "spender",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Burned",
"inputs": [
{
"name": "receiver",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "burnAmount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "amount0Out",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "amount1Out",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "liquidityBurned",
"type": "uint128",
"indexed": false,
"internalType": "uint128"
}
],
"anonymous": false
},
{
"type": "event",
"name": "FeesEarned",
"inputs": [
{
"name": "feesEarned0",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "feesEarned1",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Minted",
"inputs": [
{
"name": "receiver",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "mintAmount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "amount0In",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "amount1In",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "liquidityMinted",
"type": "uint128",
"indexed": false,
"internalType": "uint128"
}
],
"anonymous": false
},
{
"type": "event",
"name": "OwnershipTransferred",
"inputs": [
{
"name": "previousManager",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "newManager",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Paused",
"inputs": [
{
"name": "account",
"type": "address",
"indexed": false,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "PauserSet",
"inputs": [
{
"name": "pauser",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "status",
"type": "bool",
"indexed": false,
"internalType": "bool"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Rebalance",
"inputs": [
{
"name": "compounder",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "lowerTick_",
"type": "int24",
"indexed": false,
"internalType": "int24"
},
{
"name": "upperTick_",
"type": "int24",
"indexed": false,
"internalType": "int24"
},
{
"name": "liquidityBefore",
"type": "uint128",
"indexed": false,
"internalType": "uint128"
},
{
"name": "liquidityAfter",
"type": "uint128",
"indexed": false,
"internalType": "uint128"
}
],
"anonymous": false
},
{
"type": "event",
"name": "RestrictedMintSet",
"inputs": [
{
"name": "status",
"type": "bool",
"indexed": false,
"internalType": "bool"
}
],
"anonymous": false
},
{
"type": "event",
"name": "RouterSet",
"inputs": [
{
"name": "router",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "status",
"type": "bool",
"indexed": false,
"internalType": "bool"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Transfer",
"inputs": [
{
"name": "from",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "to",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Unpaused",
"inputs": [
{
"name": "account",
"type": "address",
"indexed": false,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "UpdateManagerParams",
"inputs": [
{
"name": "managerFeeBPS",
"type": "uint16",
"indexed": false,
"internalType": "uint16"
},
{
"name": "managerTreasury",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "compounderSlippageBPS",
"type": "uint16",
"indexed": false,
"internalType": "uint16"
},
{
"name": "compounderSlippageInterval",
"type": "uint32",
"indexed": false,
"internalType": "uint32"
}
],
"anonymous": false
},
{
"type": "error",
"name": "AllowanceOverflow",
"inputs": []
},
{
"type": "error",
"name": "AllowanceUnderflow",
"inputs": []
},
{
"type": "error",
"name": "InsufficientAllowance",
"inputs": []
},
{
"type": "error",
"name": "InsufficientBalance",
"inputs": []
},
{
"type": "error",
"name": "InvalidPermit",
"inputs": []
},
{
"type": "error",
"name": "Permit2AllowanceIsFixedAtInfinity",
"inputs": []
},
{
"type": "error",
"name": "PermitExpired",
"inputs": []
},
{
"type": "error",
"name": "Reentrancy",
"inputs": []
},
{
"type": "error",
"name": "TotalSupplyOverflow",
"inputs": []
}
]