0

So I have been working on a fork for GMX. In the end it gets stuck on off chain keepers (which was supposedly fixed by Chainlinks upkeep). Can someone please explain what exactly is happening? I dont need the code I just need to understand how keepers fit in for a transaction and how they're set and used.

I see that they're used in other projects as well.

2 Answers 2

2

Chainlink automation(previously known as Chainlink keepers) is a solution of smart contract conditional automation.

It is pretty straightforward to understand and use Chainlink automation(keepers). For every consumer contract(the contract which you want to automate), there are 2 functions that have to be implemented - checkUpkeep and performUpkeep.

The condition(time-based or custom logic) should be defined in checkUpkeep, and execution logics defined in performUpkeep.

With the 2 functions set, Chainlink node(oracle node is off-chain) could check the status by calling function checkUpkeep, and call performUpkeep when the pre-defined condition is met. This is the basic workflow and you can also learn more about Chainlink Automation from master class provided by Chainlink labs.

1
  • Thank you. The masterclass link was very helpful :) Feb 3 at 9:53
2

keepers are a fundamental piece of the web3 ecosystem and help contracts execute transactions without manual intervention. Keepers are bots checking and executing when specific conditions are met. They live off-chain and his role is to initiate the transactions previously defined.

Imagine that you want to execute a trade when a certain eth/usd threshold has been reached; then you would use a keeper to watch the chain and execute the trade when this happens

I wrote last summer an article explaining the different automation solutions: https://medium.com/coinmonks/smart-contract-automation-state-of-the-art-hack-view-c153944b1a02 as well as how they can help also with randomness solutions https://medium.com/coinmonks/schedule-randomness-with-gelato-and-witnet-api3-chainlink-vrf-1ebc0aac37d

Hope it helps!

2
  • Thank you! This is interesting I’ll look deeper into it Jan 30 at 10:04
  • Glad to have helped!
    – donoso.eth
    Jan 30 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.