Running Autotasks for some time now (3 weeks) Using the OpenZeppelin script examples to look for some work to be done and earn some KP3R The cronjob every minute on the 3 scripts (UniswapV2SlidingOracle, HegicPoolKeep3r and YearnV1EarnKeep3r) They run without error now since a week, using alchemy API, so used the right examples here on the right contract addresses after some trial and error.
Not a single time work has been done successfully. Only once in a while transactions fail with this message
Fail with error 'pool-keeper:claimRewards::not-enough-profit'
Just using some transaction fee and no reward. This happens on the Hegic address.
So why is there no work done successfully? And why this error which indicates there is nothing or too small amount to be earned.... Is it even worth trying to run these jobs?
Your Autotask code checks if there is work to be done, and if there is work available, submit a transaction. Though other Keepers transactions could be mined before yours and win the work.
If you have a look at some of your transactions you should be able to see a successful transaction from a Keeper who won the work, either in the same block or in a block before.
See some examples from transactions calling this contract:
Looking at the verified code (https://etherscan.io/address/0x5DDe926b0A31346f2485900C5e64c2577F43F774#code) we can see that calling workable to check could be true, and then when we submit a transaction another keeper could have won the work so it is no longer workable and our transaction will revert with pool-keeper:claimRewards::not-enough-profit:
Yeah I understand a lot of fishermen are trying to catch the same fish. Guess I have to construct a locally defined script and interaction which will run more often than openzeppelin cronjob which is bounded by running max every minute, it’s (almost) always a losing game in that way.
Thanks Question If you run this script as an autotask in OpenDefender cronjob you have to set an interval to run it? Let’s say every minute. The script stops just before that. Sleep is 55000/11 milliseconds After that minute it starts again as of the interval set. So every 5 seconds workable will be checked? Am I correct?