Keep3r Liquidity Pools
Keep3r Liquidity Provider Tokens
Keep3r Liquidity Provider Tokens, known askLP,are protocol-specific tokens minted to the users that provide liquidity to the network's liquidity pools, also known as pair managers. Jobs can bond kLP,which will periodically generate KP3R credits for them, which can be used as a form of payment for the keepers that work their job. This is further explained in Credit Mining.
To achieve this, Keep3rV2 has a factory in charge of creating wrapper contracts designed to manage the underlying token pairs they wrap. These wrappers or pair managers conform the network's accepted liquidity pools. They provide all the necessary functions to enable the user to get kLP in return for their liquidity provision to the underlying token pair, as well as the burning of those kLP to recover the liquidity they had previously provided.
The pair manager contracts' name and symbol subscribe to the the following nomenclature:
Name:
Keep3rLP - token0/token1. For example:Keep3rLP - KP3R/WETHSymbol:
kLP - token0/token1. For example:kLP - KP3R/WETH
Providing Liquidity
To provide liquidity, users have to approve their chosen pair manager contract to spend their ERC20 tokens and call the pair manager contract's mint function. This function will provide liquidity to the underlying token pair, calculate the corresponding kLPowed to the user according to the liquidity they provided, and mint them to whatever address the user has chosen to mint them to.
To compensate the protocol, the fees generated by the liquidity provided to the underlying token pair will go to governance.
/// @notice Mints kLP tokens to an address according to the liquidity the msg.sender provides to the UniswapV3 pool
/// @dev Triggers UniV3PairManager#uniswapV3MintCallback
/// @param amount0Desired The amount of token0 we would like to provide
/// @param amount1Desired The amount of token1 we would like to provide
/// @param amount0Min The minimum amount of token0 we want to provide
/// @param amount1Min The minimum amount of token1 we want to provide
/// @param to The address to which the kLP tokens are going to be minted to
/// @return liquidity kLP tokens sent in exchange for the provision of tokens
function mint(
uint256 amount0Desired,
uint256 amount1Desired,
uint256 amount0Min,
uint256 amount1Min,
address to
) external returns (uint128 liquidity);Burning Liquidity
Liquidity providers can choose to burn their kLP in order to collect the liquidity they had previously provided. To do this, they must call the burn function.
Only an address that holds kLP can call the burn function, otherwise it will revert.
Transfer kLP
If a user wishes to transfer his kLP to another address, the user can call the transfer function.
Approve User to Spend my kLP
If a user has deposited liquidity in a pair manager and wants to approve another address to spend her kLP, all the user has to do is call the pair manager's approve function.
Position
The pair manager contracts include a function that allows anyone to check the pair manager's position in the underlying token pair.
Last updated
Was this helpful?