Withdraw from an Old Farm
If you've forgotten about your old Elk LP tokens in an older farm that is not accessible on https://app.elk.finance, you can feel free to follow this tutorial to withdraw your LP tokens, and claim your rewards and impermanent loss protection amount (if applicable). You can also follow a video guide here. Please note that this method currently only works on desktop browser extensions of MetaMask. You can find a guide here on how to set up the desktop version of MetaMask on your mobile device.
- 2.Go to the staking pool link, then click write contract. If the farm is not verified and you see no "write contract" option. Please skip to the section below.
- 3.Click connect to Web 3 and "Approve" (you may have to do this twice on some explorers)
- 4.Click "write" under "1. exit" and approve the transaction in MetaMask to withdraw your LP tokens, any remaining rewards, and impermanent loss coverage (if applicable)
- 2.Navigate to a contract address from the same round that is verified, even if it is on a different chain.
- 3.Head to the verified contract, and copy the contract code, noting the solidity version.
- 5.Create a new .sol file in Remix (the little file button in the menu) and paste the contract in there.
- 6.Go down to the compiler tab, select the version that you noted prior, and hit compile.
- 7.Go down to the deploy and run transaction tab. Change the environment to injected web3, and approve to connect your MetaMask
- 8.Change the gas to what the network expects in gwei, change the contract to Staking Rewards, and paste the contract address you noted earlier of the farm you are stuck in into "At Address" and then click "At Address"
- 9.Uncollapse the "Stakingrewards At ADDRESS" menu that just appeared on the left of remix, click "exit" and confirm your transaction. If an additional gas menu pops up, like on AVAX, then fill both gwei fields with 225 and then confirm the transaction in Remix, and also in MetaMask (ensuring the gas isn't too expensive). This should pull your LP out. You're finished! Head to the pool at app.elk.finance and withdraw your liquidity.
If it failed, scroll down to the blue "balanceOf" field and past your MetaMask address in there, and click "balanceOf". If it shows a value of 0, then that means you actually do not have any LP in this particular farm. You can actually paste other farm addresses in the blue "At Address" field and repeat this step until you find the farm you are actually stuck in (it will return a non-zero value). Then simply follow the last two steps above.