$Flash - Feedback and thoughts on early withdrawal penalty

While waiting for the flashstaking comp to start yesterday we got into the topic of early withdrawal and what formula it uses.

It has come to my attention that the early withdrawal or “unstaking” feature did not function the way I expected at all and it looked like I wasn’t the only one who was confused by it so I decided to make this thread to see what other people’s thoughts are on the subject.

Now I’m no math wiz so pardon me for using dumbed down examples and terms, but here it goes:

(For the sake of simplicity I’ll use incorrect return values and imaginary XPY)


  1. David flashstakes 1000 $Flash for 10 days and he has chosen to receive LINK in return
  2. The contract then mints 100 $Flash which are then used to market buy 10 LINK. These LINK are instantly sent to Davids wallet.
  3. The flashstake is complete. Now he has to wait 10 days to get his original investment back.

But oops, David realizes he made a mistake after 5 days. Or he wants to simply back out of the flashstake for whatever reason.

With the current formula this happens:

David unstakes and based on how long he has left on the duration of his flashstake a percentage of his original investment is burned.

  • 5 days left of a 10 day stake = 50%
  • Original investment was 1000 $Flash so of these 500 $Flash is burned
  • David is left with 500 $Flash from his original investment and 100 $Flash worth of LINK from the reward. So in theory 600 worth $Flash.

David paid 500 $Flash and 5 days of his time. Bottom line is he loses 40% of his original investment + his time + contract fees, for deciding to unstake halfway through.

This seems to me like a really steep price to pay. I’m having a hard time imagining anyone would ever choose to do this. Not to mention, if someone makes a mistake when flashstaking and decides to unstake immediately because of it, they would lose 100% of their original investment and only be left with the reward. So the margin for error when flashstaking is effectively 0. Once you’ve messed up you’re in it for the ride. (Imagine fatfingering one extra 0 when only intending to stake for 100 days).

When I first got into the idea of flashstaking and unstaking early this is how I thought it worked. (Up until yesterday when Dash confirmed it was not the case)

What I thought would happen:

David unstakes and based on how long he has left on the duration of his flashstake a percentage of the minted tokens (also known as the reward) is burned from his original investment.

  • 5 days left of a 10 day stake = 50%
  • 100 $Flash were minted to buy Davids reward so 50 $Flash are burned from his original investment.
  • David is left with 950 $Flash from his original investment and 100 $Flash worth of LINK from the reward. So in theory 1050 worth of $Flash.

David paid with 5 days of his time so he’s awarded only 50 tokens, but it cost him another 50 tokens or 50% in potential rewards + contract fees because he backed out halfway through.

Isn’t this more reasonable? If someone makes mistakes or changes their mind they should still be paid for their time invested instead of feeling like they need to sacrifice a portion of their original investment to rectify the error.
They would still lose value in the form of potential rewards, so completing the flashstake and waiting out the duration should be preferable for them.

If they need to back out of a flashstake immediately, 100% of the reward will be burned from their original investment and it would be as if nothing happened, right? (Except the fees paid)

This approach is way more consumer friendly in my opinion. The original investment shouldn’t be at risk at all only the users time and reward should be at stake.

Now I don’t know if this just isn’t feasible because the math doesn’t add up, or I’m thinking completely wrong. If that’s the case please enlighten me on why it is the way it is and why it shouldn’t be like I imagined it to be. Pro’s and cons for each formula are welcomed too.

PS. If this is the wrong place for these kind of threads I’m sorry.


Aside from something like this, what mistakes are you anticipating people make when flashstaking? A confirmation window before the tx goes through would be able to solve the problem I quoted. Otherwise there really shouldn’t be any reason to withdraw early… if someone can’t handle temporarily losing liquidity they can flashstake for shorter periods of time, or simply not at all. Maybe for example if LINK goes up 100% after they’ve staked, in which case it makes sense to have a pretty severe penalty.

It certainly is way more beginner/“consumer” friendly, almost too much so. To only lose 50% of rewards essentially equates to losing nothing, as the rewards weren’t actually yours to begin with. I think a fair middle ground could be the closer you are to completing the staking period, the less severe the penalty is. And maybe some sort of immunity window after staking (1-4 hours maybe) where you can back out, to address the issue of people making mistakes.

The more I think about it the more I think there should be no early withdrawals at all. It’s not like there’s set terms to stake, the staker themselves CHOOSES how long to stake and I’d hope that most people have the critical thinking ability to decided how long they’re comfortable losing access to their asset.


Aside from something like this, what mistakes are you anticipating people make when flashstaking?

This could be a variety of things, never underestimate peoples ability to mess up. Over time pretty much everything that can happen will happen. Only yesterday someone in the flash competition chat said they picked the wrong token as output because what looked like 70% XPY was in fact only 10%. (1’s and 7’s look the same in the new font).

