CosmicSwap
Search…
πŸ¦Ήβ€β™€οΈ Migrator
It is not a novelty that many farmings, especially the first ones, made rug pull thanks to the migrator code present in the Pancake MasterChef.
1
function migrate(uint256 _pid) public {
2
require(address(migrator) != address(0), "migrate: no migrator");
3
PoolInfo storage pool = poolInfo[_pid];
4
IBEP20 lpToken = pool.lpToken;
5
uint256 bal = lpToken.balanceOf(address(this));
6
lpToken.safeApprove(address(migrator), bal);
7
IBEP20 newLpToken = migrator.migrate(lpToken);
8
require(bal == newLpToken.balanceOf(address(this)), "migrate: bad");
9
pool.lpToken = newLpToken;
10
}
Copied!
Of course, our code does not have this function and you can check it.
Pancakeswap Masterchef: 0x73feaa1eE314F8c655E354234017bE2193C9E24E​
However, there may be other forms of rug pull hidden in the code, certainly not our case! But don't trust a farm just because they don't have a migrate function. They need to have an audit done.
Last modified 5mo ago
Copy link