Lucene search

K
code423n4Code4renaCODE423N4:2022-02-REDACTED-CARTEL-FINDINGS-ISSUES-109
HistoryFeb 17, 2022 - 12:00 a.m.

Arbitrary fees

2022-02-1700:00:00
Code4rena
github.com
3

Lines of code
<https://github.com/code-423n4/2022-02-redacted-cartel/blob/main/contracts/BribeVault.sol#L23&gt;

Vulnerability details

Impact

Function transferBribes has a parameter named fees. Essentially, it allows an admin to apply any arbitrary fees and send them to the feeRecipient. This makes no sense because admins can manipulate the amounts however they want with 0 restrictions.

I see that there is an unused variable named fee that I expected to be applied when calculating fee amounts:

    uint256 public fee; // 5000 = 0.5%

This variable has no effect, even though I expected it to be used instead of these arbitrary fees.

Recommended Mitigation Steps

I think transferBribes should not accept arbitrary fees, but calculate and apply them based on this fee state variable, especially considering that according to the diagram the initiator of transferBribes can be not only multisig but team members also.


The text was updated successfully, but these errors were encountered:

All reactions