To only lose 50% of rewards essentially equates to losing nothing, as the rewards weren’t actually yours to begin with.

You’re not supposed to lose anything, you’re supposed to get rewarded for the time you put in staking $Flash.

I don’t see how this is different from traditional staking.

You start staking ie BAND. Your original intention is to stake it for 10 days, but after 5 you figure this isn’t for you. So you unstake and you’re left with 5 days worth of reward, when you could have had 10 if you had stuck to the plan.

It shouldn’t feel like a penalty. Instead look at it like this: You get rewarded for the time you put in and no more.

Flashstaking should feel like an improvement over traditional staking, not like a casino where there is a chance you’ll be worse off after interacting with the dApp.
The improvement is the instant reward up front. However, if you back out early, you don’t get to keep it (or a portion of it).


Maybe if the devs are worried people could game the system, there could still be a penalty for unstaking in the form of an unbonding period.

Like traditional staking there could be a default period of lets say 14 days unbonding every time someone unstakes early. If you need to unstake early for whatever reason - lose access to your original investment for 14 days before they are unlocked. No matter if you initially only wanted to stake for 10 or if you fatfingered and typed in 1000 by a mistake. 14 days will be lost to you (in addition to any potential rewards for time remaining), but your original investment is still intact.

This will feel like much less like being financially crippled if you make a mistake. Instead you’re still losing money in the form of time you could have spent staking.

1 Like

I think we have to figure out if we want it to be a feature with some game theory behind it or if it should be a function to be used simply when one strongly needs liquidity.
One major part I think is simulating many different examples of price variations and compare the results, because I do see a risk that even alternative two in Zach’s video (current model where withdrawal after 50% of the time burns 50% of the total stake) could be gamed too a detrimental level during periods of high volatility.

The flashstaking protocol also takes a risk when providing the liquidity upfront, thus it needs more severe penalties if one decides to early cancel the contract.

While I normally am very consumer minded and favor easy to use/understand solutions, it should never be done at the risk of the protocol, which in the end is all of us.

1 Like

I’m not following this, why would it matter what LINK price does after the contract has paid the LINK out to the user? From the perspective of the contract it just minted 100 $Flash at the time of the Flashstake, the part where it is swapped to LINK before it is sent to the user is just extra steps, right?

So if it has to burn the reward it just burns $Flash from the staked investment, based on the minted $Flash and the balance is restored without LINK being involved in any way? :thinking: That’s how I see it in my mind anyway

1 Like

Youre right lol. I was deliriously tired when I posted earlier and got carried away on an irrelevant thought.

I agree that flashstaking should feel like an evolved version of staking, though I don’t think this means it should be without penalty, or at the very least the option should be on the table.

Like you said if there’s the possibility of something going wrong, it will. In my mind, early unstaking without consequence is leaving a door open for issues.

A 14 day fixed minimum unstake period is interesting, would probably reduce the likelihood of people staking for anything less than 14, or ideally 21+ days. I could see both options as viable actually.

Example: you stake 1000 $flash for 31 days. After 10 you decide you need liquidity for something else and unstake. You’re given the option to immediately withdraw with a significant penalty or choose to wait x amount of time. I like 14 days or more as that should eliminate any whimsical stakers from going in and out of the protocol.

I still like the idea of paying the early withdraw fee based on the remaining length of the staking period, which could be more severe for shorter terms. As if youre receiving your XIO back as a drip as the stake period progresses.

Ex. You stake 100 $flash for 10 days, every day you “receive” 10 $flash. By receive I just mean that more will be available to you should you choose to unstake early. So on day 9 you’ll get 90, etc.

At the end of the day I think its important to remember that unstaking early is fundamentally problematic for the network, as the formula used to calculate the instant yield is based on the entered amount of time. While it’s great to be consumer-centric, my impression is that if anyone is using XIO to flashstake, they’ve probably already staked on platforms like uniswap etc. The idea that there may be a % of the user base that needs to be protected from themselves seems unnecessary. I’d be willing to wager that anyone currently into XIO/Flash more or less knows what they’re doing. To address the issue you mentioned of someone potentially needing to unstake immediately, there could maybe be some sort of function that reverts the contract if you return what you received as instant yield, nullifying the threat of potentially receiving a tiny % of your initial investment ( if a long stake period is chosen and you withdraw on day 1).

Hope I made sense this time lol


Do you guys mind showing an example of why it is so problematic to have an early unstake function?
How exactly does it put the protocol at risk? What is the worst case scenario if a bad actor takes advantage of it? How does having a penalty prevent it?

Sorry, I’m probably not seeing the full picture yet.

1 Like

I think that it could happen that someone need urgently money or it could also made a mistake in filling the required fields for staking. e.g. I put 100 days instead of 10. In this case it could be an useful option. I like it!


