Kodiak Island
The implementation of kodiak Island contract
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.
Adding/Removing Liquidity
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.
Adding Liquidity
function mint(
uint256 mintAmount,
address receiver
) external returns (
uint256 amount0,
uint256 amount1,
uint128 liquidityMinted
)
Mints new Island tokens by providing liquidity to the underlying Kodiak V3 position.
mintAmount
: Number of Island tokens to mintreceiver
: Address to receive the minted tokensReturns amounts of token0/token1 used and liquidity added
Removing Liquidity
function burn(
uint256 burnAmount,
address receiver
) external returns (
uint256 amount0,
uint256 amount1,
uint128 liquidityBurned
)
Burns Island tokens to withdraw underlying assets.
burnAmount
: Number of Island tokens to burnreceiver
: Address to receive the underlying tokensReturns amounts of token0/token1 received and liquidity removed
Compounding collected fee
function rebalance() external {}
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.
View Functions
Get Underlying Balances
function getUnderlyingBalances() external view returns (
uint256 amount0Current,
uint256 amount1Current
)
Returns:
amount0Current
: The total amounts of underlying tokens represented by the entire Island supply. This includes deployed liqudity (uni v3 pool tokens), any unclaimed earned fee, and any undeployed tokensamount1Current
: The total amounts of underlying tokens represented by the entire Island supply. This includes deployed liqudity (uni v3 pool tokens), any unclaimed earned fee, and any undeployed tokens resulting from fee imbalance
Get Mint Amounts
function getMintAmounts(
uint256 amount0Max,
uint256 amount1Max
) external view returns (
uint256 amount0,
uint256 amount1,
uint256 mintAmount
)
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:
amount0Max
: Max amount of token0 the user is willing to depositamount1Max
: Max amount of token1 the user is willing to deposit Returns:amount0
: The amount of token0 used from the maxamount1
: The amount of token1 used from the maxmintAmount
: The number of island tokens minted using amount0 and amount1
Get Underlying Balances At Price
function getUnderlyingBalancesAtPrice(
uint160 sqrtRatioX96
) external view returns (
uint256 amount0Current,
uint256 amount1Current
)
This function calculates the underlying token balances at a specific price point Arguments:
sqrtRatioX96
: The sqrt price to calculate balances at, in Q96 format Returns:amount0Current
: Amount of token0 at the specified priceamount1Current
: Amount of token1 at the specified price
Get Position ID
function getPositionID() external view returns (bytes32 positionID)
Returns the unique identifier for the current Kodiak V3 position Returns:
positionID
: Keccak256 hash of packed (island address, lowerTick, upperTick)
Get Token0
function token0() external view returns (IERC20)
Returns the address of token0
Get Token1
function token1() external view returns (IERC20)
Returns the address of token1
Get Upper Tick
function upperTick() external view returns (int24)
Returns the upper tick of the island's position
Get Lower Tick
function lowerTick() external view returns (int24)
Returns the lower tick of the island's position
Get Pool
function pool() external view returns (IUniswapV3Pool)
Returns the address of the Kodiak V3 pool
Get Total Supply
function totalSupply() external view returns (uint256)
Returns the total supply of the island tokens
Get Balance Of
function balanceOf(address account) external view returns (uint256)
Returns the balance of the specified account
Get Manager Fee BPS
function managerFeeBPS() external view returns (uint16)
Returns the manager fee in basis points
Get Manager Treasury
function managerTreasury() external view returns (address)
Returns the manager treasury address
Get Manager Balance 0
function managerBalance0() external view returns (uint256)
Returns the manager balance of token0
Get Manager Balance 1
function managerBalance1() external view returns (uint256)
Returns the manager balance of token1
Get Manager
function manager() external view returns (address)
Returns the current manager address. Should be address(0) for unmanaged islands
Island Management
This is applicable only for managed islands. Permissionless islands only expose the functionality to compound the fee collected.
Admin roles involved
manager
- can alter island position bounds to manage liquidity optimallypauser
- can pause operations in case of a security breach
Island Configuration Parameters
Manager Parameters
manager
: The address authorized to perform management operations like rebalancingmanagerTreasury
: Address where manager fees are sentmanagerFeeBPS
: Percentage of earned fees that go to the manager (in basis points, max 10000)restrictedMint
: When true, only the manager can mint new Island tokenscompounderSlippageBPS
: Maximum allowed slippage for rebalance operations (in basis points)compounderSlippageInterval
: Time window for TWAP price calculation using kodiak pool observations (in seconds)
Island Position Parameters
lowerTick
: Lower price bound of the Kodiak V3 positionupperTick
: Upper price bound of the Kodiak V3 positionpool
: The underlying Kodiak V3 pool addresstoken0
: First token in the uni pool pairtoken1
: Second token in the uni pool pair
Manager Fee
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.
Fee = (Total Fees Earned * managerFeeBPS) / 10000
Unmanaged/Permissionless Islands use the Island factory's default fee settings
Restricted Minting
When restrictedMint
is enabled:
Only the manager can mint new Island tokens
The first mint needs to atleast add INITIAL_MINT amount of liquidity.After the first mint this liquidity is burned.
Manager Functions
Update Manager Parameters
function updateManagerParams(
int16 newManagerFeeBPS,
address newManagerTreasury,
int16 newSlippageBPS,
int32 newSlippageInterval
) external
Updates the manager configuration parameters for the island Arguments:
newManagerFeeBPS
: New manager fee in basis points (-1 to keep current)newManagerTreasury
: New treasury address (address(0) to keep current)newSlippageBPS
: New slippage tolerance in basis points (-1 to keep current)newSlippageInterval
: New TWAP interval in seconds (-1 to keep current)
Executive Rebalance
function executiveRebalance(
int24 newLowerTick,
int24 newUpperTick,
uint160 swapThresholdPrice,
uint256 swapAmountBPS,
bool zeroForOne
) external
Rebalances the position by changing price range and optionally performing underlying pool swaps Arguments:
newLowerTick
: New lower price bound of the positionnewUpperTick
: New upper price bound of the positionswapThresholdPrice
: Maximum/minimum price for the swap in sqrtPriceX96 for uni v3 slippage protectionswapAmountBPS
: Percentage of excess available tokens to swap in BPSzeroForOne
: True to swap token0 for token1, false for opposite
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.
Call getUnderlyingBalances on the ArrakisVault to obtain amount0Current and amount1Current
Compute amount0Liquidity and amount1Liquidity using LiquidityAmounts.sol library, the new position bounds, the current price and the current amounts from step 1.
Compute amount0Leftover and amount1Leftover with formula amount0Leftover = amount0Current - amount0Liquidity. In most cases one of these values will be 0 (or very close to 0).
Use amount0Liquidity and amount1Liquidity to compute the current proportion of each asset needed.
Use the amount0Leftover and amount1Leftover and the proportion from previous step to compute which token to swap and the swapAmount.
Convert swapAmount to swapAmountBPS by doing swapAmount * 10000 / amountLeftover for the token being swapped.
Executive Rebalance With Router
function executiveRebalanceWithRouter(
int24 newLowerTick,
int24 newUpperTick,
SwapData calldata swapData
) external
Rebalances using an external router for optimized swaps across all available liquidity. Arguments:
newLowerTick
: New lower price bound of the positionnewUpperTick
: New upper price bound of the positionswapData
: Struct containing:router
: Address of whitelisted router to useamountIn
: Amount of tokens to swapminAmountOut
: Minimum tokens to receivezeroForOne
: Swap directionrouteData
: Encoded swap route data
Set Restricted Mint
function setRestrictedMint(bool _status) external
Restricts minting to only the manager address Arguments:
_status
: True to restrict minting, false to allow public minting
Set Pauser
function setPauser(address _pauser, bool _status) external
Adds or removes an address from the pauser role Arguments:
_pauser
: Address to modify pauser status for_status
: True to add as pauser, false to remove
Pause/Unpause
function pause() external
function unpause() external
Emergency functions to pause/unpause all island operations
pause
: Can be called by manager or pauserunpause
: Can only be called by manager
Fee Management
Withdraw Manager Balance
function withdrawManagerBalance() external
Withdraws accumulated manager fees to the manager treasury
Transfers all accumulated token0 and token1 fees
Resets manager balance tracking to zero
Sync To Factory
function syncToFactory() public
Updates unmanaged island parameters to match factory settings when updated.
Updates manager treasury to factory treasury
Updates manager fee to factory default fee
Only affects islands with no active manager
ABI
[
{
"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": []
}
]
Last updated