Skip to content
Business logic Audit finding Intermediate

Fees can be any amount

The transferBribes function uses a user-supplied fee amount instead of the stored fee state variable, so the fee can be set to any value. A malicious admin could set an incorrect fee, undermining the fairness of bribe distribution.

danb Follow

Originally disclosed on Code4rena

Submitted by danb, also found by pauliax

In transferBribes, the fees are user input, rather than calculation using fee (state var). Currently, fee is unused: BribeVault.sol#L23.

Therefore the fees amounts might be wrong.

Alex the Entreprenerd (judge) decreased severity to Medium and commented:

I don’t believe M-14 mentions validation of fees, as such will mark this finding as unique.

Ultimately the function trusts the Admin input instead of using the storage variable, giving less security guarantees as to the fairness of the Distribution of the Bribes.

Because this is contingent on a malicious admin, I believe medium severity to be appropriate.


The original report as published on Code4rena, by danb. 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

Likely the function fails to validate the user-provided fee against the stored fee variable, allowing arbitrary fee amounts.

Impact

A malicious admin could set incorrect fees, reducing the fairness of bribe distribution.

What the attacker needed

Malicious admin

The fix

The function should use the stored fee state variable instead of accepting user input for the fee.

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.

In a smart contract, a fee is a small amount taken from a transaction. Here, the function that transfers bribes lets the caller specify the fee directly instead of using a fixed fee stored in the contract. This means someone with special permissions could set the fee to anything, which might be unfair.

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 by danb

View all

12 more disclosed reports, best first.

More from Redacted Cartel contest

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.