No migrator code

The PancakeSwap Masterchef contract, for all its advantages, has a critical vulnerability - the so-called Migrator code, which allows the contract owner to withdraw the funds blocked in it at his discretion. As a result of the fact that most of the PancakeSwap forks retained the Migrator code, dozens of projects created by outright scammers just to steal farmers' funds appeared on the market.

The GREENBEAN Masterchef contract does not have this vulnerability - the Migrator code is completely removed from it, so that no one can steal user funds.

You see the following code still present in the following link :

https://bscscan.com/address/0x6aa8ea0bc021871dbea23bc80bc83e1c71a6fc65#code

Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good.
    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;

Last updated