# Staking Earn

*Staking Earn allows users to stake WE Tokens and earn rewards in the form of additional WE Tokens over a fixed period at a specific annual percentage rate (APR). Each pool has minimum and maximum staking amounts and may also have lock-in terms, which restrict the withdrawal of staked tokens for a certain period.*

### Staking Reward Calculation Method

In the **Webuy Staking Earn** program, rewards for stakers are calculated based on three primary factors: the amount they have staked, the duration of the stake, and the Annual Percentage Rate (APR) of the pool in which they have staked their tokens. This section outlines the exact method used to calculate the rewards for participants.

#### Formula

The rewards for each participant are calculated using the following formula:

**Staked Amount**: The number of tokens that the participant has staked in the pool.**Staking Period**: The time, in seconds, that the tokens have been staked in the pool.**Pool APR**: The annual percentage rate assigned to the pool, representing the yearly interest rate without compounding.**Annual Base**: The total number of seconds in a year, used to annualize the staking period.**APR Percentage Base**: A constant used to represent the APR accurately, allowing for decimal precision.

#### Detailed Explanation

**Staking Period Calculation**: The period for which rewards are calculated is determined from the moment tokens are staked or from the last update time to either the current time or the pool's end time, whichever is earlier.**Dynamic Reward Calculation**: The calculation accounts for the actual time the tokens have been staked, ensuring that rewards are proportional to both the duration of the stake and the amount staked.**APR Representation**: The APR is expressed in a way where`100`

equals a`1%`

annual interest rate. This allows the formula to accommodate various interest rates with precision.**Reward Accumulation**: The calculated rewards are added to any previously unclaimed rewards, providing the total available rewards for the participant.

#### Example

To provide a clearer understanding, let's consider an example where a user stakes 300 tokens in a pool with a `10%`

APR for 30 days:

The

**Staked Amount**is`300 tokens`

.The

**Staking Period**is`30 days`

(2,592,000 seconds).The

**Pool APR**is`10%`

or`1000`

in the formula representation.Given an

**Annual Base**of`31,536,000 seconds`

(365 days) and an**APR Percentage Base**of`10000`

, the reward calculation would be as follows:

This method ensures that rewards are calculated fairly and transparently, allowing participants to estimate their potential earnings based on the duration and amount of their stake.

**Key Points to Remember:**

Staking Earn typically involves locking your WE tokens for a

**set period**. You cannot access your staked tokens until the staking period ends.

Last updated