Kwenta State Log

A living document defining the state of Kwenta

KIP-127: Staking V2 Upgrade

Summary

In order to distribute USDC fees efficiently, upgrade StakingReward contract to support dual token rewards.

Abstract

Design, develop, and deploy a change to the core StakingRewards contract to enable distribution of both KWENTA and USDC. Remove the staking cooldown and deprecate the threshold requirement.

Motivation

The current USDC fee distribution requires waiting until a threshold ($500k) is reached in order to unlock a distribution. This is because there is a gas cost to claiming each discrete distribution and it's best to wait until larger fees can be distributed so that smaller stakers can receive a meaningful portion of the rewards. However, this is at the penalty of larger Kwenta stakers who may have to wait months before seeing a distribution, and makes distributions erratic. The threshold can be removed post upgrade.

Secondly, it's possible to "snapshot" the distribution by staking right before the threshold is met to be a part of the distribution. This incentivizes poor short term behavior and is the antithesis to staking. This is currently corrected by a staking cooldown to disincentivize snapshot or flash staking. There will no longer be a need for a cooldown post upgrade.

Lastly, this makes it easier to develop the compounding of KSX, where USDC can be swapped for KWENTA incrementally vs. in large clips periodically (subject to slippage).

Specification

Upgrade the StakingRewardsV2.sol contract to track and distribute both the KWENTA token and USDC. All future fee rewards that are intended to return to stakers will now be added to the StakingRewards contract weekly allowing USDC rewards to accrue for stakers continuously.

DAO and parameter changes:

  • Repeal the threshold requirement.
  • Lower the staking cooldown to 0 weeks.

Initial Distribution:

At the time of writing there is about 100k worth of USDC in the treasury awaiting distribution. StakingRewards partitions rewards over the course of a week. Therefore, the 100k would be distributed quite quickly leading to a potential drop off in fee rewards after. To prevent this, distributions should be done at the pace of 10k per week until fully distributed.

Implementation:

There already exists an example contract for this change. StakingDualRewards developed by dHedge and Synthetix. Following this contract introduce a rewardsA (KWENTA) and rewardsB (USDC) variable to StakingRewards, and respective calculation variables. Duplicate logic for rewardsB.

Exercise caution with state variable additions to only append rewardB variables to the current state chain.