So for staking, NEX tokens are to be sent to a smart contract. Let’s say I want to stake my NEX tokens for a period of 2 years. Couple of questions:
Are the staked tokens automatically returned to my wallet after the 2 years period expire?
To which wallet exactly are those tokens returned - e.g. can this be a ledger hardware wallet?
If staked tokens are not automatically returned to the wallet after staking period is over and something happens to the interface of Nash DEX (e.g. website gets hacked and it’s not accessible etc.) how can owners get/claim their staked NEX tokens back?
Here is a quote from the NEX whitepaper, but it does not answer the questions above.
4.2 Claiming Fees via Staking NEX Tokens
Users can stake their NEX tokens in a smart contract that pays out a proportion of exchange and payment service fees. To stake their tokens, users send their NEX tokens to the smart contract via a stake method that records the starting block and the amount sent by the user. The user can then make periodic claims on the contract to retrieve their share of NEX profits since staking began . Users can commit to staking their tokens for longer periods of time to receive a larger proportion of fees. The base rate of fee share will be 25%, if the user stakes their NEX tokens for one month, increasing linearly up to 75% if a user is willing to stake for two years.
Thank you in advance for your answers - just trying to understand how safe will be my staked tokens, because I am definitely going to stake them!
Yes the tokens are automatically returned after your stake period is completed (1 month to 24 months)
The tokens will be returned to your Nash wallet. The same wallet you would use to initiate the stake is the same one that the tokens will be returned to afterwards. This can not be changed currently so it is a no to ledger and I don’t think they plan to change this function. You can send your tokens over to your Ledger afterwards if you do not plan to stake again.
They will be returned automatically and this is programmed into the smart contract so even if the Nash website was down for some particular reason, the smart contract would still execute and return your tokens to your wallet which you could then view when the website was back online. If the website were down for an extended period of time, you could log into your Nash wallet (Neo portion) on Neon Wallet via your private key, encrypted key etc.
3)* This is a low probability scenario and I don’t see the website going down for any extended period of time the same way Facebook, Amazon, Netflix, Google etc. are almost always accessible - but it is good to know that your tokens will move to your wallet automatically when the stake is complete regardless of the Nash website status and can still be access if this did ever happen.
I think the tokens will be very safe in the contract, the only security concern I see is if the Neo blockchain itself is having issues like prior with the spam microtransactions but even then it would just take longer to receive the tokens. They would still be secured.
You can read the code for the smart contract yourself:
This part should answer your question regarding the end of the staking period.
def completeStake(args):
"""
Complete the stake specified by `stakeID`
If the staking period is complete, this returns the staked tokens to the user, and dispatches a `complete` event
Note that since this method can return tokens ONLY back to the address that originally staked the tokens, it can be called by anyone.
:param args (list): a list with the first item being the address in question and the second being the stakeID
:return: (bool): success
"""
stakes = getStakesForAddr(args[0])
stakeID = args[1]
stake = stakes[stakeID]
if not stake:
raise Exception("Could not find stake")
addr = stake['addr']
amount = stake['amount']
now = GetTime()
if stake['endTime'] > now:
raise Exception("Not eligible to unstake yet")
if stake['complete']:
raise Exception("Stake already completed")
# transfer back to user
args = [GetExecutingScriptHash(), addr, amount]
transferOfTokens = DynamicAppCall(getStakingContract(), 'transfer', args)
if transferOfTokens:
stake['completed'] = True
stakes[stakeID] = stake
addrStakeKey = concat(STAKE_ADDR_KEY, addr)
Put(ctx, addrStakeKey, Serialize(stakes))
OnStakeComplete(stakeID, addr)
return True
return False