You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/network/fsp/2-rewarding.mdx
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,13 @@ We refer to the [Weights and Signing](/network/fsp/weights-and-signing) page for
75
75
76
76
### Calculation process
77
77
78
+
:::tip[Calculating or verifying rewards data]
79
+
80
+
All rewards scripts are publicly available, and data providers are encouraged to calculate verify the rewards data for themselves.
81
+
The data for the rewards is published on [flare-foundation/fsp-rewards](https://github.com/flare-foundation/fsp-rewards) and the instructions for how to calculate them are [here](https://github.com/flare-foundation/FTSO-Scaling/blob/main/scripts/rewards/README.md#public-reward-data).
82
+
83
+
:::
84
+
78
85
Each sub-protocol is responsible for calculating its **partial reward claims** for each reward epoch by:
79
86
80
87
1.**Data Input**: Determining the relevant data sources (indexers).
5.**Recipient address:** The address that will receive the rewards (`recipient`).
37
38
6.**Reward distribution data access:** You must be able to fetch per-epoch `reward-distribution-data-tuples.json` from the official distribution locations on GitHub or GitLab.
38
39
7.**Wrap option:**`wrapRewards` is `true` unless explicitly set to `false`.
39
40
41
+
### Recommended: Configure a claim executor and claim recipient
42
+
43
+
For improved security, set up a **claim executor** (an account authorized to claim on your behalf) and an **allowed claim recipient** (an address permitted to receive rewards).
44
+
45
+
1. Create and fund a new account with sufficient native tokens
46
+
2. Authorize this account as a claim executor, which can be done using the [`setClaimExecutors`](/network/solidity-reference/IClaimSetupManager#setclaimexecutors) method.
47
+
- For **DIRECT (0)** claims: Use your signing policy account to authorize the executor.
48
+
- For **FEE (1)** claims: Use your identity account to authorize the executor.
49
+
3. Setup a **Claim Recipient** account, this can be done through the [`setAllowedClaimRecipient`](/network/solidity-reference/IClaimSetupManager#setallowedclaimrecipients) method.
50
+
51
+
```ts
52
+
import { Contract } from"ethers";
53
+
54
+
const claimSetupManager =newContract(
55
+
process.env.CLAIM_SETUP_MANAGER_ADDRESS!, // from contract registry
56
+
CLAIM_SETUP_MANAGER_ABI,
57
+
beneficiarySigner, // IMPORTANT: signer must be the signing policy address (`DIRECT`) or identity address (`FEE`)
58
+
);
59
+
60
+
// 1) Authorize the executor that will submit RewardManager.claim(...)
All rewards scripts are publicly available, and you are encouraged to calculate verify the rewards data yourself.
147
+
The data for the rewards is published on [flare-foundation/fsp-rewards](https://github.com/flare-foundation/fsp-rewards) and the instructions for how to calculate them are [here](https://github.com/flare-foundation/FTSO-Scaling/blob/main/scripts/rewards/README.md#public-reward-data).
148
+
149
+
:::
150
+
115
151
For each signed epoch, fetch `reward-distribution-data-tuples.json`.
116
152
You fetch **one JSON file per epoch**, using the epoch id in the path.
117
153
If the JSON cannot be fetched or validated, you cannot build a valid Merkle proof for that epoch.
@@ -203,7 +239,7 @@ Each matching entry provides:
203
239
-`merkleProof`: array of hex strings
204
240
- tuple `[id, address, sum, claimType]`
205
241
206
-
:::note
242
+
:::info
207
243
208
244
You do **not** submit the JSON onchain.
209
245
You only extract your `merkleProof` and tuple from `rewardClaims` to build the `claims[]` argument passed to `RewardManager.claim(...)`.
<summary>T0. Authorization failure: executor not allowed or recipient not allowlisted</summary>
335
+
336
+
- If the signer sending `RewardManager.claim(...)` is not the beneficiary, ensure it is configured as a **claim executor** via `setClaimExecutors(...)`.
337
+
- If the transaction reverts when using a `recipient` address, ensure the recipient is allowlisted via `setAllowedClaimRecipients(...)`.
338
+
- Ensure you set these using the correct controlling account:
339
+
-**DIRECT**: signing policy account
340
+
-**FEE**: identity account
341
+
342
+
</details>
343
+
297
344
<details>
298
345
<summary>T1. No matching tuple found for my address</summary>
0 commit comments