Discussion: A General Purpose Rewards Framework

We have developed a general purpose framework for distributing rewards that need to be calculated off-chain called Merkle Rewards.


This framework can be used for distributing the $OP onboarding rewards as well as any other type of rewards that users earn over time.


Develop a rewards framework that allows rewards to be calculated off-chain and periodically updated on-chain by a trusted party (such as the Community Multisig). After enough rewards accrue or the reward campaign ends, the trusted party can revoke ownership of the MerkleRewards contract, and rewards can continue to be claimed trustlessly.


Rewards are periodically calculated off-chain using a predetermined method, and a new Merkle tree containing the total rewards earned by each account is produced. The calculated rewards amount for each account should strictly increase or stay the same with time.

Each period, the owner calls the setMerkleRoot function, and the new Merkle root and total rewards amount are set. This function also collects any additional rewards tokens from the owner. Accounts can then withdraw the difference between their previously withdrawn amount and their total rewards earned.

$OP Fee Refunds

The library for calculating an 80% refund for users’ Optimism onboarding fees, including gas fees, AMM LP fees, and bonder fees can be found here:


Refunds will be limited to 20 $OP per transfer. There is no limit on the number of refunds an individual account can be eligible for.


Every two weeks, the fee calculation process will automatically run and post the rewards Merkle root and total amount to the Hop governance forum. Community Multisig signers as well as community members can confirm the rewards amount posted on the forum by following the instructions in the post and then updating the MerkleRewards contract with the new root and rewards amount.

The start of the $OP onboarding rewards program will be announced when all supporting infrastructure is in place.