Optimize Cake rewards through frequent compounding. All gains are sold to underlying position. The underlying LP position is staked in the PancakeStaking contract. All cake rewards are compounded into the cake staking feature of the PancakeStaking contract.
token0 / token1: corresponding token for want LP pair
paths: Governance or Strategist can define the PancakeSwap path to use when trading two assets. This will be looked up and used when selling Cake to both token0 and token1 prior to increasing LP Position.
Deposit specified LP token amount into PancakeStaking contract.
Gather all gained Cake and stake into Cake staking feature of PancakeStaking.
Harvest Cake: from Want staking
Harvest Cake from LP staking position.
Harvest & Compound Cake: from Cake staking
Harvest cake rewards from existing Cake staking position. Using the fact that enterStaking() method distributes gains before the deposit, we can do the harvest & deposit transaction in one action (aka "Compounding").
Gather all staked & earned Cake and convert to the underlying LP position by selling to the LP position components and then adding the liquidity.
Withdraw All (Migrate)
All Cake will go to the governance rewards contract. All Syrup is burned as part of leaveStaking() to withdraw Cake.