Now this is a really interesting discussion.

An unstaking fee (penalty, burn amount) should relate to the percentage of time passed (How early is the unstake?). Extremes are:

  1. instant unstaking - with no time passed (penalty at least all reward: ≥100% - possibly the total stake?)
  2. unstaking a completed stake - all time passed (no penalty: 0%)

What is it we aim to achieve with the early unstake possibility?

  • user perspective: offer an additional feature providing more flexibility
  • protocol perspective: counteract inflation by burning

I also feel that putting the whole stake at stake :wink: is too much. I’d be somewhat offended to be offered the possibility to unstake early and receive… NOTHING but rather LOOSE EVERYTHING.

I believe we should aim for a penalty for early unstaking, not a fee.
(A fee could be applied to any stake and is something that can also be discussed imo.)

If the penalty was part of the amount FLASH minted at staking this means that the most that can ever get burned is less than what was minted. We create an inflationary system.

I see following possibilities when unstaking early:

  1. burn part of or total amount originally minted : The user looses all his reward but frees his stake instantly. Minting is always greater than burning → inflationary system
  2. burn more than the amount originally minted : The user looses all of the reward and part of the stake → early unstake would be considered if FLASH price is expected to tank; at the same time burning results in deflation possibly stabilizing the price

I suggest a penalty calculation similar to the this:

Interesting ideas worth exploring in more detail are:


Excellent post Jörno

I assume that you meant “p=1+timepassed” in the second column, matching the results of the formula.

What about this (right-most) for an increased incentive not to unstake early?
(I emulated your style to make it easy to compare)

1 Like

Thanks for joining the convo with a very well made post @jorn

I also feel that putting the whole stake at stake :wink: is too much. I’d be somewhat offended to be offered the possibility to unstake early and receive… NOTHING but rather LOOSE EVERYTHING.

Well said, that was my initial reaction as well.

You also raise a good point with how the unstaking system becomes deflationary if there is a burn higher than the minted reward, I hadn’t really thought about it like that.

However now that you brought it up, I think $Flash inherently becomes an inflationary system when supplying the reward by minting it. I don’t think adding a penalty which burns into the users capital for early unstakes will change that.

Even if it functions the way it does now, where early unstakes might end up burning the users whole investment, it will not have much of an impact on inflation simply because most people will avoid early unstakes unless they are absolutely forced to do it, as it should be, but that means very few will do it and the deflation it provides will be negligible. It might at best dampen high volatility periods, but it won’t turn the tide of inflation.

I wish we had numbers that showed us how people behave with their flashstakes during high volatility periods, but obviously we don’t so I can only make a guess based on what I would do. With the current system I’d rather flashstake in small controlled bursts (at which point lets face it, I might as well have been using traditional staking solutions that other projects offer), than longer periods where I might end up risking getting in a situation where I will have to burn my investment. (It goes against my HODLER nature, I’d rather wait out the volatility than risk my bag)

I think this will have a similar effect on damping high volatility periods because people will have to plan a head. If they panic unstake early and are hit with a 14-21 day waiting period, the crypto sphere could look entirely different by the time they have access to their funds. So it will have to be considered carefully, because is it really worth losing their reward + all that time? People are used to unbonding periods from traditional staking systems so it will not be an unfamiliar concept to them.

Also it’s much more forgiving towards people who make critical errors that result in immediate unstake. Yeah, they messed up and their funds are locked, but at least they are all still there. If combined with @darby’s proposal of a “grace period” that’s even better.

I’ll loop back to my earlier statement and end this post with I think flashstaking should be a better version of traditional staking. When using normal staking solutions your investment is never at risk (well if you use legit ones at least). Therefore I think any penalties added to the system should not eat into the users funds.

1 Like

I do not think that the goal here is to make $FLASH deflationary, only the small part which is early unstaking.

The issue I see is if you make it too enticing to unstake whenever you wish, bots will be able to wreck havoc and probably manipulate quite easily.
I think a more aggressive curve, such as the one I proposed above, combined with say a 4 hour unbonding period would be enough to dampen manipulation, which I my primary concern.

Don’t you think having a lengthy unbonding period (only when unstaking early, not when your stake has finished the normal way) would be enough to prevent malicious bot action/manipulation?

Isn’t it excessive to burn peoples investment then?

1 Like

I think the unstaking works well formula wise and works as I would’ve expected it to be built - if you’ve earned £100 of interest upfront on day 1 and this is for 30 day period, then you’re essentially accruing £3.33 a day of interest and then on day 30, you receive the £100.

So if you stake for 30 days and on day 5 want to unstake. You’ve only accrued 5 days worth of interest (5 days * £3.33 daily accrual = £16.65). Remember that £100 interest although received upfront is for the entire duration so technically, you’ve only “earnt” £16.65 of interest. Since you’re forgoing the remaining 25 days, you haven’t earned that interest portion/deserve it - hence the balancing amount of £83.35 is burned

