Jobs
Last updated
Was this helpful?
Last updated
Was this helpful?
To setup a keeper function simply add the following modifier in your contract:
It could be then implement it like this:
The above will make sure the caller is a registered keeper as well as reward them with an amount of KP3R equal to their gas spent + premium. Make sure to have enough credits assigned in the Keep3r system for the relevant job.
Jobs can be created directly via .
Dependent on your requirements you might allow any keepers, or you want to limit specific keepers, you can filter keepers based on age
, bond
, total earned funds
, or even arbitrary values such as additional bonded tokens.
Accept all keepers in the system.
There are two primary payment mechanisms and these are based on the credit provided;
Pay via liquidity provided tokens (based on addLiquidityToJob
)
Pay in direct token (based on addTokenCreditsToJob
)
If you don't want to worry about calculating payment, you can simply let the system calculate the recommended payment itself.
A good behavior is expected from jobs, this includes but isn't limited to:
NOT leverage the network of keepers for malicious activities (exploits, rug pulls, etc.).
NOT limiting qualified keepers to work on their job.
NOT creating a malicious workable function to drain credits from the network.
In case it's disputed, the job won't be able to be worked by keepers, withdraw LPs / tokens credits nor perform a job migration.
Jobs that are detected to have a malicious behavior within the network (either towards the network or the protocol they are working for — eg: exploiting a protocol) will get their LP tokens slashed and seized by governance.
There may be situations where a job needs to migrate all of their "assets" to another contract address, for a job update for example. A proper migration implies the accountancy (tokens, liquidities, period credits) from the original job address will be transferred to the new one. This process is possible, and it requires the job to call two functions:
There are some considerations the job wishing to migrate must take into account to prevent the functions from reverting:
It must not provide its current address as the address where it wants to migrate to when calling migrateJob
.
Calls to both migrateJob
and acceptJobMigration
should be done with the same arguments.
Neither of the jobs involved in the migration process should be disputed
It must wait at least one minute between migrations
Here's a graphic representation to visualize the resulting changes in the credits of a job that goes through a successful migration.
Once you set up your job on the protocol, you will be able to request for it to be registered on the Job Board providing the following data to governance:
Job Address
Job Name
Job Address Link (Etherscan)
Job Documentation (script)
This information will be used to display the job on the UI, and will provide users and keepers of the network with additional information regarding the jobs of the network.
Jobs need credit to be able to pay keepers, this credit can either be paid for directly (see ), or by being a liquidity provider (see ) in the system. If you pay directly, this is a direct expense, if you are a liquidity provider, you get all your liquidity back after you are done being a provider.
To start mining credits, you will need to provide as liquidity by calling . You receive all your LP tokens back when you no longer need to provide credit for a contract.
To remove your liquidity from a job, you will need to call .
Wait UNBOND
(default 14 days) days and call .
To add Token Credits to your job, you will need to call .
Filter keepers based on bonded amount of tokens, earned funds, and age in system. For example a keeper might need to have SNX
to be able to participate in the ecosystem.
A job might be disputed by a if there is suspicious activity detected within that job.
first to start the migration process. This function should be call by the owner of the job that currently holds the assets to migrate.
to complete the migration process. This function should be call by the owner of the job that will receive the assets to migrate.