Staking Contract V2 Update

Pamp Network
5 min readAug 12, 2020

Hi everyone,

We’ve recently updated our staking contract to allow for rewards to accumulate and to fix a couple of (low-severity) bugs. We also introduced a way for liquidity staking to be part of the inflation rate, although we now realize that unfortunately this will require a liquidity staking contract migration as well (more on that to come). Our contract was audited by security engineer Adis Begic, who runs his own vulnerability-testing and auditing firm. In this post, I will explain the changes that we’ve made.

Before I explain, however, it’s very important that you go to our website (https://pamp.network/staking) and click on the “Migrate Staking Time” button if you have not done so. You cannot claim rewards before you do this. This is required for anyone with 200 tokens or more. Yes, the minimum number of tokens required to receive price-reactive staking rewards is now 200 PAMP. Liquidity staking has no minimum.

First and foremost, rewards now accumulate for up to 60 positive days. That means that you no longer have to claim rewards every day — in fact, you can wait up to 60 positive days to claim. A positive day is simply a day in which rewards are available. Since not every day is positive (some days are negative or stagnant), you can actually wait longer than 60 days to claim rewards, if you so choose. However, note that sending tokens resets your staking time, and will also cause you to lose all unclaimed rewards. Receiving tokens also reduces staking time, so you could lose some rewards if you receive too many tokens as well. If you plan on changing your balance in any way, it’s safest to claim your rewards first. We recommend claiming about once a week, but if gas prices continue being this high, even that might be too often.

Note that there should be no difference between claiming every day and once a month (or even longer). The formula goes through each positive day starting with the latest rewards update and calculates your rewards for each day, compounding your balance until it reaches the last reward update that you claimed. So why do we recommend claiming once a week? Simple — in order to understand the inflation rate, we need to know the total supply, but the total supply isn’t updated until you claim. So if the majority of the network only claims once a month, it will be difficult for us to understand how the token is inflating and we won’t be able to accurately tell the market cap.

In addition, the inflation adjustment factor used in the rewards calculation formula is based on the current inflation adjustment factor, meaning that if it’s changed in the future, all of your unclaimed rewards will be calculated using the new number. This can be good or bad for your rewards, depending on the number it is changed to. The current inflation adjustment factor is 800 and can be seen publicly by viewing the smart contract state on Etherscan. If this number increases, inflation (and therefore rewards) decreases, and vice-versa. We don’t plan on changing this number without input from the community.

Aside from compounding the rewards, we also made two small changes to the rewards formula. First, the max days staked multiplier is now 100 (was previously 60). That means that at 100 days staked you’re making 100x the rewards you were making on day 1. After 100 days, you still receive rewards with the 100x multiplier, but the multiplier will not increase. Second, a streak (2+ positive days in a row) decreases the inflation adjustment factor by 10% for every day in the streak.

Formula for calculating inflation adjustment factor (IAF) on streaks

Let’s give an example. Suppose the inflation adjustment factor (IAF) is 800 and the price is positive two days in a row. The inflation adjustment factor would now decrease by 2 days * 10% per day = 20%. That is, the IAF would be 800 — (800 * ((2 * 10) / 100)) = 640. Basically, this increases rewards for that day by 20%. The maximum number of days in a row (max streak) is 7 days, after which any more days will not decrease the IAF further.

Another change is the staking time reduction upon receiving tokens. We have reduced the penalty on staking time for receiving tokens by half. Now, if you receive 20% of your balance, your staking time will decrease by 1 day. If you receive 10% of your balance, your staking time will decrease by half a day. Any amount received will decrease your staking time, but the penalty is not as bad as it was previously. So long-term holders should be able top up their balances quite easily, but we still recommend using 3 addresses, especially if you plan to participate in liquidity staking as well. We also recommend claiming rewards before adding to your balance. If you add to your balance before claiming rewards, you could forfeit some of your rewards.

We also updated Uniswap seller burn fees to increase on negative streaks by 2% each day in the streak. So if the price is negative 2 days in a row, the burn fee will be 10%, and at 3 days it will be 12%, etc. We did the same with transfer burn fees, but right now have disabled that feature while we work with exchanges to ensure they understand how this will affect their deposit process.

The last major update was the integration of liquidity staking into the protocol and inflation rate. Unfortunately, this will require a liquidity staking contract update (we did not expect this to be the case, but recently realized that it will be necessary). For the time being, we are going to mint approximately 20k PAMP tokens to fund the liquidity staking program until we do a migration. We are also going to change the liquidity staking rewards formula to one that rewards users for staking longer, and this does not require a contract migration, so we will be able to do this soon. We will announce when this has been done.

That was quite a lot to read, so thank you for reading and staying up-to-date with the Pamp Network price-reactive protocol!

--

--