Staking

What is Staking

Staking is a process that allows users to lock up their cryptocurrency funds in a wallet in order to participate in the validation and creation of blocks on the corresponding blockchain. It can contribute to ensuring the liquidity of an asset, preventing sell-offs, and more, depending on the specific blockchain.

KLV and KFI

Excluding NFTs, all Klever Digital Assets (KDAs) are fit for staking. Nevertheless, KLV and KFi have some singularities. A node who holds 10 million KLV or more is eligible to be a validator in Kleverchain. For KFI, the stakers of this token will have to right to vote in proposals. Moreover, regular users can accumulate more of both these assets through the freeze and claim contracts.

KDAs

When users interact with Kleverchain to create their own assets, they will be faced with two types of staking: APR and FPR staking.

APR x FPR

APR staking stands for Annual Percentage Rate. It is a well-known term in the market that represents the percentage earned annually on an investment. On Kleverchain, when creating an asset and choosing this staking modality, the creator must choose what the annual return will be for users who stake their asset. It will be up to the creator to control the emission limits of their token (through initial supply and max supply). The return on investment is always in the currency in which the staking was made. The KDA creator does not need to control the distribution of rewards, since it occurs automatically by Kleverchain. Users will just need to claim the rewards when they meet the conditions.

On the other hand, FPR stands for Flexibe Proportional Return. It is a new modality of staking that the Klever ecosystem offers. When creating a KDA and choosing this option, a pool will be created for depositing any assets from Kleverchain. This pool will always be fed by the owner of the asset, and after the deposits are made, the stakers of that coin during the deposit period will have the right to withdraw the assets deposited in the pool according to the amount of staking they made of the owner's coin.

For example: Some user creates coin A with FPR. This user deposits assets B, C, D, E into his pool. A staker who has 10% of all staking of asset A will be entitled to receive 10% of all assets B, C, D, E that were deposited in the pool in that epoch, provided he had those 10% at the time of deposit and only for that deposit. If in the next deposit that staker no longer has any coins staked of asset A, he will not be entitled to receive the deposited assets.

For a staker to be eligible for withdrawing his rewards, he must have staked in an epoch prior to the deposit. If when the owner deposits the coins but there are no currently stakers from his asset on that epoch, that means no one will receive the deposited coins and after 100 epochs they will return to the owner.

The great advantage of FPR staking is that it allows the owner of the asset to create an additional incentive for people to buy their asset, as they will not only receive yields from their own coin.

This means that the owner of the KDA with FPR will be responsible to their staking community for communicating when and how much assets will be deposited, as well as which assets they intend to deposit. Klever cannot control or guarantee that the deposits will be made according to what the owner of the asset published. That is why it is essential that anyone who intends to stake an FPR asset has a full understanding and confidence in the respective project.

Important note: Although KLV and KFI are considered to have FPR system. Their staking returns are always in KLV and the distribution is made automatically through KleverChain in every epoch, based on the KLV spent on fees and according to the network params.

How To Stake

In order to freeze KLV, you should type the following code:

docker run -it --rm --user "$(id -u):$(id -g)" \
    -v $(pwd)/wallet:/opt/klever-blockchain \
    --network=host \
    --entrypoint=/usr/local/bin/operator \
    kleverapp/klever-go:latest \
    --key-file=./walletKey.pem \
    --node=https://node.mainnet.klever.finance account freeze 10000000

After the "freeze" instruction, there is this structure: [AMOUNT].

[AMOUNT] for how much is being frozen.

--kda is the Asset ID.

The minimum amount allowed to stake KLV is 1000 KLV.

How To Unstake

To unfreeze assets, you need to run the follwoing command, signaling the bucket ID, which was generated when you first staked those assets:

docker run -it --rm --user "$(id -u):$(id -g)" \
    -v $(pwd)/wallet:/opt/klever-blockchain \
    --network=host \
    --entrypoint=/usr/local/bin/operator \
    kleverapp/klever-go:latest \
    --key-file=./walletKey.pem \
    --node=https://node.mainnet.klever.finance \
    account unfreeze --bucketID=1acd6f3958f24a058e5c185fe1491bb3b42c88f65a085d9b4dbfd5866273481c

[BUCKET_ID]: a hash representing the location of the staked assets

