Giter Club home page Giter Club logo

keep3r.network's People

Contributors

cleanunicorn avatar jeremyhd avatar macarse avatar mandalorian-101 avatar matjaz avatar mushroomsforest avatar mwalol avatar romanhiden avatar soleone avatar strykerin avatar xiaojay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

keep3r.network's Issues

workReceipt reward amount capped at gas cost

Hi,

While reading through the Keep3r.sol code I found this require statement in the workReceipt function:

require(amount <= KPRH.getQuoteLimit(_gasUsed.sub(gasleft())), "workReceipt: max limit");

It seems like the amount that a job can reward a Keeper is capped at gasUsed.mul(uint(FASTGAS.latestAnswer())) .

Should it not be this instead:

require(
    amount >= KPRH.getQuoteLimit(_gasUsed.sub(gasleft())),
    "workReceipt: min limit"
);

Thus ensuring a minimum reward to cover gasCost for the Keeper, but not placing a maximum on what reward the job might want to pay out?

I noticed this when skimming so might also just be a misunderstanding from my zoomed in view.

CrvStrategyKeep3r !authorized

Hi,

The StrategyCurveYVoterProxy contract for Strategy 0x07db4b9b3951094b9e278d336adf46a036295de7 (at least) is not working

When harvest is called, the first check is require(msg.sender == strategist || msg.sender == governance, "!authorized");

This does not allow a keeper to execute the harvest.

Use Local Memory Type Variable Instead of Global Storage Type Variable in Event to Save Gas

Hi, we recently have conducted a systematic study about Solidity event usage, evolution, and impact, and we are attempting to build a tool to improve the practice of Solidity event use based on our findings. We have tried our prototype tool on some of the most popular GitHub Solidity repositories, and for your repository, we find a potential optimization of gas consumption arisen from event use.

The point is that when we use emit operation to store the value of a certain variable, local memory type variable would be preferable to global storage type (state) variable if they hold the same value. The reason is that an extra SLOAD operation would be needed to access the variable if it is storage type, and the SLOAD operation costs 800 gas.

For your repository, we find that the following event use can be improved:

  • HegicPoolKeep3r.sol
    function name:setMinRewards
    event name:  MinRewardsSet
    variable:    minETHRewards->_minETHRewards  minWBTCRewards->_minWBTCRewards
  function setMinRewards(uint256 _minETHRewards, uint256 _minWBTCRewards) public override onlyGovernor {
    minETHRewards = _minETHRewards;
    minWBTCRewards = _minWBTCRewards;
    emit MinRewardsSet(minETHRewards, minWBTCRewards);
  }

Do you find our results useful? Your reply and invaluable suggestions would be greatly appreciated, and are vital for improving our tool. Thanks a lot for your time!

Keep3rV2Oracle Overflow Bug

Keep3rV2Oracle is not to using FixedPoint library and it's using solc 0.8.x, this introduces a possible revert.

Last price cumulative's in uniswap / sushiswap pairs are accumulators, and they are designed to overflow.

When doing the calculations with these queried value, Keep3rV2Oracle does a priceLast * e10 / Q112 .

If the cumulative price is big enough * e10 will throw an overflow because of checked math in solidity 0.8.x, therefore reverting.

Very rough branch demonstrating that it will fail: link.

It does not represent an immediate risk but it depends a lot on pair's volume and tokens decimals. So, I'd strongly suggest to deprecate the oracle / fix this issue.

Multi coin bonds?

Hi!

Looking at the code it seems possible to bond any ERC20.
I'm wondering if it's possible to have a isMinKeeper check with a bond requirement of multiple coins
e.g. 1 kp3r + 1 gov token from X project.
So that a keeper job can require a keeper to have both kp3r and the gov token of the project the function is called on for incentivization alignment.
This mechanism could also be used as a registration / test / MACI for advisors and contributors.

Curious if this is supported / planned / possible?
Or some reason it's a bad idea?
Is an implementation the blocker? Front end / contract or both? Any guidance would be appreciated.

ping! sorry for the spam @andrecronje @Soleone @Soleone @matjaz @Macarse @xiaojay @fameal @RomanHiden @Macarse @mwalol @cleanunicorn

License missing

Hi, I would like to use contracts from this repo in our chain, however this repo does not specify license.
Would be possible to add license file into this repository?

As discussed in following StackExchange, the license file is necessary if creating of derived work should be legal:
https://opensource.stackexchange.com/a/1721

Also, SOL files compilation currently produce following warning when the license is missing in the SOL files headers:

Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: " to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.

Please, if you agree with considering this opensource, add the license to at least one of these places.
Thanks!

Testnet deployment

Hey guys. Is Keep3r network deployed on a testnet? How can I try it out?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.