Funds are SAFU: Fixing Our Fixed Term Staking and Introducing The New STAX 500% APY Flexible…
After our first 2 week staking contract concluded yesterday, we have discovered an issue with our fixed-term staking contracts due to a…
After our first 2 week staking contract concluded yesterday, we have discovered an issue with our fixed-term staking contracts due to a SafeMath overflow issue, which causes an error when users try to withdraw their STAX after the term length of a staking contract is over.
Unfortunately, because we added SafeMath during our review of our contract code, we did not notice two spots where we used a minus sign (-) rather than the preferred method of SafeMath for subtracting — .sub(), causing the current error. As a result, we will do more rigorous testing for our Staking contracts moving forward, and in this Medium article, will share more details on how we will keep your funds SAFU and make good on what the contract intended to do with our next steps.
Since we made sure to have some backup plans with our code, our contract still has the Emergency Withdraw feature to help withdraw all funds depositing into the staking contract on behalf of users. We have tested this before and will be able to ensure that all users who have staked into all staking pools will be able to receive their principal and earned interest back. We hoped we didn’t have to use this feature, but believe this is the best way to remedy the situation and retrieve all funds. We plan to have all deposits from this first two week staking pool, plus earned rewards distributed within 24–36 hours (subject to further notice). We will give further updates as we work to process these refunds. For all stakers of other pools, we will repeat the same process when your pools end (subject to further notice). We are also working on removing the current 1 month staking pool from the front end interface. Please do not stake into the 1 month pool at this time. We will share more updates as we process these rewards & balances.
To mitigate risk, we will work on closing off the front-end for depositing new tokens into the existing staking pools. The scope of the error only affects our fixed staking contracts. The other farming contracts, such as the stablecoin LP pools for StableXSwap beta and our STAX/BNB and STAX/BUSD pools are unaffected, and users can continue to earn rewards as normal.
To address the concerns of users who are afraid that this manual distribution of funds will cause dumping on the market, and that we will not have fixed staking products live again until they undergo more full testing, we are announcing the new STAX Flexible Staking program.
To give users more flexibility in supporting our STAX ecosystem while we work on improving our entire staking experience, we will instead switch to a snapshot-based rewards system in the interim.
For the next two weeks (between now and November 20th, 11:59PM UTC), we will take a random snapshot during a blockheight within this month, and manually distribute a 500% APY pro-rata to users based on their STAX holdings at the time of the snapshot.
There is a caveat: any user who sells any amount of STAX on Pancakeswap will be disqualified from the flexible staking program and forfeit any rewards owed.
This is to encourage users to feel comfortable with holding onto their own STAX and earn staking rewards commensurate to what they would have received in a smart contract that locked their tokens. Since if they staked in a smart contract, they would not have an option to sell, which is why we cannot give rewards to users who sell some portion of their balance.
Users who do not want to participate in this program and don’t want to hold their STAX may choose to sell, but the interesting thing about this program is that this encourages other users who still believe in us to purchase STAX if the price dips on the open market, as they can add to their balance before a possible snapshot date during the period, and earn additional rewards.
For users still mining STAX, we encourage you to harvest periodically just in case the snapshot occurs at any point in time, that you will have a STAX balance accounted for during the time of snapshot and then you can receive the maximum STAX rewards.
We will reassess the effectiveness of this flexible staking program as we move forward to decide if we will continue to offer the 500% APY or until we have a sturdy staking contract up and running.
We can’t wait to launch this flexible staking program, and hope you come along for the ride!
Q&A :
Q: Why an emergency Withdraw?
R: We will use emergency withdraw to first distribute out all the rewards for users locked in this current 2 week pool, and it will work for all other pools when they end, too.
Q: Why closing off the front-end for depositing new tokens into the existing staking pools?
R: We will make sure no more users erroneously deposit in, there will be better rewards from this flexible staking program anyways
Q: Any other pool has the same issue?
R: There’s the 1 month pool that is on the site now, and will work to take it down
Q: What about the pre-staking bonuses?
R: We will still work on giving the bonuses, but priority is to first make sure everyone gets their money back that is deposited in the contract. The pre-staking funds came from the community treasury, so will be distributed shortly after we first solve this situation.
Q: Does providing liquidity in STAX pools disqualifies me from the program?
R: No you’ll still be eligible
== UPDATE Nov 11/2020 COMPLETED ==
Same contract = same bug = same solution for all upcoming pools. All distributions will be recorded here: https://docs.google.com/spreadsheets/d/e/2PACX-1vQQ-xxMgHnjHv-DgCDoVwLVAUPKfcWcpRUofENFBp6JUYNqWdJ-okf8t2h8CvT-hgt1mwmtmimtuBVk/pubhtml#
== UPDATE Nov 5/2020 COMPLETED ==
1- We collected onchain data feed thanks to bitquery https://explorer.bitquery.io/bsc/smart_contract/0xb561f9f117acaa5512f2790354f59202b0c3642b/inflow
2- Then we compiled the data to provide a clear deposit and reward sheet records here
STAX 2W Deposit Rewards Records
STAX Earned Sender,SUM of Amount,Accrued Rewards,Prestaking Ratio,Pre-Staking Rewards,Total Owed,Total…docs.google.com
3- Then we’ve completed all of the distributions from our StableXSwap Deployer https://bscscan.com/address/0x7323b13669028780c6450a620064e30654a5be2c#tokentxns
Thanks for your patience, cooperation, and understanding from the StableX team :)
Website | Telegram | Announcements | Twitter | Github