> For the complete documentation index, see [llms.txt](https://bcdev727.gitbook.io/zoinkswap/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bcdev727.gitbook.io/zoinkswap/developers/migration/masterchef-v1.md).

# MasterChef V1

Scads MasterChef v1 is a main staking contract for Farms while providing more flexibility for adjusting the $SCADS emissions, including Scads pool, burn and other Scads products.

### Do I need to migrate?

If you are currently using old Scads MasterChef, you will need to migrate to the new contract ([0x97B631AcBAC4C38Bb0AA18691ea60dB2754609FB](https://testnet.bscscan.com/address/0x97B631AcBAC4C38Bb0AA18691ea60dB2754609FB)).

### Overview

#### Deposit&#x20;

If you are currently using the `enterStaking(uint256 _amount)` on the current Scads MasterChef. You need to migrate to the new Scads pool contract. Check out the related documentation [here](broken://pages/gMY0Hvj1atvvNTz0SSG4).

The deposit function for the farm pools is unchanged. However, you will need to upgrade the MasterChef address and the `pid` , check out the [list of farms](broken://pages/3Nb9bGvxzNMVCjFBOZjP) for the list of new `pids` on MasterChef v1.

#### Pool types

MasterChef v1 have only one type of pool: Regular farm pools.

Regular farm pools: the regular LP tokens farms. For example SCADS-BUSD...

#### Withdraw

If you are currently using the `leaveStaking(uint256 _amount)` on the current Scads MasterChef. You need to migrate to the new pool contract. Check out the related documentation [here](broken://pages/gMY0Hvj1atvvNTz0SSG4).

The withdraw function for the farm pools is unchanged. However, you will need to update the MasterChef address and the `pid` , check out the [list of farms](broken://pages/3Nb9bGvxzNMVCjFBOZjP) for the list of new `pids` on MasterChef v1.

#### Staking Balance

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

#### Staking Token&#x20;

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.&#x20;

#### Total Staking Shares/Amount

Use `lpToken.balanceOf(MasterChef.address)` to get the total staking amount for any given farm pool.

#### Multiple Rewards Update

Use massUpdatePools() to detect and distribute pending multiple rewards to the users.

You can check more details of multiple rewards distribution in [Farms](/zoinkswap/products/farms.md) & [Pools](/zoinkswap/products/pools.md).

### Mainnet Contract Address

{% hint style="info" %}
MasterChef V1 is not deployed on Mainnet yet.
{% endhint %}

**Contract name:** MasterChef v1\
**Contract address:**&#x20;

View the Scads: Main Staking Contract v2 on BscScan.

### Testnet Environment

You can use the following testnet environment to test the integration of your project with the Scads MasterChef v1. If you have any questions, please contact us.

**Dummy Tokens:**

* $SCADS: `0xAeD1DeC6F344d70240BCC02514B599eA68f35582`\
  (mintable by using `mint(address _to, uint256 _amount) public`)
* $BUSD: `0xD0F7d3611d2faDc1838FBAc6c2Dbe19EC8cCE359`\
  (mintable by using `mint(uint256 amount) public`)
* $WBNB: `0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd`

#### Factory and Router

* Factory V1: `0xc4FF830D46414bD3Aeb0Dd0942Ce044a860555c7`
* Router V2: `0x8e0A7Fde7E549Ea689c27A79d26798Cf8F27C8e8`

#### LP Pairs

* SCADS-BUSD: `0x3aea236ccdf6e41421c8047303d37181bfa4cf63`

#### MasterChef

* v1: `0x97B631AcBAC4C38Bb0AA18691ea60dB2754609FB`
  * pid0: Manual CAKE
  * pid4: Dummy Pool for MasterChef v2
  * pid5: CAKE-BUSD: `0xb98C30fA9f5e9cf6749B7021b4DDc0DBFe73b73e`
  * pid6: CAKE-WBNB: `0xa96818CA65B57bEc2155Ba5c81a70151f63300CD`
