# dDAFI Claiming

## Fragmented timeframes

As the weight accumulates, when a user decides to claim their rewards, we can extract it from the weight.

Where DPS = Distribute per second, US = User Stake, TS = Total Network Stake, UR = User Reward, and n = Time in seconds

$$
UR1 = (DPS1 \* US1 / TS1) + (DPS2 \* US1 / TS2) + (DPSn \* US1 / TSn)
$$

We can calculate the user reward within a timeframe, as a to b where b > a

Where n = 1 to a,&#x20;

$$
UR1 = US \* ∑DPSn / TSn
$$

$$
UR = US1 \* (DPS1 / TS1 + DPS2 / TS2 + DPSx / TSx)
$$

Where n = 1 to b,&#x20;

$$
UR2 = US \* ∑DPSn / TSn
$$

When a user initiates an action in the network, where a = n > 1, we calculate n from 1 to a. When the same user initiates an action again, we calculate from 1 to b, and subtract the previous 1 to a. This can be represented as :

$$
UR = US \* ∑ DPSn / TSn, (n = 1 : ∞)
$$

A user's reward between timeframe a and b can be calculated accurately as:

$$
URab = UR2 - UR1 = (US \* ∑DPSn / TSn)
$$

where n = 1 to b, and

$$

* (US \* ∑DPSn / TSn)
  $$

where n = 1 to a

$$
\= US \* ((∑DPSn / TSn, (n=1:b)) - (∑DPSn / TSn,  (n = 1:a)))
$$


---

# 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.dafiprotocol.io/guides/ddafi-claiming.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.
