🤖Automate Staking Rewards Claiming with Chainlink Automation - Guide

Currently THALES staking rewards need to be claimed manually by users on a weekly basis or the weekly reward is forfeited. The rewards do not roll over to next week automatically!

With the recent implementation of claimOnBehalf method in the THALES staking contract, it is finally possible for individual stakers to explore automating their award claiming and thus improve their UX significantly.

This page will guide you through the steps of setting up a Chainlink Automation weekly task for auto-claiming your weekly staking rewards.

You should have at least 2 LINK in your wallet that will be used to deposit and fund the task you are creation in one of the the task creation process steps.

Navigate to the Chainlink Automation dapp: https://automation.chain.link/

Connect your wallet to the dapp.

If you want to automate staking on 🔴 Optimism Network, make sure your wallet and automation dapp is connected to Optimism.

If you want to automate staking on 🔷 Arbitrum Network, make sure your wallet and automation dapp is connected to Arbitrum. If you want to automate staking on 🔵 Base Network, make sure your wallet and automation dapp is connected to Base Network.

Click on the Register new Upkeep button.

Choose Time Based.

In Target contract address input field, input the following THALES staking contract address for the respective networks:

For 🔴Optimism ➡️ 0xC392133eEa695603B51a5d5de73655d571c2CE51⬅️

For 🔷 Arbitrum ➡️ 0xD5F18910b75859616E27fc96E37c4874Bdc588bC⬅️

For 🔵 Base➡️ 0xdD462615884E70C80037cCf8Aa0f82cb06056D81⬅️

After inputting the contract address, click on use custom ABI and paste the following ABI:

For 🔴Optimism ⬇️

For 🔷 Arbitrum⬇️

For 🔵 Base⬇️

After inputting the ABI, choose the following function: claimRewardOnBehalf Input your wallet address that you use for staking THALES in the accountaddress input field.

To Specify your time schedule, in the Cron expression input field, input the following expression:

0 9 * * 2

This Cron expression signals timed execution for the automation job to be every Tuesday at 09:00 UTC.

Proceed to the next page, which should look like this:

Scrolling down beneath these details, input your desired Upkeep name in the Upkeep details tab.

Input the desired amount of LINK funding for the upkeep in the Starting balance (LINK) input field. The amount should be at least 2 LINK.

Tick the box which confirms you accept the Terms of Service and click on the Register Upkeep button.

Confirm the transaction and you have successfully automated your weekly THALES staking rewards claims using Chainlink Automation!

Step 3: Whitelist your Upkeep Address for the claimOnBehalf method

This step is important to allow (whiltelist) Chainlink Automation to actually execute the Claim transaction.

  1. Go to the Chainlink Automation main page and make sure your wallet is connected to the right network.

  2. In My Upkeeps you should see your newly created upkeep. Click on it to open the personal dashboard page of your upkeep.

  3. After you opened your upkeep page, find your personal Upkeep Address in the middle section of the page called Upkeep. Copy it by clicking on the Copy button.

Location of Upkeep Address
  1. Navigate to the THALES token Account Preferences page: https://thalesmarket.io/token?activeButtonId=account-preferences

Click on the ENABLE CLAIM ON BEHALF button that is located in the bottom left corner of the page.

After the "Claim on behalf" pop-up window opens, in the address input field make sure to input your copied Forwarder Address.

After inputting the CLA Registry address, click on the Enable button and confirm the transaction.

Last updated

Was this helpful?