Skip to content
Business logic Audit finding Intermediate

Minimum Reward-Per-Hour Validation Applied to Gross Instead of Net Amount

The contract checks a campaign's minimum reward-per-hour against the gross amount before protocol fees are deducted, and never re-checks after fees are subtracted. A campaign creator could therefore launch a campaign that passes the on-chain minimum check but actually pays recipients a lower net rate than required.

Merkl with blockace, felconsec and 13 others

Originally disclosed on Code4rena

Found by V12; also found by blockace, felconsec, Glitchunter, hezze, KINGWEST, lonelybones, LonelyWolfDemon, N0nce, nachin, odeili, Scout007, slavina, SpicyMeatball, th3_hybrid, and Valves

The contract’s minimum reward-per-hour check is applied to the campaign’s gross amount before deducting protocol fees. After the check passes, fees are subtracted, reducing the net tokens distributed per hour below the required minimum. Because there is no re-validation after fee deduction, campaigns can appear compliant on-chain while actually underpaying recipients.

Root cause

The code performs the minimum reward-per-hour validation against newCampaign.amount (gross) prior to computing and deducting fees. It never re-checks the threshold against the fee-adjusted (net) distribution amount.

Impact

Campaign creators can deploy campaigns that meet the on-chain minimum rate check but pay out at a lower rate than advertised. This undermines participant incentives, violates expected protocol guarantees, and can deceive users into accepting lower rewards.


The original report as published on Code4rena. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The minimum reward-per-hour threshold is validated against the gross campaign amount before fees are deducted, with no re-validation against the net amount.

Impact

Campaign creators could deploy campaigns that pass the on-chain minimum rate check but pay out at a lower rate than advertised, undermining participant incentives and protocol guarantees.

What the attacker needed

Ability to create a campaign

The fix

The minimum reward-per-hour check should be applied to the fee-adjusted net distribution amount, or re-validated after fees are deducted.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A smart contract is a program that runs on a blockchain and can hold and move funds. This one lets people create reward campaigns and enforces a minimum payout rate per hour, but it measures that rate before taking out the platform's fee, so the amount actually paid out can end up below the minimum. The check should be done on the amount left after fees.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More from Merkl

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.