# Staking Pools

The new ScadsPool is a new $SCADS staking contract built based on the manual Staking and designed to work with Scads MasterChef v1 to provide "stake $SCADS, earn multiple rewards($SCADS, $SNACKS...)".

### Do I need to migrate?&#x20;

If you are currently using old MasterChef, you will need to migrate to the new contract.

### No compounding

No need compounding yet because Scads V1 has only manual staking pools.

### Fees&#x20;

{% hint style="info" %}
Pools don't set any type of fees yet in Scads V1.&#x20;
{% endhint %}

### Overview

#### Deposit

If you are currently using the `enterStaking(uint256 _amount)` on the current Scads MasterChef. You need to migrate to `deposit(uint256 _amount).`

#### Staking Balance and Fees

```
struct UserInfo {
    uint256 amount; // How many staked tokens the user has provided
    uint256 rewardDebt; // Reward debt of zoinks. See explanation below.
    uint256 rewardDebtSnacks; // Reward debt of snacks. See explanation below.
    uint lastWithdrawDate; // Last Withdraw Time
}
```

#### Pending Rewards&#x20;

```
/*
* @notice View function to see pending reward on frontend.
* @param _user: user address
* @return Pending reward for a given user
*/
function pendingReward(address _user) external view returns (uint256) {
  return userInfo[_user].rewardDebt;
}
```

#### Withdraw

If you are using the `leaveStaking(uint256 _amount)` method on the current Scads MasterChef. You need to migrate to `withdraw(uint256 _shares)`.

```
/*
 * @notice Withdraw staked tokens and collect reward tokens
 * @param _amount: amount to withdraw (in rewardToken)
 */
function withdraw(uint256 _amount) external nonReentrant {
    UserInfo storage user = userInfo[msg.sender];
    require(user.amount >= _amount, "Amount to withdraw too high");
   
    if (_amount > 0) {
        user.amount = user.amount.sub(_amount);
        totalStakedZoinks = totalStakedZoinks.sub(_amount);

        if (user.lastWithdrawDate == 0 || (user.lastWithdrawDate + 1 days > block.timestamp)) {
            stakedToken.safeTransfer(seniorageAddress, _amount.div(2));
            stakedToken.safeTransfer(address(msg.sender), _amount.div(2));
        emit Withdraw(msg.sender, _amount.div(2));
        emit Withdraw(seniorageAddress, _amount.div(2));
        } else {
            stakedToken.safeTransfer(address(msg.sender), _amount);
    emit Withdraw(msg.sender, _amount);
        }
        user.lastWithdrawDate = block.timestamp;
    }

    rewardTransfer();
}
```

#### How to calculate the total rewards distributed to the new Scads pool?

The multiple reward is generated irregularly whenever Scads Inflation and $SNACS buy/buyback in Scads V1. So it's impossible to calculate the correct rewards amount in advance. Please check below to discover more details of how to provide/calculate rewards.

{% content-ref url="/pages/Zi8njJagIheYtm0tRZPV" %}
[Pools](/zoinkswap/products/pools.md)
{% endcontent-ref %}

### **Mainnet Contract Address**

{% hint style="info" %}
Pool Contract is not deployed on mainnet yet in Scads V1.
{% endhint %}

**Contract name:** Scads Pool\
**Contract address:**&#x20;

View the Scads: ScadsPool Contract on BscScan.

### **Testnet Environment**

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

**Dummy Tokens:**

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

#### Factory and Router

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

#### MasterChef

* v1: `0x97B631AcBAC4C38Bb0AA18691ea60dB2754609FB`
  * pid0: Manual SCADS
  * pid4: Dummy Pool for MasterChef v1

#### SCADS Pool

`0x3a88e377a53310d829262F8b747a82512B74EA47`

#### SNACKS Pool

0xc474FF61B82416d06B0535F5DB5ecAeFC64fca97


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bcdev727.gitbook.io/zoinkswap/developers/migration/staking-pools.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
