ILiquidityIncreaserJob
Inherits: IKeep3rJob
Functions
WETH
Returns the WETH contract
function WETH() external view returns (IERC20 _weth);
Returns
Name | Type | Description |
---|---|---|
_weth | IERC20 | The WETH token |
POOL_MANAGER_FACTORY
Returns the pool manager factory
function POOL_MANAGER_FACTORY() external view returns (IPoolManagerFactory _poolManagerFactory);
Returns
Name | Type | Description |
---|---|---|
_poolManagerFactory | IPoolManagerFactory | The pool manager factory |
minIncreaseWeth
Returns the WETH-denominated amount of liquidity that must be added to the full-range position
function minIncreaseWeth() external view returns (uint256 _minIncreaseWeth);
Returns
Name | Type | Description |
---|---|---|
_minIncreaseWeth | uint256 | The minimum WETH increase |
work
Increases the full-range position of a given pool manager
Will revert if the job is paused or if the keeper is not valid
function work(IPoolManager _poolManager, uint256 _wethAmount, uint256 _tokenAmount) external;
Parameters
Name | Type | Description |
---|---|---|
_poolManager | IPoolManager | The address of the target pool manager |
_wethAmount | uint256 | The amount of WETH to be inserted in the full-range position |
_tokenAmount | uint256 | The amount of non-WETH token to be inserted in the full-range position |
isWorkable
Returns true if the specified pool manager can be worked
function isWorkable(IPoolManager _poolManager) external returns (bool _workable);
Parameters
Name | Type | Description |
---|---|---|
_poolManager | IPoolManager | The address of the target pool manager |
Returns
Name | Type | Description |
---|---|---|
_workable | bool | True if the pool manager can be worked |
isWorkable
Returns true if the specified keeper can work with the selected pool manager
function isWorkable(IPoolManager _poolManager, address _keeper) external returns (bool _workable);
Parameters
Name | Type | Description |
---|---|---|
_poolManager | IPoolManager | The address of the target pool manager |
_keeper | address | The address of the keeper |
Returns
Name | Type | Description |
---|---|---|
_workable | bool | True if the pool manager can be worked |
setMinIncreaseWeth
Sets the new min WETH increase
function setMinIncreaseWeth(uint256 _minIncreaseWeth) external;
Parameters
Name | Type | Description |
---|---|---|
_minIncreaseWeth | uint256 | The min WETH increase |
Events
Worked
Emitted when a fee manager is worked
event Worked(IPoolManager _poolManager, uint256 _amountWeth, uint256 _amountToken);
MinIncreaseWethSet
Emitted when the min WETH increase is set
event MinIncreaseWethSet(uint256 _minIncreaseWeth);
Errors
LiquidityIncreaserJob_InvalidPoolManager
Thrown when an invalid pool manager was passed to the job
error LiquidityIncreaserJob_InvalidPoolManager();
LiquidityIncreaserJob_PoolManipulated
Thrown when the price oracle detects a manipulation
error LiquidityIncreaserJob_PoolManipulated();
LiquidityIncreaserJob_InsufficientIncrease
Thrown when the job transfers less WETH and non-WETH token amounts to the pool than min WETH increase
error LiquidityIncreaserJob_InsufficientIncrease();