Blog

Callisto Cold Staking testnet implementation

Callisto Cold Staking testnet implementation

Foreword

Cold Staking is a unique feature of Callisto Network that rewards users for staking. The implementation is planned during the first hard fork (HF1) which is set on November 11th.

Please bear in mind the following:

  • Cold Staking is at its development phase at this moment and will not be implemented in production until it has been extensively tested.
  • Make sure not to send any funds from mainnet. You can use this faucet to request test $CLO.
  • A protocol description is out of scope in this post – an extended writing about Cold Staking can be found here.
  • Cold Staking contract is currently deployed at 0x99e318aa116bba18db83cfcfc9d071d8ddb6fa17 address.
  • A human-friendly UI will be developed for Cold Staking, this is just for test purposes.

Cold Staking on Testnet

This is a very first implementation of the Cold Staking solidity smart-contract which is intended to serve as a demonstration and experimental version. Contract source code can be found here.
This version of the contract allows a user to start stakingclaim the reward and demonstrates the process of interaction with the smart contract.

Calculation of rewards and numbers are not the real values that a user can expect to with the real staking contract. Again, the amount of reward you will receive in the final staking contract will be different from what you can get in this testing contract. Time frames are also lowered due to testing reasons.

If you want to be among the other participants in the testnet, feel free to request test CLO using the faucet https://faucet.callisto.network/

How to stake

In order to participate in test cold staking you should follow these steps

  1. Go to ClassicEtherWallet and choose the Callisto Testnet 3.0 network.
  2. Go to “Send Ether & Tokens” tab and unlock your wallet.
  3. Type 0x99e318aa116bba18db83cfcfc9d071d8ddb6fa17 address into the “To” input box, enter the amount of test CLO that you want to stake with into “Amount” input box, increase the Gas Limit to 150,000 then generate and send the transaction.
  4. Once the transaction is confirmed, your account will begin to stake with the amount of test CLO that you sent to the contract.
    NOTE: Your test CLO will be locked for a certain period of time: 1 hour for testing contract (this will be 1 month for final cold staking contract). You can not withdraw your funds before this time passes.

How do I withdraw my test reward?

  1. Go to ClassicEtherWallet, Interact with Contract tab.
    Enter the 0x99e318aa116bba18db83cfcfc9d071d8ddb6fa17 address into the “Contract Address” box.
  2. Go to Cold Staking contract repo and copy the ABI of the contract.
  3. Go back to Interact with Contract tab at ClassicEtherWallet and paste the ABI into the “ABI / JSON Interface” box
  4. Click “Access” button. “Read / Write Contract” dropdown menu will appear then.
  5. Select the “claim” function at the dropdown menu as follows:
  6. Click the “Write” button. A pop-up warning message will appear. Enter the required gas amount and send the transaction. NOTE: Do not send test CLO to this function. “Amount to send” must be 0, otherwise transaction will fail. Make sure that you use the same account as the one with which you sent the staking transaction. Make sure that you are at Callisto Testnet 3.0 network!
  7. After the transaction occurs you can check your balance. NOTE: After claiming the reward your funds will be locked for 1 more hour. If you want to withdraw your reward + your initial stake then you should use the claim_and_withdraw function. It works the same as claim function but it will also give back your initial stack.

How do I check my reward?

  1. Go to ClassicEtherWallet Interact with Contract tab. Enter the 0x99e318aa116bba18db83cfcfc9d071d8ddb6fa17 address into the “Contract Address” input box.
  2. Go to Cold Staking contract repo and copy the ABI of the contract.
  3. Go back to the Interact with Contract tab at ClassicEtherWallet and paste the ABI into the “ABI / JSON Interface” input box:
  4. Click “Access” button. “Read / Write Contract” dropdown menu will appear.
  5. Select the “staker_info” function at the dropdown menu
  6. Enter your address into the “addr address” box
  7. Click “Read” button. The contract will display your values in the corresponding fields:

 

“weight” is your initial stake (in WEI. 1 CLO = 1000000000000000000 WEI)
“init” is the number of the block on which you started to stake
“stake_time” is how long you are staking (in blocks)
“reward” this is the amount of WEI that you get if you call the claim function
NOTE: reward will display 0 if the funds locking time did not pass yet. Locking time is 200 blocks for testing contract (approx. 1 hour)

Common issues when staking in testnet

  • Hardware Wallets are not supported at this moment. When sending a transaction using Nano Ledger, the following error might appear “Invalid Sender”.
  • Staking interface on CEW is not implemented yet – hence it won’t work when you try to interact with the menu.

In case you encounter any issue, feel free to open an issue on our github repo.

Topics:Learning