SMBSwap
  • SMBSwap Intro
  • 1️⃣Get Started (BSC)
    • Create a Wallet
    • Get BEP20 Tokens
    • Using SMBSwap without Centralized Exchanges
    • Connect Your Wallet to SMBSwap
  • πŸ†˜Help Area
    • General FAQ
    • Troubleshooting Errors
    • Fixing Stuck Pending Transactions in MetaMask
  • πŸ“§Contact Us
    • Business Partnerships
    • Community
    • Customer Support
  • πŸ‘©β€πŸ³The SMB Team
  • πŸ—ΊοΈRoadmap
  • PRODUCTS
    • πŸ”„Exchange
      • πŸͺ™Token Swaps
      • ↕️How To Trade
      • πŸ“³Smart Router
        • How to trade using Smart Router
      • πŸ’΅Liquidity Pools
      • ⚑Zap
      • πŸ“ How to Add/ Remove Liquidity
      • FAQ
    • 🚜Yield Farming
      • How to Use Farms
      • bSELF
        • How to Use bSELF
        • FAQ
      • FAQ
    • πŸ’΅Made Pools - Stake SELF
      • New SELF Made Pool
        • How to Use the Flexible Staking Option
        • How to Use the Fixed-Term Staking Option
        • SELF Made Pool FAQ
      • Other Made Pools
        • Made Pool FAQ & Troubleshooting
    • 🎟️Lottery
      • How to Play SMB Lottery
      • How to Play BUSD Lottery
      • Lottery FAQ
    • πŸ“ŠAnalytics
    • β˜‘οΈVoting
      • How to Vote
  • TOKENOMICS
    • πŸͺ™SELF
      • SELF Tokenomics
      • Controlling SELF Supply
  • DEVELOPERS
    • 🚚v3 Migration
      • How to migrate
      • How v3 APR is calculated
      • FAQ
    • 🚚v2 Migration
      • Migrate Your Stakings
      • MasterChef v2
        • List of Farms
      • SELF Made Pool
    • Smart Contracts (EVM)
      • SMBSwap Exchange
        • v3
          • SMBV3Factory
          • SmartRouterV3
            • V3SwapRouter
            • V2SwapRouter
            • StableSwapRouter
          • NonfungiblePositionManager
          • SMBV3Pool
        • v2
          • Factory v2
          • Router v2
        • Stable Swap
          • StableSwap Pools
        • Smart Router
      • MasterChef
        • MasterChef V3
      • Made Pools
      • SELF Made Pool
      • Lottery
      • Farm Booster (bSELF)
    • 🧠Smart Contracts (BSC)
      • SMBSwap Exchange
        • Factory v2
        • Router v2
      • MasterChef
      • Made Pools
      • SELF Made Pool
      • Lottery
      • Farm Booster (bSELF)
    • πŸͺ°Report a Bug
  • JOIN THE TEAM
    • πŸ”‘Opportunities
  • REFERENCE/ ARCHIVE
    • Auto SELF Made Pool
    • How to Use Farms with BscScan
    • Main Staking/ Made Pool/ MasterChef Contract
    • Auto SELF Made Pool (SelfVault)
Powered by GitBook
On this page
  1. DEVELOPERS
  2. v2 Migration

MasterChef v2

Migrate to MasterChef v2

PreviousMigrate Your StakingsNextList of Farms

Last updated 2 years ago

SMBSwap MasterChef v2 is a new main staking contract for Farms while providing more flexibility for adjusting the $SELF emissions, including SELF pool, burn and other SMBSwap products.

Do I need to migrate?

If you are currently using SMBSwap MasterChef (), you will need to migrate to the new contract ().

Overview

Deposit

If you are currently using the enterStaking(uint256 _amount) on the current SMBSwap MasterChef, you need to migrate to the new SELF pool contract. Check out the related documentation .

The deposit function for the farm pools is unchanged. However, you will need to upgrade the MasterChef address and the pid , check out the for the list of new pids on MasterChef v2.

Pool types

MasterChef v2 have 2 types of pool: Regular farm pools and Special farm pools, which you can use poolInfo(_pid).isRegular to query the pool type. They share a different totalAllocPoint, making them two sets of independent pools.

Special farm pools: only whitelisted addresses can deposit. They are usually utilized by internal PancakeSwap products for rewards distributions.

Regular farm pools: the regular LP tokens farms. For example SELF-BNB, BNB-BUSD, etc.

Withdraw

If you are currently using the leaveStaking(uint256 _amount) on the current SMBSwap MasterChef, you need to migrate to the new SELF pool contract. Check out the related documentation .

The withdraw function for the farm pools is unchanged. However, you will need to update the MasterChef address and the pid , check out the for the list of new pids on MasterChef v2.

Staking Balance

Use userInfo[_pid][_user].amount to query the staking balance.

Staking Token

Note that the new PoolInfo struct does not contain the lp token address field, you will need to use lpToken(_pid) to query any given pool's staking token.

Total Staking Shares/Amount

Use lpToken.balanceOf(MasterChef.address) to get the total staking amount for any given farm pool. However, In MasterChef v2, the users' share can be boosted (coming soon). Therefore, rewards are calculated using a new totalBoostedShare field in PoolInfo as each pool’s total shares. For example, if pool 0 has 2 users, user1 stake 100 LPs (without boost), user2 stake 100 (with boostMultiplier being 1.05), then the totalBoostedShare will become 205. Resulting in user2 gaining more rewards.

SelfPerBlock

You can use selfPerBlock(bool _isRegular) to query the SELF reward per block that goes to all the SMBSwap farms.

Mainnet Contract Address

Contract name: MasterChef v2 Contract address: 0xb1c2C30b339C8666530d7E1dbef2F2ba20295Ec2

​

🚚
0x3d03d12F95Bdc4509804f9Bcee4139b7789DC516
0xb1c2C30b339C8666530d7E1dbef2F2ba20295Ec2
here
list of farms
here
list of farms
View the SMBSwap Main Staking Contract v2 on BscScan.​