Skip to main content

IMultiPositionManager.sol

Methods

accruedSteerFees0()

Solidity

function accruedSteerFees0() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

accruedSteerFees1()

Solidity

function accruedSteerFees1() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

accruedStrategistFees0()

Solidity

function accruedStrategistFees0() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

accruedStrategistFees1()

Solidity

function accruedStrategistFees1() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

allowance(address,address)

Solidity

function allowance(address owner, address spender) external view returns (uint256)
Details

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

NameTypeDescription
owneraddressundefined
spenderaddressundefined

Returns

NameTypeDescription
_0uint256undefined

approve(address,uint256)

Solidity

function approve(address spender, uint256 amount) external nonpayable returns (bool)
Details

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

NameTypeDescription
spenderaddressundefined
amountuint256undefined

Returns

NameTypeDescription
_0boolundefined

balanceOf(address)

Solidity

function balanceOf(address account) external view returns (uint256)
Details

Returns the amount of tokens owned by account.

Parameters

NameTypeDescription
accountaddressundefined

Returns

NameTypeDescription
_0uint256undefined

claimYieldAll(address,uint256,uint256)

Solidity

function claimYieldAll(address _receiver, uint256 _amountWETH, uint256 _amountUSDB) external nonpayable

Parameters

NameTypeDescription
_receiveraddressundefined
_amountWETHuint256undefined
_amountUSDBuint256undefined

deposit(uint256,uint256,uint256,uint256,address)

Solidity

function deposit(uint256 amount0Desired, uint256 amount1Desired, uint256 amount0Min, uint256 amount1Min, address to) external nonpayable returns (uint256 shares, uint256 amount0, uint256 amount1)
Details

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

NameTypeDescription
amount0Desireduint256Max amount of token0 to deposit
amount1Desireduint256Max amount of token1 to deposit
amount0Minuint256Revert if resulting amount0 is less than this
amount1Minuint256Revert if resulting amount1 is less than this
toaddressRecipient of shares

Returns

NameTypeDescription
sharesuint256Number of shares minted
amount0uint256Amount of token0 deposited
amount1uint256Amount of token1 deposited

emergencyBurn(int24,int24,uint128)

Solidity

function emergencyBurn(int24 tickLower, int24 tickUpper, uint128 liquidity) external nonpayable returns (uint256 amount0, uint256 amount1)
Details

Removes liquidity in case of emergency.

Parameters

NameTypeDescription
tickLowerint24undefined
tickUpperint24undefined
liquidityuint128undefined

Returns

NameTypeDescription
amount0uint256undefined
amount1uint256undefined

getTotalAmounts()

Solidity

function getTotalAmounts() external view returns (uint256 total0, uint256 total1)
Details

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

NameTypeDescription
total0uint256undefined
total1uint256undefined

initialize(address,address,address,bytes)

Solidity

function initialize(address _vaultManager, address, address _steer, bytes _params) external nonpayable
Details

initializes vault param _vaultManager is 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

NameTypeDescription
_vaultManageraddressundefined
_1addressundefined
_steeraddressundefined
_paramsbytesundefined

maxTotalSupply()

Solidity

function maxTotalSupply() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

poke()

Solidity

function poke() external nonpayable
Details

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()

Solidity

function pool() external view returns (contract IUniswapV3Pool)

Returns

NameTypeDescription
_0contract IUniswapV3Poolundefined

setMaxTotalSupply(uint256)

Solidity

function setMaxTotalSupply(uint256 _maxTotalSupply) external nonpayable
Details

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

NameTypeDescription
_maxTotalSupplyuint256undefined

setTWAPnums(int24,uint32)

Solidity

function setTWAPnums(int24 newMax, uint32 newInterval) external nonpayable
Details

Used to change the MaxTickChange and twapinterval used when checking for flash loans, by default set to 500 ticks and 45 seconds, respectively

Parameters

NameTypeDescription
newMaxint24undefined
newIntervaluint32undefined

steerCollectFees(uint256,uint256,address)

Solidity

function steerCollectFees(uint256 amount0, uint256 amount1, address to) external nonpayable
Details

Used to collect accumulated protocol fees.

Parameters

NameTypeDescription
amount0uint256undefined
amount1uint256undefined
toaddressundefined

strategistCollectFees(uint256,uint256,address)

Solidity

function strategistCollectFees(uint256 amount0, uint256 amount1, address to) external nonpayable
Details

Used to collect accumulated protocol fees.

Parameters

NameTypeDescription
amount0uint256undefined
amount1uint256undefined
toaddressundefined

sweep(address,uint256,address)

Solidity

function sweep(address token, uint256 amount, address to) external nonpayable
Details

Removes tokens accidentally sent to this vault.

Parameters

NameTypeDescription
tokenaddressundefined
amountuint256undefined
toaddressundefined

tend(tuple,int256,uint160)

Solidity

function tend(IMultiPositionManager.LiquidityPositions newPositions, int256 swapAmount, uint160 sqrtPriceLimitX96) external nonpayable

Parameters

NameTypeDescription
newPositionsIMultiPositionManager.LiquidityPositionsundefined
swapAmountint256undefined
sqrtPriceLimitX96uint160undefined

token0()

Solidity

function token0() external view returns (address)

Returns

NameTypeDescription
_0addressundefined

token1()

Solidity

function token1() external view returns (address)

Returns

NameTypeDescription
_0addressundefined

totalSupply()

Solidity

function totalSupply() external view returns (uint256)
Details

Returns the amount of tokens in existence.

Returns

NameTypeDescription
_0uint256undefined

transfer(address,uint256)

Solidity

function transfer(address to, uint256 amount) external nonpayable returns (bool)
Details

Moves amount tokens from the caller's account to to. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.

Parameters

NameTypeDescription
toaddressundefined
amountuint256undefined

Returns

NameTypeDescription
_0boolundefined

transferFrom(address,address,uint256)

Solidity

function transferFrom(address from, address to, uint256 amount) external nonpayable returns (bool)
Details

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.

Parameters

NameTypeDescription
fromaddressundefined
toaddressundefined
amountuint256undefined

Returns

NameTypeDescription
_0boolundefined

vaultRegistry()

Solidity

function vaultRegistry() external view returns (address)

Returns

NameTypeDescription
_0addressundefined

withdraw(uint256,uint256,uint256,address)

Solidity

function withdraw(uint256 shares, uint256 amount0Min, uint256 amount1Min, address to) external nonpayable returns (uint256 amount0, uint256 amount1)
Details

Withdraws tokens in proportion to the vault's holdings.

Parameters

NameTypeDescription
sharesuint256Shares burned by sender
amount0Minuint256Revert if resulting amount0 is smaller than this
amount1Minuint256Revert if resulting amount1 is smaller than this
toaddressRecipient of tokens

Returns

NameTypeDescription
amount0uint256Amount of token0 sent to recipient
amount1uint256Amount of token1 sent to recipient

Events

Approval

Solidity

event Approval(address indexed owner, address indexed spender, uint256 value)

Parameters

NameTypeDescription
owner indexedaddressundefined
spender indexedaddressundefined
valueuint256undefined

Transfer

Solidity

event Transfer(address indexed from, address indexed to, uint256 value)

Parameters

NameTypeDescription
from indexedaddressundefined
to indexedaddressundefined
valueuint256undefined