Newbie Question: Don't know where to start

Hi all,

New to KP3R here. Wanted to ask the community.

With the current Jobs posted, how difficult is the Job?

Can non-developers also participate? If not, what’s the best way to start? Also, can the Job be done by multiple people? Does the reward generally get reduced as more people do the Job?

How does it work?

Hey! Welcome, having technical background does make it easier, but it isn’t required.

You could use third party services like defender.

Or you could download and setup one of the preconfigured scripts

As an example, the UniswapV2Oracle job needs to refresh its prices every ~30 minutes. When it is ready to be refreshed the function updateable() returns True. When that happens you can call work(). You could do this manually, but keep3r is designed to be setup and forget, so scripts or bots are recommended.

Give the scripts a try, and if you get stuck, please ask questions, happy to help!

10 Likes

Thanks Andre! This is very helpful.

1 Like

Great work here from Andre and others I have used Andre’s Guide to OpenZeppelin

I am allowed to transact on Mainnet.
Made a Relay on OpenZeppelin and used the script for
Oracle Uniswap Script to get the workableAbi to put in the Autotask on OpenZeppelin.

the first const “workableAbi” is the ABI, taken from the script, the second “workableAddr” is the Uniswap Oracle Keeper contract address and the third one “const from” is my OpenZeppelin relay address from the Ralyer as shown here:

const workableAbi = [{“inputs”:[{“internalType”:“address”,“name”:“_keep3r”,“type”:“address”}],“stateMutability”:“nonpayable”,“type”:“constructor”},{“inputs”:,“name”:“KP3R”,“outputs”:[{“internalType”:“contract IKeep3rV1”,“name”:“”,“type”:“address”}],“stateMutability”:“view”,“type”:“function”},{“inputs”:,“name”:“acceptGovernance”,“outputs”:,“stateMutability”:“nonpayable”,“type”:“function”},{“inputs”:[{“internalType”:“address”,“name”:“tokenA”,“type”:“address”},{“internalType”:“address”,“name”:“tokenB”,“type”:“address”}],“name”:“add”,“outputs”:,“stateMutability”:“nonpayable”,“type”:“function”},{“inputs”:[{“internalType”:“address”,“name”:“tokenIn”,“type”:“address”},{“internalType”:“uint256”,“name”:“amountIn”,“type”:“uint256”},{“internalType”:“address”,“name”:“tokenOut”,“type”:“address”}],“name”:“consult”,“outputs”:[{“internalType”:“uint256”,“name”:“amountOut”,“type”:“uint256”}],“stateMutability”:“view”,“type”:“function”},{“inputs”:,“name”:“factory”,“outputs”:[{“internalType”:“address”,“name”:“”,“type”:“address”}],“stateMutability”:“view”,“type”:“function”},{“inputs”:,“name”:“governance”,“outputs”:[{“internalType”:“address”,“name”:“”,“type”:“address”}],“stateMutability”:“view”,“type”:“function”},{“inputs”:,“name”:“granularity”,“outputs”:[{“internalType”:“uint8”,“name”:“”,“type”:“uint8”}],“stateMutability”:“view”,“type”:“function”},{“inputs”:[{“internalType”:“address”,“name”:“”,“type”:“address”}],“name”:“lastUpdated”,“outputs”:[{“internalType”:“uint256”,“name”:“”,“type”:“uint256”}],“stateMutability”:“view”,“type”:“function”},{“inputs”:[{“internalType”:“uint256”,“name”:“timestamp”,“type”:“uint256”}],“name”:“observationIndexOf”,“outputs”:[{“internalType”:“uint8”,“name”:“index”,“type”:“uint8”}],“stateMutability”:“view”,“type”:“function”},{“inputs”:[{“internalType”:“address”,“name”:“”,“type”:“address”},{“internalType”:“uint256”,“name”:“”,“type”:“uint256”}],“name”:“pairObservations”,“outputs”:[{“internalType”:“uint256”,“name”:“timestamp”,“type”:“uint256”},{“internalType”:“uint256”,“name”:“price0Cumulative”,“type”:“uint256”},{“internalType”:“uint256”,“name”:“price1Cumulative”,“type”:“uint256”}],“stateMutability”:“view”,“type”:“function”},{“inputs”:,“name”:“pairs”,“outputs”:[{“internalType”:“address”,“name”:“”,“type”:“address”}],“stateMutability”:“view”,“type”:“function”},{“inputs”:,“name”:“pendingGovernance”,“outputs”:[{“internalType”:“address”,“name”:“”,“type”:“address”}],“stateMutability”:“view”,“type”:“function”},{“inputs”:,“name”:“periodSize”,“outputs”:[{“internalType”:“uint256”,“name”:“”,“type”:“uint256”}],“stateMutability”:“view”,“type”:“function”},{“inputs”:[{“internalType”:“address”,“name”:“_governance”,“type”:“address”}],“name”:“setGovernance”,“outputs”:,“stateMutability”:“nonpayable”,“type”:“function”},{“inputs”:[{“internalType”:“address”,“name”:“_keep3r”,“type”:“address”}],“name”:“setKeep3r”,“outputs”:,“stateMutability”:“nonpayable”,“type”:“function”},{“inputs”:[{“internalType”:“address”,“name”:“tokenA”,“type”:“address”},{“internalType”:“address”,“name”:“tokenB”,“type”:“address”}],“name”:“update”,“outputs”:[{“internalType”:“bool”,“name”:“”,“type”:“bool”}],“stateMutability”:“nonpayable”,“type”:“function”},{“inputs”:[{“internalType”:“uint256”,“name”:“i”,“type”:“uint256”},{“internalType”:“uint256”,“name”:“length”,“type”:“uint256”}],“name”:“updateFor”,“outputs”:[{“internalType”:“bool”,“name”:“updated”,“type”:“bool”}],“stateMutability”:“nonpayable”,“type”:“function”},{“inputs”:[{“internalType”:“address”,“name”:“pair”,“type”:“address”}],“name”:“updatePair”,“outputs”:[{“internalType”:“bool”,“name”:“”,“type”:“bool”}],“stateMutability”:“nonpayable”,“type”:“function”},{“inputs”:,“name”:“updateable”,“outputs”:[{“internalType”:“bool”,“name”:“”,“type”:“bool”}],“stateMutability”:“view”,“type”:“function”},{“inputs”:[{“internalType”:“uint256”,“name”:“i”,“type”:“uint256”},{“internalType”:“uint256”,“name”:“length”,“type”:“uint256”}],“name”:“updateableFor”,“outputs”:[{“internalType”:“bool”,“name”:“”,“type”:“bool”}],“stateMutability”:“view”,“type”:“function”},{“inputs”:,“name”:“updateableList”,“outputs”:[{“internalType”:“address”,“name”:“list”,“type”:“address”}],“stateMutability”:“view”,“type”:“function”},{“inputs”:,“name”:“windowSize”,“outputs”:[{“internalType”:“uint256”,“name”:“”,“type”:“uint256”}],“stateMutability”:“view”,“type”:“function”},{“inputs”:,“name”:“work”,“outputs”:,“stateMutability”:“nonpayable”,“type”:“function”}];

