ILiquidityIncreaserJob

Git Source

Inherits: IKeep3rJob

Functions

WETH

Returns the WETH contract

function WETH() external view returns (IERC20 _weth);

Returns

NameTypeDescription
_wethIERC20The WETH token

POOL_MANAGER_FACTORY

Returns the pool manager factory

function POOL_MANAGER_FACTORY() external view returns (IPoolManagerFactory _poolManagerFactory);

Returns

NameTypeDescription
_poolManagerFactoryIPoolManagerFactoryThe 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

NameTypeDescription
_minIncreaseWethuint256The 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

NameTypeDescription
_poolManagerIPoolManagerThe address of the target pool manager
_wethAmountuint256The amount of WETH to be inserted in the full-range position
_tokenAmountuint256The 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

NameTypeDescription
_poolManagerIPoolManagerThe address of the target pool manager

Returns

NameTypeDescription
_workableboolTrue 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

NameTypeDescription
_poolManagerIPoolManagerThe address of the target pool manager
_keeperaddressThe address of the keeper

Returns

NameTypeDescription
_workableboolTrue if the pool manager can be worked

setMinIncreaseWeth

Sets the new min WETH increase

function setMinIncreaseWeth(uint256 _minIncreaseWeth) external;

Parameters

NameTypeDescription
_minIncreaseWethuint256The 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();