Migrator Code Removed

It is not a novelty that many farmings, especially the first ones, made rugpull thanks to the migrator code present in the Pancake MasterChef.

function migrate(uint256 _pid) public {
require(address(migrator) != address(0), "migrate: no migrator");
PoolInfo storage pool = poolInfo[_pid];
IBEP20 lpToken = pool.lpToken;
uint256 bal = lpToken.balanceOf(address(this));
lpToken.safeApprove(address(migrator), bal);
IBEP20 newLpToken = migrator.migrate(lpToken);
require(bal == newLpToken.balanceOf(address(this)), "migrate: bad");
pool.lpToken = newLpToken;
}

Of course our code does not have this function and you can check it.

Void MasterChef: https://bscscan.com/address/0xD72fF7178fb11141492Da457A1B3c4D5143b696c

Pancake MasterChef: https://github.com/pancakeswap/pancake-farm/blob/master/contracts/MasterChef.sol

However, there may be other forms of rugpull hidden in the code, certainly not our case! But don't trust a farming just because they don't have a migrate function. They need to have an audit done. We will talk more about this in future articles, it's a long topic ...