# Earning

### Calculation Parameters

| Parameter                                         | Type | Description                                                                                                                               |
| ------------------------------------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| Lv                                                | u16  | Level                                                                                                                                     |
| R                                                 | u64  | On-chain Random Seed                                                                                                                      |
| E                                                 | u16  | Current efficiency value                                                                                                                  |
| S                                                 | u16  | Current skill value                                                                                                                       |
| L                                                 | u16  | Current luck value                                                                                                                        |
| D                                                 | u16  | Current durability value                                                                                                                  |
| $$E\_{base}$$                                     | u16  | Basic efficiency value                                                                                                                    |
| <p><span class="math">S\_{base}</span></p><p></p> | u16  | Basic skill value                                                                                                                         |
| <p><span class="math">L\_{base}</span></p><p></p> | u16  | Basic luck value                                                                                                                          |
| $$D\_{base}$$                                     | u16  | Basic durability value                                                                                                                    |
| $$J\_{max}$$                                      | u16  | Maximum number of jumps                                                                                                                   |
| $$J\_{avg}$$                                      | u16  | Average jumps per minute                                                                                                                  |
| G                                                 | u16  | After upgrading, the growth points obtained, refer to **Upgrade Growth Points**                                                           |
| T                                                 | u16  | Trip rope times                                                                                                                           |
| N                                                 | u16  | Energy value, `Jump Rope` consumes 1 point of energy for every 30 seconds of exercise, and no energy is consumed for less than 30 seconds |
| K                                                 | u16  | Assessment frequency constant, system value = 120 times/minute.                                                                           |
| FUN                                               | u128 | Reward tokens with a decimal precision of 12. 1 FUN=10^12 unit                                                                            |

### **Calculate random luck score**

$$L\_{Rnd} = R \pmod L + 1$$

The actual luck score is calculated via on-chain random number.

### **Compute the skill score for this training**

$$S' = \lfloor \frac {S\*J\_{max}}{(T+1)\*K} \rfloor$$

$$\Delta S = R \pmod {\vert S - S'\vert}$$

$$
S''= \begin{cases} S-\Delta S, & S' \lt S \ S+\Delta S, & S' \ge S \end{cases}
$$

In a training session, the maximum number of consecutive jumps and the number of trip ropes are the key factors affecting skill scores. The trainer's mastery of jumping rope skills will double the skill scores.

### **Calculate Jump Frequency Factor**

$$
F= \begin{cases} 0, & J\_{avg} \notin \[80, 400] \ 1, & J\_{avg} \in \[80, 400] \end{cases}
$$

Valid frequency factor: the value is 1 within the range of 80 times/minute to 400 times/minute, otherwise it is 0.

### **FUN reward base**

$$B = \frac {FUN} {10}$$

### **FUN reward formula**

$$FUN\_{reward} = (E+S'' + 2 \* L\_{rnd} ) \* N \* F \* B$$


---

# 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://polketio.gitbook.io/toearnfun/guide/gamefi-system/earning.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.
