# Staking Rewards

{% hint style="info" %}
**Staking is live on both Mainnet and Testnet**

* **Mainnet:** Liquid staking via [Onyx App](https://app.onyx.org) using the [StakedXCNDirect](/reference/contracts.md) contract
* **Testnet:** Liquid staking via [Slingshot Yield](/defi/slingshot/yield.md) using the stXCN contract

The APY rates and reward calculations below reflect testnet configuration. Mainnet staking uses the same mechanics.
{% endhint %}

## What Are Staking Rewards?

Any XCN holder can **stake their tokens** and earn passive rewards. No technical knowledge or infrastructure required.

## Key Benefits

| Feature                  | Details                            |
| ------------------------ | ---------------------------------- |
| **No Minimum**           | Stake any amount of XCN            |
| **No Lock-up**           | Withdraw anytime, fully liquid     |
| **No Slashing**          | Your XCN is never at risk          |
| **Automatic Collection** | Rewards paid on account activity   |
| **Daily Accrual**        | Earnings calculated every 24 hours |

***

## How Staking Works

### Step-by-Step Flow

```
+-----------------------------------------------------------------------+
|                       STAKING REWARD FLOW                              |
+-----------------------------------------------------------------------+

     Your Account                            Validator Node
     ============                            ==============

+------------------------+          +----------------------------------+
|                        |          |                                  |
|  Balance: 100,000 XCN  | =======> |  Your stake adds to              |
|                        |   STAKE  |  validator's consensus weight    |
|  Staked To: Validator 1|          |                                  |
|                        |          |  Higher weight = more influence  |
|                        |          |  in consensus decisions          |
+------------------------+          +----------------------------------+
         |
         | Rewards accrue at UTC midnight
         v
+------------------------+
|  Staking Reward Fund   |
|  ====================  |          +----------------------------------+
|                        | =======> |  When you send/receive XCN:      |
|  Pays rewards to all   | COLLECT  |  - Pending rewards collected     |
|  staked accounts       |          |  - Added to your balance         |
|                        |          |  - Counter resets to zero        |
+------------------------+          +----------------------------------+
```

### Key Mechanics

1. **Whole Balance Stakes** - Your entire account balance is staked (no partial staking)
2. **One Validator Per Account** - Each account stakes to exactly one validator
3. **Automatic Rewards** - No manual claiming needed
4. **365-Day Window** - Uncollected rewards older than 365 days are forfeited

***

## Reward Formula

```
Daily Reward (XCN) = Your Balance × Validator Reward Rate / 100,000,000

Where:
  - Your Balance = Total XCN in your staked account
  - Validator Reward Rate = Rate specific to the validator (in tiny units)
  - 100,000,000 = Conversion factor from tiny units to XCN
```

### Calculation Example

**Staking 100,000 XCN to Validator 1 (rate: \~55,000):**

```
Daily Reward = 100,000 × 55,000 / 100,000,000
             = 55 XCN/day

Monthly Reward = 55 × 30 = 1,650 XCN/month
Yearly Reward  = 55 × 365 = 20,075 XCN/year
APY            = ~20%
```

***

## Current Reward Rates (Testnet)

| Validator | Reward Rate | APY   | 100K XCN Daily | 100K XCN Yearly |
| --------- | ----------- | ----- | -------------- | --------------- |
| 0         | \~55,000    | \~20% | \~55 XCN       | \~20,075 XCN    |
| 1         | \~55,000    | \~20% | \~55 XCN       | \~20,075 XCN    |
| 2         | \~55,000    | \~20% | \~55 XCN       | \~20,075 XCN    |
| 3         | \~55,000    | \~20% | \~55 XCN       | \~20,075 XCN    |
| 4         | \~55,000    | \~20% | \~55 XCN       | \~20,075 XCN    |

{% hint style="info" %}
**Tip:** Check current rates on the [Validator Dashboard](https://validators.testnet.goliath.net/) before staking. Rates update daily at UTC midnight.
{% endhint %}

***

## Profit Examples

| Stake Amount   | APY (\~20%) | Annual Reward   |
| -------------- | ----------- | --------------- |
| 10,000 XCN     | \~20%       | \~2,000 XCN     |
| 100,000 XCN    | \~20%       | \~20,000 XCN    |
| 500,000 XCN    | \~20%       | \~100,000 XCN   |
| 1,000,000 XCN  | \~20%       | \~200,000 XCN   |
| 10,000,000 XCN | \~20%       | \~2,000,000 XCN |

***

## Reward Collection

### When Are Rewards Collected?

Your pending rewards are **automatically collected** when:

* You **send** XCN from your account
* You **receive** XCN to your account
* You **change** which validator you stake to
* You **update** your staking preferences

### Important: 365-Day Limit

{% hint style="danger" %}
**Transact at least once per year!**

If you don't have any account activity for over 365 days, uncollected rewards older than 365 staking periods are **permanently forfeited**.

A simple transfer to yourself counts as activity and will collect all pending rewards.
{% endhint %}

***

## Why Different Rates?

Reward rates depend on **total stake per validator**:

* **Less crowded validators** = Higher reward rate per XCN
* **More crowded validators** = Lower reward rate (same pool, more stakers)

This creates a natural incentive to distribute stake across validators, improving network decentralization and security.

### Rate Calculation

When too much stake concentrates on one validator, rewards get **diluted**:

```
If Validator A has 10M XCN staked and Validator B has 1M XCN staked:
  - Same reward pool per validator
  - Validator A: pool split among 10M XCN = lower rate per XCN
  - Validator B: pool split among 1M XCN = higher rate per XCN
```

**Strategy:** Check rates and consider less crowded validators for better returns.

***

## How to Stake

### On Goliath Mainnet

Use the [**Onyx App**](https://app.onyx.org) liquid staking module:

1. Connect wallet to Goliath Mainnet (Chain ID 327)
2. Open the staking module on [app.onyx.org](https://app.onyx.org)
3. Enter XCN amount and submit stake
4. Rewards accrue automatically
5. Unstake when ready to receive XCN back

**Contract:** [StakedXCNDirect](/reference/contracts.md) at `0xA553a603e2f84fEa6c1fc225E0945FE176C72F74`

### On Goliath Testnet

Use [**Slingshot Yield**](/defi/slingshot/yield.md) or the native SDK:

* **Slingshot Yield:** Liquid staking via stXCN at [slingshot.goliath.net/#/yield](https://slingshot.goliath.net/#/yield)
* **SDK:** Submit an `AccountUpdate` transaction with `stakedNodeId` using the Goliath SDK (JavaScript, Java, or Go)

### Multiple Validators

To stake to multiple validators:

1. Create separate accounts
2. Fund each account with desired amount
3. Stake each account to a different validator

***

## Frequently Asked Questions

**Q: Do I need to claim rewards manually?**

A: No. Rewards are collected automatically whenever your account has activity.

**Q: What happens if my validator goes offline?**

A: Your XCN is never at risk. There is no slashing. You simply don't earn rewards during downtime, but no funds are lost.

**Q: Can I partially unstake?**

A: No. Your entire balance is always staked. To reduce stake, transfer XCN to a different account.

**Q: Is there a minimum stake?**

A: No minimum. Any amount of XCN can be staked to earn rewards.

**Q: Can I lose my staked XCN?**

A: No. There is no slashing mechanism. Your XCN remains fully under your control and can be transferred anytime.

**Q: How long until I earn rewards?**

A: You must be staked for at least one full staking period (24 hours from UTC midnight) before rewards begin accruing.

***

## Monitoring Your Rewards

Use the [**Validator Dashboard**](/rewards/validator-dashboard.md) to track:

* **Account Page** → View pending rewards and staking status
* **Validators Page** → Compare reward rates across validators
* **Staking Page** → Use the rewards calculator
* **Export** → Download reward history in CSV or JSON

***

## Related Documentation

* [**Onyx App (Mainnet)**](/defi/onyx-app.md) - Mainnet liquid staking via Onyx App
* [**Rewards Overview**](/rewards/overview.md) - Compare staking vs validator rewards
* [**Validator Rewards**](/rewards/validator-rewards.md) - Rewards for node operators
* [**Validator Dashboard**](/rewards/validator-dashboard.md) - Monitor your rewards
* [**Smart Contract Addresses**](/reference/contracts.md) - Full contract registry
* [**XCN Token**](/tokenomics/xcn-token.md) - Token economics


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.goliath.net/rewards/staking-rewards.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
