Lucene search

K
code423n4Code4renaCODE423N4:2021-10-MOCHI-FINDINGS-ISSUES-55
HistoryOct 25, 2021 - 12:00 a.m.

Referrer can drain ReferralFeePoolV0

2021-10-2500:00:00
Code4rena
github.com
5

Handle

gzeon

Vulnerability details

Impact

function claimRewardAsMochi in ReferralFeePoolV0.sol did not reduce user reward balance, allowing referrer to claim the same reward repeatedly and thus draining the fee pool.

#Proof of Concept
L28-47 did not reduce user reward balance

Tools Used

None

Recommended Mitigation Steps

Add the following lines

> rewards -= reward[msg.sender];
reward[msg.sender] = 0;


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

All reactions