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?
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
Pools don't set any type of fees yet in Scads V1.
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
Withdraw
If you are using the leaveStaking(uint256 _amount) method on the current Scads MasterChef. You need to migrate to withdraw(uint256 _shares).
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.
Pool Contract is not deployed on mainnet yet in Scads V1.
Contract name: Scads Pool
Contract address:
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)
/*
* @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;
}
/*
* @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();
}