Alpaca Finance
Published in

Alpaca Finance

Regarding PancakeSwap’s Migration and a Note of Warning to BNB Chain Users

In case you’re unaware, only hours ago, PancakeSwap announced they’d be doing a migration of all the LP tokens in their AMM to a new V2 LP contract.

Unfortunately for many protocols integrated with them on BNB Chain, this means those projects will also have to migrate their users’ tokens from any vaults or staking pools built on PCS LP pools. At this point, this will be a very large percentage of BNB Chain projects. And most of them will have to ask you to do this manually, in a rough way. In essence, you will have to unstake your LP tokens, break them apart into their individual tokens, then create new LP tokens on PancakeSwap’s V2 liquidity page, and restake those into a new vault/staking pool at those projects, whenever they get them online. In summary, it’s quite troublesome.

Therefore, it’s lucky for you Alpacas, that we senior Alpacas had foreseen a possible issue like this long ago. That’s why we built our code with upgradeable proxy contracts. With these, the protocol will be able to do the migration from PancakeSwap V1 to V2 for you, without you having to do anything. We’re probably one of the few protocols on BNB Chain that will be able to do it this way due to our contract structure.

What PancakeSwap’s migration will mean for you

First of all, lenders will have no issue at all. Lending does not use LP tokens so none of these changes directly affect you if you’re a lender. You can just keep lending and staking.

As for borrowers, because you are farming with LP tokens, this change will affect you on PancakeSwap’s side, so this is what will happen. PancakeSwap’s migration is scheduled for Friday, April 23rd at 5 AM UTC. Thus, we are also planning to update your LP tokens on the same day. We started working on the code for this process right when they made the announcement, which was only hours before we published this article.

As soon as their V2 contract is up, our system will begin the process to convert your V1 LP tokens into V2 LP tokens. Your farming positions will remain open during this process and you will not have to do anything.

You will not have to worry about swap fees for paying back debt when the protocol converts your LP tokens. The protocol will not pay back the debt during this change; It will only upgrade your LP tokens to V2. We do want to mention that during the process of switching from the V1 to V2 LP contracts, there may be slippage in the asset prices which would cause a slight rebalancing of your positions’ tokens. If such a rebalancing is necessary, there would be swap fees for the small rebalanced amount, but we expect these to be trivial relative to your position size.

Of course, you can also choose to close your position manually at any time before we help you with this automatic migration. An alternative is to move your funds into lending which will not have any issues during this period at all; business as usual.

There is one significant caveat to all this, however. Since PancakeSwap only announced this today, they’ve given BNB Chain projects very little time to adapt. In our case, because we have a 24-hour Timelock for security, we need to deploy these changes to our code 24-hours in advance of PancakeSwap doing their migration in order for them to take effect a short time after.

This requires us to have the routerV2 address and pool IDs for the new V2 pools ahead of time in order to avoid delaying the update. As a result, we’ve been in direct contact with Pancake’s staff and hope to have this information soon, but it’s out of our control if there are delays on their side. So if you have a farming position using leverage above 1x, it’s important you check back semi-regularly to our socials over the next 1.5 days as we continue to update you on the status of this migration.

We say that because if Pancake does not pass us this information in time, due to the Timelock, there would be a delay period after V2 goes up, during which time our farming positions would not be receiving CAKE yields from the new V2 pools. However, during this period, you would continue receiving ALPACA rewards and featured pool rewards. In any case though, as long as everything goes according to plan, this will not be an issue.

As for our Timelock, as many of you know, it exists for your benefit, because it ensures your funds are safe. During this 24-hour period when our deployed updates will be delayed by the Timelock contract, many community members and developers will review the code changes to confirm everything is as expected, which you’ll also be able to do here. If any questionable issue is found, you’ll hear about it and can withdraw your funds in time.

Yet, this is a luxury many other projects will not offer you. That’s also why we feel a responsibility to give you an additional note of warning: be very careful with your funds this weekend with any project that does not have a timelock.

Note of warning for BNB Chain users

This kind of massive funds reshuffling caused by PancakeSwap’s migration will create an environment forcing many other protocols to do migrations and make changes to their routers. If they don’t have a Timelock for community members to review these changes, it may become a scenario susceptible to potential exploits and rugpulls. Hence, if possible, we urge you to hold your funds in protocols with Timelocks during this period. Old audits will not be meaningful because new code is unaudited. Plus, even if the project team has no issue, that does not mean their new code put up in a hurry will not have a possible vulnerability for others to exploit. Of course, we’re not yet clear on the extent of PancakeSwap’s changes to their router, so it’s possible this is overzealous, but we prefer stressing caution.

So in summary, be careful out there. As for Alpaca Finance, with us, you can rest assured that your funds will always be safe, and that we will help you weather any storms in the DeFi ecosystem, holding strong as your refuge while you young Alpacas nap comfortably below deck, earning yields and dreaming of luscious green fields.

(*Note: Depending on what happens with PancakeSwap’s migration, it’s possible certain upcoming events may be delayed for a few days. We will update you when we have more specifics.)



Alpaca Finance is the top DeFi protocol offering leveraged products. Currently on BNB Chain and Fantom.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store