In the FRAG-22 architecture, rewards are distributed based on each user’s contribution—determined by the amount of tokens held and the duration these tokens are held. The processes of Settlement and Claiming manage accurate reward distribution, ensuring fairness and precision.
Settlement is a periodic process where newly accumulated rewards in the Fund Reward Account are proportionally allocated to all contributors based on their accumulated contribution points during a defined time interval. Each settlement results in a Settlement Block, which records the reward details, enabling users to claim rewards later.Why Settle?
Ensures rewards are fairly allocated according to token holding duration and amount.
Provides transparency and auditability.
Maintains manageable on-chain storage for reward data.
Each settlement generates a Settlement Block, structured with the following key data:
Reward Amount: Total amount of reward tokens to distribute in the settlement period.
Start and End Contribution Snapshot: Captures global contributions at the beginning and end of the settlement period, defining the exact interval.
Timestamp: Time when the settlement block was created.
These settlement blocks are stored in a circular buffer with a fixed length of 64, meaning the system retains only the 64 most recent settlement records. When a new block is created beyond this limit, it overwrites the oldest block.
Settlement blocks are managed as a circular buffer (FIFO - First In, First Out).
Oldest settlement blocks are overwritten by the newest ones after exceeding 64 settlements.
Users who fail to claim rewards within 64 blocks (e.g., 64 days, if settlements are daily) permanently lose access to those rewards. These lost rewards typically revert to the treasury.