-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: 0xGorilla <84932007+0xGorilla@users.noreply.github.com>
- Loading branch information
Showing
14 changed files
with
99 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,97 @@ | ||
# Enable the Keep3rRelay on your Vault | ||
|
||
Coming soon... | ||
> 🚧 Prerequisite: Please ensure you have completed the [Automation Vault setup](./automation_vault.md) before proceeding. For this relay, the selected chain must be Ethereum Sepolia. | ||
The Keep3r Relay allows you to connect the Keep3r Network to an array of automation networks within xKeeper. The Keep3r Network currently provides an incentive of 120% of gas costs to keepers. For in-depth information about the Keep3r Network, please consult their [documentation](https://docs.keep3r.network/). | ||
|
||
Moreover, the Keep3r Relay introduces an opportunity for job owners to leverage Keep3r Liquidity Provider Tokens (kLPs) for their tasks. These tokens, minted to liquidity providers within the network's pools, accrue KP3R credits over time, which can then be utilized for automation payments. The process is detailed further in the [Credit Mining Docs](https://docs.keep3r.network/tokenomics/job-payment-mechanisms/credit-mining). | ||
|
||
|
||
## Step 1: Add the relay in your vault | ||
|
||
Inside your vault, find and click "Add New Relay," then choose Keep3r Relay from the list. | ||
|
||
In the Callers section of the window that appears, activate the "Allow any caller" option to permit any address to execute your job. Remember that only valid keepers will be able to run your job. | ||
|
||
Then, in the Jobs section, provide your job's specifics. For this tutorial, we'll use a sample job available on all testnets: | ||
|
||
> Job Address: `0x129f5C4Adf38a1860e54DE46970653465A605364` | ||
> | ||
> Selectors to allow: | ||
> * `work (0x322e9f04)` | ||
Additionally, for this relay's operation, it's crucial to authorize the `isKeeper` and `worked` functions from Keep3r v2 for executing payments: | ||
|
||
> Job Address: `0xf171B63F97018ADff9Bb15F065c6B6CDA378d320 (Keep3rV2)` | ||
> | ||
> Selectors to allow: | ||
> * `isKeeper (0x6ba42aaa)` | ||
> * `worked (0x5feeb794)` | ||
Continue by confirming the transaction. | ||
|
||
<video controls width="1280"> | ||
<source src="../../media/how-to/keep3r_relay/setup.mp4" type="video/mp4"> | ||
<source src="../../media/how-to/keep3r_relay/setup.webm" type="video/webm"> | ||
Your browser does not support the video tag. | ||
</video> | ||
|
||
## Step 2: Register your Automation Vault as a Keep3r Job | ||
|
||
Open [keep3r.network](https://keep3r.network/) in your web browser, connect your wallet, and opt for "Register Job" using your Automation Vault's address. | ||
|
||
<video controls width="1280"> | ||
<source src="../../media/how-to/keep3r_relay/register.mp4" type="video/mp4"> | ||
<source src="../../media/how-to/keep3r_relay/register.webm" type="video/webm"> | ||
Your browser does not support the video tag. | ||
</video> | ||
|
||
## Step 3: Acquire kLPs | ||
|
||
Since kLPs are backed by WETH and KP3R, acquiring these underlying tokens is a prerequisite for minting kLPs. | ||
|
||
- **To obtain WETH:** Utilize the [WETH deposit function](https://sepolia.etherscan.io/token/0xfff9976782d46cc05630d1f6ebab18b2324d6b14#writeContract#F5) to convert 0.01 ETH. | ||
- **To acquire KP3R:** Use the [KP3R mint function](https://sepolia.etherscan.io/token/0x80b4327021946ff962d570c808b6aac47224aef1#writeContract#F9) to mint 100,000 KP3R (`100000000000000000000000`). | ||
|
||
Afterward, navigate to your job on [keep3r.network](https://keep3r.network/) and mint kLPs with the KP3R and WETH you've acquired. | ||
|
||
<video controls width="1280"> | ||
<source src="../../media/how-to/keep3r_relay/mint-klps.mp4" type="video/mp4"> | ||
<source src="../../media/how-to/keep3r_relay/mint-klps.webm" type="video/webm"> | ||
Your browser does not support the video tag. | ||
</video> | ||
|
||
## Step 4: Deposit kLPs into your vault | ||
|
||
Access your job on [keep3r.network](https://keep3r.network/) and in the "Add liquidity" section, enter the amount of previously minted kLPs. Proceed by selecting "Add liquidity to job" and confirming the transaction. | ||
|
||
This will commence the automatic generation of KP3R credits. Please note, it may take up to an hour to accumulate sufficient credits to commence your job. | ||
|
||
<video controls width="1280"> | ||
<source src="../../media/how-to/keep3r_relay/add-klps.mp4" type="video/mp4"> | ||
<source src="../../media/how-to/keep3r_relay/add-klps.webm" type="video/webm"> | ||
Your browser does not support the video tag. | ||
</video> | ||
|
||
## Step 5: Work your job for the first time | ||
|
||
While only validated keepers can execute tasks, testnet testing simplifies the keeper registration process. | ||
|
||
Visit [keep3r.network](https://keep3r.network/), connect your wallet, and select "Bond". Confirm the transaction, without the need of adding KP3R, effectively validating your keeper status. | ||
|
||
While this process is typically automated, we'll manually trigger the job via Etherscan for demonstration purposes. Visit the [OpenRelay in Etherscan](https://sepolia.etherscan.io/address/0x1bc8FC8D130666d8fC37fCA41F436fDC1F822c1E#writeContract#F1) and execute the `exec` function with the specified parameters: | ||
|
||
- **`_automationVault`:** Your automation vault's address. | ||
- **`_execData`:** `[{ "job": "0x129f5C4Adf38a1860e54DE46970653465A605364", "jobData": 0x322e9f04 }]` | ||
|
||
<video controls width="1280"> | ||
<source src="../../media/how-to/keep3r_relay/work.mp4" type="video/mp4"> | ||
<source src="../../media/how-to/keep3r_relay/work.webm" type="video/webm"> | ||
Your browser does not support the video tag. | ||
</video> | ||
|
||
## Step 6: Verify execution | ||
|
||
After the first work transaction is included onchain, you will be able to find its details under the Activity tab if your vault. | ||
|
||
![Vault transaction history](../../media/how-to/keep3r_relay/history.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.