Becoming a Validator

The first ever Starknet validator survey is now live!

Make your voice heard and help improve Starknet and its ecosystem together 🤜🤛

Using the Starknet staking contract to stake STRK tokens requires interacting with the stake function. The stake function does the following:

  1. Locks the specified amount of STRK tokens from the validator’s account into the staking contract.

  2. Records the validator’s details, including reward and operational addresses, in the staking contract.

  3. If pooling is enabled, deploys a new delegation pool contract associated with the validator.

Subsequently, the validator’s tokens will be locked in the staking contract, and the validator will begin earning rewards based on their stake.

For more information on what happens during the staking process, see Staking Architecture.

Prerequisites
Procedure
  1. If you are using a block explorer:

    1. Navigate to the STRK contract by searching for its address

    2. In the contract interface, locate and select the approve function.

  2. Pre-approve the STRK ERC20 contract for the transfer of tokens from your address to the staking contract by invoking its approve function with the following parameters:

If you using Starkli as CLI tool, the following example, which approves the STRK contract to transfer 1 STRK to the staking contract on Sepolia, can be used as reference:

starkli invoke 0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d approve \
0x03745ab04a431fc02871a139be6b93d9260b0ff3e779ad9c8b377183b23109f1 u256:1000000000000000000 \
--network=sepolia
  1. If you are using a block explorer:

    1. Navigate to the staking contract by searching for its address.

    2. In the contract interface, locate and select the stake function.

  2. Invoke the staking contract’s stake function with the following parameters:

    • In the first parameter (reward_address), enter the address where the rewards will be sent.

    • In the second parameter (operational_address), enter the address that in the future will be used for block attestations and sequencing.

    • In the third parameter (amount), enter the number of STRK tokens you want to stake (note the minimum stake for validators and that STRK has 18 decimals).

    • In the fourth parameter (pool_enabled), enter 1 (true) if you wish to enable delegation pooling, otherwise enter 0 (false).

    • In the fifth parameter (commission), enter the commission rate for any delegated staking. The rate should be entered as a percentage with precision, where 10000 represents 100%. For example, to set a 5% commission, you would enter 500.

If you are using Starkli as CLI tool, the following example, which stakes 1 STRK with delegation pooling enabled and 1% commission on Sepolia, can be used as reference:

starkli invoke 0x03745ab04a431fc02871a139be6b93d9260b0ff3e779ad9c8b377183b23109f1 stake \
<reward_address> <operational_address> 1000000000000000000 1 100 \
--network=sepolia
  1. Register your validator on Karnot’s, Staking Rewards', and Voyager’s dashboards.