# How to stake on Curio Parachain as Delegator

## Overview

In the **dPoS consensus**, delegators play an important role (at least in the infancy of the network) to filter the pool of candidates for honest, trusted and well-performing collators.

The requirements to become a delegator are much less than those for collators. You only need to stake a relatively low number of tokens and decide on a collator candidate. Once the collator you have backed with your stake authors a block and thus receives a reward, you and all the other delegators of this collator also receive a reward.

The following sections will guide you through the process of becoming a delegator, adjusting your stake, revoking a delegation and unstaking your tokens.

{% hint style="info" %}
**Info**

The amount of delegators per collator is limited. Currently, each delegator can only stake to one collator per account; this may change if the community decides to enable multiple delegations per account.
{% endhint %}

## Become a Delegator

In contrast to the rather difficult path to become a collator candidate, joining the delegator pool is rather simple. Anyone can delegate to a collator candidate by staking a minimum of **100 CGT**.

{% hint style="info" %}
**INFO**

You can either execute this transaction in Polkadot JS Apps or the **Capital DEX Staking** page, which serves as an in-house developed Frontend for all Curio Parachain staking activity. Below, we outline the steps for the Capital DEX Staking page and Polkadot JS Apps.
{% endhint %}

## Staking via Capital DEX Staking

Go to <https://parachain.capitaldex.exchange/staking>. You need to install and create a Polkadot wallet to interact with Capital DEX on Curio Parachain (see the guide "How to create and connect the wallet to Curio Parachain").

{% hint style="info" %}
**INFO**

You need CGT in your Curio Parachain network wallet to pay the transaction's gas fee.
{% endhint %}

### How to stake

<figure><img src="https://3995532231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV1VXXsfM-OSWA2aH3X%2Fuploads%2FtGnVrlf9Xmmcs7oNbMXM%2FFireShot%20Capture%20003%20-%20Capital%20DEX%20on%20the%20Curio%20Parachain%20-%20testnet.beta.capitaldex.exchange.png?alt=media&#x26;token=df9ac916-bd25-4a72-b7f2-9a6a0d200c81" alt="" width="563"><figcaption></figcaption></figure>

* Connect the wallet and select a wallet provider (e.g. Polkadot{.js}).
* Choose the account with CGT amount which you wish to use for staking.
* Enter the stake amount and sign the transaction in Polkadot{.js} wallet (**Stake CGT** button). The minimum amount that must be staked for the first stake is **100 CGT**. Next, you can add CGT to the stake for any amount.
* You can make **Claim rewards** at any time.

### How to withdraw stake and unlock unstaked tokens

<figure><img src="https://3995532231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV1VXXsfM-OSWA2aH3X%2Fuploads%2F0NNQNHu3s09978wgXGio%2FFireShot%20Capture%20004%20-%20Capital%20DEX%20on%20the%20Curio%20Parachain%20-%20testnet.beta.capitaldex.exchange.png?alt=media&#x26;token=ae527b99-19f0-49a1-be35-2acaa45b8387" alt="" width="563"><figcaption></figcaption></figure>

* Connect the wallet and select a wallet provider (e.g. Polkadot{.js}).
* Choose the account which you wish to use for staking.
* Enter the amount to unstake and sign the transaction in Polkadot{.js} wallet (**Unstake CGT** button). The minimum stake amount (100 CGT) must always be in the stake for staking to be active. You can unstake for an amount over 100 CGT, or unstake the entire staked amount.
* After completing the unstake transaction: the unstaked amount is blocked for **7 days**. The list of unstaked amounts is displayed in **Locked Amounts**. After 7 days you can **Withdraw** the unstaked amount and receive CGT to your wallet.
* Locked unstaked amount can be used to add to stake without waiting for the 7-day unlock period.

## Staking via Polkadot JS Apps

