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.
Handle
shw
Vulnerability details
Impact
According to the comments of the
FundsTransferred
event inSwappableYieldSource
, theamount
parameter is the number of funds transferred. However, in the_transferFunds
function, the actual transferred amount iscurrentBalance
, 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 tocurrentBalance
.