How To Withdraw

Withdrawing assets will remove the values of all the unfrozen buckets automatically. This is how you should do it:

docker run -it --rm --user "$(id -u):$(id -g)" \
    -v $(pwd)/wallet:/opt/klever-blockchain \
    --network=host \
    --entrypoint=/usr/local/bin/operator \
    kleverapp/klever-go:latest \
    --key-file=./walletKey.pem \
    --node=https://node.mainnet.klever.finance \
    account withdraw

How To Claim Rewards

You can claim rewards either from Staking (with no delegation) or Allowance (from delegation):

docker run -it --rm --user "$(id -u):$(id -g)" \
    -v $(pwd)/wallet:/opt/klever-blockchain \
    --network=host \
    --entrypoint=/usr/local/bin/operator \
    kleverapp/klever-go:latest \
    --key-file=./walletKey.pem \
    --node=https://node.mainnet.klever.finance \
    account claim 0 --id=KLV

[claim_type]: represents the source of the rewards:

StakingClaim = 0; AllowanceClaim = 1;

[id] : KDA ID.

Rewards With FPR

FPR is a way for owners to distribute rewards to their holders through deposits into the FPR pool.

How to Set Up the Asset to support FPR

In order to use a KDA to pay rewards with FPR to your holders, you must set up a KDA with FPR activated.

1. Create an Asset with FPR Support

First of all, you need to create a KDA. Use the Create Asset Contract to create a KDA with FPR Activated. When executing the command make sure you pass —-interestType 1 to activate the FPR in your KDA.

PS: You can not upgrade an existing KDA from APR to FPR Support.

docker run -it --rm --user "$(id -u):$(id -g)" \\
    -v $(pwd)/wallet:/opt/klever-blockchain \\
    --network=host \\
    --entrypoint=/usr/local/bin/operator \\
    kleverapp/klever-go:latest \\
    --key-file=./walletKey.pem \\
    --node=https://node.mainnet.klever.finance \\
    kda create 0 --canBurn=true --canMint=true --canFreeze=true --canPause=true --canWipe=true --logo=LOGO_URL --maxSupply=AMOUNT_MAX --precision=6 --name=KDA_NAME --ticker=KDA_TICKER —-interestType 1

2. Deposit KDA to your holders

After you created or updated your KDA, you need to deposit KDA to your FPR pool to be able to pay rewards to your holders.

PS: you can deposit multiple KDAs to your FPR pool to pay rewards with them.

docker run -it --rm --user "$(id -u):$(id -g)" \\
    -v $(pwd)/wallet:/opt/klever-blockchain \\
    --network=host \\
    --entrypoint=/usr/local/bin/operator \\
    kleverapp/klever-go:latest \\
    --key-file=./walletKey.pem \\
    --node=https://node.mainnet.klever.finance \\
    kda deposit AMOUNT --depositType=0 --kdaID=YOUR_KDA_ID --currencyID=KDA_YOU_WANT_TO_PAY_REWARDS

How to get rewards with FPR

If you are a holder and want to receive rewards.

1. Freeze your KDA

To be able to receive rewards of a KDA with FPR you need to freeze this KDA with the following command. Make sure the asset you’re freezing supports FPR.

docker run -it --rm --user "$(id -u):$(id -g)" \\
    -v $(pwd)/wallet:/opt/klever-blockchain \\
    --network=host \\
    --entrypoint=/usr/local/bin/operator \\
    kleverapp/klever-go:latest \\
    --key-file=./walletKey.pem \\
    --node=https://node.mainnet.klever.finance \\
    account freeze AMOUNT --kda=KDA_id_YOU_WANT_TO_FREEZE

2. Claim Rewards

After the reward is generated, you can claim it with the following command:

PS: You need to claim your rewards at least 100 epochs after the reward is generated.

docker run -it --rm --user "$(id -u):$(id -g)" \
    -v $(pwd)/wallet:/opt/klever-blockchain \
    --network=host \
    --entrypoint=/usr/local/bin/operator \
    kleverapp/klever-go:latest \
    --key-file=./walletKey.pem \
    --node=https://node.mainnet.klever.finance \
    account claim 0 --id=KDA_ID_YOU_HAVE_FROZEN

Was this page helpful?