$PINA & rewards
Rewards distributor
Merkle-claimable reward rounds: how a round is created, verified and claimed.
RewardsDistributor (0x123508dFCe1Bd5Dc5e25f627030F6a7C754429b1) pays out Points seasons, weekly prizes, creator grants and any future fee rebate. It is deliberately simple:
- Funded up front.
createRound(token, root, total, expiresAt, label)pulls the fulltotaloftokenfrom the caller before the root is published, so every listed allocation is backed by a balance the contract already holds. - Merkle claims. A leaf is
keccak256(abi.encodePacked(index, account, amount)); pairs are hashed sorted (OpenZeppelinMerkleProof).claim(roundId, index, account, amount, proof)transfersamounttoaccountand marks the index claimed; anyone may submit a valid claim on a wallet's behalf. - Expiry and sweep. After
expiresAt, unclaimed balances can be swept to the treasury (sweep, owner only, and only once the round has expired). Before expiry the owner cannot touch a round's funds.
Claiming
The Points page lists your open allocations with the proof ready; one transaction per round. Integrators: fetch the round's leaf file (published with every round), build the proof, call claim. isClaimed(roundId, index) says whether a leaf was already paid.
Verifying a round
RoundCreated(roundId, token, root, total, expiresAt, label)on Blockscout gives the root and the funded total.- Recompute the root from the published leaf file and compare.
- Sum the leaves: it must equal
total.
Owner powers
The owner (protocol) can create rounds, sweep expired rounds and change the treasury address. It cannot alter a live round's root, pull funds before expiry, or block a valid claim. See Security model.