Categories
Fees Getting Started Installation Staking

Validator Commission

Every validator has the potential to earn a portion of the staking rewards in return for operational service.

By default, for a new validator, the commission rate is set to 100%.

This would result in all staking rewards being deposited to the validator vote account and no increase in the delegated stake size.

Set the commission on your validator as follows

# set the commission rate to 10%

~/Safecoin/target/release/safecoin vote-update-commission ~/ledger/validator-vote-account.json 10 ~/ledger/validator-identity.json

You can change the validator commission levels at any time.

Categories
Fees Getting Started Staking Voting

How do Staking Rewards work?

Staking rewards on SafeCoin are determined by a variety of factors, some of which are related to the chosen validator, while others depend on the global network state.

Rewards are automatically added to the active stake to compound, which means withdrawing earned rewards also requires the cooldown phase to pass.

Staked Supply: Newly issued tokens are rewarded to those staking, which means that if there is a lower percentage of the circulating SAFE supply at stake, those staking will receive higher rewards.

Transaction Fees: Transaction fees in SafeCoin are dynamically adapting based on the load in the system. 50% of fees is burned, which indirectly benefits SAFE holders as this lowers the overall SAFE supply. The rest is retained by the validator proposing the block containing the transaction.

State Rent: Accounts and contracts on SafeCoin are charged rent in proportion to the space they occupy. 50% of the rent the protocol collects is burned, decreasing the overall SAFE supply, and the rest is distributed to validators as part of the transaction fees.

Validator-Specific

Commission Rate: Validators can set a commission fee in the protocol. This percentage is the proportional cut that validators receive from delegated stake for operating the node infrastructure on behalf of token holders.

Uptime: Validator nodes earn credits for blocks on the majority fork they successfully voted on. Stakers earn a portion of inflation rewards based on their proportional stake times the percentage of blocks their validator successfully voted on. As an example, if a validator missed to vote on 10% of blocks, its delegators will only receive 90% of the staking rewards.

Categories
Getting Started Staking

How does Cooldown work?

When deciding to stop staking, staked SAFE needs to pass a period during which stake remains eligible for penalties before it becomes liquid.

Similar to the warmup phase, this happens gradually and works in the same way that warming does, with at maximum 25% of the SAFE at stake being able to pass the cooldown phase per epoch.

Categories
Getting Started Staking

How does Warmup work?

When sending a staking transaction to the network, stake first needs to activate before it influences the consensus process and begins to earn rewards.

The time this takes is dependent on how much SafeCoin is beginning to stake relative to the SafeCoin already at stake. Up to 25% of the SAFE already at stake can warmup per epoch and start to earn staking rewards.

In the best case scenario, when a reasonably high percentage of SAFE is at stake and there is little new stake entering, this will usually mean that stake will become active in the upcoming epoch that the staking transaction was sent.

In times of high stake turnover, e.g. at network launch, stake will progressively activate meaning that only a fraction of stake will enter the validation stage each epoch.

Categories
Getting Started Staking

Can I top-up the stake-account?

You cannot send new coins to your stake-account once it is active and delegated. To stake more coins you need to create a new stake account and deposit your new coins to that using the same process.

The stake rewards automatically get deposited into your stake account for immediate compounding.

See: Staking with CLI

Categories
Staking Withdrawing

Withdraw Stake

Before you can withdraw from a stake account, it must have completed the cooldown process which is started by running the Deactivate-Stake command.

Once the cooldown process is complete, you can withdraw-state from your previosuly delegated stake-account.

~/Safecoin/target/release/safecoin withdraw-stake --withdraw-authority <KEYPAIR> <STAKE_ACCOUNT_ADDRESS> <RECIPIENT_ADDRESS> <AMOUNT> --fee-payer <KEYPAIR>
Categories
Staking

Deactivate Stake

As soon as your stake-account is fully active, you can deactivate the stake at any time. It will take a number of epochs to complete before you can issue the withdraw-stake command.

~/Safecoin/target/release/safecoin deactivate-stake --stake-authority <KEYPAIR> <STAKE_ACCOUNT_ADDRESS> --fee-payer <KEYPAIR>
Categories
Getting Started Staking

Staking with CLI

The safest method to delegate your stake is remotely to the validator. In this short guide I’ll show you how to create a local wallet, a stake account and how to delegate to your validator.

Make a note of your validator vote-account address as this is needed in order to delegate a stake-account to your chosen validator.

To complete this guide your will need to build/acquire the safecoin and the safecoin-keygen binaries. If you don’t have access to the binaries, you can build them as below.

You will need SSH/terminal access to an Ubuntu 20.04 system. Login to your system and build the binaries below.

Install dependencies, modules and build binaries

apt update upgrade -y

curl https://sh.rustup.rs -sSf | sh

source $HOME/.cargo/env

rustup component add rustfmt

rustup update

sudo apt-get install libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang make git screen -y

git clone https://github.com/Fair-Exchange/Safecoin.git

cd Safecoin

cargo build --release

mkdir ~/ledger

You now have the binaries built in the ~/SAFE/target/release folder.

Creating a Local Wallet, a Stake-Account and Delegating

The steps below will create a local wallet keypair, a stake account and will delegate your stake-account to your desired validator vote account.

Create a keypair for your Local Wallet

# create local wallet

~/Safecoin/target/release/safecoin-keygen new -o ~/ledger/wallet.json

# set config to default to local wallet

~/Safecoin/target/release/safecoin config set --keypair ~/ledger/wallet.json

Make sure to keep a backup of your keypair seed and private key, which you can find in ~/ledger/wallet.json file.

Send funds to your Local Wallet

# send some funds to the local wallet address

~/Safecoin/target/release/safecoin address

# check the balance, are they there?

~/Safecoin/target/release/safecoin balance

Create a keypair for your Stake-Account

Make sure to keep a backup of your keypair seed and private key, which you can find in ~/ledger/stake-account.json file.

# create local stake keypair

~/Safecoin/target/release/safecoin-keygen new -o ~/ledger/stake-account.json

Create and Credit your Stake-Account

Ensure there are enough funds in your local wallet. If you want to stake 10,000 SAFE then sent 10,001 SAFE so that you have a little extra to cover the transaction fees.

# create and fund stake account 

~/Safecoin/target/release/safecoin create-stake-account ~/ledger/stake-account.json <AMOUNT> --from ~/ledger/wallet.json --stake-authority ~/ledger/wallet.json --withdraw-authority ~/ledger/wallet.json --fee-payer ~/ledger/wallet.json

Delegate your Stake-Account to a Validator

This final step commits your stake-account and begins activation. This is the point of no return.

# delegate to the vote account of your chosen validator

~/Safecoin/target/release/safecoin delegate-stake ~/ledger/stake-account.json <VOTE ADDRESS OF CHOSEN VALIDATOR> --fee-payer ~/ledger/wallet.json --stake-authority ~/ledger/wallet.json

At this point, you will be given a transaction id which confirms your stake is now delegated.

You can view your stake-account address on the SafeCoin explorer to see how much of your stake is active, and how much is activating.

You can also see the Validator commission fee.

Note: You cannot send coins to your stake-account once it is delegated. To stake more coins you need to create a new stake account. Simply repeat the process above with a new stake-account keypair and delegate to your desired validator.