I think it works as it should personally

If this was a financial instrument being accounted, the above is exactly how it would be done (on a accruals basis) - the only change from a traditional debt instrument is the immediate interest - however the underlying accounting is still accrued up until the contract expires - I say it should remain as it is

1 Like

I think that a lengthy period as in the by some proposed 2-3 weeks, would discourage many for ever staking.
It may in that case be better to just remove it as an option.

Often in life, a bad feature/option can be/feel worse than none.

1 Like

Also; I wonder if perhaps something like:

You lock up 1,000
XIO for 30 days and earn equivalent £100 upfront yield. You want to unstake on day 10 to take advantage of increasing price volatility. Under the current formula, you’d only receive back 333 XIO back (that’s the amount theoretically you’ve earned at that point).

What if instead, you had the option to receive MORE than that (up to a maximum % - it can never be 100%) but the more XIO you choose to receive back, the longer the remaining XIO is Held in the stake

Ie; I decide I’d really like 500 XIO back but currently I can only get 333. I agree through the dapp - that instead of receiving 33%, I want to recieve 50% back (500 XIO) however as a consequence, the remaining 500 XIO is not burnt, but the duration of the stake is doubled let’s say (so instead of getting those XIO in 20 days time, I have to wait 40’days)

If I don’t want to do that, I have to stick with the default option of accepting 333 and burning the rest

TLDR: Retain the option of early unstake/burn fee but add the option of allowing users to recieve MORE of their XIO back up to % cap of the entire XIO staked and instead of the remaining XIO being burned, the duration for the remaining XIO is
doubled (or extended based on formula etc)

That way it’s pro’s and cons of both and also caters to both types of users?

1 Like

This is not how it currently works.

Right now, on beta (or competition)
If you stake £1000 for a 30 day period and get £100 interest on day one, but decide to unstake on day 5 this happens:
5 days of 30 is 16.66% of the way
83.34% are left so it means £834.33 are burned.

You are left with

  • upfront interest of £100
  • the remains of your investment £165,67
    In total £265.67
1 Like

I think that a lengthy period as in the by some proposed 2-3 weeks, would discourage many for ever staking.
It may in that case be better to just remove it as an option.

Often in life, a bad feature/option can be/feel worse than none.

I’m proposing that only people who unstake early encounter the unbonding period. Normal stakes that are completed as usual should function like they do now. People who don’t intend to unstake early wouldn’t even know it’s there.

1 Like

Thanks for clarifying - I may have got my symbols mixed the wrong way round :’) - my explanation should remain the same bar the maths (in that the system works the way it should in my mind work)

1 Like

Most financial investment solutions in the real world currently allow for investors to withdraw their investments (Venture Capital and adding seed money to your startup might be exceptions) but this action usually always comes with a penalty. The unstaking feature is a welcomed option but the current implementation will deter persons from coming on board as opposed to increasing adoption of the flashstaking concept and remember there are other investment options available in crypto that we are competing with.

I don’t see how it would be acceptable to lose all your investment in an investment vehicle like this one. I stake my 1000 FLASH and then re-invested my reward tokens. So all that I had and gained have been invested. I invested for 1 year (365 days) but 30 days later I had an financial situation and had to unstake. I’ve only completed 8% of the stake period and therefore will lose 92% of my investment which also includes my rewards. The maths don’t line up at all.

Now, in reality, anything can happen (financial issues, crisis etc) and based on your risk tolerance you can accept certain risks but unless you are wealthy and you know for sure you won’t need your funds for the duration of the period, you would not accept such an agreement. Don’t invest what you are not willing to lose is a common phrase used in investment circles but we have to be careful to not push the users we want to onboard away unless we are going after a specific pool of users.

So the following is a possible solution:

Say I Stake 1000 FLASH for 100 UNI for 10 Hours. After 1 hour has passed I want to unstake, meaning I would have not earned 90% of my gains (90 UNI). So a calculation would be done at that time to calculate how much FLASH would be needed to compensate the system and say 1 FLASH = 1 UNI then the system would deduct 90 FLASH from my staked amount leaving me with 910 FLASH. On top of that based on the time that’s remaining, I would be charged that percentage of the early unstacking penalty fee. So if the overall early unstaking penalty fee is 10% and I have 90% of my staking period remaining I would be charged a 9% penalty on the FLASH I have remaining. So 9% of 910 = 828.1 FLASH that I would receive.

The calculations would be similar to how some exchanges calculate the exchange between two tokens using a price oracle more so one that’s off-chain.

Zach had done a video stating that this could allow for users to manipulate the system and his alternative on basing the penalty on XPY sounds interesting but still would need to see some actual calculations to see how viable it would look from an investor’s perspective.