# Stake Formulas and Math

Don't worry, you don't need to know or understand any of this math if you are a regular ape! Just know that everything is algorithmically programmed and built to last!&#x20;

You can easily see what you will earn by using the [calculator on the website](https://maxx.finance/#calc)!

<table><thead><tr><th width="176.53943883623788"></th><th></th></tr></thead><tbody><tr><td>Minimum Stake Duration</td><td>7 Days</td></tr><tr><td>Maximum Stake Duration</td><td>3333 Days</td></tr><tr><td>Share Factor (SF)</td><td>1.000</td></tr><tr><td>Share Factor Reduction Rate (SFR)</td><td>1/3333 per day until 0.000</td></tr><tr><td>Magic Number (MN)</td><td>1111</td></tr><tr><td>Base Inflation Rate</td><td>0.18185 (18.185%) Fixed</td></tr><tr><td>Stake - Basic Shares</td><td>amount / (2-SF)</td></tr><tr><td>Stake - Bigger Pays Better Bonus %</td><td>0-10% from 0 to 20,000,000 MAXX (stake_amount / 2,000,000) capped at 10</td></tr><tr><td>Stake - Bigger Pays Better Shares</td><td>BasicShares * (bpb_bonus / 100);</td></tr><tr><td>Stake - Longer Pays Better</td><td>(BasicShares + BPB Shares) * (Duration - 1) / MN</td></tr><tr><td>Stake - Total Shares</td><td>Basic Shares + BPB Shares + LPB Shares</td></tr><tr><td>Stake - Full Duration Interest</td><td>(stake_total_shares * (stake_duration/365)) * base_inflation</td></tr><tr><td>Stake - Daily Interest</td><td>(stake_total_shares * (stake_duration/365)) * base_inflation / stake_duration</td></tr><tr><td>Stake - Annual Interest</td><td>((stake_total_shares * (stake_duration/365)) * base_inflation) / stake_duration*365</td></tr><tr><td>Stake - Annual Interest APR %</td><td>Annual Interest / Principal Amount</td></tr><tr><td>Stake - Late Withdraw Penalty rate</td><td>100/365 (0.273972602739726) % per day after 14 day grace period</td></tr></tbody></table>

### Example

With the above formulas, we can calculate exactly how many shares a user will receive at staking, and how much interest they will earn over the period.

**A user stakes 10,000,000 MAXX for 3333 days, whilst the SF is 1.000:**

**​Basic Shares** = amount / (2-SF)\
`10,000,000 / (2-1) =`` `**`10,000,000`**

**BPB Bonus** = (stake\_amount / 2,000,000) capped at 10%\
`10,000,000 / (2,000,000) =`` `**`5%`**

​**BPB Shares** = BasicShares \* (bpb\_bonus / 100);\
`10,000,000 * (5/100) =`` `**`500,000`**

**LPB Shares** = (BasicShares + BPB Shares) \* (Duration - 1) / MN\
`(10,000,000 + 500,000) * (3333 - 1) / 1111 =`` `**`31,490,549.0549`**

&#x20;**Total Shares** = Basic Shares + BPB Shares + LPB Shares\
`​10,000,000 + 500,000 + 31,490,549.0549 =`` `**`41,990,549.0549`**

**Full Duration Interest** \
(stake\_total\_shares \* (stake\_duration/365)) \* base\_inflation\
`​(41,990,549.0549 * (3333/365)) *` 0.18185 `=`**`69,728,015.9589 MAXX`**

**Annual Interest** \
((stake\_total\_shares \* (stake\_duration/365)) \* base\_inflation) / stake\_duration\*365\
`((41,990,549.0549 * (3333/365)) * 0.18185) / 3333 * 365 =`**`7,635,981.3456 MAXX`**

**Annual Interest APY%**\
Annual Interest / Principal Amount\
`7,635,981.3456 / 10,000,000 = 0.76359813456 /`**`76.36% APR`**

\
**With this, we can see that the user will earn a fixed 76.36% APR for his 3333 Day Stake of 10m MAXX.  He will earn a total of 69,728,016 MAXX, making the total withdrawable amount 79,728,016  MAXX**


---

# 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.maxx.finance/features/staking-maxx/stake-formulas-and-math.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.
