code-423n4 / 2021-07-pooltogether-findings

0 stars 0 forks source link

Incorrect parameter of `FundsTransferred` event #48

Closed code423n4 closed 3 years ago

code423n4 commented 3 years ago

Handle

shw

Vulnerability details

Impact

According to the comments of the FundsTransferred event in SwappableYieldSource, the amount parameter is the number of funds transferred. However, in the _transferFunds function, the actual transferred amount is currentBalance, which should be provided as the event parameter instead.

Proof of Concept

Referenced code: SwappableYieldSource.sol#L288

Recommended Mitigation Steps

Change _amount at line 288 to currentBalance.

PierrickGT commented 3 years ago

Duplicate of https://github.com/code-423n4/2021-07-pooltogether-findings/issues/28