In the Polkadot JS Apps (<https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fparachain.curioinvest.com%2F#/explorer>) go to `Developer -> Extrinsics -> Submission`  and call `parachainStaking -> joinDelegators`

<figure><img src="https://3995532231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV1VXXsfM-OSWA2aH3X%2Fuploads%2FJaketSTtSRLbaN4b9Wak%2Fimage.png?alt=media&#x26;token=d132221f-c9c3-40d9-ba80-7d29d0604352" alt="" width="563"><figcaption></figcaption></figure>

1. Select the Curio Parachain address you want to delegate from as the extrinsic submitter (*using the selected account* field)
2. Select the appropriate extrinsic: `parachainStaking -> joinDelegators`
3. Select the `Id` option (the *MultiAddress (LookupSource) field*)
4. Select the collator account (the *Id: AccountId* field). You can see the collator accounts here: go to `Developer -> Chain state -> Storage`, then `parachainStaking -> topCandidates`. You need to select any collator account from the first 150 addresses from the list.

<figure><img src="https://3995532231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV1VXXsfM-OSWA2aH3X%2Fuploads%2FSxjy7xabH4Jt7TZwtVFF%2FScreenshot%202023-10-16%20at%2020.06.46.png?alt=media&#x26;token=66a5f6d3-7cc0-4373-841d-f6a853c89036" alt="" width="563"><figcaption></figcaption></figure>

5. Choose the desired stake amount. The minimum amount for delegation is **100 CGT**.
6. Sign and submit the extrinsic (the *Submit Transaction* button). The stake amount will be displayed in your wallet balance as Locked after successful transaction execution.

{% hint style="info" %}
**Info**

A recent change in the blockchain metadata resulted in a change in the UI regarding how balances are shown. In the current version of PolkadotJS Apps, specifying 1 CGT requires adding 18 trailing `0`s. So, for instance, 1 CGT needs to be written as `1,000,000,000,000,000,000`, while 10,000 CGT would be written as `10,000,000,000,000,000,000,000`.
{% endhint %}

### Happy Path <a href="#happy-path" id="happy-path"></a>

If your chosen collator candidate has at least one empty slot in their delegation pool (out of **150 maximum slots** at the time of writing), your delegation will be successful and you immediately start receiving rewards each time the collator you delegated produces a block.

{% hint style="info" %}
**Info**

If your chosen collator fails to produce blocks, neither the collator itself nor their delegators receive rewards. This can happen if the collator has connectivity issues or are not building blocks fast enough.
{% endhint %}

### Unhappy Path <a href="#unhappy-path" id="unhappy-path"></a>

If the delegation pool of your chosen collator candidate is full, you may still delegate to them if you stake more than the current lowest delegator stake of that pool. When that happens,

* The kicked delegator will be replaced by the delegator with a higher delegation (you) immediately
* The kicked delegator's stake is prepared for unstaking as if they revoked the delegation
* A delegator needs to wait **7 days** (in block time) to be able to unlock the stake. Please note that it can take longer in real time as the block times assume a constant block time of 12s, which is not guaranteed.

{% hint style="info" %}
**Info**

For now, an account can only delegate to one collator at any time! Moreover, you can only (re-) delegate, e.g., call `parachainStaking -> {joinDelegators, delegateAnotherCandidate}`, once per staking round.
{% endhint %}

## Check Your Delegation Stake

In the Polkadot JS Apps (<https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fparachain.curioinvest.com%2F#/explorer>) go to `Developer -> Chain state -> Storage`. Then select `parachainStaking -> delegatorState`, select your delegation account and click `+`.

<figure><img src="https://3995532231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV1VXXsfM-OSWA2aH3X%2Fuploads%2F9rgMUrcpDFY7pwAs6LHK%2FScreenshot%202023-10-16%20at%2020.11.32.png?alt=media&#x26;token=0af8866e-59c2-4895-b8e5-5cee204d6f75" alt="" width="563"><figcaption></figcaption></figure>

## Adjust Your Delegation Stake

In the Polkadot JS Apps (<https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fparachain.curioinvest.com%2F#/explorer>) go to `Developer -> Extrinsics -> Submission`.&#x20;

A delegator can increase and decrease their stake by calling either `parachainStaking -> delegatorStakeMore(more)` or `parachainStaking -> delegatorStakeLess(less)`. Your adjustment becomes effective immediately! If you increase your stake, you will instantly receive higher rewards for any blocks produced by your collator; if you decreased your delegation amount, the reverse applies and you receive less rewards.

In the Polkadot JS Apps (<https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fparachain.curioinvest.com%2F#/explorer>) go to `Developer -> Extrinsics -> Submission`.

{% tabs %}
{% tab title="Stake more" %}

<figure><img src="https://3995532231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV1VXXsfM-OSWA2aH3X%2Fuploads%2FWe5Xwvgi3w3T9QBsu10L%2Fimage.png?alt=media&#x26;token=ecbeeafe-2b9d-44f6-baea-b4b78ec30641" alt=""><figcaption></figcaption></figure>

1. Select the Curio Parachain address you want to delegate from as the extrinsic submitter (*using the selected account* field)
2. Select the extrinsic: `parachainStaking -> delegatorStakeMore`
3. Choose the desired amount of stake that you want to add to your current stake. You can add up to your maximum available balance.
4. Sign and submit the extrinsic (the *Submit Transaction* button)
   {% endtab %}

{% tab title="Stake less" %}

<figure><img src="https://3995532231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV1VXXsfM-OSWA2aH3X%2Fuploads%2Fu25V0UmcwcJ1dgUZSOis%2Fimage.png?alt=media&#x26;token=62df5c6a-26f6-44b6-8ee4-a062c036fad3" alt=""><figcaption></figcaption></figure>

1. Select the Curio Parachain address you want to delegate from as the extrinsic submitter (*using the selected account* field)
2. Select the extrinsic: `parachainStaking -> delegatorStakeLess`
3. Choose the desired amount of stake that you want to remove from your current stake. You can reduce down to the minimum delegation amount (**100 CGT**), e.g., any value up to the difference of your current stake and the minimum will be accepted.
4. Sign and submit the extrinsic (the *Submit Transaction* button)
   {% endtab %}
   {% endtabs %}

{% hint style="danger" %}
**CAUTION**

You cannot adjust your stake if your Collator candidate is in the leaving state, e.g., they want to stop collating. However, you can still **remove** your delegation (see the guide *"How to unlock unstaked tokens"*).
{% endhint %}

## Leave the Set of Delegators

A Delegator can revoke their delegation by calling `parachainStaking -> leaveDelegators`. As a result, you won't receive any rewards immediately after the transaction is successfully executed.

* Your previously delegated amount will be prepared for unstaking.
* You need to wait **7 days** (in block time) before you can unlock your unstaked tokens, see the section **Unlock Unstaked** for more information.
* Exiting does not count towards the limit of “1 delegation per round”.

In the Polkadot JS Apps (<https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fparachain.curioinvest.com%2F#/explorer>) go to `Developer -> Extrinsics -> Submission`.

<figure><img src="https://3995532231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV1VXXsfM-OSWA2aH3X%2Fuploads%2FZ9jHqhi7MPhDMy1NWTAT%2Fimage.png?alt=media&#x26;token=c53555c4-7984-442d-a3f9-58d7e2f9c98f" alt=""><figcaption></figcaption></figure>

1. Select the Curio Parachain address you delegated from as the extrinsic submitter (*using the selected account* field)
2. Select the appropriate extrinsic: `parachainStaking -> leaveDelegators`.
3. Sign and submit the extrinsic (the *Submit Transaction* button)