const workableAddr = ‘0x127a2975c4E1c75f1ed4757a861bbd42523DB035’;
const from = ‘my relay address’;

The rest is this code from Andre’s Guide:

const { ethers } = require(“ethers”);
const { DefenderRelaySigner } = require(‘defender-relay-client/lib/ethers’);
// Entrypoint for the Autotask
exports.handler = async function(credentials) {
const provider = ethers.getDefaultProvider(‘mainnet’);
const signer = new DefenderRelaySigner(credentials, provider, { speed: ‘fastest’, from });
const contract = new ethers.Contract(workableAddr, workableAbi, signer);
// Run work if needed
if (await contract.updateable()) {
const tx = await contract.work();
console.log(tx.hash);
}
}


When running the Autotask manually

Result

null

Logs

2020-11-04T10:09:09.441Z AUTOTASK START
2020-11-04T10:09:11.344Z AUTOTASK COMPLETE

All the scheduled tasks all are a success

There is no transaction visible from my relay address on etherscan.io so I guess nothing happens.

I have some questions, maybe I do not really understand how OpenZeppelin works.
My Metamask wallet, with KP3R tokens, is connected to my account in OpenZeppelin.
Is the relay address from OpenZeppelin somehow connected to my real Metamask address? Because the Metamask address is bonded to Keep3r network and not the relay-address.

As I understand work can only be rewarded if the address is bonded (with 0 KP3R or more) to Keep3r network, so how to bond the relayer address ?? And where is the reward paid to?

Tried using my real Metamask address in the Autotask but unsuccessful when running the Autotask manually, not allowed. Or do I have to add this to the Addressbook of my OpenZeppelin account first?

Did this, added the address to OpenZeppelin and now the Autotask is running without error, so maybe this is how the Autotask will work? And if the contract is updateable some work will be done and rewarded?

i have a question, if it can be runned by script, why we need more keepers to do the jobs, if one or two team can write all scripts and run them as a keeper for all the jobs, what is the point we have many keepers in this ecosystem, or if individuals can compete with the professional teams, thank you !

The more keepers, the more decentralized. If you compare with ETH, you also only need to run 1 node, yet there are 11k+, the more you run the higher the security, decentralization, and robustness.

4 Likes

so the bounded kp3r is like the eth pos mechanism, i have some kp3r bounded , but i am not technical guy so am learning to be a keeper, just afraid i can’t compete with professional tech team. thanks for the reply.

thank yo @Ceazor

@andre.cronje, sorry I’m not a dev , forgive and me if im wrong
but monetize automation, strategies, bots integrate with other protocols aave snx, alpha homera , comp , maker, Binance chain , uni, etc,
Formerly verify
Front running or gas capped war cost or not,
please iterate cross chain with other blockchains if possible.
Outstanding job

2 Likes

Ok. So I forced myself to learn Javascript, Python and HTML/CSS in the last two months. Next stop, Solidity. Can anyone give me some guidance to where to even begin? I think I want to help other people like me to learn how to code so people don’t have to ask the same questions like this. Right now, there doesn’t seem to be enough (or clear guidance) on how to be an ethereum developer. Or maybe I’m just ranting at 3am in the morning. Please help!

2 Likes