First Flight #18: T-Swap

First Flight #18
Beginner FriendlyDeFiFoundry
100 EXP
View results
Submission Details
Severity: low
Valid

`TSwapPool::_addLiquidityMintAndTransfer` passing wrong param to `LiquidityAdded` event

Summary

The LiquidityAdded event in the _addLiquidityMintAndTransfer function emits parameters in the wrong order, causing potential confusion and incorrect data logging.

Vulnerability Details

The _addLiquidityMintAndTransfer function emits the LiquidityAdded event with poolTokensDeposited and wethToDeposit parameters swapped. This discrepancy leads to incorrect event data, which can mislead users and developers relying on these events for accurate information.

Impact

Incorrect event parameter order can cause confusion for users monitoring these events. This can lead to incorrect assumptions about the state of the contract and misinterpretations of the event data.

Tools Used

  • Manual review

Recommendations

+ emit LiquidityAdded(msg.sender, wethToDeposit, poolTokensToDeposit);
- emit LiquidityAdded(msg.sender, poolTokensToDeposit, wethToDeposit);
Updates

Appeal created

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

`LiquidityAdded` event has parameters out of order

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.