Skip to main content
Staking

Understanding Staking: How it works and why it matters

Updated yesterday

Overview

Our staking feature allows users to lock up SPL tokens in a Stake Pool to earn rewards over a specified period. By staking tokens, users can grow their holdings based on the staking duration and yield set by the pool creator. The longer users stake, the higher the yield they earn, making it an attractive option for those looking to maximize their returns.

Key features include:

  • Flexible Staking Options: Users can choose how long to stake their tokens, with configurable minimum and maximum staking durations.

  • Yield-Based Rewards: Rewards are calculated based on the duration of the stake, offering higher returns for longer commitments.

  • Reward Pools: Each Stake Pool can have one or more Reward Pools, distributing rewards to stakers in a controlled and customizable manner.

  • Permissionless Setup: Depending on the configuration, anyone can add and top up Reward Pools, or this can be limited to the Stake Pool creator.

Our staking system is designed for simplicity, offering users an intuitive way to earn passive income through SPL token staking while providing flexibility and control over their staking strategy.


Why Stake?

  • For creators, staking serves as a powerful tool to incentivize user participation while creating a sustainable token economy. By offering staking opportunities, creators can effectively manage token distribution, encourage long-term commitment, and create a token sink that keeps the overall supply in check. Here’s how it works:

    • Engage Your Community: Staking pools offer an attractive way for users to lock in their tokens for extended periods, rewarding them with higher yields. This increases user engagement, encouraging them to stay invested in your ecosystem.

    • Control Token Circulation: By staking, tokens are temporarily removed from circulation, acting as a "sink" and reducing the circulating supply. This can help stabilize the token economy by managing inflation and boosting token value.

    • Flexible Reward Distribution: As the creator, you have full control over the staking parameters. You can configure yield, staking durations, and the distribution of rewards, ensuring that rewards are distributed in a way that aligns with your goals.

    • Boost Loyalty and Retention: Staking encourages users to commit their tokens for longer durations, deepening their involvement in your project and reducing short-term volatility.

  • Earn Rewards: Staking generates passive income through rewards based on the staked amount and duration.


Stake Pool

Creating a Stake Pool

Users can create a Stake Pool with these configurable settings:

  • Mint of the Stake Pool: Defines the token used in the pool.

  • Minimum and Maximum Staking Duration: Sets how long tokens can be staked.

  • Minimum and Maximum Stake Yield: Determines the yield or reward multiplier based on the staking duration.

  • Permissionless option : Controls whether anyone can add a Reward Pool or only the Stake Pool creator.

Staking Process

Anyone can stake tokens in a Stake Pool with the following steps:

  • Stake Tokens: Users select a staking duration, which must fall within the pool’s min/max range.

    • The yield of the stake is calculated based on the selected duration - the longer the stake, the higher the yield.

    • Users receive a Stake Receipt that stores:

      • The timestamp of the stake.

      • The amount of tokens staked.

      • Information about the stake owner.

    • Users also receive Stake Tokens, representing the yield-adjusted amount - the longer they stake, the more tokens they earn.

  • Each stake generates a new entry, which tracks:

    • Total tokens staked in the pool.

    • Proper reward distribution.


Unstaking

Users can unstake their tokens after the staking duration has passed. Upon unstaking:

  • Stake Tokens are burned.

  • The stake entry is flagged as closed.


Reward Pool

Creating a Reward Pool

A Reward Pool distributes rewards to stakers. Depending on the permissionless option:

  • Either the Stake Pool creator or anyone can add a Reward Pool.

  • Multiple Reward Pools can be created within a single Stake Pool for flexible rewards.

Reward Pool Configuration:

  • Reward Period: The interval for distributing rewards.

  • Reward Amount: The total rewards distributed per period for each staked token (adjusted for yield).

  • Permissionless option: Controls who can top up the pool - anyone or just the creator.

Top-Up Process

A Reward Pool can be topped up to ensure it has sufficient funds. Top-up actions require a dedicated instruction to ensure fees are handled properly. Here’s how it works:

  • The permissionless option determines who can top up the Reward Pool.

  • Fees are deducted from the top-up amount through:

    1. Reward Pool Creation: Fees are fetched from the fee manager and remain static for the pool’s lifetime.

    2. Top-Up: Fees are dynamically fetched based on the wallet performing the top-up.


Claiming Rewards

Users can claim rewards based on how long they have staked their tokens. The process works as follows:

  • Users must initialize a Reward Entry for each Reward Pool, which tracks claimed rewards and the last claim date.

  • For each Stake Entry, a corresponding Reward Entry is created in every Reward Pool.

When claiming rewards:

  • The system calculates the amount based on the time passed since the last claim (or the stake time if no previous claims exist).

  • Rewards are proportional to the number of reward periods that have passed

Did this answer your question?