🤖
Automate Staking Rewards Claiming using Gelato - 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 Gelato weekly task for auto-claiming your weekly staking rewards.
Connect your wallet to the dapp.
If you want to automate staking on Optimism Network, make sure your wallet is connected to Optimism.
🔴
If you want to automate staking on Arbitrum Network, make sure your wallet is connected to Arbitrum.
🔷
Before you are able to create a task, you need to fund your Gelato account with ETH that is needed as gas for the claim transactions that you are trying to automate.
.png?alt=media&token=9c881fe2-e946-409b-8f47-5d9a0b7931fa)
Click on the
Funds
button on the top left of the page, input the amount of ETH you wish to fund the contract with, click on the Deposit button and confirm the transaction.When it comes to choosing the amount of ETH sufficient for funding the contract, keep in mind that it should probably never spend more than ~$0.50 worth of ETH per week of claiming.
Now that you funded your account, it is time to create the automated task itself.
.png?alt=media&token=bd19903d-03af-40cd-913c-0dbb0bd566e0)
In the New Task page, input the following THALES staking contract address in the the
Contract address
input field:.png?alt=media&token=9a268cf8-9061-4847-9971-483c4c47189b)
After inputting the contract address, choose the
claimRewardOnBehalf
function and input your wallet address that you use for staking THALES in the (
address
account)
input field.After inputting your staking address in
(
address
account)
, a card for choosing a frequency of execution should appear below it.Since THALES staking rewards are claimable from a weekly snapshot, the
Interval
should be chosen to be 7 days+0 hours+0 min. By default, the claiming will execute from the moment you create a task and will continue using that timestamp for every week. If you want to input a different day and time of the week for when the claiming executes on a weekly basis, you can do so by unchecking the
Start immediately
checkbox and choosing a day using Start time
date and time picker.On the next card called
Pay With
choose Gelato Balance
(should be chosen as default already).And finally, give your automated task a name of your choice in the
Task name
input field, after which a Create Task
button should become visible.To allow Gelato automation to trigger the reward claim on your behalf, you have to whitelist your personal Gelato contract address.
First you need to find your Gelato Executing Address which is visible on the page of your newly created task. Enter the task page by clicking on your task on the https://app.gelato.netwo main page:
.png?alt=media&token=210df127-b05a-4e4a-9067-74c382939f27)
On the bottom part of your Task Page, you should see your Executing Address in the
Executing Address
tab. .png?alt=media&token=44e34ed4-8ba7-4510-b79f-296cad600b2e)
Copy your unique Executing Address (msg.sender) so you can input it in the Thales dapp!
Make sure your wallet used for staking THALES is connected to the dapp.
Click on the
ENABLE/DISABLE CLAIM ON BEHALF
button.
After the "Claim on behalf" pop-up window opens, in the address input field make sure to input your Gelato Executing Address that you copied in the previous step!

After inputting the Gelato contract address, click on the
Enable
button and confirm the transaction.