Kwenta

Posted on Jul 17, 2023Read on Mirror.xyz

Staking v2 Reverse Migration

While no project wants to announce a bug or flaw in a smart contract, swift movement to identify and prevent issues is essential for minimizing the impact when a problem is identified. Last week Kwenta core contributors made the difficult decision to pause Staking v2 after a critical vulnerability was identified by an engineer contributing to the project.

Fortunately, this response successfully prevented losses, and resulted only in a small inconvenience for Kwenta stakers. Over the next several days with the contracts safely frozen, Kwenta engineers discussed a series of potential fixes and courses of action, and have narrowed down a set of possible solutions which will be presented to the community through the KIP process.

What is the reverse migration process, and why is it necessary?

To ensure users are able to immediately resume collecting staking rewards normally while the plan for Staking v2 is presented to governance, and to unsure maximum safety and security as engineers complete outstanding work, Kwenta is asking stakers to migrate back to v1.

Migrating back to Staking v1 is simple, and can be completed in the following steps:

Note: if you did not migrate to v2 or claim v2 escrow, you will not need to take any action. In this case, the Staking UI will not show the reverse migration steps.

Step 0

The Kwenta UI will direct users only to the necessary steps based on their individual case.

Step 1

  • Unstake your v2 $KWENTA

If you have liquid $KWENTA staked in v2, this frame will display as active.

This step removes all liquid $KWENTA from the v2 contracts, preparing to restake in v1.

Note: if you have not migrated any liquid $KWENTA but did claim v2 rewards, you will not need to complete Step 1. The UI will show this step as dimmed, indicating it does not need to be completed.

Step 2

  • Reclaim your v2 rewards

If you claimed rewards in v2, this frame will become active once all liquid $KWENTA in v2 is unstaked.

The “reclaim” process vests your v2 rewards, meaning your $KWENTA will be distributed as liquid.

As a one-time solution to allow users to complete the reverse migration, there is no early vesting fee applied to “Reclaimed” $KWENTA. You will receive 100% of this v2 reward vested immediately, which may be staked in v1.

Note: if you have not claimed v2 rewards, you do not need to complete Step 2. The Kwenta UI will automatically skip this step.

Step 3

  • Restake in v1

Once you've unstaked from v2, restake in v1 to earn ongoing rewards.

While we refocus our efforts and approve a governance plan for our final v2 implementation, inflationary rewards will be directed back to v1 staking. Ensure your $KWENTA is staked on v1 to continue earning.

What comes next?

Once the reverse migration is completed, Kwenta contributors and governance will need to provide the community with a plan for the next steps.

What about missing rewards?

Unfortunately, some users missed out on rewards as a result of issues with the migration. Core contributors have developed a plan to rectify this situation and distribute rewards from the treasury to stakers over the course of the next several weeks.

Although Kwenta contributors are confident this plan will fairly correct any outstanding issues with inflationary rewards, the specific implementation will require input and approval from governance. Expect to see a governance proposal outlining a specific plan and timeline released and discussed by council in the coming days.

When will the Staking v2 migration continue?

A potential solution which ensures a safe, complete implementation of the original Staking v2 proposal has been identified, but must be presented to governance, and any technical changes to the required implementation must be approved.

Although we’re happy to report that core contributors have developed a solution, testing, auditing, and deploying new code can be a lengthy process. We expect governance to discuss and approve a solution in the coming weeks, at which time an updated timeline for development and implementation of Staking v2 can be released to the community.

Where can I find a full Post Mortem on issues related to Staking v2?

A full Post Mortem review has been completed among core contributors, and a full blog drafted describing the issues in detail. Due to the dense technical detail in the Post Mortem report, this information will be released in a separate blog to ensure that casual users have a concise, step-by-step instruction.

Join the Kwenta Community

If you haven't already, join the Kwenta community on Discord.

To be the first to learn about new updates to Kwenta, follow us on Twitter.

To trade synthetic assets and futures, visit Kwenta.