---
eip: 1973
label: ERC-1973
title: Scalable Rewards
status: Stagnant
type: Standards Track
category: ERC
created: 2019-04-01
official: https://eips.ethereum.org/EIPS/eip-1973
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-1973.md
canonical: https://eips.huatuo.xyz/eip-1973/
lang: en
tldr: "A pattern for minting a fixed number of tokens per block and splitting them equally among a changing set of participants, using cumulative 'masks' so each person pulls their own reward in O(1) gas."
tags: [token, rewards, distribution, pull-payment]
---

# ERC-1973: Scalable Rewards

> A mintable token rewards interface that mints 'n' tokens per block which are distributed equally among the 'm' participants in the DAPP's ecosystem.

**TL;DR:** A pattern for minting a fixed number of tokens per block and splitting them equally among a changing set of participants, using cumulative 'masks' so each person pulls their own reward in O(1) gas.

## What problem does it solve?

Paying rewards to many participants by looping over them ("push") does not scale: with thousands of addresses the loop exceeds the block gas limit, and whoever runs it pays all the gas. ERC-1973 proposes a **pull** design where each participant claims their own share whenever they like, and the cost of each operation does not depend on how many participants exist.

Rewards are minted per block, so early participants (when the set is small) earn a larger share each, and the per-person amount shrinks as the network grows.

## How it works

The design is a running-sum accumulator:

- **TPP (tokens per participant):** each time new tokens are minted, `TPP = minted / totalParticipants`.
- **roundMask:** the running total of every TPP so far. It answers "how much would one participant have earned since the beginning?"
- **participantMask:** a snapshot of `roundMask` taken when a participant joins or last withdrew.
- **Reward owed:** `roundMask - participantMask`. After withdrawing, the participant's mask is reset to the current `roundMask`.

Minting is rate-limited: `tokensPerBlock` sets the issuance, and `blockFreezeInterval` is how many blocks must pass before another mint. When a mint runs, it issues `(currentBlock - lastMintedBlock) * tokensPerBlock` tokens to the contract. Any participant can trigger it.

Worked example from the spec: 65 blocks pass with 2 participants, so `roundMask` grows by 32.5 tokens. Two more join, 101 blocks pass with 4 participants, adding 25.25. A participant who never withdrew is owed `32.5 + 25.25 = 57.75`.

## Sample code

The accounting core, simplified to modern Solidity (no access control or mint scheduling):

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

contract RewardMasks {
    uint256 public roundMask;           // cumulative tokens-per-participant
    uint256 public totalParticipants;
    mapping(address => uint256) public participantMask;

    function _join(address p) internal {
        totalParticipants += 1;
        participantMask[p] = roundMask;   // start earning from now
    }

    function _distribute(uint256 minted) internal {
        require(totalParticipants > 0, "no participants");
        roundMask += minted / totalParticipants;
    }

    function _claim(address p) internal returns (uint256 owed) {
        owed = roundMask - participantMask[p];
        participantMask[p] = roundMask;
        // transfer `owed` tokens to p
    }
}
```

## Things to know

- Status is **Stagnant**, with no finished reference implementation (the spec's test cases and implementation are marked WIP).
- The spec's sample contract has gaps: integer division by `totalParticipants` loses precision (real implementations scale by e.g. `1e18`), `removeMinters` does not settle the leaving participant's rewards, and `withdraw` returns no value. Do not deploy it as-is.
- The same accumulator idea is widely used in staking and liquidity-mining contracts, usually weighted by stake rather than one equal share per participant.
- Who counts as a "participant" is entirely up to the deployer; in the sample, adding participants is unrestricted.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-1973
