CAKE Syrup Pool
Migrate to new CAKE Syrup Pool
The new CakePool is a new $CAKE staking contract built based on the CakeVault (the current auto CAKE pool) and designed to work with PancakeSwap MasterChef v2 to provide "stake $CAKE, earn $CAKE" functionality while offering more features such as fixed-term staking. The current Manual CAKE pool will be retired after the migration.
The new CakePool will use a dummy token to harvest $CAKE from MasterChef v2 and reward them to users who are staking $CAKE. Users who lock their $CAKE for longer will receive a more significant number of shares (boosted linearly based on duration), therefore, enjoy a higher yield.
Do I need to migrate?
If you are currently using enterStaking
and leaveStaking
on the PancakeSwap MasterChef (0x73feaa1eE314F8c655E354234017bE2193C9E24E), you will need to migrate to the new contract.
No more compounding
With the new CakePool, rewards are distributed proportionally to all pool users based on shares. Similar to “interest-bearing tokens” or other share-based models, users’ staking balance will grow when more rewards are being put into the pool. Users don’t need to harvest and compound their rewards.
Fees
In the new CakePool, all flexible staking users will be subjected to two sets of fees.
Fee on flexible staking rewards
A 2% fee will apply to all the rewards generated by flexible staking. The amount of the fee will be calculated and realized upon the next deposit or withdrawal action, cut from users’ shares. To query the number of the unrealized performance fee, use calculatePerformanceFee(address _user)
.
Withdrawal fee
A 0.1% withdrawal fee will apply to the unstaking amount if you withdraw within 72 hours of the last deposit action. The withdrawal fee is cut from the final withdrawal amount before the CAKE transfer.
Overview
Deposit
If you are currently using the enterStaking(uint256 _amount)
on the current PancakeSwap MasterChef. You need to migrate to deposit(uint256 _amount, uint256 _lockDuration)
. For flexible staking, simply use “0” as _lockDuration
.
Staking Balance and Fees
CAKE staking amount (before subtracting all the fees)
Performance Fee
Query from contract:
Calculate it manually:
Overdue Fee: (only applies to locked staking)
Query from contract:
Calculate it manually:
Withdraw Fee
CAKE staking amount (after subtracting all the fees)
Pending Rewards
Please note that the new pool does not require any compounding. Rewards are being put into your staking balance automatically.
However, you can query the number of CAKE earned since the last action, using the difference between the current staking balance (mentioned above), and the number from userInfo.cakeAtLastUserAction
.
Withdraw
If you are using the leaveStaking(uint256 _amount)
method on the current PancakeSwap MasterChef. You need to migrate to withdraw(uint256 _shares)
.
When doing flexible staking. Please note that upon withdrawing, the pending reward fees will be calculated and cut from the number of users’ shares, the actual number of shares being withdrawn will be re-calibrated, based on the percentage of the shares you are withdrawing against the total shares you have. See the example below:
Please note that the final receiving amount will be affected by withdraw fee. If your function relies crucially on the final number of CAKE being withdrawn, we recommend calculating that using the difference in CAKE balance before and after the withdrawal action:
Or, calculate and subtract the withdraw fee when estimating the amount.
How to calculate the CAKE per block distributed to the new CAKE pool?
Previously, the manual CAKE pool had a fixed 10 CAKE/block emission. After migrating to MasterChef v2 and the new CAKE pool, we can now adjust its emissions.
And here's how you can calculate the CAKE per block distributed to the new CAKE pool:
cakePerBlockToPool = MasterChef.cakePerBlock(false) * (cakePool.allocPoint / MasterChef.totalSpecialAllocPoint)
You can query the cakePool.allocPoint
using MasterChef.poolInfo(0)
Mainnet Contract Address
Contract name: CakePool
Contract address: 0x45c54210128a065de780C4B0Df3d16664f7f859e
View the PancakeSwap: Cake Pool Contract on BscScan.
Testnet Environment
You can use the following testnet environment to test the integration of your project with the new PancakeSwap CAKE Pool. If you have any questions, please contact our team via the existing channels, or reach out to bun@pancakeswap.com via Email.
Dummy Tokens:
$CAKE:
0xFa60D973F7642B748046464e165A65B7323b0DEE
(mintable by usingmint(address _to, uint256 _amount) public
)$WBNB:
0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd
Factory and Router
Factory v2:
0x6725F303b657a9451d8BA641348b6761A6CC7a17
Router v2:
0xD99D1c33F9fC3444f8101754aBC46c52416550D1
MasterChefs
v1:
0x1ED62c7b76AD29Bfb80F3329d1ce7e760aAD153d
pid0: Manual CAKE
pid4: Dummy Pool for MasterChef v2
v2:
0xB4A466911556e39210a6bB2FaECBB59E4eB7E43d
New CAKE Pool
0x683433ba14e8F26774D43D3E90DA6Dd7a22044Fe
Last updated