IMultiPositionManager.sol
Methods
accruedSteerFees0()
function accruedSteerFees0() external view returns (uint256)
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
accruedSteerFees1()
function accruedSteerFees1() external view returns (uint256)
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
accruedStrategistFees0()
function accruedStrategistFees0() external view returns (uint256)
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
accruedStrategistFees1()
function accruedStrategistFees1() external view returns (uint256)
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
allowance(address,address)
function allowance(address owner, address spender) external view returns (uint256)
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.
Parameters
| Name | Type | Description |
|---|---|---|
| owner | address | undefined |
| spender | address | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
approve(address,uint256)
function approve(address spender, uint256 amount) external nonpayable returns (bool)
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.
Parameters
| Name | Type | Description |
|---|---|---|
| spender | address | undefined |
| amount | uint256 | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | bool | undefined |
balanceOf(address)
function balanceOf(address account) external view returns (uint256)
Returns the amount of tokens owned by account.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
deposit(uint256,uint256,uint256,uint256,address)
function deposit(uint256 amount0Desired, uint256 amount1Desired, uint256 amount0Min, uint256 amount1Min, address to) external nonpayable returns (uint256 shares, uint256 amount0, uint256 amount1)
Deposits tokens in proportion to the vault's current holdings.These tokens sit in the vault and are not used for liquidity on Uniswap until the next rebalance.
Parameters
| Name | Type | Description |
|---|---|---|
| amount0Desired | uint256 | Max amount of token0 to deposit |
| amount1Desired | uint256 | Max amount of token1 to deposit |
| amount0Min | uint256 | Revert if resulting amount0 is less than this |
| amount1Min | uint256 | Revert if resulting amount1 is less than this |
| to | address | Recipient of shares |
Returns
| Name | Type | Description |
|---|---|---|
| shares | uint256 | Number of shares minted |
| amount0 | uint256 | Amount of token0 deposited |
| amount1 | uint256 | Amount of token1 deposited |
emergencyBurn(int24,int24,uint128)
function emergencyBurn(int24 tickLower, int24 tickUpper, uint128 liquidity) external nonpayable returns (uint256 amount0, uint256 amount1)
Removes liquidity in case of emergency.
Parameters
| Name | Type | Description |
|---|---|---|
| tickLower | int24 | undefined |
| tickUpper | int24 | undefined |
| liquidity | uint128 | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| amount0 | uint256 | undefined |
| amount1 | uint256 | undefined |
getTotalAmounts()
function getTotalAmounts() external view returns (uint256 total0, uint256 total1)
Calculates the vault's total holdings of token0 and token1 - in other words, how much of each token the vault would hold if it withdrew all its liquidity from Uniswap.this function DOES NOT include fees. To include fees, first poke() and then call getTotalAmounts. There's a function inside the periphery to do so.
Returns
| Name | Type | Description |
|---|---|---|
| total0 | uint256 | undefined |
| total1 | uint256 | undefined |
initialize(address,address,bytes)
function initialize(address _vaultManager, address _steer, bytes _params) external nonpayable
initializes vault param _vaultManageris the address which will manage the vault being created param _params is all other parameters this vault will use. param _tokenName is the name of the LPT of this vault. param _symbol is the symbol of the LPT of this vault. param token0 is address of token0 param token1 is address of token1 param _FEE is pool fee, how much is charged for a swap
Parameters
| Name | Type | Description |
|---|---|---|
| _vaultManager | address | undefined |
| _steer | address | undefined |
| _params | bytes | undefined |
maxTotalSupply()
function maxTotalSupply() external view returns (uint256)
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
poke()
function poke() external nonpayable
burns each vault position which contains liquidity, updating fees owed to that position.call this before calling getTotalAmounts if total amounts must include fees. There's a function in the periphery to do so through a static call.
pool()
function pool() external view returns (contract IUniswapV3Pool)
Returns
| Name | Type | Description |
|---|---|---|
| _0 | contract IUniswapV3Pool | undefined |
setMaxTotalSupply(uint256)
function setMaxTotalSupply(uint256 _maxTotalSupply) external nonpayable
Used to change deposit cap for a guarded launch or to ensure vault doesn't grow too large relative to the pool. Cap is on total supply rather than amounts of token0 and token1 as those amounts fluctuate naturally over time.
Parameters
| Name | Type | Description |
|---|---|---|
| _maxTotalSupply | uint256 | undefined |
setTWAPnums(int24,uint32)
function setTWAPnums(int24 newMax, uint32 newInterval) external nonpayable
Used to change the MaxTickChange and twapinterval used when checking for flash loans, by default set to 500 ticks and 45 seconds, respectively
Parameters
| Name | Type | Description |
|---|---|---|
| newMax | int24 | undefined |
| newInterval | uint32 | undefined |
steerCollectFees(uint256,uint256,address)
function steerCollectFees(uint256 amount0, uint256 amount1, address to) external nonpayable
Used to collect accumulated protocol fees.
Parameters
| Name | Type | Description |
|---|---|---|
| amount0 | uint256 | undefined |
| amount1 | uint256 | undefined |
| to | address | undefined |
strategistCollectFees(uint256,uint256,address)
function strategistCollectFees(uint256 amount0, uint256 amount1, address to) external nonpayable
Used to collect accumulated protocol fees.
Parameters
| Name | Type | Description |
|---|---|---|
| amount0 | uint256 | undefined |
| amount1 | uint256 | undefined |
| to | address | undefined |
sweep(address,uint256,address)
function sweep(address token, uint256 amount, address to) external nonpayable
Removes tokens accidentally sent to this vault.
Parameters
| Name | Type | Description |
|---|---|---|
| token | address | undefined |
| amount | uint256 | undefined |
| to | address | undefined |
tend(tuple,int256,uint160)
function tend(IMultiPositionManager.LiquidityPositions newPositions, int256 swapAmount, uint160 sqrtPriceLimitX96) external nonpayable
Parameters
| Name | Type | Description |
|---|---|---|
| newPositions | IMultiPositionManager.LiquidityPositions | undefined |
| swapAmount | int256 | undefined |
| sqrtPriceLimitX96 | uint160 | undefined |
token0()
function token0() external view returns (address)
Returns
| Name | Type | Description |
|---|---|---|
| _0 | address | undefined |
token1()
function token1() external view returns (address)
Returns
| Name | Type | Description |
|---|---|---|
| _0 | address | undefined |
totalSupply()
function totalSupply() external view returns (uint256)
Returns the amount of tokens in existence.
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
transfer(address,uint256)
function transfer(address recipient, uint256 amount) external nonpayable returns (bool)
Moves amount tokens from the caller's account to recipient. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
Parameters
| Name | Type | Description |
|---|---|---|
| recipient | address | undefined |
| amount | uint256 | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | bool | undefined |
transferFrom(address,address,uint256)
function transferFrom(address sender, address recipient, uint256 amount) external nonpayable returns (bool)
Moves amount tokens from sender to recipient 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.
Parameters
| Name | Type | Description |
|---|---|---|
| sender | address | undefined |
| recipient | address | undefined |
| amount | uint256 | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | bool | undefined |
vaultRegistry()
function vaultRegistry() external view returns (address)
Returns
| Name | Type | Description |
|---|---|---|
| _0 | address | undefined |
withdraw(uint256,uint256,uint256,address)
function withdraw(uint256 shares, uint256 amount0Min, uint256 amount1Min, address to) external nonpayable returns (uint256 amount0, uint256 amount1)
Withdraws tokens in proportion to the vault's holdings.
Parameters
| Name | Type | Description |
|---|---|---|
| shares | uint256 | Shares burned by sender |
| amount0Min | uint256 | Revert if resulting amount0 is smaller than this |
| amount1Min | uint256 | Revert if resulting amount1 is smaller than this |
| to | address | Recipient of tokens |
Returns
| Name | Type | Description |
|---|---|---|
| amount0 | uint256 | Amount of token0 sent to recipient |
| amount1 | uint256 | Amount of token1 sent to recipient |
Events
Approval
event Approval(address indexed owner, address indexed spender, uint256 value)
Parameters
| Name | Type | Description |
|---|---|---|
owner indexed | address | undefined |
spender indexed | address | undefined |
| value | uint256 | undefined |
Transfer
event Transfer(address indexed from, address indexed to, uint256 value)
Parameters
| Name | Type | Description |
|---|---|---|
from indexed | address | undefined |
to indexed | address | undefined |
| value | uint256 | undefined |