*Paid Advertisement. Not financial advice. RugDoc is not responsible for the projects showcased here. DYOR and ape safu.
Putting your precious funds into a new yield farm can be very risky, but we can make it a bit safer by checking the MasterChef contract against that of previous, proven farms to check for malicious or otherwise dangerous code.
Can’t read Solidity? That’s OK: usually there is very little difference between the farms and in many cases a quick diffcheck can clear the new MasterChef as not containing obviously malicious code.
Most farms list the address of their MasterChef in the docs page linked from their site.
We’ll use GarudaSwap as an example in the following steps.
Make sure it is verified on bscscan.com (don’t take it from GitHub as it may not match the deployed contract) and copy it from there.
Paste the new ‘chef into one of the columns on Diffchecker. Look at the bottom part of the ‘chef code to identify which parent code the new ‘chef is forked from.
The commonly forked ‘chefs can be identified by looking at the end of their code. Here are listed the various ‘chefs and how they end.
The endings of the commonly forked Masterchef’s can be found here.
If it is none of these you have a custom code – try bringing it to the attention of the admins in RugDoc Telegram.
You can find the repository of commonly forked MasterChefs here.
Here’s PantherSwap – click to open the contract in BscScan,
As before, grab the verified contract from BscScan.
In the empty DiffCheck column, copy and paste the parent fork MasterChef contract code.
And hit the “Find Difference” button.
Compare your codes. Where you see differences pay attention and figure out what those differences do.
See the table “Exploits and Rug Codes” here.
Well done for reading to the end! Now you know how to (pretty quickly) evaluate a MasterChef for safety, even with little to no knowledge of the Solidity programming language.
Please stay #SAFU and #DYOR. Follow us on Twitter for regular updates of checked farms and other helpful yield-farming safety content and join us on Telegram to get more involved — if you can check farms we want to hear from you!
Save my name, email, and website in this browser for the next time I comment.