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/WETH
Symbol:
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 kLP
owed 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.
For example, Alice decides she needs a keeper to work on her job, but at the same time she wants to periodically earn KP3R
. After doing some research, Alice finds aboutkLP
and looks for the pair managers of the Keep3r Network.
Among them she finds the kLP - KP3R/WETH
pair manager. She looks for the contract's address, and approves it to spend her KP3R
and WETH
. Once all approvals are signed, Alice calls the mint
function of thekLP - KP3R/WETH
contract. The contract, in turn, mints her kLP
, which she can bond in her job to periodically earnKP3R
. Or, should she have a change of heart, Alice can burn her kLP
in order to recover the KP3R
and WETH
she had provided.
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.
To execute addLiquidityToJob
the provider needs first to approve the spending for the Keep3r address
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