The PID, or Pool ID, is an identifier for a particular pool and is required to perform certain actions manually within the Masterchef contract, such as harvesting and emergency withdrawals.
Option 1: Look at the site documentation #
Occasionally, a Yield Farm will list all the the pools and their corresponding PIDs. If you come across such a list, copy it and store it elsewhere, as you won’t be able to reference this list if the site is inaccessible.
Option 2: Look at your deposit transactions #
After making the deposit, go to bscscan.com and search for your wallet address. Your address page will contain every transaction that you have made with that particular wallet. Next, scroll down to Transactions and click the record that corresponds to the transaction where you staked your tokens. This will take you to the Transaction Details page. Click the “Click to see More” link at the bottom of the page and scroll down to “Input Data”. Depending on the Masterchef, you may see a “Decode Input Data” button. In this case, all you need to do is click that button and you will see the PID for the transaction.
If you do not see a Decode Input Data button, you will need to manually convert the hexadecimal character to a decimal which you can do here: Decimal to Hexadecimal Converter (rapidtables.com).
Option 3: Start Counting #
If you are in a dire situation such as an Emergency Withdraw, and you need to act quickly, simply start at zero and work your way up. There usually aren’t that many total PIDs and you will hit the correct one eventually.
Now that you know how to find the PID of a pool, you’ll be able to use it to withdraw or harvest by interacting directly with the contract.