Keep4r is a fork of the Keep3rV1 — a decentralized keeper network for projects that need external devops and for external teams to find keeper jobs.

Introduction

This Docs has been forked and modified by the keep4r team from keep3r.network. We are still updating and improving the documentation.

Keep4r Network is a decentralized keeper network for projects that need external devops and for external teams to find keeper jobs

Keepers

A Keeper is the term used to refer to an external person and/or team that executes a job. This can be as simplistic as calling a transaction — usually a smart-contract call, or as complex as requiring extensive off-chain logic. The scope of Keep4r allows users register contracts as jobs for keepers, and keepers to register themselves as available to perform jobs. It is up to the individual keeper to set up their devops and infrastructure and create their own rules based on what transactions they deem profitable.

Jobs

A Job is the term used to refer to a smart contract that wishes an external entity to perform an action. They would like the action to be performed in “good will” and not have a malicious result. For this reason they register as a job, and keepers can then execute on their contract.

Becoming a Keeper

To join as a Keeper you call bond(uint) on the Keep4r contract. You do not need to deposit any DAI or ETH tokens to join as a Keeper, so you can join with bond(0). There is a 1 day bonding delay before you can activate as a Keeper. Once the 7 days have passed, you can call activate(). Once activated you lastJob timestamp will be set to the current block timestamp.

Registering a Job

A job can be any system that requires external execution, the scope of Keep4r is not to define or restrict the action taken, but to create an incentive mechanism for all parties involved. There are two cores ways to create a Job;

If you prefer, you can register as a job by simply submitting a proposal via Governance, to include the contract as a job. If governance approves, no further steps are required.

WIP — We are working on better ways to register jobs via the job factory interface

Job Interface

Some contracts require external event execution, an example for this is the harvest() function in the yearn ecosystem, or the update(address,address) function in the uniquote ecosystem. These normally require a restricted access control list, however these can be difficult for fully decentralized projects to manage, as they lack devops infrastructure.

These interfaces can be broken down into two types, no risk delta (something like update(address,address) in uniquote, which needs to be executed, but not risk to execution), and harvest() in yearn, which can be exploited by malicious actors by front-running deposits.

For no, or low risk executions, you can simply call Keep4r.isKeeper(msg.sender) which will let you know if the given actor is a keeper in the network.

For high, sensitive, or critical risk executions, you can specify a minimum bond, minimum jobs completed, and minimum Keeper age required to execute this function. Based on these 3 limits you can define your own trust ratio on these keepers.

So a function definition would look as follows;

function execute() external {
require(Keep4r.isKeeper(msg.sender), "Keep4r not allowed");
}

At the end of the call, you simply need to call workReceipt(address,uint) to finalize the execution for the keeper network. In the call you specify the keeper being rewarded, and the amount of KP4R you would like to award them with. This is variable based on what you deem is a fair reward for the work executed.

Forked from keep3r

Example Keep4rJob

Job Credits

As mentioned in Job Interface, a job has a set amount of DAI or ETH that they can award keepers with.

Website: https://kp4r.network

Docs: https://docs.kp4r.network/

Twitter: https://twitter.com/kp4rnetwork

Telegram: https://t.me/keep4rnetwork

Token Address: https://etherscan.io/token/0xa89ac6e529acf391cfbbd377f3ac9d93eae9664e

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store