# Staking

### Why Stake CDX?

Staking CDX unlocks exclusive benefits that enhance your Cod3x experience:

| Benefit              | Description                                     |
| -------------------- | ----------------------------------------------- |
| **Credit Discounts** | Save 10-30% on credit purchases                 |
| **USDC Yield**       | Earn your share of platform profit              |
| **Premium Access**   | Unlock battlepass tracks and exclusive features |

> **Note:** Discounts require **active staking** — simply holding CDX doesn't unlock benefits.

***

### Staking Tiers

| Tier      | Stake Requirement | Discount | Key Perks                               |
| --------- | ----------------- | -------- | --------------------------------------- |
| **PRO**   | 5,000 CDX         | 10%      | Premium battlepass                      |
| **ELITE** | 40,000 CDX        | 20%      | Exclusive Templates, All PRO benefits   |
| **WHALE** | 150,000 CDX       | 30%      | White-glove service, All ELITE benefits |

**Discount Stacking:** Tier discounts can stack with promotional bonuses up to a maximum of 40%.

***

### How Staking Works (Reliquary)

CDX staking utilizes the **Reliquary system**, a time-weighted staking mechanism that rewards long-term commitment. Your stake is represented by a **Relic** — an ERC-721 NFT that tracks your position and maturity.

#### Core Concepts

| Term           | Definition                                         |
| -------------- | -------------------------------------------------- |
| **Relic**      | ERC-721 NFT representing your staking position     |
| **Maturity**   | Age of your position, measured in time             |
| **Multiplier** | Reward boost based on maturity (up to 1.5x at max) |

| Parameter          | Value                                                                       |
| ------------------ | --------------------------------------------------------------------------- |
| Minimum Stake      | 5,000 CDX                                                                   |
| Maturity Period    | 1 year to max maturity                                                      |
| Max Maturity Bonus | 50% yield boost (1.5x multiplier)                                           |
| Maturity Curve     | <p>Polynomial Plateau (S-curve) <br>slow start → acceleration → plateau</p> |
| Position Format    | ERC-721 NFT (tradeable OTC/marketplace)                                     |

#### How Maturity Works

Your stake's maturity determines your yield bonus:

| Age       | Multiplier | Bonus             |
| --------- | ---------- | ----------------- |
| New Relic | 1.0x       | 0%                |
| 3 months  | \~1.1x     | \~10%             |
| 6 months  | \~1.3x     | \~30%             |
| 12 months | 1.5x       | **50% (maximum)** |

The **Polynomial Plateau curve** creates optimal incentives:

| Phase      | Behavior             | Purpose                   |
| ---------- | -------------------- | ------------------------- |
| **Early**  | Slow maturity growth | Encourages commitment     |
| **Middle** | Accelerated growth   | Rewards persistence       |
| **Late**   | Plateau at maximum   | Ensures fair distribution |

### Multiple Positions

You can hold **multiple Relics**, each maturing independently:

| Capability           | Benefit                                      |
| -------------------- | -------------------------------------------- |
| Separate strategies  | Manage different time horizons               |
| Preserve maturity    | New deposits don't dilute existing positions |
| Selective liquidity  | Sell one position, keep others               |
| Independent tracking | Each Relic has its own maturity clock        |

### Advanced Relic Operations

The tokenized nature of Reliquary enables powerful position management:

#### Split

| Action   | Divide a Relic into two separate positions              |
| -------- | ------------------------------------------------------- |
| Maturity | **Preserved** on both resulting Relics                  |
| Use Case | Sell part of your position without sacrificing maturity |
| Penalty  | None — underlying liquidity remains committed           |

#### Shift

| Action   | Transfer tokens from one Relic to another     |
| -------- | --------------------------------------------- |
| Maturity | Recalculated on receiving Relic               |
| Use Case | Consolidate capital from an acquired position |
| Penalty  | None — liquidity remains committed            |

#### Merge

| Action   | Combine two Relics into one               |
| -------- | ----------------------------------------- |
| Process  | Source Relic burned, target updated       |
| Maturity | Recalculated based on combined position   |
| Use Case | Simplify management of multiple positions |

> **Key Insight:** Since underlying liquidity remains committed during these operations, you're never penalized for managing your positions.

#### Position NFT

Your staking position is represented as a tradeable NFT, allowing you to:

* Transfer positions without unstaking
* Sell mature positions on secondary markets
* Maintain yield while exploring liquidity options

***

### Withdrawal Process

#### Cooldown Period

| Parameter             | Details                               |
| --------------------- | ------------------------------------- |
| Cooldown Duration     | 7 days                                |
| Yield During Cooldown | Yes                                   |
| Tier Status           | Maintained until withdrawal completes |
| Cancel Option         | Anytime — maturity preserved          |

#### How to Withdraw

1. **Initiate Withdrawal:** Start the 7-day cooldown
2. **Wait Period:** You are still earning yield and access all staking benefits during this period.
3. **Complete or Cancel:** Either claim tokens or cancel to preserve maturity

> **Tip:** If market conditions change, you can cancel withdrawal anytime without losing accumulated maturity.

***

### Yield Distribution

#### Source

All yield comes from **platform profit** after operating costs are covered.

#### Two Reward Types

Reliquary supports two reward mechanisms:

| Type                 | Description                                            | Use Case                 |
| -------------------- | ------------------------------------------------------ | ------------------------ |
| **Infinite Rewards** | Emission-rate based, tokens owed regardless of funding |                          |
| **Finite Rewards**   | Reserve-based, stops when empty                        | USDC profit distribution |

CDX staking uses **Finite Rewards** for USDC yield — distribution continues only while the reserve has funds.

#### Schedule

| Parameter               | Value                       |
| ----------------------- | --------------------------- |
| Profit Determination    | Every 14-day cycle          |
| Distribution Cycle      | Rolling 28-day distribution |
| Refill Frequency        | Every 14 days               |
| Distribution Method     | Per-block (continuous)      |
| Minimum Claim Threshold | None                        |
| Claiming                | Anytime                     |
| Currency                | USDC                        |

#### Yield Calculation Formula

```
Your Yield Share = (Your Stake × Your Maturity Multiplier) / Total Weighted Stake × Yield Pool
```

Where **Total Weighted Stake** = Sum of all (Stake × Maturity Multiplier) across all Relics in the pool.

***

### Emergency Features

Reliquary includes safety mechanisms:

| Feature                   | Description                                                   |
| ------------------------- | ------------------------------------------------------------- |
| **Pause Functionality**   | Admin can pause the system in emergencies                     |
| **Emergency Withdrawals** | Users can retrieve funds without standard reward distribution |
| **Immutable Codebase**    | Core contract logic cannot be changed post-deployment         |

***

### Best Practices

| Practice                   | Rationale                                                        |
| -------------------------- | ---------------------------------------------------------------- |
| **Start Early**            | The sooner you stake, the sooner maturity builds                 |
| **Stake and Forget**       | Avoid unnecessary withdrawals to maximize maturity               |
| **Use Split Wisely**       | If you need partial liquidity, split rather than full withdrawal |
| **Hold Multiple Relics**   | New deposits can create new Relics, preserving existing maturity |
| **Monitor Yield Flip**     | At $1+ CDX price, yield allocation increases to 70%              |
| **Consider Selling Relic** | If you need liquidity, selling the NFT preserves value for buyer |
