Automated Claiming from Gelato tutorial – Live on Optimism

This post was originally published on this site

Automated Claiming from Gelato tutorial - Live on Optimism

We’ve recently partnered with Gelato to allow stakers to automatically claim their SNX staking rewards on Optimism. As of right now, the integration enables stakers to claim their weekly rewards once their C-Ratio is above the target C-Ratio (as of right now, this is 350%)

The functionality to enable automation utilizes the Synthetix Delegate function, which has been apart of the system since SIP-10 was released in March of 2020. Gelato bots do not have control over your staking account, they are only able to claim your rewards by using the delegate function introduced in SIP-10.

Lets explore a quick example to explore how automated claiming through Gelato works:

  • If it any point during the week you’re above 350% (target c-ratio) – Automated claiming bot will claim your rewards
  • If you are below 350% and burn sUSD to increase your C-Ratio above 350% (target c-ratio) – Automated claiming will claim your rewards
  • If you NEVER go above 350% (target c-ratio) – Automated claiming bot WILL NOT claim your rewards

Here’s an examples of one wallet currently using the automated claiming bot through Gelato – https://app.gelato.network/task/0x8a370a89fa2d31b0bc46b74a198ebd43a67fc19d5133200548cd5e2e79b7e179?chainId=10

We’re working with Gelato to add additional functionality in two areas: 1. Burn sUSD in their account to make them eligible to claim and 2. Mint Max to maximize rewards for stakers. As of right now, these feature are not live.

Automated Claiming Tutorial

image
  • Before you start, deposit some funds onto your Gelato account https://app.gelato.network/funds.
  • These funds will be used to pay for transactions to claim for you; I recommend $20-25 as tx’s on Optimism cost $.50 or so.
image
image
  • Use 0x4a16A42407AA491564643E1dfc1fd50af29794eF as contract address (this is the SNX fee pool address on Optimism)
  • If a function does not show up, input the custom ABI of the following

[{“constant”:false,”inputs”:[{“internalType”:”address”,”name”:”claimingForAddress”,”type”:”address”}],”name”:”claimOnBehalf”,”outputs”:[{“internalType”:”bool”,”name”:””,”type”:”bool”}],”payable”:false,”stateMutability”:”nonpayable”,”type”:”function”}]

  • Select function claimOnBehalf(address)
  • Select “dynamic inputs via resolver”
  • Dynamic inputs via resolver ensure that it checks to see if your account is eligible to claim.
image
  • Use 0x92Deb39BBDB1B4dec45eb6f533de4c19616Ae256 as resolver address
  • If a function does not show up, input the custom ABI of the following

[{“inputs”:[{“internalType”:”address”,”name”:”_account”,”type”:”address”}],”name”:”checker”,”outputs”:[{“internalType”:”bool”,”name”:””,”type”:”bool”},{“internalType”:”bytes”,”name”:”execPayload”,”type”:”bytes”}],”stateMutability”:”view”,”type”:”function”}]

  • Select checker(address)
  • Paste in your address which you want automated claiming enabled for
  • Double check that you’ve used this address to delegate claiming rights to (0x340759c8346A1E6Ed92035FB8B6ec57cE1D82c2c)
image
  • Select “gelato balance” and deposit some funds
  • Input a name for your task – Mine is “Weekly Claiming SNX.”
image

Leave a Comment