gm! This post will walk you through all the steps required to interact with the ApeCoin Staking Smart Contract from start to finish. LFG 🚀
This is a supplement to our Guide to ApeCoin Staking Video. If you’d like to see us walk through the steps of staking, check it out 🫡
Table of Contents
🚨 Stay safe! 🚨
Only use links/contract addresses from official sources for staking.
Official Twitter Channels: @apecoin & @HorizenLabs
Official Links: apecoin.com & docs.apestake.io
ApeCoin Contract Address: 0x4d224452801aced8b2f0aebe155379bb5d594381
ApeCoin Staking Contract Address: 0x5954aB967Bc958940b7EB73ee84797Dc8a2AFbb9
On Horizen Lab’s docs.apestake.io page, you will be able to find the Apecoin Staking Contract Address when it is live on mainnet. (See below)
Getting Started
⚠️ DELIST YOUR APES FROM ALL MARKETPLACES BEFORE STAKING!!! ⚠️
First things first, make sure your NFTs and ApeCoin are all in the same wallet and that it’s the wallet you want to stake from. Then, familiarize yourself with the steps to connect your wallet to Etherscan. You are required to connect to Etherscan to interact with the contracts (ApeCoin contract & ApeCoin staking contract - they’re two different things) 🫡
1. Approve the Staking Contract to access your ApeCoin
⚠️ DELIST YOUR APES FROM ALL MARKETPLACES BEFORE STAKING!!! ⚠️
You will need…
ApeCoin Contract Address: 0x4d224452801aced8b2f0aebe155379bb5d594381
ApeCoin Staking Contract Address: 0x5954aB967Bc958940b7EB73ee84797Dc8a2AFbb9
Max Approval Number: 115792089237316195423570985008687907853269984665640564039457584007913129639935
What’s going on here? 🧐
Before we are able to use the ApeCoin Staking Contract, we must first approve it on the ApeCoin Contract. This will allow the ApeCoin Staking Contract to move our ApeCoin in and out of the staking pools.
Here’s the 1. Approve function from the ApeCoin Contract (as seen in the gif above)
Spender Address = ApeCoin Staking Contract Address: 0x5954aB967Bc958940b7EB73ee84797Dc8a2AFbb9
Amount = Whatever amount you want to approve → easiest to approve the max amount
Max Amount: 115792089237316195423570985008687907853269984665640564039457584007913129639935
2. Staking ApeCoin with your BAYC
⚠️ DELIST YOUR APES FROM ALL MARKETPLACES BEFORE STAKING!!! ⚠️
You will need…
ApeCoin Staking Contract: 0x5954aB967Bc958940b7EB73ee84797Dc8a2AFbb9
BAYC Tuple: [["BAYC ID","Amount of ApeCoin to Stake"]]
From the ApeCoin Staking Contract, connect your wallet and write to function 12.depositBAYC.
You will need to insert the BAYC Tuple format from above.
NOTE: Double Check your quotation marks they should look like this " and not like this “ ”!
In this example, we max staked BAYC #460 using the following tuple: [["460","10094000000000000000000"]]
Click “Write”, and a MetaMask transaction will appear. If you formatted everything correctly and if you’re not trying to add more ApeCoin to the BAYC than what is allowed, your transaction should look similar to the one on the Left (below). If your formatting is incorrect, or if you’re trying to stake more than the max for a BAYC (10,094 ApeCoin) your transaction will have a big red warning box saying it will likely fail.
Congrats 🎉 You’ve just staked ApeCoin with your BAYC!
Here’s what your transaction would look like.
(this is on the Testnet - Mock ERC20 is ApeCoin in this example)
3. Staking ApeCoin with your MAYC
⚠️ DELIST YOUR APES FROM ALL MARKETPLACES BEFORE STAKING!!! ⚠️
You will need…
ApeCoin Staking Contract: TBD (Dec. 5th)
MAYC Tuple: [["MAYC ID","Amount of ApeCoin to Stake"]]
From the ApeCoin Staking Contract, connect your wallet and write to function 13.depositMAYC.
You will need to insert the MAYC Tuple format from above.
NOTE: Double Check your quotation marks they should look like this " and not like this “ ”!
In this example, we max staked MAYC #251 using the following tuple: [["251","2042000000000000000000"]]
Click “Write”, and a MetaMask transaction will appear. If you formatted everything correctly and if you’re not trying to add more ApeCoin to the MAYC than what is allowed, your transaction should look similar to the one on the Left (below). If your formatting is incorrect, or if you’re trying to stake more than the max for a MAYC (2,042 ApeCoin) your transaction will have a big red warning box saying it will likely fail.
Congrats 🎉 You’ve just staked ApeCoin with your MAYC!
4. Staking ApeCoin with your BAKC
⚠️ DELIST YOUR APES FROM ALL MARKETPLACES BEFORE STAKING!!! ⚠️
You will need…
ApeCoin Staking Contract: TBD (Dec. 5th)
BAKC Tuple: [["BAYC or MAYC ID","BAKC ID","Amount of ApeCoin to Stake"]]
From the ApeCoin Staking Contract, connect your wallet and write to function 11.depositBAKC.
You will need to insert the BAKC Tuple format into the appropriate box based on if you are pairing your BAKC with a BAYC or an MAYC
NOTE: Double Check your quotation marks they should look like this " and not like this “ ”!
In this example, we staked 856 ApeCoin pairing BAKC #210 with MAYC #250 using the following tuple: [["250","210","856000000000000000000"]]
Note: Your BAKC can only be paired with one Ape (BAYC or MAYC)
In this other example, we max staked 856 ApeCoin pairing BAKC #211 with BAYC #460 using the following tuple: [["460","211","856000000000000000000"]] and we staked 856 ApeCoin pairing BAKC #210 with MAYC #251 using the following tuple: [["251","210","856000000000000000000"]]
Click “Write”, and a MetaMask transaction will appear. If you formatted everything correctly and if you’re not trying to add more ApeCoin to the BAKC than what is allowed, your transaction should not have any errors. If your formatting is incorrect, or if you’re trying to stake more than the max for a BAKC (856 ApeCoin) your transaction will have a big red warning box saying it will likely fail.
Congrats 🎉 You’ve just staked ApeCoin with your BAKC!
5. Claiming your ApeCoin Reward
If you want to claim your reward and not remove your staked amount, you will use the following functions. The formatting is quite simple compared to the staking functions 😅
BAYC
Function: 8. claimSelfBAYC
Enter the ID of the BAYC you have staked (Ex: BAYC #460)
MAYC
Function: 9. claimSelfMAYC
Enter the ID of the MAYC you have staked (Ex: MAYC #251)
BAKC
Function: 7. claimSelfBAKC
Enter a tuple in the form [["APE ID","BAKC ID"]]
EX: Claiming rewards from BAKC #210, paired with MAYC #250 → [["250","210"]] and no BAKC pair with a BAYC → []
Note: If you don’t remember what Ape you paired your dog with, go to step 7 to check what you have staked.
6. Withdrawing your staked ApeCoin
If you would like to withdraw your staked ApeCoin, you have two options.
You can either A) withdraw a partial amount or B) withdraw the full amount.
Either one you choose will also claim any unclaimed rewards.
BAYC
24. withdrawSelfBAYC
In this example, we withdrew 10094 ApeCoin for BAYC #460 using the following tuple: [["460","10094000000000000000000"]]
MAYC
25. withdrawSelfMAYC
In this example, we withdrew 2042 ApeCoin for MAYC #251 using the following tuple: [["251","2042000000000000000000"]]
BAKC
20. withdrawBAKC
In this example, we withdrew 856 ApeCoin for BAKC #210 that is paired with MAYC #251 using the following tuple: [["251","210","856000000000000000000",true]]
>Note: If you want to keep some apecoin staked, change the “true” to a “false”
”true” will always remove the max amount of staked Apecoin
7. Checking your staked amounts
In order to check your staked ApeCoin, we will use Read Contract instead of Write Contract. In function 4. getAllStakes, you insert your wallet address and click “Query”.
This will return a LOT of information.
The first digit corresponds to pool type.
The Second digit is the asset ID
Ex: BAYC #460 or MAYC #251
The Third Digit shows the staked amount
The fourth digit shows the reward amount
The 2nd to last digit shows any paired NFT ID
The Last digit shows the asset type (1=BAYC,2=MAYC)
8. “ApeCoin ONLY pool” Stake/Claim/Withdraw
Whoops, forgot to show the sections for ApeCoin only staking. Luckily it’s more straight forward.
Staking
Function: 14. depositSelfApeCoin
Convert the number you wanted staked to the appropriate format.
Ex: 5555 → 5555000000000000000000
You can click the “+” and then select 10^18 to convert to the correct format.
Claiming
Function: 6. claimSelfApeCoin
Just click “Write”! 🎉
Withdrawing
Function: 23. withdrawSelfApeCoin
Enter the amount you want to withdraw and convert to the correct format.
Ex: withdrawing 123 ApeCoin
123 → 123000000000000000000
Conclusion
We hope this helped! If you run into any troubles or need any clarification feel free to drop us a DM 🫡
Here’s our twitter links (give us a follow 👉👈)
Thank you guys - much appreciated
Any tips if not maxed out on APE? How easy/hard to claim rewards and then stake them?