What is the current cold staking?

A detailed description of the Cold Staking protocol can be found at Callisto blog. This protocol description in our blog refers to an earlier version that is now deprecated in favor of Cold staking new version (v2). The technical details for the implementation of Cold Staking v2 are different. The Cold Staking v2 will be implemented at HardFork1, then it will be upgraded at HardFork2. You can find the discussion of cold staking version implementation here at Github.

Terms: Staking reward — the amount of funds that the user has accumulated during the “staking” of the deposit in the contract, but which did not belong to him before. Staking deposit — the amount of funds that the user deposited to the Staking contract address. No one can dispose of the deposit except the user who made it.

Where does the contract take CLO to pay rewards?

20% of CLO block rewards go into the Staking Contract. The Staking contract distributes these funds among stakers as rewards.

Staking rules.

After depositing funds into the contract, the funds are locked for 27 days. After 27 days, a user can withdraw staking reward or deposited funds + staking reward. (That’s why 27)

A user must not deposit funds into the staking contract if there is some reward staked at his address! Any deposit will cause the erase of the already staked reward.

It is possible to stake for longer than 27 days. However, it is only possible to claim rewards for completed staking rounds. If a user keeps his funds in the contract for 30 days and claims the reward, then he will receive the reward for only 27 days of staking, but the next claim will be possible in 24 days. 3 days are assigned for the next round. If the user withdraws his staking deposit + staking reward but decides to deposit it back then it will erase the previously staked 3 days.

As of the Cold Staking v2, compound interest is not possible. This means that if you have a certain amount of CLO staking, then it is better to withdraw your reward after every 27 days and deposit it back, rather than staking it for (27 * n) days.

There are 2 ways to re-stake your reward after it was claimed. (1) If a user claims it at the end of Staking round i.e. at 54th day for example. In this case, a user can just send the reward back into the staking contract because there are 0 days remaining for the next round and nothing will be erased. (2) If a user is using multiple accounts. For example, a user is staking from account 0x11111. At the 38th day, he decides to claim the reward. The reward is sent to the 0x11111 address, but the reward for the remaining 11 days is still allocated for the next staking round of 0x11111 address. The user can transfer the claimed reward to address 0x22222 and start staking from the 0x22222 address at any time.

“Staking round” is individual for each staking address. This means that if a user_1 deposits his funds to the staking contract earlier than user_2, then the Staking Round of user_1 will finish earlier. The user_1 will be able to withdraw his reward before user_2.

Cold Staking implementation: smart-contract.

Cold Staking is not a consensus protocol. It is an economical feature. Read more here.

Cold Staking of Callisto Network is implemented as a system smart-contract. Cold Staking smart-contract is an open source software. Anyone can check its code here.

The smart contract implements debugging features. These functions allow Callisto founders to freeze/unfreeze the contract and withdraw staking rewards. The contract does not allow founders to withdraw staking deposits! Only the staker who made a deposit to the contract can withdraw his funds. Debugging functionality is necessary in the early stages to debug a contract in case any problems arise to prevent such accidents as TheDAO hack or Parity Multisig hack.

A user must deposit funds in the contract to become a cold staker. After 27 days have passed, the user can withdraw all his funds including the deposit, or claim the reward and leave the deposit in the contract for the next 27 days. A user must not deposit funds into the staking contract during the 27-days locking period or his staking reward will be erased.

A user must call the withdraw_stake() function to retrieve all his funds or claim() function to claim the reward only and continue staking. It is planned to simplify the process through the implementation of the user interface.

If the user has not performed any actions with the contract for 2 years, then he is considered to be inactive and is excluded from the staking contract (report_abuse() function). If the user was excluded, then his staking deposit is returned to his account but the staking reward is not paid.