HegicPoolKeep3r: pool-keeper:claimRewards::not-enough-profit

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?

1 Like

when I got this error it’s bc someone claimed the rewards just before me

1 Like

Hi @Mash,

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:

  // Keep3r actions
  function claimRewards() external override paysKeeper {
    require(workable(), 'pool-keeper:claimRewards::not-enough-profit');
    uint256 _rewards = HegicPool.claimRewards();
    emit RewardsClaimedByKeeper(_rewards);
  }

  // Governor keeper bypass
  function workable() public view override returns (bool) {
    ILotManager LotManager = ILotManager(HegicPool.getLotManager());
    IHegicStaking HegicStakingETH = LotManager.hegicStakingETH();
    IHegicStaking HegicStakingWBTC = LotManager.hegicStakingWBTC();

    return (
      HegicStakingETH.profitOf(address(LotManager)) >= minETHRewards ||
      HegicStakingWBTC.profitOf(address(LotManager)) >= minWBTCRewards
    );
  }

You may want to try adding other jobs and removing any jobs that are not successful.
See the documentation for some information on adding new jobs:

You may also want to check out the Keep3r network category in yearn.finance forum for discussions on profitability:

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.

1 Like

Hi @Mash,

This is something that the development team are looking at for how to address the frequency for Keepers.

You could look at the available Jobs to see which ones have less people competing.

Hi @Mash,

New in Defender is an example script for running a Keep3r at a faster rate.

Please see Defender Release 2020W49: Sokol testnet, Autotask examples repository, and faster Keep3rs.

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?

1 Like

Hi @Mash,

That is correct, you can set the Autotask frequency to every minute and the script will check for work every 5 seconds.

A post was split to a new topic: Running frequent keeper every minute appears to have two autotasks running at the same time