Step 5: Stake, Unstake, Withdraw and Claim reward
Objectives: Using Etherscan and interacting with the UniswapV3Staker contract, you will be able to stake, unstake, withdraw and claim our rewards!
You may unstake then withdraw your tokens or claim rewards before the incentive has ended. The steps are the same.
You may unstake then withdraw your tokens or claim rewards in whatever manner you would like. You do not need to withdraw token then claim rewards or vice versa.
You may choose to withdraw tokens and not claim rewards or claim rewards and not withdraw tokens.
UniswapV3Staker (0x1f98407aaB862CdDeF78Ed252D6f557aA5b0f00d)
Part 1 (Stake)
You may only start staking in the pool when the incentive has started on Friday, 12 November, 2021 9:00:00 AM (GMT+8).
Input
0x1f98407aaB862CdDeF78Ed252D6f557aA5b0f00d
in the search barNavigate to the
Contract
tabClick on the
Write Contract
buttonClick into the
stakeToken
dropdownEnsure the correct wallet address is connected
Input:
key (tuple)
tokenId
For field 1 key (tuple)
copy
andpaste
the following: ['0x0fd10b9899882a6f2fcb5c371e17e70fdee00c38','0xD050430dd432876cF5622fF60c4Dc106b64fA753',1636678800,1639184400,'0xC5eC7a3295B1C664feEe4aEA17ea96A0d30f96b2']Tuple information:
Rewardtoken address
Pool address
Start time
End time
Refundee
Your tokenID needs to match the pool address if not the contract will throw an error
7. Click write
8. A Metamask notification will appear, click confirm
Part 2 (Unstake)
You will always need to unstake before withdrawing even when the incentive has already ended
Click into the
unstakeToken
dropdownInput:
key (tuple)
tokenId (uint256)
For field 1 key (tuple)
copy
andpaste
the following: ['0x0fd10b9899882a6f2fcb5c371e17e70fdee00c38','0xD050430dd432876cF5622fF60c4Dc106b64fA753',1636678800,1639184400,'0xC5eC7a3295B1C664feEe4aEA17ea96A0d30f96b2']
Once the incentive has ended, your token can be unstaked by anyone, and you may stand to lose your rewards if you do not claim them.
3. Click write
4. A Metamask notification will appear, click confirm
Part 3 (Withdraw Token)
Please ensure your token has been unstaked before withdrawing. Once the incentive has ended, anyone can unstake your token
Click into the
withdrawToken
dropdownInput:
tokenId (uint256)
to (address)
data (bytes)
For field 3 data (bytes)
copy
andpaste
the following: 0x0000000000000000000000000000000000000000
Ensure <your wallet address> is the owner of <your tokenID>
3. Click write
4. A Metamask notification will appear, click confirm
Part 4 (Checking rewards getRewardInfo/rewards)
4a) getRewardInfo
Use the getRewardInfo
function if your token is STILL STAKING
Click on the
Read Contract
buttonClick into the
getRewardInfo
dropdown (this will be the pending reward while your token is still staking)Input:
key(tuple)
tokenId (uint256)
For field 1 key (tuple)
copy
andpaste
the following: ['0x0fd10b9899882a6f2fcb5c371e17e70fdee00c38','0xD050430dd432876cF5622fF60c4Dc106b64fA753',1636678800,1639184400,'0xC5eC7a3295B1C664feEe4aEA17ea96A0d30f96b2']
4. Click query
return (eg):
4b) rewards
The rewards
function can only be used once you have UNSTAKED
your token
Click into the
rewards
dropdown (your eligible rewards once you unstake your token, it will be 0 until you unstake your NFT if you don’t already have any pending rewards in the contract)Input:
<input> (address)
<input> (address)
For field 1 <input> (address)
copy
andpaste
the following: 0x0FD10b9899882a6f2fcb5c371E17e70FdEe00C38
Ensure <your wallet address> is the owner of <your tokenID>
3. Click query
return (eg):
Part 5 (Claim Rewards)
Click on the
Write Contract
buttonClick into the
claimReward
dropdownEnsure the correct wallet address is connected
Input:
rewardToken (address)
to (address)
amountRequested (uint256)
For field 1 rewardToken (address)
copy
andpaste
the following: 0x0FD10b9899882a6f2fcb5c371E17e70FdEe00C38
The amount you requested from part 4b) will be needed here. You may request any amount between 0 to the amount you requested in 4b).
Say my eligible rewards was 21961075569626700000. I can claim a reward amount anything ranging from 1 to 21961075569626700000.
5. Click write
6. A Metamask notification will appear, click confirm
Last updated